==== ffmpeg android build ====
Under linux mint 17.4, you can choose any OS, even cygwin.
- download android ndk, in this document, I used "android-ndk-r14b"
- download ffmpeg source, http://www.ffmpeg.org/download
- unzip ndk
- make standalone compiler
*
$NDK/build/tools/make-standalone-toolchian.sh --platform=android-21 --install-dir=~/home/android_toolchain
* "android-21" means minimum sdk, 21 is android 6.0 marshmallow
- make android build script
* in $FFMPEG directory,
*
NDK=/home/kjkim/android-ndk-r14b
SYSROOT=$NDK/platforms/android-21/arch-arm
TOOLCHAIN=/home/kjkim/android_toolchain
function build_one
{
./configure \
--prefix=$PREFIX \
--enable-shared \
--disable-static \
--disable-doc \
--disable-ffmpeg \
--disable-ffplay \
--disable-ffprobe \
--disable-ffserver \
--disable-avdevice \
--disable-doc \
--disable-symver \
--cross-prefix=$TOOLCHAIN/bin/arm-linux-androideabi- \
--target-os=linux \
--arch=arm \
--enable-cross-compile \
--sysroot=$SYSROOT \
--extra-cflags="-Os -fpic $ADDI_CFLAGS" \
--extra-ldflags="$ADDI_LDFLAGS" \
$ADDITIONAL_CONFIGURE_FLAG
make clean
make
make install
}
CPU=arm
PREFIX=$(pwd)/android/$CPU
ADDI_CFLAGS="-marm"
build_one