Democratic Underground Latest Greatest Lobby Journals Search Options Help Login
Google

Does anyone in here know how to change a .avi into an animated .gif?

Printer-friendly format Printer-friendly format
Printer-friendly format Email this thread to a friend
Printer-friendly format Bookmark this thread
Home » Discuss » DU Groups » Computers & Internet » Open Source and Free Software Group Donate to DU
 
Occulus Donating Member (1000+ posts) Send PM | Profile | Ignore Mon Mar-17-08 05:32 PM
Original message
Does anyone in here know how to change a .avi into an animated .gif?
Edited on Mon Mar-17-08 05:59 PM by kgfnally
I have a 200 frame .avi file that I'd like to turn into an animated gif. I tried the method explained (poorly) by the GIMP Wiki for using the GIMP to do this (I have 200 .png images that I imported as layers and tried to export as an animated .gif) but it's far too choppy, and changing the delay from 100ms to 40ms as recommended didn't do anything at all.

Does anyone know how to do this properly in the GIMP? Thanks in advance!

edit: I should have said, I have both a 200 frame .avi and each frame saved as a .png image. I'm willing to accomplish this with either the one or the other.

another edit: Here's the image. See how choppy and slow it is? That's what I want to fix.

Refresh | 0 Recommendations Printer Friendly | Permalink | Reply | Top
qnr Donating Member (1000+ posts) Send PM | Profile | Ignore Mon Mar-17-08 10:11 PM
Response to Original message
1. it doesn't look /too/ choppy, but I can see how you'd like to touch it up
Edited on Mon Mar-17-08 10:34 PM by qnr
I just made a quick animated GIF from section of a tv episode downloaded from the Internet Archive.

I didn't do anything special to it to reduce the file size or anything, though I did change it to B&W and scaled it down to 200x120

First, I converted it to a .gif with mplayer:

$ mplayer atarist.avi -vo gif89a: output=file.gif:fps=30.0 -vf scale=200:120 -ss 15 -endpos 20 -saturation -100

(note that I put a space before "output" to avoid the smiley - you should remove that)

That gives me a five second clip starting at the 15 second mark of the .avi - the -saturation -100 made it black and white. The tv clip was full color, GIF only displays 256 colors, that's the reason I did this. As you have an already limited palette, you shouldn't have any problem.

I then loaded it into the Gimp and optimized it for Gif, and resaved it.

Printer Friendly | Permalink | Reply | Top
 
Occulus Donating Member (1000+ posts) Send PM | Profile | Ignore Mon Mar-17-08 11:03 PM
Response to Reply #1
2. Thanks! I'm assuming I can omit the scale switch if my .avi is already to scale?
Edited on Mon Mar-17-08 11:05 PM by kgfnally
And, if I want to start at the beginning of the .avi and end at the end, should I do a -ss 0 or and -endpos <whatever the end is>, or just remove them?

(I've never used mplayer to convert clips, only to play them.)

Also, I read in my searches for information about a linux utility called convert that's supposed to be able to do exactly what I'm trying to accomplish. Do you know anything about that?

edit: the original .avi I made is smooth as silk, as are the individual .png files when I play them back as an animation in blender. I don't know why the GIMP can't stitch the images together correctly...
Printer Friendly | Permalink | Reply | Top
 
qnr Donating Member (1000+ posts) Send PM | Profile | Ignore Mon Mar-17-08 11:22 PM
Response to Reply #2
3. right, they're all options. if it's the size you need you don't need to scale,
and I was just showing how to get a clip from a longer movie, you don't need either -ss or -endpos if you want the whole thing.

As far as the GIMP goes, it makes fine animations. My guess is that 40ms or whatever you used is slightly too long.
Printer Friendly | Permalink | Reply | Top
 
Occulus Donating Member (1000+ posts) Send PM | Profile | Ignore Mon Mar-17-08 11:34 PM
Response to Reply #3
4. That's the thing, I've tried changing the delay between frames when I export
and it does nothing at all. I read that I should be using the GIMP Animation Plugin (GAP), so I downloaded it, and although it adds a whole laundry list of options for animation work, it doesn't seem to help at all.

I should add, when I play the animation from within the GIMP, it plays at speed. It only slows down when I export to an animated .gif, and as I said, altering the delay between frames prior to export doesn't seem to accomplish anything. :shrug:

I'd really like to do it in the GIMP, because I'm lazy and I don't want to haul the whole thing over to my fedora account :D I guess I might not have any other options.

Being able to render directly to an animated gif would solve everything, but for some strange reason, that's not supported in blender. Maybe it'll be in version 2.50....
Printer Friendly | Permalink | Reply | Top
 
qnr Donating Member (1000+ posts) Send PM | Profile | Ignore Mon Mar-17-08 11:37 PM
Response to Reply #4
6. Actually, a dialog box should come up when you tell it to save as
Edited on Mon Mar-17-08 11:49 PM by qnr
a GIF animation. In that box, there will be something along the lines of Use <____> FPS for layers that don't have a time .... and then further down will be another one asking if you want to use that one to override all the layers, you'd say yes to that. That would be one quick way of changing the timing.

Edit: sounds like you say you tried that already and it didn't work.
Printer Friendly | Permalink | Reply | Top
 
Occulus Donating Member (1000+ posts) Send PM | Profile | Ignore Tue Mar-18-08 12:10 AM
Response to Reply #6
8. yeah- that setting has no effect, increased or decreased
which is very odd, because it's the standard, 'tutorialized' way of getting animations to play correctly.

I also tried it using .jpg images as the feedstock, and got the same- wrong- result.

Printer Friendly | Permalink | Reply | Top
 
qnr Donating Member (1000+ posts) Send PM | Profile | Ignore Mon Mar-17-08 11:39 PM
Response to Reply #4
7. Well, that mplayer line will convert it directly to an animated gif - but it
will be relatively large, which is why you're bringing it into the GIMP for optimization. It might also help to do two steps, first optimize for difference, and then optimize for GIF.
Printer Friendly | Permalink | Reply | Top
 
qnr Donating Member (1000+ posts) Send PM | Profile | Ignore Mon Mar-17-08 11:34 PM
Response to Reply #2
5. In reference to convert, you're probably thinking of the convert from the
imagemagick suite of tools. ImageMagick is exceptionally useful (others too, netpbm, for example). I'd say play with the mplayer/GIMP bit for a while and see what it can do for you, and then after you've accomplished what you want, explore the others. There are many fine tutorials online.
Printer Friendly | Permalink | Reply | Top
 
Occulus Donating Member (1000+ posts) Send PM | Profile | Ignore Tue Mar-18-08 12:12 AM
Response to Reply #5
9. I tried downloading imagemagick for windows
Edited on Tue Mar-18-08 12:13 AM by kgfnally
and all I got was a lousy image viewer.

Seriously. :D

However, if I can just 'yum imagemagick' and then 'convert ted.avi ted.gif' I'd be very very happy.

Nothing to lose- I'm gonna reboot and see what I can get done in linux.

Printer Friendly | Permalink | Reply | Top
 
qnr Donating Member (1000+ posts) Send PM | Profile | Ignore Tue Mar-18-08 12:16 AM
Response to Reply #9
10. OK, I wasn't paying close enough attention at first. I thought you were in Linux
until I saw your earlier Fedora comment. Give that mplayer bit a try in fedora, it should work fine for you.
Printer Friendly | Permalink | Reply | Top
 
Occulus Donating Member (1000+ posts) Send PM | Profile | Ignore Tue Mar-18-08 12:47 AM
Response to Reply #10
12. Well, here it is
Edited on Tue Mar-18-08 01:40 AM by kgfnally


Mplayer gave it a weird black line. I ran it through a filters -> animation -> optimize for GIF in GIMP before I uploaded it... is that what gave me the line, or did mplayer engage in some shenanigans?

edit: the color is a bit messed up, too.
Printer Friendly | Permalink | Reply | Top
 
qnr Donating Member (1000+ posts) Send PM | Profile | Ignore Tue Mar-18-08 12:18 AM
Response to Reply #9
11. thing about imagemagick is that it is a lot of little utilities that
you call individually. When you ran imagemagick it most likely fired up "display" - and you do get some options if you left or right click on an image, but it's certainly not the most efficient way of using it.
Printer Friendly | Permalink | Reply | Top
 
Gman Donating Member (1000+ posts) Send PM | Profile | Ignore Tue Apr-22-08 01:34 PM
Response to Original message
13. If you wanted that any smoother
you'd probably have to do a flash animation. The graphic is as smooth as you're going to get it as an animated gif, IHMO.
Printer Friendly | Permalink | Reply | Top
 
Occulus Donating Member (1000+ posts) Send PM | Profile | Ignore Mon Apr-28-08 01:14 PM
Response to Reply #13
14. It's exactly right in post #12, but for the background color and the black line on the right
I don't know why that happened, either, because the background is supposed to be stark white, and I didn't mess with the colors at all- at least, voluntarily.

(This should not be this hard; I see good, smooth animated gif images on the web all the time. I sure would like to know just what gives, here...)
Printer Friendly | Permalink | Reply | Top
 
DU AdBot (1000+ posts) Click to send private message to this author Click to view 
this author's profile Click to add 
this author to your buddy list Click to add 
this author to your Ignore list Sun Dec 22nd 2024, 08:52 AM
Response to Original message
Advertisements [?]
 Top

Home » Discuss » DU Groups » Computers & Internet » Open Source and Free Software Group Donate to DU

Powered by DCForum+ Version 1.1 Copyright 1997-2002 DCScripts.com
Software has been extensively modified by the DU administrators


Important Notices: By participating on this discussion board, visitors agree to abide by the rules outlined on our Rules page. Messages posted on the Democratic Underground Discussion Forums are the opinions of the individuals who post them, and do not necessarily represent the opinions of Democratic Underground, LLC.

Home  |  Discussion Forums  |  Journals |  Store  |  Donate

About DU  |  Contact Us  |  Privacy Policy

Got a message for Democratic Underground? Click here to send us a message.

© 2001 - 2011 Democratic Underground, LLC