https://github.com/husen-hn/ffmpeg-android-binary
🎬 Android FFmpeg Builder - Automated FFmpeg shared library (.so) builder for Android. Supports multiple architectures, optimized configuration, and includes pre-built binaries.
https://github.com/husen-hn/ffmpeg-android-binary
android automation build-script ffmpeg media-processing ndk shared-libraries shell
Last synced: 2 months ago
JSON representation
🎬 Android FFmpeg Builder - Automated FFmpeg shared library (.so) builder for Android. Supports multiple architectures, optimized configuration, and includes pre-built binaries.
- Host: GitHub
- URL: https://github.com/husen-hn/ffmpeg-android-binary
- Owner: husen-hn
- License: lgpl-3.0
- Created: 2025-03-28T12:30:38.000Z (2 months ago)
- Default Branch: master
- Last Pushed: 2025-03-29T08:54:36.000Z (2 months ago)
- Last Synced: 2025-03-29T09:24:09.509Z (2 months ago)
- Topics: android, automation, build-script, ffmpeg, media-processing, ndk, shared-libraries, shell
- Language: Shell
- Homepage:
- Size: 12.3 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Android FFmpeg Builder
🎬 Automated FFmpeg shared library and binary builder for Android. This script builds FFmpeg with full codec support and hardware acceleration for multiple Android architectures.
[](LICENSE)
[](https://ffmpeg.org/releases/ffmpeg-7.1.tar.bz2)
[](https://github.com/husen-hn/ffmpeg-android-binary/commits/main)
[](https://github.com/husen-hn/ffmpeg-android-binary/releases/latest)## 🚀 Features
- FFmpeg 7.1 with full codec and format support
- Supported architectures:
- arm64-v8a
- armeabi-v7a
- x86_64
- Hardware acceleration enabled
- MediaCodec support
- NEON optimization
- Network capabilities
- All encoders and decoders
- All muxers and demuxers
- All protocols enabled
- ffmpeg and ffprobe binaries included## 📋 Prerequisites
### Required Tools
- Android NDK
- Build essentials (gcc, make)
- YASM/NASM assembler
- wget
- pkg-configOn Ubuntu/Debian:
```bash
sudo apt-get update && sudo apt-get install -y \
build-essential \
gcc \
make \
yasm \
nasm \
pkg-config \
wget
```On macOS:
```bash
brew install automake yasm nasm pkg-config wget
```### Android NDK Setup
1. Download Android NDK from [Android's NDK page](https://developer.android.com/ndk/downloads)
2. Extract it to a location (default: `/opt/android-ndk`)
3. Update the `ANDROID_NDK_HOME` variable in the script if your NDK is installed elsewhere
4. Ensure NDK toolchain is accessible## 🛠️ Usage
1. Clone the repository:
```bash
git clone https://github.com/husen-hn/android-ffmpeg-builder.git
cd android-ffmpeg-builder
```2. Make the script executable:
```bash
chmod +x build_ffmpeg.sh
```3. Run the script:
```bash
./build_ffmpeg.sh
```## 📚 Output Structure
```
android/project_output/
├── arm64-v8a/
│ ├── bin/
│ │ ├── ffmpeg
│ │ └── ffprobe
│ └── lib/
│ ├── libavcodec.so
│ ├── libavdevice.so
│ ├── libavfilter.so
│ ├── libavformat.so
│ ├── libavutil.so
│ ├── libpostproc.so
│ ├── libswresample.so
│ └── libswscale.so
├── armeabi-v7a/
├── x86_64/
└── build_info.txt
```## 🔧 Configurations
The script builds FFmpeg with these features:
- Shared libraries enabled
- Hardware acceleration
- MediaCodec support
- NEON optimization
- Network support
- All codecs and formats
- Debug symbols stripped
- Size-optimized binaries## 📦 Releases & Pre-built Binaries
### Latest Release
[](https://github.com/husen-hn/ffmpeg-android-binary/releases/latest)
Pre-built binaries are available in the [Releases](https://github.com/husen-hn/ffmpeg-android-binary/releases) section. Each release includes:
- Built `.so` files for all supported architectures (arm64-v8a, armeabi-v7a, x86_64)
- ffmpeg and ffprobe binaries
- Build information and checksums
- Source code archive## 🔄 Updating FFmpeg Version
1. Update the version in `build_ffmpeg.sh`:
```bash
# Change this line
FFMPEG_VERSION="7.1"
```2. Download the new FFmpeg source:
```bash
wget https://ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.bz2
```3. Clean old build files:
```bash
rm -rf ffmpeg-*
rm -rf android/project_output/*
```4. Run the build script:
```bah
./build_ffmpeg.sh
```## 📜 License
This project is licensed under the GNU Lesser General Public Version 3 License - see the [LICENSE](./LICENSE) file for details.