Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I installed FFmpeg on my XAMPP for converting stream of video to GIF images.

I used the below code but it doesn't work.

ffmpeg -ss 00:00:05.0 -t 00:00:10.0 -i input.wmv -acodec copy -vcodec copy -async 1 output.gif
share|improve this question
up vote 3 down vote accepted

Your problem is: You cannot simply copy the input video and audio streams to a GIF. GIFs need to be encoded differently. Basically you're telling FFmpeg to actually not convert anything.

Try this instead:

ffmpeg -ss 5 -i input.wmv -t 10 -pix_fmt rgb24 output.gif


  • I shortened the timestamps. If you just need seconds, it's enough to specify those.
  • -t is an output option and should go between -i and your output file name.
  • GIFs need an RGB pixel format, which you have to specify as well.
  • You may need to downscale your video so the GIF doesn't become unnecessarily large. Try adding -filter:v "scale=-1:320" or similar to downscale the output to 320 pixels height (and adjust the width automatically (-1).

Tip: "It doesn't work" is not a specific enough problem description. Please always include the full, uncut FFmpeg command output when asking FFmpeg questions.

share|improve this answer
thanks its works :) you save my life :) but it seems blurred image how can i get the gif image as like as video – Ramkumar Feb 7 '13 at 11:28
You probably can't. GIFs were never meant to be used for video. Why would you want the videos to be GIFs in the first place, if I may ask? – slhck Feb 7 '13 at 11:34

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.