Thameera's MicroBlog

Just another WordPress.com blog. There's nothing special here.

Posts Tagged ‘video

Saving a video into a sequence of images

with 4 comments

I wanted to create a GIF out of a part of a video sequence. But how could one extract a sequence of images from a video? After some googling FFMPEG turned out to be the savior. Here’s a sample command for taking a series of snapshots out of a video using ffmpeg:

ffmpeg -ss 23 -i kids.mp4 -f image2 -vframes 50 a%2d.jpg

23 is the position in the video to start extracting images (in seconds). kids.mp4 is the input video file. image2 says that the output would be in JPEG format. 50 is the number of frames to capture. a%2d.jpg is the format of the output file, i.e. in this case the files would be saved as a01.jpg, a02.jpg, etc.

The next step would be to convert the sequence of images to a GIF, which can be easily done using GIMP.

Written by thameera

November 2, 2010 at 10:01 am

Posted in Uncategorized

Tagged with , , , , , ,