How to install FFmpeg and LAME on Mac OS X Leopard from source
(Thanks to Peter Boling for these instructions.)
To install FFmpeg, first we should install 7 media libraries to make our experience with FFmpeg smooth, 4 of which play nicely with the standard Linux installation process of ./configure, make, and sudo make install, and 3 libraries that don’t play as nicely, but still work if we install them correctly for Mac.
1. Four libraries that play nice: lame, h264, ogg, and vorbis
# lame:
wget http://easynews.dl.sourceforge.net/sourceforge/lame/lame-3.97.tar.gz
svn export svn://svn.videolan.org/x264/trunk x264
# ogg:
wget http://downloads.xiph.org/releases/ogg/libogg-1.1.3.tar.gz
wget http://downloads.xiph.org/releases/vorbis/libvorbis-1.2.0.tar.gz
on each package |foo| do
tar xzf foo (if needed)
cd foo
./configure
make (-j2 if you have dual core or more)
sudo make install
2) Three libraries that don’t play nice: faac, faad, and xvid
# faac
wget http://superb-east.dl.sourceforge.net/sourceforge/faac/faac-1.25.tar.gz
aclocal -I . | autoheader | glibtoolize –automake | automake –add- missing | autoconf
# also, before ./configure, you need to fix the misspaced line in the config file at ac_config_files. THEN:
./configure
make
sudo make install
# faad
wget http://nchc.dl.sourceforge.net/sourceforge/faac/faad_src_20020104.tar.gz
# the dudes at faad didn’t tar correctly, so
mkdir faad
cd faad
tar zxf ../faad_src_20020104.tar.gz
aclocal -I . | autoheader | glibtoolize –automake | automake –add- missing | autoconf
# THEN, once built / installed, copy faad.h to /usr/local/include
sudo cp include/faad.h /usr/local/include
# xvid
wget http://downloads.xvid.org/downloads/xvidcore-1.1.3.tar.gz
# navigate to xvidcore/builds/generic - see http://rob.opendot.cl/index.php/useful-stuff/xvid-with-asm-on-os-x/ make those changes, then
make
make install
3) Now download and build/install ffmpeg
# get code from subversion
svn export svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
# move to ffmpeg directory
cd ffmpeg
# configure installation
./configure –enable-pp –enable-pthreads –disable-debug –enable- static –enable-libmp3lame –enable-libfaac –enable-libx264 –enable- libfaad –enable-libogg –enable-libvorbis –disable-ffplay –disable- ffserver –enable-gpl –enable-libxvid
# make installation
make (-j2 if you have dual core or more)
# install
sudo make install
resources: http://troykelly.com/2007/01/18/building-ffmpeg-on-os-x/
Libraries I haven’t tackled yet: -enable-theoris -enable-libgsm
You could also try adding-enable-shared
NOTE: old versions of ffmpeg use the video codec ‘mp3′, not ‘libmp3lame’. If-enable-mp3lame is in the build, mp3 works. We’ve upgraded to ffmpeg trunk and only-enable-mp3lame and -vocdec libmp3lame works now.























