AVI to GIF?
August 8, 2006 7:22 AM   Subscribe

AVI to GIF. It can't be so difficult, can it?

I know it can be done. Evidence is all around me. So tell me, if you know ... without resorting to questionable software from unknown sources -- all of which seem to want $29.95, how would you go about making an animated GIF from a portion of an AVI?

Note: I have Adobe ImageReady CS (which should do the trick), but when I import frames from an AVI, all of the resultant frames are empty and white. I'm guessing this is a codec issue. For certain AVI files, special codecs (Xvid, etc.) are required, so how do I tell IR to use them?

Previous Similar Posts: Here and Here.
posted by grabbingsand to Computers & Internet (10 answers total) 3 users marked this as a favorite
 
What OS? mplayer on linux can do this easypeasy: well, a single animated gif, or a stack of jpegs or pngs or whatever (not a stack of gifs, but I'm guessing that the image file format is less important).

mplayer file.avi -vo jpeg

options (from the man page):
Output each frame into a JPEG file in the current directory. Each file takes the frame number padded with leading zeros as
name.
[no]progressive
Specify standard or progressive JPEG (default: noprogressive).
[no]baseline
Specify use of baseline or not (default: baseline).
optimize=<0 -100>
optimization factor (default: 100)
smooth=<0 -100>
smooth factor (default: 0)
quality=<0 -100>
quality factor (default: 75)
outdir=
Specify the directory to save the JPEG files to (default: ./).
subdirs= Create numbered subdirectories with the specified prefix to save the files in instead of the current directory.
maxfiles=
Maximum number of files to be saved per subdirectory. Must be equal to or larger than 1 (default: 1000).

Looks like mplayer is available for OSX, too:
mplayer for OSX.
posted by handee at 7:31 AM on August 8, 2006 [1 favorite]


Pretty sure ImageMagick has a tool for this; probably convert. You might want to use VirtualDub to clip out the part you care about.

Vdub *might* be able to export as AGIF, but I don't think so.
posted by baylink at 7:32 AM on August 8, 2006


Virtual dub doesnt export as animated gif, at least not the version I have. When I do this I usually use premiere or something similar and then tweak in ImageReady.

Using cheap tools I just tried Total Video Converter which I found from MetaFilter as a way to convert youtube flv files to avi or mov. It will accept almost any format and export almost any format including animated gifs. Its got a free download so you can try and see if it will let you do that without registering, I have a registered copy and actually use it all the time.
posted by skrike at 8:02 AM on August 8, 2006


Sorry, misread your question - you want an animated gif rather than a stack of gifs. mplayer again:

mplayer video.avi -vo gif89a:15.0:test.gif

The 15.0 is the frame rate.
posted by handee at 8:06 AM on August 8, 2006


Animation Shop which is bundled with Paint Shop Pro (or at least used to be) will open avi's. You then re-save as a gif.
posted by fire&wings at 8:23 AM on August 8, 2006


If you don't want anything new, and you've got Flash, It can do what you want. Sorta a silly use of Flash, but I've successfully done it many a time.
posted by potch at 8:29 AM on August 8, 2006


Oh yeah, how to do it... Import the file, pick up just the frames you need, and export movie to a gif. The settings and framerate are in your control, too.
posted by potch at 8:31 AM on August 8, 2006


my first step would be to re-encode the clip with virtualdub into a known "good" codec and then go back to imageready. I'm assuming that it's not too long if you're making a gif out of it, should it should be quite quick.
posted by Mayor Curley at 10:49 AM on August 8, 2006


QuickTime Pro will do this very easily as well, but of course you need to pay for it.
posted by anildash at 3:53 PM on August 8, 2006


Just to warn you, the result won't be very good. GIF is inherently an 8-bit format, so all the frames have to use the same palette of 256 colors, which usually means they'll be dithered up the wazoo.

It also means that they have to be cast into that palette all at the same time, so that the palette can be optimized.

If I were doing this, I'd grab the individual frames as 24-bit images, and then I'd be using JASC Animation Shop 3.
posted by Steven C. Den Beste at 4:01 PM on August 8, 2006


« Older Insert Clever Name Here   |   Get my whites back to whiter than white! Newer »
This thread is closed to new comments.