[FFmpeg-user] Extract N evenly spaced images from a video

Benjamin Black benblack86 at gmail.com
Wed Feb 18 01:00:19 CET 2015


Thanks Moritz/Carl. I’ve got something working using the select method and vsync:






ffmpeg -i example.mov -f image2 -vsync vfr -vf "select='not(mod(n,17)')" -vframes 10 preview-%d.jpeg




round(number of frames in video/number of frames wanted) = 168/10 = 17




I also added the vframes setting to limit the number of frames, because due to rounding we might sometimes generate one more frame. I feel like I have a lot more to learn :)


More information about the ffmpeg-user mailing list