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?

  • 6
    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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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