ffmpeg with mp3 encoder support on Ubuntu Dapper

The default install of ffmpeg on Ubuntu Dapper does not come with support for encoding mp3. I had to get the source and re-compile with mp3 support using lame as the encoder.

Make sure you have multiverse and universe enabled.

$ sudo apt-get build-dep ffmpeg
$ sudo apt-get install liblame-dev libfaad2-dev libfaac-dev libxvidcore4-dev liba52-0.7.4 liba52-0.7.4-dev libx264-dev
$ apt-get source ffmpeg
$ cd ffmpeg-*/
$ ./configure --enable-gpl --enable-pp --enable-pthreads \
        --enable-libogg --enable-a52 --enable-dts \
        --enable-dc1394 --enable-libgsm --disable-debug --enable-mp3lame \
        --enable-faad --enable-faac --enable-xvid --enable-x264
$ make
$ sudo make install

References:

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Ffmpeg Installation from latest SVN snapshot

I got the latest ffmpeg SVN snapshot to statically compile from source by disabling vhooks and libx264.

$ wget http://ffmpeg.mplayerhq.hu/ffmpeg-export-snapshot.tar.bz2
$ tar -xvjf ffmpeg-export-snapshot.tar.bz2
$ cd ffmpeg-export-*
$ ./configure --prefix=/usr/local --disable-debug --enable-gpl --enable-postproc --enable-swscale --enable-pthreads --enable-x11grab --enable-liba52 --enable-libdc1394 --enable-libfaac --enable-libfaad --enable-libgsm --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libxvid --disable-vhook
$ make
$ sudo make install

Here is the formats output:

$ /usr/local/bin/ffmpeg -formats | grep mp3
FFmpeg version SVN-r14044, Copyright (c) 2000-2008 Fabrice Bellard, et al.
  configuration: --prefix=/usr/local --disable-debug --enable-gpl
--enable-postproc --enable-swscale --enable-pthreads --enable-x11grab
--enable-liba52 --enable-libdc1394 --enable-libfaac --enable-libfaad
--enable-libgsm --enable-libmp3lame --enable-libtheora
--enable-libvorbis --enable-libxvid --disable-vhook
  libavutil version: 49.7.0
  libavcodec version: 51.57.2
  libavformat version: 52.16.0
  libavdevice version: 52.0.0
  built on Jul  2 2008 21:23:41, gcc: 4.0.3 (Ubuntu 4.0.3-1ubuntu5)
DE mp3             MPEG audio layer 3
  EA    libmp3lame      libmp3lame MP3 (MPEG audio layer 3)
D A    mp3             MP3 (MPEG audio layer 3)
D A    mp3adu          ADU (Application Data Unit) MP3 (MPEG audio layer 3)
D A    mp3on4          MP3onMP4
text2movsub remove_extra noise mov2textsub mp3decomp mp3comp mjpegadump
imxdump h264_mp4toannexb dump_extra

Reference: ConShell

Comment