- FFmpeg for Android compiled (encoders: aac & openh264)
- Supports Android N
- kotlin wrapper for FFmpeg (task queue)
- armeabi-v7a
- x86 (with has text relocations kludge - disabled asm)
- MacOS
- Linux
- Windows10 Linux Subsystem (NOTE: you have to set ANDROID_NDK_ROOT to LINUX version of Android SDK / NDK / build tools)
- Set environment variable
default:
~/Android/Sdk/ndk-bundle
or set it manually:export ANDROID_NDK_ROOT={Android NDK Base Path}
- Run following commands to compile ffmpeg
sudo apt-get --quiet --yes install build-essential git autoconf libtool pkg-config gperf gettext yasm python-lxml nasm
./update_modules.sh
- update submodules and libraries./build_android.sh
- build ffmpeg & libopenh264
- Find the executable binary in build/{arch}/bin directory.
The binaries can be built from a docker container using the included Dockerfile. This sets the version of the NDK to an older, known-working version.
./docker_build.sh
will build the ffmpeg binaries (including openh264)
- import ffmpegandroid module
- put your ffmpeg & libopenh264.so into kotlin-wrapper/ffmpegandroid/ffmpeg
- replace
compile project(path: ':ffmpegandroid')
with
debugCompile project(path: ':ffmpegandroid', configuration: "debug") // force compile debug module
releaseCompile project(path: ':ffmpegandroid', configuration: "release")
in your app
build.gradle file (dependencies
section)
- FFmpeg: LGPL 3.0
- openh264: BSD
- kotlin wrapper: MIT
- build scripts: MIT
Inspired by WritingMinds java forks