Compiling ffmpeg with mp3 support on Ubuntu

2007-05-23 / jpoesen

[UPDATE May 12, 2008]

The information is this post is outdated.
You should head over to the revised edition.

—-

The Flashvideo module in Drupal uses ffmpeg to convert uploaded video to Adobe Flash Video format (.flv).

However, we’re using Ubuntu based servers and Ubuntu has a strict policy not to include non-free software. This means that the ffmpeg version in the repositories is not built with essential functionality, like mp3 support for audio conversion.

Solution: compile from source:

1. enable universe and multiverse repositories

UbuntuGuide » general notes » how to add extra repositories

2. get your tools

sudo apt-get install checkinstall build-essential subversion

3. get the latest ffmpeg sources

cd /usr/local/src

sudo svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg

4. get the necessary dependencies

sudo apt-get install liblame-dev libfaad2-dev libfaac-dev libxvidcore4-dev liba52-0.7.4 liba52-0.7.4-dev libx264-dev

5. configure

./configure —enable-gpl —enable-pp —enable-libvorbis —enable-libogg
—enable-liba52 —enable-dc1394 —enable-libgsm —disable-debug
—enable-libmp3lame —enable-libfaad —enable-libfaac —enable-xvid
—enable-pthreads —disable-vhook

6. compile

make

7. go have a snack

8. create the .deb package

checkinstall

9. install the .deb package

dpkg -i [ffmpeg_your_version.deb]

10. rejoice