Last active
May 27, 2018 08:43
Star
You must be signed in to star a gist
The build script of FFmpeg for Android
This file contains 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
#!/bin/bash | |
ADDI_CFLAGS="-marm" | |
ADDI_LDFLAGS="" | |
API=18 | |
PLATFORM=arm-linux-androideabi | |
CPU=armv7-a | |
NDK=/Users/lecion/Dev/Android/android-ndk-r13b | |
SYSROOT=$NDK/platforms/android-$API/arch-arm/ | |
ISYSROOT=$NDK/sysroot | |
ASM=$ISYSROOT/usr/include/$PLATFORM | |
TOOLCHAIN=$NDK/toolchains/$PLATFORM-4.9/prebuilt/darwin-x86_64 | |
OUTPUT=./build | |
function build_one | |
{ | |
./configure \ | |
--prefix=$OUTPUT \ | |
--enable-shared \ | |
--disable-static \ | |
--disable-doc \ | |
--disable-ffmpeg \ | |
--disable-ffplay \ | |
--disable-ffprobe \ | |
--enable-avdevice \ | |
--disable-doc \ | |
--disable-symver \ | |
--enable-gpl \ | |
--enable-postproc \ | |
--cross-prefix=$TOOLCHAIN/bin/arm-linux-androideabi- \ | |
--target-os=android \ | |
--arch=arm \ | |
--enable-cross-compile \ | |
--sysroot=$SYSROOT \ | |
--extra-cflags="-Os -fpic $ADDI_CFLAGS" \ | |
--extra-ldflags="$ADDI_LDFLAGS" \ | |
$ADDITIONAL_CONFIGURE_FLAG | |
make -j8 | |
make install | |
make clean | |
} | |
build_one |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment