wiki:Create a thumbnail image every X seconds of the video

-frames option

Output a single frame from the video into an image file:

ffmpeg -i input.flv -ss 00:00:14.435 -frames:v 1 out.png

This example will seek to the position of 0h:0m:14sec:435msec and output one frame (-frames:v 1) from that position into a PNG file.

fps video filter

Output one image every second, named out1.png, out2.png, out3.png, etc.

ffmpeg -i input.flv -vf fps=1 out%d.png

Output one image every minute, named img001.jpg, img002.jpg, img003.jpg, etc. The %03d dictates that the ordinal number of each output image will be formatted using 3 digits.

ffmpeg -i myvideo.avi -vf fps=1/60 img%03d.jpg

Output one image every ten minutes:

ffmpeg -i test.flv -vf fps=1/600 thumb%04d.bmp

select video filter

Output one image for every I-frame:

ffmpeg -i input.flv -vf "select='eq(pict_type,PICT_TYPE_I)'" -vsync vfr thumb%04d.png

thumbnail video filter

Pick one of the most representative frames in sequences of 100 consecutive frames:

ffmpeg -i input.flv -vf thumbnail=n=100 thumb%04d.png

Also see

Last modified 16 months ago Last modified on Jul 21, 2023, 1:47:14 PM
Note: See TracWiki for help on using the wiki.