Skip to content
This repository has been archived by the owner on Jan 6, 2025. It is now read-only.

android.sh

Taner Sener edited this page Jun 30, 2018 · 22 revisions

android.sh builds FFmpeg and MobileFFmpeg for Android platform.

By default five Android ABIs (armeabi-v7a, armeabi-v7a-neon, arm64-v8a, x86 and x86_64) are built without any external libraries enabled. When compilation ends an Android Archive (AAR) file is created with enabled platforms inside. Please note that GPL libraries (external libraries with GPL license) need --enable-gpl flag to be set explicitly.

Options can be used to disable ABIs and/or enable external libraries.

Usage: ./android.sh [OPTION]...

Options:
  -h, --help			display this help and exit
  -V, --version			display version information and exit

Licensing options:
  --enable-gpl			allow use of GPL libraries, resulting libs will be licensed under GPLv3.0 [no]

Platforms:
  --disable-arm-v7a		do not build arm-v7a platform [yes]
  --disable-arm-v7a-neon	do not build arm-v7a-neon platform [yes]
  --disable-arm64-v8a		do not build arm64-v8a platform [yes]
  --disable-x86			do not build x86 platform [yes]
  --disable-x86-64		do not build x86-64 platform [yes]

Libraries:
  --full			enables all external libraries
  --enable-android-media-codec	build with built-in Android MediaCodec [no]
  --enable-android-zlib		build with built-in zlib [no]
  --enable-fontconfig		build with fontconfig [no]
  --enable-freetype		build with freetype [no]
  --enable-fribidi		build with fribidi [no]
  --enable-gmp			build with gmp [no]
  --enable-gnutls		build with gnutls [no]
  --enable-kvazaar		build with kvazaar [no]
  --enable-lame			build with lame [no]
  --enable-libaom		build with libaom [no]
  --enable-libass		build with libass [no]
  --enable-libiconv		build with libiconv [no]
  --enable-libilbc		build with libilbc [no]
  --enable-libtheora		build with libtheora [no]
  --enable-libvorbis		build with libvorbis [no]
  --enable-libvpx		build with libvpx [no]
  --enable-libwebp		build with libwebp [no]
  --enable-libxml2		build with libxml2 [no]
  --enable-opencore-amr		build with opencore-amr [no]
  --enable-opus			build with opus [no]
  --enable-shine		build with shine [no]
  --enable-snappy		build with snappy [no]
  --enable-soxr			build with soxr [no]
  --enable-speex		build with speex [no]
  --enable-wavpack		build with wavpack [no]

GPL libraries:
  --enable-x264			build with x264 [no]
  --enable-xvidcore		build with xvidcore [no]

Advanced options:
  --reconf-LIBRARY		run autoreconf before building LIBRARY [no]
  --rebuild-LIBRARY		build LIBRARY even it is detected as already built [no]

Example Usage

1. Default build

android.sh is called without any options. FFmpeg is built for all five platforms without any external library support.

2. Full build

android.sh is called with --full option. FFmpeg is built for all five platforms with all external libraries enabled. Libraries with GPL license are not included in this option.

3. Custom build

android.sh is called with a series of --enable-*, --disable-*, --reconf-* and --rebuild-* options. Options define which platforms and libraries will be built, which libraries will be reconfigured or rebuilt.

Clone this wiki locally