GIF to FLV software on GNU/Linux (or cross-platform)

4

1

Do you know how to convert an animated GIF (only two pics in loop) to FLV or AVI?

I didn't search for a Microsoft alternative that maybe could run with WINE, because I really prefer a native one; also a java version will be fine.

dag729

Posted 2010-01-31T17:37:11.100

Reputation: 1 894

So guys, I wish I could give the bounty to all of you! I found the right way to achieve what I was trying to do by mixing your commands.

The result is "convert input.gif -coalesce 'frame%02d.png'" and "ffmpeg -r 1 -i 'frame%02d.png' output.flv". (I gave a +1 to all of you, but for the bounty...I really don't know!) Thanks again to everyone that helped me so far, you are really great! – dag729 – 2010-02-12T02:23:25.290

You should pick one randomly. :) – Iain – 2010-02-14T14:00:55.233

Maybe I should answer to myself with the right code, and then give to me the bounty! :D But I suppose that will go to the guy with more votes, instead. – dag729 – 2010-02-14T22:25:38.847

From the FAQ: "The highest voted answer created after the bounty started with at least 2 upvotes will be automatically accepted. Half the bounty will be awarded to the owner of that answer." --- Why the bounty went to JohnT and not to WhiteQuark, since I didn't decided myself? – dag729 – 2010-02-15T20:43:41.227

Answers

5

ffmpeg should be able to do this all by itself:

ffmpeg -f gif -i infile.gif outfile.flv

If you prefer a GUI tool, Format Factory can do this, and will run under WINE.

alt text

No need to worry, it's available in English!

John T

Posted 2010-01-31T17:37:11.100

Reputation: 149 037

No luck even with that command...I've tried with different gifs – dag729 – 2010-02-09T17:12:28.150

@dag729 What about FormatFactory? – John T – 2010-02-11T00:46:12.170

6

Try doing this in console:

convert image.gif 'frame%02d.png'
ffmpeg -r RATE -i 'frame%02d.png' movie.flv

Replace RATE with needed framerate, e.g. 2 for 2 frames per second.

You'll need two packages: imagemagick and ffmpeg.

whitequark

Posted 2010-01-31T17:37:11.100

Reputation: 14 146

1+1, but can't ffmpeg do this in one shot? – DaveParillo – 2010-01-31T20:09:08.583

It only translates one frame of gif, and I wasn't able to find any options regarding. – whitequark – 2010-01-31T20:21:01.350

It doesn't did the trick...all I get is a kind 0f 19:6 (yes, not 16:9) video where you cannot see anything! :D I'm still searching. Thank you for the "convert" advice: I have it but I didn't remember that ImageMagick was that featured! – dag729 – 2010-02-02T16:20:44.900

Try doing mencoder "mf://frame*.png" -mf fps=RATE -o output.flv -ovc lavc -lavcopts vcodec=flv instead. – whitequark – 2010-02-02T19:20:06.610

same output... :( – dag729 – 2010-02-04T13:31:12.910

1

Try this with ImageMagick and ffmpeg :

convert original.gif -coalesce out.gif
ffmpeg -f gif -i out.gif result.flv

Optimizing the gif with ImageMagick before converting to flv is done to resolve transparency problems.

harrymc

Posted 2010-01-31T17:37:11.100

Reputation: 306 093