envyen
2/14/2017 - 10:27 AM

Build scripts for ffmpeg static compilation and cross compilation

Build scripts for ffmpeg static compilation and cross compilation

#!/bin/bash

# Get the FFMPEG source
git clone git://source.ffmpeg.org/ffmpeg.git

cd ffmpeg

# Get library dependency sources
git clone git://git.videolan.org/x264

# Build x264
cd x264
./configure --enable-static --disable-asm
make -j8
cd ..

# Build FFMPEG
./configure --prefix=./build/ --enable-gpl --enable-libx264 --enable-static --enable-pic --extra-cflags="-I./x264/" --extra-ldflags="-L./x264/" --extra-libs="-ldl"
make -j8
make install
#!/bin/bash

export CCPREFIX="/usr/bin/arm-linux-gnueabihf-"

# Get the FFMPEG source
git clone git://source.ffmpeg.org/ffmpeg.git

cd ffmpeg

# Get library dependency sources
git clone git://git.videolan.org/x264

# Build x264
cd x264
./configure --host=arm-linux --cross-prefix=${CCPREFIX} --enable-static --disable-asm
make -j8
cd ..

# Build FFMPEG
./configure --prefix=./build/ --enable-cross-compile --cross-prefix=${CCPREFIX} --arch=armhf --target-os=linux --enable-gpl --enable-libx264 --enable-static --enable-pic --extra-cflags="-I./x264/" --extra-ldflags="-L./x264/" --extra-libs="-ldl"
make -j8
make install