How do I enable LAME support for ffmpeg?
Solution 1
Debian "support[s] ... and provide[s] infrastructure for non-free packages'. lame
is such a package and is available in a 'non-free' repository. An explanation of how to access and configure this repository is available here.
The Debian Social Contract provides information on where 'non-free' software sits in the Debian software ecosystem.
Solution 2
No need to install from source... The ffmpeg
package that comes from deb-multimedia.org
(5:0.7.13-dmo2
ATM) has libmp3lame
support.
I did the following on Squeeze (as root):
apt-get install deb-multimedia-keyring
Add to /etc/apt/sources.list
:
deb http://www.deb-multimedia.org squeeze main non-free
then
apt-get update
then if you check it with sudo apt-cache policy ffmpeg
, it should show that ffmpeg
will come from deb-multimedia.org
, not from the default repo. So:
apt-get install ffmpeg
and it should include LAME support. (I also had lame
installed... I'm not sure if that's required though.)
Solution 3
Maybe your ffmpeg wasn't installed with LAME support. I'd just say you download it from source and compile it with --enable-libmp3lame
, or to be precise:
$ ./configure --enable-gpl --enable-liba52 --enable-libgsm --enable-libxvid \
--enable-libamr_nb --enable-libamr_wb --enable-libmp3lame --enable-libogg \
--enable-libvorbis --enable-libfaac --enable-libfaad --enable-shared
It should then use your lame
installation. If it can't: Get LAME from here.
Solution 4
Found in this quick tutorial.
# cd /my/path/where/i/keep/compiled/stuff
# git clone git://source.ffmpeg.org/ffmpeg.git
# cd ffmpeg
# ./configure --enable-gpl --enable-libx264 --enable-libmp3lame --enable-nonfree --enable-libaacplus
# make
# make install
make sure you have all the dependencies installed, if you don't. check this tutorial on how to install them
Solution 5
Since July 2011, lame
package is available in Debian main, see this page for the details:
http://packages.qa.debian.org/l/lame.html.
Please note that deb-multimedia package repository referred to in other answers here isn't supported, and is not recommended by Debian. In fact, it's not affiliated with Debian at all. More information can be found at this wiki page: http://wiki.debian.org/MultimediaCodecs
Related videos on Youtube
![Kumar](https://i.stack.imgur.com/q1Ips.jpg?s=256&g=1)
Kumar
I am a run of the mill LAMP guy who is a self proclaimed guru of everything LAMP. I blog at http://www.kumarchetan.com/blog/ as a super duper numero uno techie.
Updated on September 18, 2022Comments
-
Kumar almost 2 years
This isn't a duplicate. I am Debian 6 Squeeze and installed ffmpeg using apt-get. I didn't compile it from source. Later I installed lame from http://www.rarewares.org/. But when I try to use
ffmpeg -i some.flv -acodec lame -ab 128k my.mp3
I see errorUnknown encoder 'lame'
. If I try to use libmp3lame instead of lame the error saysUnknown encoder 'libmp3lame'
. But lame is installed. Any clue?-
boehj about 13 yearsIs there any particular reason you didn't get
lame
from the Debian multimedia repos? -
Kumar about 13 yearsAFAIK, lame is not part of official Debian repos. Please correct me if I am wrong and point me to the package.
-
boehj about 13 yearsDebian do have issues with the patent encumbered nature of mp3 sure, but you can install it from the 'non-free' Squeeze repository. Details are here. I'm not sure if that's something you want to do for political or other reasons however.
-
Kumar about 13 years@boehj, thanks for the link. Worked for me. Post your solution as an answer.
-
boehj about 13 yearsGlad it worked for you. :)
-
-
Kumar about 13 yearsThanks slhck, I would rather try to find a fix which doesn't want me to compile source.
-
slhck over 11 yearsWhich version of FFmpeg does that give you? Just curious because the packaged versions are often quite outdated.
-
ddekany over 11 yearsffmpeg 5:0.7.13-dmo2, as I said.