入力ファイルは最初で指定すること。

ffmpegの入力ファイルの指定を後で書いた方がきれいだと思い以下のようにするとエラーになる。

$ffmpeg -y -vcodec xvid  -qscale 5 -s 320x240 -b 768 -ab 64 -i a.avi output.mp4
・・・
Error while opening codec for output stream #0.1 - maybe incorrect parameters such as bit_rate, rate, width or height

最初でやるとちゃんと動く。

ffmpeg -i a.avi -y -vcodec xvid  -qscale 5 -s 320x240 -b 768 -ab 64 output.mp4

オプションの順番で動きが変わるコマンドは好きじゃないなぁ。