6

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 error Unknown encoder 'lame'. If I try to use libmp3lame instead of lame the error says Unknown encoder 'libmp3lame'. But lame is installed. Any clue?

Kumar
  • 266
  • 1
  • 4
  • 14

6 Answers6

3

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.

boehj
  • 1,120
3

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.)

ddekany
  • 151
2

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.

slhck
  • 235,242
1

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

andrewsh
  • 195
1

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

0

When you use ffmpeg, it'll have a header like:

FFmpeg version 0.6.6-4:0.6.6-0ubuntu0.11.04.1, Copyright (c) 2000-2010 the Libav
 developers
  built on Jun 12 2012 16:35:16 with gcc 4.5.2
  configuration: --extra-version=4:0.6.6-0ubuntu0.11.04.1 --prefix=/usr --enable
-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm -
-enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis 
--enable-pthreads --enable-zlib --enable-libvpx --disable-stripping --enable-run
time-cpudetect --enable-vaapi --enable-gpl --enable-postproc --enable-swscale --
enable-x11grab --enable-libdc1394 --enable-shared --disable-static
  libavutil     50.15. 1 / 50.15. 1
  libavcodec    52.72. 2 / 52.72. 2
  libavformat   52.64. 2 / 52.64. 2
  libavdevice   52. 2. 0 / 52. 2. 0
  libavfilter    1.19. 0 /  1.19. 0
  libswscale     0.11. 0 /  0.11. 0
  libpostproc   51. 2. 0 / 51. 2. 0

If, when you use ffmpeg, the configuration doesn't include --enable-libmp3lame, it wasn't compiled with LAME support, and there's no way to get it to use LAME. By default, Debian and its derivatives do not provide an ffmpeg package with LAME support. Unless you can find a package somewhere other than the official repositories, you'll have to compile it from source.

Kopachris
  • 9
  • 1