1. AVI to GIF converter for Windows
- Posted by mic_ Oct 14, 2009
- 2226 views
Quick link for people who don't like to read: http://jiggawatt.org/badc0de/avi2gif-1.zip
The other day I wanted to create a GIF anim from a short part of an AVI, so I started searching for a program that would do that for me. Most of the programs I could find were ones that cost money though, which I found odd because it seemed like a relatively easy thing to do. Now, surely there must be some free programs like this but I didn't have the patience to go through all the search results.
So yesterday I started writing a program for this myself, and now the first version is done. It's very minimalistic so far; it's a command line application and only has a few options, such as starting frame, length, playback delay etc. There's not a whole lot of error checking either.
Since it uses VFW for video decoding you need to have the necessary codecs installed for whatever AVI you want to convert. A possible improvement for the future might be to add support for AVS files using AVISynth, so that you can read MPEG files, as well as getting access to all the AVISynth filters.
I've submitted the program to the archive - in the meantime you can get it from the link at the top of this post.
2. Re: AVI to GIF converter for Windows
- Posted by Lone_EverGreen_Ranger Oct 14, 2009
- 2211 views
Quick link for people who don't like to read: http://jiggawatt.org/badc0de/avi2gif-1.zip
The other day I wanted to create a GIF anim from a short part of an AVI, so I started searching for a program that would do that for me. Most of the programs I could find were ones that cost money though, which I found odd because it seemed like a relatively easy thing to do. Now, surely there must be some free programs like this but I didn't have the patience to go through all the search results.
So yesterday I started writing a program for this myself, and now the first version is done. It's very minimalistic so far; it's a command line application and only has a few options, such as starting frame, length, playback delay etc. There's not a whole lot of error checking either.
Since it uses VFW for video decoding you need to have the necessary codecs installed for whatever AVI you want to convert. A possible improvement for the future might be to add support for AVS files using AVISynth, so that you can read MPEG files, as well as getting access to all the AVISynth filters.
I've submitted the program to the archive - in the meantime you can get it from the link at the top of this post.
Another improvment would to be to add a GUI, making it easier for noobs. But nice work. This will come in handy for quite a few people.
3. Re: AVI to GIF converter for Windows
- Posted by ssallen Oct 14, 2009
- 2149 views
Another improvment would to be to add a GUI, making it easier for noobs. But nice work. This will come in handy for quite a few people.
I concur, Mic makes the coolest s_!
The euphoria language devs too! :)
Steve A.
4. Re: AVI to GIF converter for Windows
- Posted by mic_ Oct 15, 2009
- 2132 views
A possible improvement for the future might be to add support for AVS files using AVISynth, so that you can read MPEG files, as well as getting access to all the AVISynth filters.
I just realized that AVISynth works automagically when you're using the VFW functions. So to be able to read an MPEG-1 video you'll just have to create an .avs file with the line
DirectShowSource("foo.mpeg")
and pass the .avs file as the input for avi2gif.exe and it should work as long as you've got AVISynth installed.
As for a GUI of some sort - yeah that could be nice, but I really don't like UI programming. Maybe some day.
5. Re: AVI to GIF converter for Windows
- Posted by ghaberek (admin) Oct 15, 2009
- 2126 views
I just finished a GUI in Win32Lib for this. However, neither the original command line program nor my GUI convert the AVI correctly. On line 136, aFrame is zero. I assume that's supposed to be a handle of some sort, but there is no check for it the value to be nonzero. I added a check for this to my GUI, so it never gets on to the actual transcoding.
aFrame = AVIStreamGetFrameOpen(aStream, {40, sAviInfo[6], sAviInfo[7], 1, 24, 0, 0, 0, 0, 0, 0})
Download: avi2gif-gui.zip (4 KB)
(You still need all the other DLLs from the original avi2gui.)
-Greg
6. Re: AVI to GIF converter for Windows
- Posted by ghaberek (admin) Oct 15, 2009
- 2138 views
Also, in the past I've used ffmpeg to covert movie files to GIF with great success. It supports just about every type of movie file in existence.
-Greg
7. Re: AVI to GIF converter for Windows
- Posted by mic_ Oct 16, 2009
- 2086 views
On line 136, aFrame is zero.
That means you either don't have the necessary codec installed, or that codec doesn't support decoding to 24-bit RGB. The example video that I included with the program uses DivX iirc.
Anyway, like I said in my previous post, passing .avs files to the program works if you've got AVISynth installed. So if you've also got FFDShow installed the DirectShowSource function in AVISynth should be able to decode pretty much anything (except MPEG2 maybe, but there's a plugin for that).
8. Re: AVI to GIF converter for Windows
- Posted by dure Dec 15, 2009
- 1953 views
mm....as for me I use VidGIF
9. Re: AVI to GIF converter for Windows
- Posted by John_black Jan 29, 2010
- 1792 views
So interesting,but i prefer use Video Avatar.It's tool can convert video to gif.Also you can create animated avatar.Try)