fanplayer icon indicating copy to clipboard operation
fanplayer copied to clipboard

Error while building ffmpeg library for android

Open DaAlx opened this issue 4 years ago • 10 comments

Hello,

first of all thank you for this awesome project. I tested the demo android application and I'm suprised with the excellent performance of the player.

Now I'm trying to build the ffmpeg library for the android application. My environment is an Ubuntu 20.04.3 (kernel: 5.11.0-37-generic). The build process results to the following error:

./fanplayer/player-android/jni/soundtouch/source/Android-lib/jni/soundtouch-lib.cpp:39:24: fatal error: soundtouch.h: No such file or directory
 #include "soundtouch.h"

I have followed the steps from the readme (https://github.com/rockcarry/fanplayer/wiki/build-ffmpeg-for-android):

  • git clone https://github.com/rockcarry/fanplayer.git
  • cd player-android/jni
  • export ANDROID_NDK_HOME=/Downloads/android-ndk-r13b/
  • ./build_fanplayer_jni.sh --> this results to the error no NDK arm-linux-androideabi-gcc on $PATH at (eval 10) line 124.
  • I changed the line 54 of the build_fanplayer_jni.sh script from export PATH=$PATH:$ANDROID_NDK_HOME/toolchains/$TOOLCHAIN_PATH/prebuilt/windows-x86_64/bin to export PATH=$PATH:$ANDROID_NDK_HOME/toolchains/$TOOLCHAIN_PATH/prebuilt/linux-x86_64/bin --> Now the the scripts continues but after a few seconds it results to the error ./fanplayer/player-android/jni/soundtouch/source/Android-lib/jni/soundtouch-lib.cpp:39:24: fatal error: soundtouch.h: No such file or directory'

I have looked in the directory ./fanplayer/player-android/jni/soundtouch/source/Android-lib/jni. There is no file named soundtouch.h.

Do I missing something?

Best Regards, DaAlx

DaAlx avatar Nov 07 '21 14:11 DaAlx

git clone https://github.com/rockcarry/soundtouch.git soundtouch-lib.h and soundtouch-lib.cpp is in directoy soundtouch/source/Android-lib/jni please check the build script build_fanplayer_jni.sh.

rockcarry avatar Nov 09 '21 01:11 rockcarry

This unfortunately does not fix the error. The file soundtouch/source/Android-lib/jni/soundtouch-lib.cpp includes on line 39 the header file soundtouch.h. In this directory (https://github.com/rockcarry/soundtouch/tree/master/source/Android-lib/jni) there is no file with this name.

DaAlx avatar Nov 09 '21 21:11 DaAlx

image

rockcarry avatar Nov 10 '21 01:11 rockcarry

During the script execution the copy command on line 99 is never reached, because the error appears on line 80 (execution of ${CROSS_PREFIX}gcc command, in this case it is arm-linux-androideabi-gcc).

Do I missing some configuration?

DaAlx avatar Nov 11 '21 21:11 DaAlx

check PATH environment variable: export PATH=$PATH:$ANDROID_NDK_HOME/toolchains/$TOOLCHAIN_PATH/prebuilt/windows-x86_64/bin on ubuntu it is differernt, not windows-x86_64, but you should use the correct value of you ndk path

rockcarry avatar Nov 12 '21 02:11 rockcarry

I changed the line 54 of the script (see my first post). So my PATH variable has the following value $PATH:$ANDROID_NDK_HOME/toolchains/$TOOLCHAIN_PATH/prebuilt/linux-x86_64/bin.

DaAlx avatar Nov 12 '21 22:11 DaAlx

try command: $ANDROID_NDK_HOME/toolchains/$TOOLCHAIN_PATH/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc -v

rockcarry avatar Nov 13 '21 02:11 rockcarry

I tried it with -v parameter but I'm not able to see what the error could be. Maybe you can figure out what is going wrong! build.log

DaAlx avatar Nov 14 '21 19:11 DaAlx

During the script execution the copy command on line 99 is never reached, because the error appears on line 80 (execution of ${CROSS_PREFIX}gcc command, in this case it is arm-linux-androideabi-gcc).

Do I missing some configuration?

soundtouch.h, the issue is file name lowercase.

tangfuhao avatar Dec 08 '21 08:12 tangfuhao

modify soundtouch-lib.cpp line 39 #include "soundtouch.h" to #include "SoundTouch.h"

MRDHR avatar Jan 10 '24 06:01 MRDHR