I'm trying to build ffmpeg in Android NDK under Windows to put into an app but having issues. I found various guides on how to do this but they were all many years old and no longer worked.
What I've done so far is install NDK and downloaded the latest ffmpeg 3.1.2 source code into the sources folder. I also installed cygwin.
I then created a script, build_android.sh, with the code (taken from another guide):
#!/bin/bash NDK=/cygdrive/c/Android/ndk/android-ndk-r12b SYSROOT=$NDK/platforms/android-24/arch-arm64/ TOOLCHAIN=$NDK/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64 function build_one { ./configure \ --prefix=$PREFIX \ --disable-shared \ --enable-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 When I run this I get:
Makefile:198: /tests/Makefile: No such file or directory make: *** No rule to make target '/tests/Makefile'. Stop. Anyone know how to successfully build ffmpeg in NDK or have any guides that work with the latest version?
Thanks, Oliver