Support building FFmpeg for Android with x264.
FFmpeg | x264 | Android NDK | Tested |
---|---|---|---|
2.8.6 | 90a61ec76424778c050524f682a33f115024be96 | ndk20,ndk21,ndk22,ndk26 | Yes |
3.4.8 | 5db6aa6cab1b146e07b60cc1736a01f21da01154 | ndk20,ndk21,ndk22,ndk26 | Yes |
4.4.4 | 7ed753b10a61d0be95f683289dfb925b800b0676 | ndk22,ndk26 | Yes |
5.0 | 7ed753b10a61d0be95f683289dfb925b800b0676 | ndk22,ndk26 | Yes |
- Install git
- Install Android NDK (tested with ndk20、ndk21、ndk22、ndk26), do not use
NDK23
!- Tested with
NDK26
on macOS with Apple chips
- Tested with
- Install yasm, nasm (via
brew install nasm yasm
orapt install nasm yasm -y
...)
$ export NDK=/path/to/your/android-ndk
$ ./build_android.sh
- Use
./build_android.sh --ffmpeg 3.4.8 --x264 5db6aa6cab1b146e07b60cc1736a01f21da01154
to build the specific version
- Use
$ cd jni && $NDK/ndk-build
- The
libffmpeg.so
is in the folderlibs