Android How to compile ffmpeg for all cpu systems.

How to compile ffmpeg for all cpu architectures in android. I am currently using the following script that generates hand-only libs.

#!/bin/bash NDK=$HOME/ndk32 SYSROOT=$NDK/platforms/android-9/arch-arm/ TOOLCHAIN=$NDK/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86 function build_one { ./configure \ --prefix=$PREFIX \ --enable-shared \ --disable-static \ --disable-doc \ --disable-ffmpeg \ --disable-ffplay \ --disable-ffprobe \ --disable-ffserver \ --disable-avdevice \ --disable-doc \ --disable-symver \ --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 make install } CPU=arm PREFIX=$(pwd)/android/$CPU ADDI_CFLAGS="-marm" build_one 

I want to support all possible platforms.

+4
source share
1 answer

Just use different toolchains , see build_android.sh from the AndroidFFmpeg project for a good example. Please note that it also processes the library for ARM NEON SIMD, it is loaded at run time if NEON support is detected.

+1
source

Source: https://habr.com/ru/post/972029/


All Articles