ffmpeg Unknown encoder ‘libmp3lame’

I was trying to convert a .flv file to mp3 when using the command ffmpeg -i video.flv -acodec libmp3lame -ab 196k -ac 2 -ar 44100 audio.mp3 came up with Unknown encoder ‘libmp3lame’. It was because I did not install the ffmpeg from source and in the binary the –enable-libmp3lame was not defined. Ps.: To see what options are enabled just ffmpeg –help

To solve this problem I did the following:

  • Installed the libmp3lame from source:
    wget http://easynews.dl.sourceforge.net/sourceforge/lame/lame-3.98.4.tar.gz; tar -xvf lame-3.98.4.tar.gz; cd lame-3.98.4;./configure; sudo make && make install
  • Removed the pre-compiled ffmpeg installation: apt-get remove ffmpeg
  • Downloaded its source: svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg
  • Installed the source setting the –enable-libmp3lame option up: sudo ./configure –enable-libmp3lame; sudo make && make install
  • And ffmpeg -i video.flv -acodec libmp3lame -ab 192k -ac 2 -ar 44100 audio.mp3 command should works properly
ffmpeg -i video.flv -acodec libmp3lame -ab 196k -ac 2 -ar 44100 audio.mp3
About these ads

One Response to ffmpeg Unknown encoder ‘libmp3lame’

  1. Sagar says:

    Or you can install libavcodec-unstripped package.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: