Utility for converting wmv (or avi) to animated gif

4

Possible Duplicate:
How can I get ffmpeg to convert a .mov to a .gif?

I'm looking for any console utility which can convert principally wmv files (or avi) to animated gif. Preferably the program would be a console application, because I'm going to call it within a C# or C++ program.

Note, it will be used on Windows only.

Oskar K.

Posted 2012-09-18T19:49:48.603

Reputation: 202

Question was closed 2012-09-18T20:49:33.083

1

FFmpeg will read almost anything, so whether it's MOV or WMV doesn't matter. Please note that Zeranoe hosts FFmpeg builds for Windows.

– slhck – 2012-09-18T20:50:28.590

Answers

5

FFmpeg can do this in Unix and Windows. You can download FFmpeg for Windows from here.

In the most simple case, the conversion would work as follows:

ffmpeg -i input.wmv output.gif

Vincent

Posted 2012-09-18T19:49:48.603

Reputation: 930

I found that converting it to AVI first and then running this command, results in a much better quality gif. From WMV to GIF was almost unwatchable. Luckily, converting to AVI first, is exactly the same command with the file extensions switched around accordingly – PandaWood – 2014-12-17T07:30:24.110

Do you exactly mean it can convert video to animated(!) gif ? – Oskar K. – 2012-09-18T20:54:39.170

That is what it claims it can do. See for example this website: http://www.catswhocode.com/blog/19-ffmpeg-commands-for-all-needs

– Vincent – 2012-09-18T20:57:36.993

Hm, it converts avi (not wmv) to animated gif. – Oskar K. – 2012-09-18T20:58:58.110

Are you sure (http://roundup.libav.org/issue1159)? What about first converting wmv to avi (using ffmpeg's -sameq parameter) and then to animated gif?

– Vincent – 2012-09-18T21:17:27.383

It's not good I think. It doesn't allow to convert wmv to animated gif directly, right? – Oskar K. – 2012-09-19T15:03:52.733

M0sthated, the sameq parameter does not mean "same quality" and doesn't help preserving the quality when converting from WMV to AVI. The OP needs to specify the bitrate or quality factor for MPEG-4 accordingly. – slhck – 2012-09-19T15:29:13.573