Skip to main content

Reply to comment

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" title="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" title="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.

Reply

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <pre>
  • Lines and paragraphs break automatically.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <pre>. The supported tag styles are: <foo>, [foo]. PHP source code can also be enclosed in <?php ... ?> or <% ... %>.
  • Images can be added to this post.

More information about formatting options