FFMpeg on Android, undefined references to libavcodec functions, although it is listed on command line

后端 未结 3 1278
别那么骄傲
别那么骄傲 2020-12-14 04:40

I have a problem with unresolved references to ffmpeg\'s libavcodec functions, so far failed to find the answer in other places (including my mind) :)

Let me descri

3条回答
  •  遥遥无期
    2020-12-14 05:23

    when you build ffmpeg should use android-14 or lower,like this:

    export NDK=/Users/luoye/Downloads/android-ndk-r11c
    export PREBUILT=$NDK/toolchains/arm-linux-androideabi-4.9/prebuilt
    export PLATFORM=$NDK/platforms/android-8/arch-arm
    export PREFIX=../simplefflib
    build_one(){
    ./configure --target-os=linux --prefix=$PREFIX \
    --enable-cross-compile \
    --enable-runtime-cpudetect \
    --disable-asm \
    --arch=arm \
    --cc=$PREBUILT/darwin-x86_64/bin/arm-linux-androideabi-gcc \
    --cross-prefix=$PREBUILT/darwin-x86_64/bin/arm-linux-androideabi- \
    --disable-stripping \
    --nm=$PREBUILT/darwin-x86_64/bin/arm-linux-androideabi-nm \
    --sysroot=$PLATFORM \
    --enable-gpl --enable-shared --disable-static --enable-small \
    --disable-ffprobe
    --disable-ffplay
    --disable-ffmpeg
    --disable-ffserver
    --disable-debug \
    --extra-cflags="-fPIC -DANDROID -D__thumb__ -mthumb -Wfatal-errors -         Wno-deprecated -mfloat-abi=softfp -marm -march=armv7-a" 
    }
    
    build_one
    
    make
    make install
    

提交回复
热议问题