s4lepw
Last Updated: February 25, 2016
·
981
· dmcrodrigues

FFmpeg for OSX 10.7

Pre-requisites

Optional

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