Skip to main content
Welcome guest. | Register | Login | Post

Converting MNG or GIF to video? [solved]

2 replies [Last post]
libervisco's picture
Offline
Joined: 2006-05-04

I hope I'm not asking for the impossible. In fact, I've seen some freeware non-freedomware which can do this sort of thing, but I'd like to do it on GNU/Linux. Basically, I have an animation in GIF and MNG and would like to convert this to a proper video like Theora (OGM) or ffmpeg (AVI, MPEG etc.) and such.

Is this anyhow possible? I've searched a bit and imagemagick has a convert command, but it seems to be able to convert only between image formats.

Perhaps ffmpeg has something for mng?

Thanks

libervisco's picture
Offline
Joined: 2006-05-04
Interesting how after hours

Interesting how after hours of searching last night I couldn't quite find the right solution and today I got it with one search query. I guess I just had to search for the right thing...

Anyway, here is the solution:

convert test.gif test%05d.jpg
ffmpeg -r 25 -i test%05d.jpg -y -an test.avi

The first is a command from the ImageMagick suite which converts every frame in a given GIF animation into a JPG file.

The second command takes those JPG's and stitches them into an AVI file. You can also use other extensions like .ogg which will make a nice OGG video. Smiling

With -r you can set the framerate to make the video slower or faster.

Yay!

libervisco's picture
Offline
Joined: 2006-05-04
Here is a result:

Here is a result: http://www.libervis.com/files/libervis_logo.ogg Smiling

So I now know how to create a GIF animation and convert it to video and add audio to it using only Inkscape, ImageMagick, ffmpeg and PiTiVi.