Some useful ffmpeg commands
Extracting images from a video file using ffmpeg:
Extract single frame at 10th second (ffmpeg uses HH:MM:SS:sss format) of the video:
$ ffmpeg -i input.avi -r 1 -ss 00:00:10.000 -f image2 output_%05d.png
Extract a frame every 2 seconds of the video:
$ ffmepg -i input.avi -r 0.5 -f image2 output_%05d.png
Extract all frames from the input video:
$ ffmpeg -i input.avi -f image2 output_%05d.png
To combine images into a video file (avi container with HuffYUV encoding with 30 fps for this example).
One thing to not here is ffmpeg assumes the input frame rate is 25 by default and does not put all the frames inside the output … Continue Reading
