I'm trying to use ffmpeg on a video to extract a list of specific frames, denoted by their frame numbers. So lets say I want to extract just one frame from 'test_video.mp4', frame number 150 to be exact. I can use the following command
ffmpeg -i test_video.mp4 -vf "select=gte(n\, 150)" -vframes 1 ~/test_image.jpg
[100, 110, 127, 270, 300]
ffmpeg -i in.mp4 -vf select='eq(n\,100)+eq(n\,184)+eq(n\,213)' -vsync 0 frames%d.jpg
FFmpeg is primarily a processor of timed video i.e. media with a cycle rate such as framerate or sample rate. It assumes that the output should be at the same rate as the source. If inadequate frames are supplied, it duplicates unless told not to. In this case,
-vsync 0 which, in this case, tells it to suppress duplication.