Installing ffmpeg on OS X

This is a work in progress for installing ffmpeg on OSX by a custom compile

This is another thing that I have needed to do and decided to put what I am doing in a blog post, I might need it in the future or it might be helpful for others.

So firstly download LAME - this is needed for supporting MP3 audio files, such as those in FLV and also for vorbis support. LAME src can be located on sourceforge.

Unarchive the file (lame-3.98b6 at the time of writing )

CD lame-3.98b6
./configure --with-vorbis
make
sudo make install

The first time I did this I noticed a problem running make so I “make clean” and then went through the process again.

Next up we want support for AAC audio, and you can get packages called FAAD2 and FAAC from www.audiocoding.com/downloads.html for these and then unarchive them ( FAAD 2.6.1 and FAAC 1.26 at the time of writing).

CD faad2
autoreconf -vif
./configure --without-bmp --without-xmms --without-drm --without-mpeg4ip
make
sudo make install

Then faac

CD faac
./bootstrap
./configure --with-libmp4v2
make
sudo make install

x264 ( http://www.videolan.org/developers/x264.html )

CD x264
./configure --enable-pthread --enable-pic
make
make install

liba52

wget http://liba52.sourceforge.net/files/a52dec-snapshot.tar.gz
tar -xzvf a52dec-snapshot.tar.gz
CD a52dec-0.7.5-CVS/
./configure
./configure --enable-libmp3lame --enable-x264 --enable-liba52 --enable-GPL

And for amr_wb and amr_nb go into their directories and do the following:

./configure
make clean
make -j2 > /dev/null
sudo make install

Basically the -j2 switch is for enabling dual cores when compiling.

Now we get around to compiling ffmpeg itself:

./configure --enable-shared --disable-mmx --enable-libmp3lame --enable-libamr-wb --enable-libamr-nb --enable-nonfree --disable-vhook
make clean
make -j2 > /dev/null
sudo make install

And that should be it though I am currently trying this configuration and it seems to work well:

./configure --enable-shared --disable-mmx --enable-libmp3lame --enable-libamr-wb --enable-libamr-nb --enable-nonfree --enable-libx264 --enable-libfaad --enable-GPL --disable-vhook

One Response to “Installing ffmpeg on OS X”

  1. solomon71 Says:

    Thanks. Very useful.

Leave a Reply

Bad Behavior has blocked 674 access attempts in the last 7 days.