FFMPEG on Debian Etch

FFMPEG is a great package for converting different video formats, which is widely used by Drupal video modules. The trouble is that due to licensing issues, the default version in Debian is somewhat crippled. One notable issue is the lack of MP3 support.

Google will tell you that you need to compile your own version, if you want to have support for the missing formats, and there's no shortage of pages suggesting how to do it. None of which I'm particularly happy about, so here's my version.

Falko Timme gets close, so kudos to him, but I prefer to do it a bit differently:

First off, we need the build-essentials:

  1. aptitude install build-essential

Now we're ready to build. However, I'm not particularly fond of installing packages 'the old way', as it often leaves cruft around when upgrading the package, and often there's no such thing as an uninstaller. But there's a handy little tool available called checkinstall which will run the install, keep track of all files it installs and modifies, and roll an package description around it. Which is good. The bad news is that it fell out of Etch sorta by mistake, so it's not available in regular Debian archives anymore. A great shame, but we can work around that:

  1. echo "deb <a href="http://snapshot.debian.net/archive">http://snapshot.debian.net/archive</a> pool checkinstall" >>/etc/apt/sources.list
  2. aptitude update
  3. aptitude install checkinstall=1.6.1-1

The version specification is important, as that was the last version that I found could be installed on Etch. I guess the latter ones on snapshot.debian.net is for Lenny.

Then it's just a matter of:

  1. cd /usr/src/
  2. wget <a href="http://heanet.dl.sourceforge.net/sourceforge/lame/lame-3">http://heanet.dl.sourceforge.net/sourceforge/lame/lame-3</a> .97.tar.gz # Or another version
  3. tar -zxf lame-3.97.tar.gz 
  4. cd lame-3.97/
  5. ./configure --enable-shared --prefix=/usr
  6. make
  7. checkinstall

And LAME is both installed and un-installable with aptitude remove lame. Checkinstall asks a few questions about the name and version of the package it generates, but mostly guesses it right.

The we can carry on with the rest, much like Falko:

  1. cd ..
  2. apt-get source ffmpeg
  3. apt-get build-dep ffmpeg
  4. cd ffmpeg-0.cvs20060823/
  5. vi debian/rules

Now edit debian/rules, adding in the extra switches. --enable-mp3lame for MP3 support, but if there's other options you want, they can be added too. More libs require that the corresponding dev packages is installed, of course.

  1. dpkg-buildpackage 
  2. cd ..
  3. dpkg -i *.deb

And we're done. Ideally, we'd fiddle with the version string, in order to avoid the risk of apt upgrading to a newer version, but I'll leave that as an exercise for the reader.


mp3 Lame dependancy info

Hey, i'm running debian gcc 4.2.3-2 and followed the instructions above, the compilation works when i omit the enable flag for lame.
When i add the flag: --enable-mp3lame it complains saying no such package installed (even tho the lame deb installation done above worked; verified with (dpkg -l | grep -i lame)..

When i use the config flag: --enable-libmp3lame, the build reports the error:

dpkg-shlibdeps: failure: no dependency information found for /usr/lib/libmp3lame.so.0 (used by debian/libavcodec1d/usr/lib/libavcodec.so.1d.51.38.0).
dh_shlibdeps: command returned error code 512.. sighhh

ffmpeg source being used: fmpeg-free-0.cvs20070307

ideas? thx guys...

I'm having the same problem

I'm having the same problem if anybody knows how to solve this a solution would be quite useful

same prob here


I have the same Problem.

But i used the ffmpeg-free-0.svn20080206

there i had to use --enable-libmp3lame instead of --enable-mp3lame

however after a while of compiling i got:

no dependency information found for /usr/lib/libmp3lame.so.0

the lib can be found in the directory