Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have about 20 .webm files that I would like to convert to audio in the terminal. I want to do

avconv -i *.webm -acodec libmp3lame0 -aq 4 *.mp3

I tried:

for i in *.webm; do avconv -i "${i}" -acodec libmp3lame0 -aq 4 "${i%.wemb}.mp3"; done

but it says "libmp3lame0 encoder not found." It is installed, though. I also installed ubuntu-restricted-extras and reinstalled libav-tools.

I also tried

for i in *.webm; do avconv -i "${i}" -acodec -aq 4 "${i%.wemb}.ogg"; done

to remove the whole mp3/LAME aspect, but then it just said '.ogg encoder not found.'

This worked once before when I tried to convert using libmp3lame0 without the for loop...but I just tried to convert one file and it doesn't work anymore.

Thanks. (I'm using 12.10.)

share|improve this question
add comment

1 Answer 1

up vote 3 down vote accepted

You seem to be using the wrong codec name. To see which codecs are supported, do:

avconv -codecs

according to this the codec name is libmp3lame (you have an extra 0). This is on my system however, so yours may be different. The command I gave will let you find out.

share|improve this answer
mp3 does not seem to be supported. at least in ubuntu it only shows as Decoding, and not available as Encoding. –  gcb Oct 2 '13 at 22:55
@gcb check that you have libmp3lame installed, I think this is needed for encoding. I do and in the list it shows "E" next to "libmp3lame". –  roadmr Oct 3 '13 at 14:49
add comment

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.