Android FFmpeg Prebuilt

https://github.com/hzw1199/Android-FFmpeg-Prebuilt

Prebuilt FFmpeg binaries for Android — ready to use, no compilation needed.

Provides ffmpeg / ffprobe executables and a single libffmpeg.so shared library with all core modules merged in.


Features

  • FFmpeg 8.0.1 — latest major release
  • Android arm64-v8a (aarch64) — targeting modern 64-bit devices, minSdkVersion 28
  • Single shared librarylibffmpeg.so merges libavcodec, libavformat, libavfilter, libavutil, libavdevice, libswresample, libswscale, all 7 core libraries into one .so
  • Standalone executablesffmpeg and ffprobe can be pushed to device and run directly via shell
  • C/C++ headers included — integrate into your Android NDK project
  • Pure LGPL build--disable-gpl --disable-nonfree, safe for commercial use
  • MediaCodec hardware acceleration — H.264 / HEVC / MPEG-4 hardware decoding via Android MediaCodec
  • 16 KB page size compatible — meets Google Play’s 16 KB page size requirement for apps targeting Android 15+
  • Size-optimized — built with --enable-small -Os

File Structure

ffmpeg-8.0.1/
├── bin/
│   ├── ffmpeg           # CLI executable (15 MB)
│   └── ffprobe          # CLI executable (14 MB)
├── libffmpeg.so         # Merged shared library — all 7 modules in one .so (74 MB)
├── include/
│   ├── libavcodec/
│   ├── libavdevice/
│   ├── libavfilter/
│   ├── libavformat/
│   ├── libavutil/
│   ├── libswresample/
│   └── libswscale/
└── examples/            # Official FFmpeg example source code

Build Configuration

Encoders & Decoders

All LGPL-compatible encoders and decoders enabled, including MediaCodec hardware decoders:

MediaCodec DecoderDescription
h264_mediacodecH.264 hardware decoding via Android MediaCodec
hevc_mediacodecHEVC hardware decoding via Android MediaCodec
mpeg4_mediacodecMPEG-4 hardware decoding via Android MediaCodec

Other Capabilities

CategoryStatus
Muxers / DemuxersAll enabled
ProtocolsAll enabled (network included)
FiltersAll enabled
Parsers / BSFsAll enabled
Hardware AccelerationMediaCodec + JNI enabled
iconvEnabled

libffmpeg.so Included Libraries

libffmpeg.so is linked from all 7 static libraries:

LibraryDescription
libavdeviceDevice capture & playback
libavfilterAudio/video filter framework
libavcodecAudio/video codec encoding & decoding
libavformatMuxing & demuxing (container formats)
libswresampleAudio resampling & format conversion
libswscaleVideo scaling & pixel format conversion
libavutilCommon utility functions

Quick Start

Use as CLI tool on device

adb push ffmpeg-8.0.1/bin/ffmpeg /data/local/tmp/
adb shell chmod +x /data/local/tmp/ffmpeg
adb shell /data/local/tmp/ffmpeg -version

Use libffmpeg.so in Android NDK project

CMakeLists.txt

add_library(ffmpeg SHARED IMPORTED)
set_target_properties(ffmpeg PROPERTIES
    IMPORTED_LOCATION ${CMAKE_SOURCE_DIR}/libs/${ANDROID_ABI}/libffmpeg.so
)
target_include_directories(your_target PRIVATE ${CMAKE_SOURCE_DIR}/ffmpeg-8.0.1/include)
target_link_libraries(your_target ffmpeg)

Build Information

ItemValue
FFmpeg Version8.0.1
Target PlatformAndroid
Target ABIarm64-v8a (aarch64)
minSdkVersion28 (Android 9.0)
NDK Versionr28
ToolchainLLVM / Clang
License ModeLGPL-2.1 (no GPL, no non-free)
Build TypeStatic libs → merged shared library + standalone executables
Size Optimization--enable-small, -Os -fpic

License

This build is compiled with --disable-gpl --disable-nonfree, making it a pure LGPL-2.1 build. You may use it in proprietary / commercial applications as long as you comply with the LGPL-2.1 license terms.

This repository distributes prebuilt binaries of FFmpeg. The complete FFmpeg source code is available at:

FFmpeg includes code from many contributors. Full copyright information is available in the FFmpeg source distribution.


If this project saved your time, please consider giving it a ⭐ — it helps others find it too!

Share

You may also like...

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注