Apr 09

Convert video to a series of JPG stills with ffmpeg

Category: Linux   — Published by goeszen on April 9, 2012 at 12:47 pm

Here's how to convert a video to a series / sequence of jpeg images, effectively converting every still frame into a jpg, with numbering, using the magic of ffmpeg:

ffmpeg -i <input_video> -f image2 <output_name>%03d.jpg

a more verbose variant:

ffmpeg -i <input>.avi -r 1 -s WxH -f image2 <output>-%03d.jpeg

To create a video from a sequence of images (the other way round):

ffmpeg -f image2 -i foo-%03d.jpeg -r 12 -s WxH foo.avi

Leave a Reply

=