mp4box on Mac

To install mp4box on Mac, this bash script can be used.
# 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.11/libpng-1.5.11.tar.gz
curl -#LO http://downloads.sourceforge.net/project/faac/faad2-src/faad2-2.7/faad2-2.7.tar.gz?r=&ts=1340744079&use_mirror=iweb
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

Article Type

General