I am trying to compile FFMPEG for Android on Windows 8.1, but I got an error on line 32 in build_android.sh
./build_android.sh: line 32: syntax error: unexpected end of file
when i execute command in cygwin
chmod + x build_android.sh
./build_android.sh
If you know the steps to compile ffmpeg for Android on Windows and how to use ffmpeg in android, please answer me.
I refer.
http://www.packtpub.com/sites/default/files/downloads/Developing_Multimedia_Applications_with_NDK.pdf
,
https://trac.ffmpeg.org/wiki/CompilationGuide/Android and
http://www.roman10.net/how-to-build-ffmpeg-with-ndk-r9
build_android.sh
#!/bin/bash
NDK=E:/android-ndk-r9d
SYSROOT=$NDK/platforms/android-9/arch-arm/
TOOLCHAIN=$NDK/toolchains/arm-linux-androideabi-4.6/prebuilt/windows
function build_one { ./configure \
--prefix=$PREFIX \
--disable-shared \
--enable-static \
--disable-doc \
--enable-ffmpeg \
--disable-ffplay \
--disable-ffprobe \
--disable-ffserver \
--enable-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