windows - How to build video thumbnails sheet using pipe (ffmpeg + imagemagick)? -
how can build video thumbnails sheet using pipe (ffmpeg + imagemagick) on windows without using temporary files?
update:
here update version of post wrote.
the script bellow creates folder named .\thumbnails
, store in video thumbnails, same name of video file.
fully configurable! no temporary files used! (uses pipe!)
requires: ffmpeg , imagemagick.
set impath=c:\programs\imagemagick set folder=c:\my videos set frame=320x180 set tile=10x1 set vframes=10 set fps=1/20 rem 1/60 -> 1 shot every 60s set filesize=300 rem max file size in kb set filetypes=*.mp4 pushd "%folder%" if not exist thumbnails md thumbnails /f "usebackq delims=" %%f in (`dir /b %filetypes%`) ( if not exist "thumbnails\%%~nf.jpg" ( ffmpeg.exe -threads 2 -y -i "%%f" -an -qscale:v 1 -vf fps=%fps% -vframes %vframes% -f image2pipe -vcodec ppm - ^ | %impath%\convert - -resize %frame% -background transparent -gravity center -extent %frame% -sharpen 1x2 -quality 100%% miff:- ^ | %impath%\montage - -tile %tile% -geometry %frame% -background black -quality 100%% -define jpeg:extent=%filesize%kb "thumbnails\%%~nf.jpg" ) )
Comments
Post a Comment