How to install libmp3lame for ffmpeg
Solution 1:
First, I see this is on an Ubuntu machine, so let me first suggest you go to the Ubuntu wiki ffmpeg page.
Basically, what you want to do is compile ffmpeg from source so it includes libmp3lame. They tell you how to make your ffmpeg with more option on this page. When you commence the build with ./configure, you need to add --enable-libmp3lame
Solution 2:
The link in the selected answer is now obsolete. On Kubuntu 11.04 (and above), do:
sudo apt-get install ffmpeg libavcodec-extra-53
Solution 3:
The solution may be to compile ffmpeg manually:
The post suggests to compile x264 and ffmpeg yourself. But use x264 from Ubuntu and compile just ffmpeg is enough. So, here are the steps. Start by removing ffmpeg and making sure x264 is properly installed.
apt-get remove ffmpeg
apt-get update
apt-get install libx264-106 libx264-dev x264
Then, login as root, download, compile and install ffmpeg:
su -
svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg
cd ffmpeg
./configure --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-x11grab
make
make install
Solution 4:
For coding in mp3, in gentoo I have added the "mp3" USE flag, it's add the lame support.
USE="mp3" emerge ffmpeg