Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I run youtube-dl and extract the audio it gives me the error:
ERROR: audio conversion failed: Unknown encoder 'libmp3lame'
Could this be because I have ffmpeg and lame installed? Do the two conflict with eachother somehow?

share|improve this question
try xtreme video download manager for downloading videos – Dinse Das Jan 2 '14 at 1:28
up vote 8 down vote accepted

Make sure that you have the libavcodec-extra-53 package for encoding to mp3 installed. To install libavcodec-extra-53 from the terminal run:

sudo apt-get install libavcodec-extra-53  

Libav codec library:
Libav is a complete, cross-platform solution to decode, encode, record, convert and stream audio and video.

In Ubuntu 14.04 the Libav codec library (libavcodec-extra-53) has been updated to libavcodec-extra-54. In Ubuntu 15.10 and 16.04 the Libav codec library has been updated to libavcodec-ffmpeg-extra56. In Ubuntu 16.10 Libav codec library has been updated to libavcodec-extra57.

share|improve this answer
Thank you. This seems to have worked. – Awalrod Jan 2 '14 at 1:56

I just had the same problem but installing that package didn't work for me. When I ran this command, the problem was solved: sudo aptitude install ubuntu-restricted-extras.

share|improve this answer

If you're getting this error running youtube-dl on a server check out this example for how I solved it for running python app on heroku:

The steps were

  1. make sure lame is installed (I used a buildpack) and
  2. make sure ffprobe is installed

There are presumably other ways: --extract-audio "requires ffmpeg or avconv and ffprobe or avprobe"

share|improve this answer

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.