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 )

<br /> cd lame-3.98b6<br /> ./configure –with-vorbis<br /> make<br /> sudo make install<br />

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).

<br /> cd faad2<br /> autoreconf -vif<br /> ./configure –without-bmp –without-xmms –without-drm –without-mpeg4ip<br /> make<br /> sudo make install<br />

Then faac

<br /> cd faac<br /> ./bootstrap<br /> ./configure –with-libmp4v2<br /> make<br /> sudo make install<br />

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

<br /> cd x264<br /> ./configure –enable-pthread –enable-pic<br /> make<br /> make install<br />

liba52

<br /> wget http://liba52.sourceforge.net/files/a52dec-snapshot.tar.gz<br /> tar -xzvf a52dec-snapshot.tar.gz<br /> cd a52dec-0.7.5-cvs/<br /> ./configure<br /> ./configure –enable-libmp3lame –enable-x264 –enable-liba52 –enable-gpl</p> <p>

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

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

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

Now we get around to compiling ffmpeg itself:

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

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

<br /> ./configure –enable-shared –disable-mmx –enable-libmp3lame –enable-libamr-wb –enable-libamr-nb –enable-nonfree –enable-libx264 –enable-libfaad –enable-gpl –disable-vhook<br />

comments powered by Disqus