How to compile latest FFmpeg Library for Android?

后端 未结 3 2022
情书的邮戳
情书的邮戳 2021-02-06 10:10

Struggling to put together a working and generally best practice build of current FFmpeg. There seems to be no up-to-date documents or tutorials. What does exist is full of outd

3条回答
  •  伪装坚强ぢ
    2021-02-06 10:31

    Build the standalone NDK Toolchain

    Download the latest NDK and run make_standalone_toolchain.py

    Configure FFmpeg

    ./configure \
    --cross-prefix=arm-linux-androideabi- \
    --sysroot="${ANDROID_STANDALONE_NDK}/sysroot" \
    --target-os=linux \
    --arch=arm \
    --cpu=cortex-a8 \
    --enable-cross-compile \
    --enable-pic \
    --enable-shared \
    --extra-cflags="-fpic"
    

    Then of course

    make -j4
    

    You probably don't want to compile a lot of the components, so you'll need to see what to enable/disable in ./configure --help

提交回复
热议问题