FFmpeg for OSX 10.7
Pre-requisites
- <b><a href="https://developer.apple.com/downloads/index.action">Xcode Command Line Tools</a></b>
- <b><a href="http://yasm.tortall.net/">Yasm</a></b>
- <b><a href="http://www.freedesktop.org/wiki/Software/pkg-config/">pkg-config</a></b>
Optional
- <b><a href="http://www.videolan.org/developers/x264.html">x264</a></b>
Build x264
#!/bin/sh
PARALLEL_JOBS=3
### x264 ##############################################
echo "installing x264..."
if [ ! -d x264 ]; then
git clone git://git.videolan.org/x264.git x264
fi
cd x264
make clean
sudo ./configure \
--enable-static \
--enable-shared \
--enable-debug \
&& sudo make -j${PARALLEL_JOBS} && sudo make install
echo "-------------------------------"
echo "x264 installed!"
cd ..
Script: <b><a href="https://gist.github.com/3198522">build.x264.sh</a></b>
Build FFmpeg
#!/bin/sh
PKG_CONFIG_VERSION=0.25
YASM_VERSION=1.2.0
PARALLEL_JOBS=3
### pkg-config ########################################
echo "installing pkg-config ${PKG_CONFIG_VERSION}..."
curl -#LO http://pkg-config.freedesktop.org/releases/pkg-config-${PKG_CONFIG_VERSION}.tar.gz
tar zxvf pkg-config-${PKG_CONFIG_VERSION}.tar.gz
cd pkg-config-${PKG_CONFIG_VERSION}
./configure && make -j${PARALLEL_JOBS} && sudo make install
echo "pkg-config ${PKG_CONFIG_VERSION} installed!"
echo "-------------------------------"
cd ..
### Yasm ##############################################
echo "installing yasm ${YASM_VERSION}..."
curl -#LO http://www.tortall.net/projects/yasm/releases/yasm-${YASM_VERSION}.tar.gz
tar zxvf yasm-${YASM_VERSION}.tar.gz
cd yasm-${YASM_VERSION}
./configure && make -j${PARALLEL_JOBS} && sudo make install
echo "yasm ${YASM_VERSION} installed!"
echo "-------------------------------"
cd ..
### FFmpeg ############################################
echo "installing FFmpeg..."
if [ ! -d ffmpeg ]; then
git clone git://source.ffmpeg.org/ffmpeg.git ffmpeg
fi
cd ffmpeg
make clean
sudo ./configure \
--enable-static \
--enable-shared \
--enable-gpl \
--enable-libx264 \
&& sudo make -j${PARALLEL_JOBS} && sudo make install
echo "-------------------------------"
echo "FFmpeg installed!"
cd ..
Script: <b><a href="https://gist.github.com/3198517">build.ffmpeg.sh</a></b>
Notes
To disable x264 on ffmpeg just remove
--enable-gpl
--enable-libx264
I'm using 3 parallel jobs but you may update this value according to your system
PARALLEL_JOBS=3
Written by David Rodrigues
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Osx
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#