Skip to content

Instantly share code, notes, and snippets.



Forked from daz/
Created Nov 26, 2018
What would you like to do?
Cross-compile ffmpeg with x264 for Raspberry Pi 2
# Build environment. I use vagrant ubuntu/trusty64
sudo apt-get install build-essential git-core
sudo git clone /opt/tools
export CCPREFIX="/opt/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-"
# Get ffmpeg and x264 repos
git clone git://
cd ffmpeg
git clone git://
# Build x264
cd x264
./configure --host=arm-linux --cross-prefix=${CCPREFIX} --enable-static --disable-asm
cd ..
# Build ffmpeg with x264
./configure --enable-cross-compile --cross-prefix=${CCPREFIX} --arch=armel --target-os=linux --enable-gpl --enable-libx264 --extra-cflags="-Ix264/" --extra-ldflags="-ldl -Lx264/"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment