Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 959
john-jones Avatar asked Jul 09 '10 13:07

john-jones


People also ask

How do you make a GIF only loop once?

Open the Animated gif in Photoshop. Go to the Window tab and select timeline(if the timeline is not already open). At the bottom of the timeline panel, you will find an option, which says "Forever". Change that to "Once".


1 Answers

ffmpeg's gif input doesn't work too well. It's usually easier to unpack the gif frames with convert (from ImageMagick) and process these with ffmpeg:

convert some.gif some%05d.png   ffmpeg -i some%05d.png some.avi   rm some*.png 
like image 90
Nordic Mainframe Avatar answered Sep 29 '22 09:09

Nordic Mainframe