Thameera's MicroBlog

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

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 , , , , , ,

4 Responses

Subscribe to comments with RSS.

  1. Hey, that’s pretty neat.
    I’ve always wanted to know how to do it.

    Himal Kotelawala

    November 3, 2010 at 9:53 pm

  2. [...] Fuente | Thameera’s [...]

  3. Eh? Not a windows app? -__-

    Narada Thomas

    November 14, 2010 at 7:27 am


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.