编译x264 静态库

下载x264源码
链接:https://pan.baidu.com/s/1EJc9-P4cWUllya_84R7pAQ
提取码:f5y0

拷贝到linux
解压unzip x264-snapshot-20161111-2245.zip

赋予权限
chmod 777 -R x264-snapshot-20161111-2245

编写android_build.sh

#!/bin/bash
export NDK_HOME=/root/android-ndk-r10e
export SYSROOT=$NDK_HOME/platforms/android-9/arch-arm/
export TOOLCHAIN=$NDK_HOME/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64
export CPU=arm
export PREFIX=$(pwd)/android/$CPU

function build_x264
{
./configure --prefix=$PREFIX \
--disable-shared \
--enable-static \
--disable-arm \
--enable-debug \
--enable-pic \
--host=arm-linux \
--cross-prefix=$TOOLCHAIN/bin/arm-linux-androideabi- \
--sysroot=$SYSROOT
make clean
make
make install
}
build_x264

编译x264
./build_android.sh

你可能感兴趣的:(编译x264 静态库)