How can I build video thumbnails sheet using pipe (ffmpeg + imagemagick) on windows without using temporary files?
Here is an update version of this post I wrote.
The script bellow creates a folder named .\thumbnails and store in it all video thumbnails, with the same name of the video file.
Fully configurable! No temporary files used! (uses pipe!)
Requires: ffmpeg and 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
for /f "usebackq delims=" %%f in (`dir /b %filetypes%`) do (
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"
)
)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With