1. 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
    By timc3 on the
    March 25th, 2008

Comment

  1. Thanks. Very useful.

    solomon71 Says:
    July 8th, 2008 at 9:22 pm

Please post a comment