Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

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 used the command below to compress an avi file(using ubuntu)

ffmpeg -i input.avi -vcodec msmpeg4v2 output.avi

but I am getting these errors

Incompatible sample format 's16' for codec 'ac3', auto-selecting format 'flt'
[ac3 @ 0x9cd1fa0] invalid bit rate

Error while opening encoder for output stream #0.1 - maybe incorrect      
parameters such as bit_rate, rate, width or height

What's wrong?

share|improve this question
BTW: If you just in general want to compress a video file, msmpeg4v2 is a pretty bad choice. ffmpeg -c:v libx264 -c:a copy -crf 23 -preset slower is much better (change -crf 23 to change the quality; lower = better quality. 18 is often considered visually lossless; you can go much higher). This encode will take a long time, even on fast hardware. Pick a different preset if its too slow. Also, if possible, use mkv or mp4 for the output format. – derobert Apr 8 '13 at 16:21

Try the following:

ffmpeg -i input.avi -vcodec msmpeg4v2 -acodec copy output.avi
share|improve this answer

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.