Skip to content

Android NEON Support

Taner Sener edited this page Jul 15, 2026 · 1 revision

The arm-v7a and arm-v7a-neon architectures use the same Android ABI, armeabi-v7a, in the FFmpegKit Android library. When both architectures are included in a binary, FFmpegKit detects NEON support at runtime and loads the appropriate architecture for armeabi-v7a.

This mechanism allows compatible devices to benefit from NEON optimizations. However, the armeabi-v7a package is larger than the other ABI packages because it contains libraries for both architectures.

The following shared libraries are packaged for each Android ABI:

libavcodec.so
libavdevice.so
libavfilter.so
libavformat.so
libavutil.so
libc++_shared.so    # Included only when chromaprint, libilbc, libjxl,
                    # libsvtav1, openh264, rubberband, snappy, srt,
                    # tesseract, vvenc, x265 or zimg is enabled
libcpufeatures.so
libffmpegkit-abidetect.so
libffmpegkit.so
libswresample.so
libswscale.so

To provide NEON support for the armeabi-v7a ABI, the following libraries, identified by the _neon suffix, are also included:

libavcodec_neon.so
libavdevice_neon.so
libavfilter_neon.so
libavformat_neon.so
libavutil_neon.so
libffmpegkit_armv7a_neon.so
libswresample_neon.so
libswscale_neon.so

To reduce the size of the armeabi-v7a package, you can exclude either the arm-v7a-neon or the arm-v7a libraries.

Excluding arm-v7a-neon

Add the following configuration to your build.gradle file:

android {
    packagingOptions {
        exclude 'lib/armeabi-v7a/*_neon.so'
    }
}

Excluding arm-v7a

Add the following configuration to your build.gradle file:

android {
    packagingOptions {
        exclude 'lib/armeabi-v7a/libavcodec.so'
        exclude 'lib/armeabi-v7a/libavformat.so'
        exclude 'lib/armeabi-v7a/libavfilter.so'
        exclude 'lib/armeabi-v7a/libavutil.so'
        exclude 'lib/armeabi-v7a/libswscale.so'
        exclude 'lib/armeabi-v7a/libswresample.so'
        exclude 'lib/armeabi-v7a/libavdevice.so'
    }
}

Clone this wiki locally