1. AVI to GIF converter for Windows

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.

new topic     » topic index » view message » categorize

2. Re: AVI to GIF converter for Windows

mic_ said...

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.

new topic     » goto parent     » topic index » view message » categorize

3. Re: AVI to GIF converter for Windows

Lone_EverGreen_Ranger said...

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.

new topic     » goto parent     » topic index » view message » categorize

4. Re: AVI to GIF converter for Windows

mic_ said...

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.

new topic     » goto parent     » topic index » view message » categorize

5. Re: AVI to GIF converter for Windows

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. sad

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

new topic     » goto parent     » topic index » view message » categorize

6. Re: AVI to GIF converter for Windows

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

new topic     » goto parent     » topic index » view message » categorize

7. Re: AVI to GIF converter for Windows

ghaberek said...

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).

new topic     » goto parent     » topic index » view message » categorize

8. Re: AVI to GIF converter for Windows

mm....as for me I use VidGIF

new topic     » goto parent     » topic index » view message » categorize

9. Re: AVI to GIF converter for Windows

So interesting,but i prefer use Video Avatar.It's tool can convert video to gif.Also you can create animated avatar.Try)

new topic     » goto parent     » topic index » view message » categorize

10. Re: AVI to GIF converter for Windows

<delete>

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu