-
Notifications
You must be signed in to change notification settings - Fork 25
Building Android
FFmpegKitNext for Android can be built with the recommended Nix wrapper or by calling the direct Android build script.
Before building, review Android Prerequisites. For the full Android option reference, see nix‐android.sh.
Use the Nix wrapper for normal builds, CI builds and reproducible host environments.
./nix-android.sh --list-profiles
./nix-android.sh -p android-r27d
The wrapper enters the selected Nix profile and then calls scripts/start-android.sh inside that environment.
If you maintain the Android SDK, NDK, JDK and host tools yourself, call the direct script from the project root:
./scripts/start-android.sh
The direct script uses the environment described in Android Prerequisites, especially ANDROID_SDK_ROOT, ANDROID_NDK_ROOT and JAVA_HOME.
The same Android build options can be passed to both commands. For example:
./nix-android.sh -p android-r27d --enable-libwebp --disable-arm-v7a-neon
./scripts/start-android.sh --enable-libwebp --disable-arm-v7a-neon
Use --enable-gpl when enabling GPL-licensed libraries such as x264, x265, xvidcore, libvidstab or rubberband.
The complete option list is documented in nix‐android.sh.
The Android build has three phases:
- Build
FFmpegand enabled external libraries with the Android NDK toolchain. - Build the native
FFmpegKitNextAndroid library withndk-build. - Package the Kotlin/Java API and native libraries into an Android Archive (
.aar) with the Gradle wrapper.
Build outputs are written under prebuilt.
A default API 24 Android build creates a local Maven repository similar to:
prebuilt/bundle-android-aar-24-maven/
com/arthenica/ffmpeg-kit-next/<version>/
ffmpeg-kit-next-<version>.aar
ffmpeg-kit-next-<version>.pom
Use the generated local Maven repository from your Android application or copy it into your own artifact repository.
Copyright (c) 2026 FFmpegKitNext
- Status
- Versions
- Changelog
- Project Layout
- Using
- Building
- External Libraries
- Patents
- License