This is a universal script that makes it easy to build FFmpeg 0.7.1, FFmpeg 0.11.5, FFmpeg 2.2.4, FFmpeg 3.1.4 and FFmpeg 4.0.4 for Android with legacy versions support.
-
If there is none in-the-box, install the missing packages:
# for Ubuntu/Debian/Linux Mint # Windows and macOS currently not supported sudo apt-get install gcc g++ yasm gettext autoconf automake cmake git git-core \ libass-dev libfreetype6-dev libmp3lame-dev libsdl2-dev libtool \ libvdpau-dev libvorbis-dev pkg-config wget zlib1g-dev texinfo
-
Download Android NDK (
r5
,r7b
orr8e
/r10e
).
See NDK r8e download page or list of unsupported NDK versions. -
Clone repo.
git clone https://github.com/tinelix/ffmpeg-android-builder.git cd ffmpeg-android-builder
-
Change
./build-android-x.y.z.sh
file andffmpeg-x.y.z
directories permissions to0777
(chmod -R 0777 .
) and run it.
-------------------------------------------------------------------------------------------------------------------|
| FFmpeg version | NDK version | Supported ABIs | Supported Android versions | Tested in Linux distros |
|-----------------|-------------|------------------|------------------------------|--------------------------------|
| 4.0.4 | r10e | armeabi | Android 2.3 and above | Debian 8.11.0 |
| | | armeabi-v7a | | |
| | | x86-eabi | | |
| | | arm64-v8a | | |
|-----------------|-------------|------------------|------------------------------|--------------------------------|
| 3.1.4 | r10e | armeabi | Android 2.3 and above | - |
| | | armeabi-v7a | | |
| | | x86-eabi | | |
| | | arm64-v8a | | |
|-----------------|-------------|------------------|------------------------------|--------------------------------|
| 2.2.4 | r10e | armeabi | Android 2.0* and above | Debian 8.11.0 |
| | r8e | armeabi-v7a | | |
| | | x86-eabi | | |
| | | arm64-v8a | | |
|-----------------|-------------|------------------|------------------------------|--------------------------------|
| 0.11.5 | r8e | armeabi | Android 2.0 and above | - |
| | r7 | armeabi-v7a | | |
| | r6 | x86-eabi | | |
| | r5b | | | |
|-----------------|-------------|------------------|------------------------------|--------------------------------|
| 0.7.1 | r8e | armeabi | Android 2.0 and above | - |
| | r7 | armeabi-v7a | | |
| | r6 | x86-eabi | | |
| | r5 | | | |
----------------------------------------------------------------------------------|--------------------------------|
* if used Android NDK r8e for 32-bit build
This builder using FFmpeg (modified) source code licensed under LGPLv2.1 or later version with LGPLv3 licensing model by default.
Scripts are also licensed under LGPLv3.
In countries where MPEG standard algorithm patents are still in force and possibly used in open source projects within FFmpeg, royalties will likely need to be paid to their owners. Read more in the legal information about FFmpeg.