Unknown encoder 'libmp3lame' in Ubuntu 14.04

The problem

It appears that you compiled ffmpeg, but you omitted the configure option --enable-libmp3lame which is required to be able to encode MP3 audio (there is also --enable-libshine, but that's a fixed-point MP3 encoder that most users won't need).

Additionally you'll need the libmp3lame-dev package as a dependency before compiling. Currently this needs to provide LAME ≥ 3.98.3, so if your package is too old then you can also compile LAME instead.

How to fix

You have 3 main options if you want to use FFmpeg:

Compile

As mentioned above you will need the LAME dependencies and use the --enable-libmp3lame configure option. See the Ubuntu FFmpeg Compile Guide for step-by-step instructions.

Download

You can simply download, extract, and run a static build of ffmpeg. It has MP3 encoding enabled.

PPA

Ubuntu 14.04 users can utilize mc3man's Ubuntu Multimedia for Trusty. It also supports MP3 encoding.


Ubuntu does not officially bundle ffmpeg after ditching it in favor of the Libav fork. There is a PPA that is quite outdated, so it should not be used unless you're keen on running an old version of ffmpeg.

I honestly have to confess that I don't know why it won't work for your specific case—or how you got an ffmpeg running in the first place, since Ubuntu does not bundle it officially.

Here are two solutions that should always work though:

Use a static build

A quick solution would be to simply download a recent static build (scroll down where it says Linux Static Builds). These all have libmp3lame bundled. Extract that build to some location, and copy ffmpeg to a directory in your PATH, e.g.:

cd ~/Downloads
tar xvf ffmpeg-*.tar.xz
cd !$
sudo mkdir -p /usr/local/bin
sudo cp ./ffmpeg ./ffprobe /usr/local/bin/
sudo chmod ugo+x /usr/local/bin/ffmpeg /usr/local/bin/ffprobe

Also make sure that /usr/local/bin is in your shell PATH.

Compile from source

This will also give you the latest version with all extras you want. Follow the always up-to-date guide on the FFmpeg wiki. It'll take a bit longer, but gives you more configuration options, and access to other encoders, such as libfdk_aac, which cannot be statically bundled due to licensing reasons.