Ubuntu – Converting WEBM to MP3

avconvmp3webm

I'm aware there are a couple of other questions here related to this, but the answers provided don't seem to work.

I'm trying to convert a webm to mp3 with avconv. Here's how I tried to do it:

 $ ls
test.webm
 $ avconv -acodec libmp3lame -i test.webm test.mp3
avconv version 9.18-6:9.18-0ubuntu0.14.04.1, Copyright (c) 2000-2014 the Libav developers
  built on Mar 16 2015 13:19:10 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
test.webm: End of file
 $ ls -l
total 4
-rw-rw-r-- 1 user user 439 Apr 28 09:16 test.webm

As you can see, I don't appear to get an error but my file is not created. Please note that I did install ubuntu-restricted-extras.

EDIT:

 $ avprobe test.webm 
avprobe version 9.18-6:9.18-0ubuntu0.14.04.1, Copyright (c) 2007-2014 the Libav developers
  built on Mar 16 2015 13:19:10 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
test.webm: End of file
# avprobe output

 $ avprobe -encoders|grep mp3
avprobe version 9.18-6:9.18-0ubuntu0.14.04.1, Copyright (c) 2007-2014 the Libav developers
  built on Mar 16 2015 13:19:10 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
A... libmp3lame           libmp3lame MP3 (MPEG audio layer 3) (codec mp3)

Best Answer

The proper way to converting is :

avconv -i test.webm -c:a libmp3lame test.mp3

or even shorter, without telling to avconv that you want use libmp3lame encoder.

avconv -i test.webm test.mp3