https://github.com/RoyGuanyu/build-scripts-of-ffmpeg-x264-for-android-ndk/blob/master/ffmpeg/build_android_armeabi_v7a.sh
https://github.com/shishuo365/libx264-android/blob/master/build.sh
https://github.com/sjitech/ffmpeg-android
https://github.com/icylord/ffmpeg-android
http://vinsol.com/blog/2014/07/30/cross-compiling-ffmpeg-with-x264-for-android/
http://leng.iteye.com/blog/2285210
以下是我2017-06-29日能编译通过且正常运行的config:
#!/bin/bash NDK=/home/hzh/soft/softy/Android/android-ndk-r9c-x86_64 PLATFORM=$NDK/platforms/android-18/arch-arm/ TOOLCHAIN=$NDK/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64 PREFIX=./android/arm function build_one { ./configure --prefix=$PREFIX --enable-static --enable-shared --enable-pic --host=arm-linux --disable-cli --cross-prefix=$TOOLCHAIN/bin/arm-linux-androideabi- --extra-cflags="-fPIC -DX264_VERSION -DANDROID -I${NDK}/platforms/android-9/arch-arm/usr/include" --extra-ldflags="-Wl,-rpath-link=${NDK}/platforms/android-9/arch-arm/usr/lib -L$NDK/platforms/android-9/arch-arm/usr/lib -nostdlib -lc -lm -ldl -lgcc" --sysroot=$PLATFORM # --enable-strip } build_one echo Android ARM builds finished
以下是网上某个人的编译选项:
#!/bin/bash
NDK=/home/hzh/soft/softy/Android/android-ndk-r9c-x86_64
PLATFORM=$NDK/platforms/android-18/arch-arm/
TOOLCHAIN=$NDK/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64
PREFIX=./android/arm
function build_one
{
./configure
--prefix=$PREFIX
--enable-static
--enable-shared
--enable-pic
--host=arm-linux
--disable-cli
--cross-prefix=$TOOLCHAIN/bin/arm-linux-androideabi-
--extra-cflags="-fPIC -DX264_VERSION -DANDROID -I${NDK}/platforms/android-9/arch-arm/usr/include"
--extra-ldflags="-Wl,-rpath-link=${NDK}/platforms/android-9/arch-arm/usr/lib -L$NDK/platforms/android-9/arch-arm/usr/lib -nostdlib -lc -lm -ldl -lgcc"
--sysroot=$PLATFORM
# --enable-strip
}
build_one
echo Android ARM builds finished