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

Converting MNG or GIF to video? [solved]

2 replies [Last post]
libervisco's picture
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?


libervisco's picture
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.


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

Here is a result: 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. Smiling

Once I know the process and have all the commands saved up handy this is actually not a bad way to do videos on GNU/Linux considering the alpha state of most freedomware video editors.

Also, for animations where something specific needs to be done it may actually be easier to do it this way than using a full application.


Comment viewing options