DEV Community

LucQuebec
LucQuebec

Posted on

FFmpegKit is retired — here's how to fix your Android build (NDK r26c patch)

What happened

On April 1, 2025, FFmpegKit was officially retired and all
prebuilt binaries were removed from Maven Central overnight.
If your Android build suddenly started failing with:

Could not find com.arthenica:ffmpeg-kit-full:6.0-2

...you're not alone. Thousands of Android projects broke
the same day.

The NDK r26c problem

After digging through build logs, I found a second issue
for anyone trying to compile from source with NDK r26c —
clang strict mode rejects a bit-field initializer in
fftools_ffmpeg_mux_init.c:

error: implicit truncation from 'int' to a one-bit wide
bit-field changes value from 1 to -1
[-Werror,-Wsingle-bit-bitfield-constant-conversion]

The original FFmpegKit code was never updated for NDK r26c's
stricter clang behavior.

The fix

One line in android/jni/Android.mk:

LOCAL_CFLAGS := -Wall -Wextra -Werror \
-Wno-single-bit-bitfield-constant-conversion \
-Wno-unused-parameter

What I built

Instead of migrating away from FFmpegKit, I decided to
maintain a patched Android-only fork:

  • arm64-v8a (modern devices only)
  • API 24+ (Android 7.0+)
  • NDK r26c compatible
  • compileSdk/targetSdk 35
  • 16KB page size alignment for Android 15+
  • Android MediaCodec hardware acceleration
  • LGPL-3.0

Prebuilt AAR available — search "ffmpegkit-maintained"
on GitHub.
https://github.com/ffmpegkit-maintained/ffmpeg-kit

Quick setup

Place the AAR in your app/libs/ folder and add to
your build.gradle:

dependencies {
implementation fileTree(dir: 'libs', include: ['*.aar'])
implementation 'com.arthenica:smart-exception-java9:0.2.1'
}

Why Android-only?

Maintaining FFmpegKit across Android, iOS, Flutter and
React Native is a full-time job — that's partly why the
original maintainer retired it. Focusing on Android only
keeps the scope manageable and the builds reliable.

What's next

  • Full variant with additional codecs
  • GPL variant with x264/x265
  • Maven Central publication (namespace already verified)
  • CI/CD pipeline for automated builds

The project is early but functional.
Happy to answer questions in the comments.

Top comments (0)