Build FFMPEG 3.1.4 for Android

前端 未结 1 1221
再見小時候
再見小時候 2021-01-15 06:19

I used this and this methods to build latest (3.1.4) FFMPEG version for Android.
Build was succeed.
I got several folders with sources

相关标签:
1条回答
  • 2021-01-15 06:59

    I've actually posted this as a few answers now. This works perfectly for ffmpeg 3.1.4:

    #!/bin/bash
    
    NDK=$HOME/Android/Sdk/ndk-bundle
    SYSROOT=$NDK/platforms/android-19/arch-arm/
    TOOLCHAIN=$NDK/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64
    CPREFIX=$TOOLCHAIN/bin/arm-linux-androideabi-
    
    function build_it {
    ./configure \
        --prefix=$PREFIX    \
        --disable-static    \
        --enable-shared     \
        --disable-doc       \
        --disable-ffmpeg    \
        --disable-ffplay    \
        --disable-ffprobe   \
        --disable-ffserver  \
        --disable-avdevice  \
        --disable-doc       \
        --disable-symver    \
        --cross-prefix=$CPREFIX \
        --target-os=linux   \
        --arch=arm      \
        --enable-cross-compile  \
        --enable-gpl        \
        --sysroot=$SYSROOT  \
        --extra-cflags="-Os -fpic $ADDI_CFLAGS" \
        --extra-ldflags="$ADDI_LDFLAGS" \
        $ADDITIONAL_CONFIGURE_FLAG
        make clean
        make -j9
        make install
    }
    
    CPU=arm
    PREFIX=$(pwd)/android/$CPU
    ADDI_CFLAGS="-marm"
    
    build_it
    

    You will find the android libraries and headers in android/arm/...

    0 讨论(0)
提交回复
热议问题