Extract a thumbnail from a specific video frame

Viewed 27180

Given a specific frame I need to extract an image (a thumbnail) from a video using ffmpeg.

E.g. I can do:

ffmpeg -i test.mp4 -ss 00:01:14.35 -vframes 1 out2.png

I can extract an image from a specific time (00:01:14.35), but what I need is to extract an image from a specific frame.

3 Answers

To get to some specific frame you should use filter select. Command to extract frame 100 out of video should look like this:

 ffmpeg -i in_video.avi -vf "select=gte(n\,100)" -vframes 1 out_img.png

or just

-vf "select=eq(n\,100)" 100.png

the -vframes option could be omitted

Related