Before upgrade to the latest Ubuntu I used the following command to extract mp3 from an avi file:
$ for x in *.avi; do ffmpeg -vol 100 -ab 160k -ar 44100 -i "$x" "`basename "$x" .avi`.mp3"; done
This worked. But since Ubuntu 12.04 I get Option sample_rate not found. when I try to execute this command. If I omit -ar 44100 (or -sample_rate 44100) it does extract the mp3, but in most cases the length of the extracted mp3 doesn't fit anymore. That means that they've got a length of 43min or something although the avi has a length of only 5min.
It's the same problem with both ffmpeg and avconv. Any ideas how to solve these problems?