[FFmpeg-user] compiling for android

Carl Eugen Hoyos cehoyos at ag.or.at
Wed Jul 9 08:48:02 CEST 2014


Patrick Shirkey <pshirkey <at> boosthardware.com> writes:

> >> I have successfully compiled  and run ffmpeg and
> >> ffserver on my android-4.4 device
> >> using the ffmpeg4android scripts here:
> >
> > External build scripts are not supported here.

I forgot to add that the script in question is known 
to contains severe deficiencies, so it really shouldn't 
be used.

If something is wrong with our configure script, 
*please* report it.

[...]

> Here's the full configure :
> 
> ./configure --arch=arm --target-os=linux --enable-cross-compile \
> --cross-prefix=/4.4/prebuilts/gcc/linux-x86/arm/
> arm-linux-androideabi-4.7/bin/arm-linux-androideabi- \
> --sysroot=/4.4/prebuilts/ndk/current/platforms/android-18/arch-arm \
> --disable-shared --enable-static --enable-gpl  --enable-avresample
> --enable-libx264 --enable-encoder=libx264 \
> --extra-cflags='-mcpu=cortex-a7 -mfloat-abi=softfp -mfpu=neon
> -D_GNU_SOURCE -fno-builtin-sin -fno-builtin-cos -std=c99' \
> --extra-ldflags='-Wl,--fix-cortex-a8' \
> --extra-libs="/4.4/external/x264/libx264.a";

--disable-shared --enable-static --enable-encoder=libx264 
are the default, please remove them.

The --extra-libs option looks wrong / superfluous, please 
remove it.
If your libx264 library is in /4.4/external/x264, you have to 
tell configure with --extra-ldflags=-L/4.4/external/x264

Why are --extra-cflags needed?

arm compilations often use --cpu (in your case: --cpu=cortex-a8)

What is failing when using above configure line?

Carl Eugen



More information about the ffmpeg-user mailing list