ndk 编译ffmpeg 并依赖与libx264
{
#! /bin/bash
echo ".............compile"
make clean
export NDK=/home/yfk/pripro/Android/android-ndk-r10e
export SYSROOT=$NDK/platforms/android-18/arch-arm/
export TOOLCHAIN=$NDK/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64
export CPU=arm
export PREFIX=/home/yfk/pripro/D/library/ffmpeg-4.0/libs/$CPU
export ADDI_CFLAGS="-marm -march=armv7-a"
./configure --target-os=android \
--ln_s="cp -rf" \
--prefix=$PREFIX \
--arch=arm \
\
--enable-shared \
--enable-static \
--enable-gpl \
\
--enable-runtime-cpudetect \
--disable-asm \
--arch=arm \
--enable-avcodec \
--enable-avformat \
--enable-nonfree \
--enable-version3 \
--disable-ffmpeg \
--disable-ffplay \
--disable-ffprobe \
--enable-doc \
--enable-protocols\
--enable-libx264\
--enable-decoder=h264 \
--enable-decoder=h263 \
--enable-decoder=aac \
--enable-decoder=mpeg4 \
--enable-decoder=mjpeg \
--enable-decoder=png \
--enable-decoder=gif \
--enable-small \
--disable-symver \
--enable-fft \
--enable-mdct \
--disable-parsers \
--enable-parser=h264 \
--enable-yasm \
\
--cross-prefix=$TOOLCHAIN/bin/arm-linux-androideabi- \
--enable-cross-compile \
--sysroot=$SYSROOT \
--extra-cflags="-Os $ADDI_CFLAGS -fPIC -I/home/yfk/pripro/D/library/x264-master/libs/arm/include " \
--extra-ldflags="$ADDI_CFLAGS -fPIC -L/home/yfk/pripro/D/library/x264-master/libs/arm/lib" \
$ADDITIONAL_CONFIGURE_FLAG
echo "configure over"
make clean
#-L/home/yfk/pripro/D/library/ffmpeg-4.0/ex/x264/lib
# --enable-libx264 \
echo ".............building over"
#--enable-librtmp \
}
ok