Open bkatgithub opened 6 years ago
The JNI folder should be inside app/src/main
Thanks Madhavan for the clarification. It helped me get past the error I was seeing.
However, I am seeing this error now. I googled it and found a mention about specifying abiFilters (https://stackoverflow.com/questions/37508876/android-ndk-ffmpeg-unknown-mnemonic-error). But doing this did not help with the error. Do you happen to know what the problem here is?
Thanks.
Bcs-MacBook-Pro:jni bc$ /Users/bc/projects/android/android-ndk-r12b/ndk-build [arm64-v8a] Compile : ffmpeg <= ffmpeg_controller.c [arm64-v8a] Compile : ffmpeg <= ffmpeg.c /var/folders/lw/psryh7r92d9djvtltkfrjgz80000gn/T//cc5pthx0.s: Assembler messages: /var/folders/lw/psryh7r92d9djvtltkfrjgz80000gn/T//cc5pthx0.s:8554: Error: unknown mnemonic
itt' -- itt gt' /var/folders/lw/psryh7r92d9djvtltkfrjgz80000gn/T//cc5pthx0.s:8555: Error: unknown mnemonic
movgt' -- movgt x25,x0' /var/folders/lw/psryh7r92d9djvtltkfrjgz80000gn/T//cc5pthx0.s:8556: Error: unknown mnemonic
movgt' -- movgt x0,x1' /var/folders/lw/psryh7r92d9djvtltkfrjgz80000gn/T//cc5pthx0.s:8558: Error: unknown mnemonic
it' -- it le' /var/folders/lw/psryh7r92d9djvtltkfrjgz80000gn/T//cc5pthx0.s:8559: Error: unknown mnemonic
movle' -- movle x0,x2' /var/folders/lw/psryh7r92d9djvtltkfrjgz80000gn/T//cc5pthx0.s:8561: Error: unknown mnemonic
it' -- it gt' /var/folders/lw/psryh7r92d9djvtltkfrjgz80000gn/T//cc5pthx0.s:8562: Error: unknown mnemonic
movgt' -- movgt x25,x0' make: *** [/Users/bc/tmp/android/MediaCodecTest/app/src/main/obj/local/arm64-v8a/objs/ffmpeg/ffmpeg.o] Error 1
Can you give me the following information :
I am working with ffmpeg v 2.8.13 and ndk r12b.
The build file
`
NDK=/Users/bc/projects/android/android-ndk-r12b SYSROOT=$NDK/platforms/android-14/arch-arm/ TOOLCHAIN=$NDK/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64
function build_one { ./configure \ --prefix=$PREFIX \ --enable-shared \ --disable-static \ --disable-doc \ --disable-ffmpeg \ --disable-ffplay \ --disable-ffprobe \ --disable-ffserver \ --disable-doc \ --disable-symver \ --enable-protocol=concat \ --enable-protocol=file \ --enable-muxer=mp4 \ --enable-demuxer=mpegts \ --enable-memalign-hack \ --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 -j3 make install }
CPU=arm PREFIX=$(pwd)/android/$CPU ADDI_CFLAGS="-marm" build_one `
Hi Madhavan,
I tried specifying vcodec libx264 and it caused a crash. I realized that I might have to do a custom build with this codec. I am trying to do that using the instructions in your blog (https://medium.com/madhavanmalolan/ffmpeg-for-android-b307f2613c82). I am getting an error (shown below) when I do the ndk-build.
Before I start debugging it, I wanted clarification on something in the build instructions. In the section titled "Compiling source" you say "Copy the following files from /path/to/ffmpeg to the jni/ directory". Where should the "jni" directory be created? I tried creating it in the android project directory at the same level as the 'app' directory (based on what you say further down in the instructions to cd /path/to/app/jni). I also tried placing it in the app/src/main directory.
I am using ffmpeg 2.8.13 and android-ndk-r12b
Thanks for putting this out for everybody!
Did I miss something that is causing this error?
Bcs-MacBook-Pro:jni bc$ /Users/bc/projects/android/android-ndk-r12b/ndk-build Android NDK: WARNING: Ignoring unknown import directory: /Users/bc/tmp/android/MediaCodecTest/app/src/main/jni Android NDK: /Users/bc/tmp/android/MediaCodecTest/app/src/jni/Android.mk: Cannot find module with tag '../../../../../../../projects/android/ffmpeg-2.8.13/android/arm' in import path Android NDK: Are you sure your NDK_MODULE_PATH variable is properly defined ? Android NDK: The following directories were searched: Android NDK: /Users/bc/tmp/android/MediaCodecTest/app/src/jni/Android.mk:14: *** Android NDK: Aborting. . Stop.