Last active
January 29, 2021 22:26
-
-
Save daz/0fecfb80dca969c0a3b4 to your computer and use it in GitHub Desktop.
Cross-compile ffmpeg with x264 for Raspberry Pi 2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Build environment. I use vagrant ubuntu/trusty64 | |
sudo apt-get install build-essential git-core | |
sudo git clone https://github.com/raspberrypi/tools.git /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://source.ffmpeg.org/ffmpeg.git | |
cd ffmpeg | |
git clone git://git.videolan.org/x264 | |
# Build x264 | |
cd x264 | |
./configure --host=arm-linux --cross-prefix=${CCPREFIX} --enable-static --disable-asm | |
make | |
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/" | |
make | |
does this actually enable acceleration on the pi ? like for h264 decoding.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
configure --host=arm-linux --cross-prefix=${CCPREFIX} --enable-static --disable-asm
should be./configure --host=arm-linux --cross-prefix=${CCPREFIX} --enable-static --disable-asm