Hunter Ford Hunter Ford

Compiling MP4Box on Mac OS X

# Create a temporary directory for sources.
SOURCES=$(mktemp -d /tmp/XXXXXXXXXX)
cd $SOURCES

# Download the necessary sources.
curl -#LO http://www.ijg.org/files/jpegsrc.v8c.tar.gz
curl -#LO http://downloads.sourceforge.net/project/libpng/libpng15/1.5.1/libpng-1.5.1.tar.gz
curl -#LO http://downloads.sourceforge.net/project/faac/faad2-src/faad2-2.7/faad2-2.7.tar.gz
curl -#LO ftp://ftp.mars.org/pub/mpeg/libmad-0.15.1b.tar.gz
curl -#LO http://liba52.sourceforge.net/files/a52dec-0.7.4.tar.gz
curl -#LO http://www.libsdl.org/tmp/SDL-1.3.tar.gz
svn export --non-interactive --trust-server-cert https://gpac.svn.sourceforge.net/svnroot/gpac/trunk/gpac

# Unpack files
for file in `ls ${SOURCES}/*.tar.*`; do
    tar -xzf $file
    rm $file
done

cd jpeg-*/
./configure && make -j 4 && sudo make install; cd ..

cd libpng-*/
./configure && make -j 4 && sudo make install; cd ..

cd faad2-*/
./configure --without-xmms --without-drm --without-mpeg4ip && make && sudo make install; cd ..

cd libmad-*/
sed -i -e 's/-march=i486//g' configure.ac
./configure && make -j 4 && sudo make install; cd ..

cd a52dec-*/
./configure --enable-shared && make -j 4 && sudo make install; cd ..

# SDL won't compile on Lion
# http://forums.libsdl.org/viewtopic.php?t=7390&sid=62659329519f407daa486ec8a3ee2ba9
cd SDL-*/
./configure --without-x && make -j 4 && sudo make install; cd ..

cd gpac/
./configure && make lib && make apps && sudo make install lib && sudo make install

Downloads


Comments

  • franciskim

    So handy, thanks for posting up the script!
  • orcaman

    Thanks. I made some updates as it was not working any longer. You can find it here: https://gist.github.com/orcaman/369e8da048b5d7345f5a
  • FaithNOmore

    Thank you very much for that nice script. One point - the libpng download link is not working. I'm used the following - http://downloads.sourceforge.net/project/libpng/libpng15/1.5.4/libpng-1.5.4.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Flibpng%2Ffiles%2Flibpng15%2F1.5.4%2F&ts=1315169186&use_mirror=citylan May be you have also any experience with the mencoder compile for MacOSX? It will be great if you can share it.