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.
  • 222
  • 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 Sep 18 '12 at 20:50

1 Answers1

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
slhck
  • 228,104
Vincent
  • 1,130
  • Do you exactly mean it can convert video to animated(!) gif ? – Oskar K. Sep 18 '12 at 20:54
  • 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 Sep 18 '12 at 20:57
  • Hm, it converts avi (not wmv) to animated gif. – Oskar K. Sep 18 '12 at 20:58
  • 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 Sep 18 '12 at 21:17
  • It's not good I think. It doesn't allow to convert wmv to animated gif directly, right? – Oskar K. Sep 19 '12 at 15:03
  • 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 Sep 19 '12 at 15:29
  • 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 Dec 17 '14 at 07:30