Disable all FFmpeg features apart from audio extraction. We only keep enable MP3, WAV, Flac and M4A extraction.
The script uses configure
file to generate accurate makefile
according to selected options and call make
to compile the library.
Compilation generates 4 files : libavcodec.so
, libavformat.so
, libavutil.so
and libswresample.so
.
- Android NDK : contains the cross compilator we will use to compile FFmpeg sources for Android as well as Android headers.
- FFmpeg source code .
- Linux OS : if you are on Mac OS, you need to apply some modifications on the script by replacing
linux
reference bydarwin
. - GCC compilator.
To compile FFmpeg for Android, you need to follow these steps :
- Define
NDK
variable in your development environnement with the path of your Android NDK directory. - Put the script inside FFmpeg directory.
- Execute the script with one of the following paramter :
x86
,ARMv6
orARMv7
. - Generated
.so
files are copied inside your personal directory.
- This script has been developed to compile FFmpeg 3.3. Some flags can have changed with time if you compile for a newer version.
- Some optimizations are done during compilation (
-ffast-math -pipe -O2 -ftree-vectorize
) and more are done according to the choosen architecture. - Script will generate a
shared
library with.so
files. - All generated files are inside their respective directory but also copied in your personal directory.
- Compilation is done with headers of the Android API 14.