Search code examples
videoffmpeggifanimated-gif

Animated gif to avi on linux


Is there any way to convert an animated gif to a video format (e.g. .avi) on Linux?

I have already tried

ffmpeg -i thegif.gif thevideo.avi

but all I get is the first image of the video.


Solution

  • I can suggest combination of imagemagick and ffmpeg

    do this to extract each frame as png/jpeg

    $magick> convert 'images.gif[0]' image.png
    

    Do this to convert images to movie sequence

    ffmpeg -f image2 -i image%d.jpg video.mpg
    

    More help on commands

    http://www.imagemagick.org/script/command-line-processing.php

    http://www.catswhocode.com/blog/19-ffmpeg-commands-for-all-needs

    http://electron.mit.edu/~gsteele/ffmpeg/