Skip to content

Commit f2045d1

Browse files
committed
README ⌾
1 parent faa4b84 commit f2045d1

File tree

1 file changed

+116
-34
lines changed

1 file changed

+116
-34
lines changed

README.md

Lines changed: 116 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,79 +1,161 @@
11
# Android FFmpeg Builder
2-
A robust shell script to build FFmpeg libraries for Android. This script automatically builds FFmpeg shared libraries (.so files) for multiple Android architectures.
32

4-
## Current Features
5-
- Builds FFmpeg version 7.1 for Android
6-
- Supports multiple architectures (armeabi-v7a, arm64-v8a, x86_64)
7-
- Minimal configuration focusing on core video/audio functionality
8-
- Optimized for size and performance
9-
- Automated build process
10-
- Pre-built binaries available in releases
3+
🎬 Automated FFmpeg shared library and binary builder for Android. This script builds FFmpeg with full codec support and hardware acceleration for multiple Android architectures.
114

12-
## Prerequisites
5+
[![License](https://img.shields.io/badge/License-LGPL-blue.svg)](LICENSE)
6+
[![FFmpeg Version](https://img.shields.io/badge/FFmpeg-7.1-red.svg)](https://ffmpeg.org/releases/ffmpeg-7.1.tar.bz2)
7+
[![GitHub last commit](https://img.shields.io/github/last-commit/husen-hn/ffmpeg-android-binary?label=Last%20Update)](https://github.com/husen-hn/ffmpeg-android-binary/commits/main)
8+
[![GitHub release (latest by date)](https://img.shields.io/github/v/release/husen-hn/ffmpeg-android-binary)](https://github.com/husen-hn/ffmpeg-android-binary/releases/latest)
9+
10+
## 🚀 Features
11+
12+
- FFmpeg 7.1 with full codec and format support
13+
- Supported architectures:
14+
- arm64-v8a
15+
- armeabi-v7a
16+
- x86_64
17+
- Hardware acceleration enabled
18+
- MediaCodec support
19+
- NEON optimization
20+
- Network capabilities
21+
- All encoders and decoders
22+
- All muxers and demuxers
23+
- All protocols enabled
24+
- ffmpeg and ffprobe binaries included
25+
26+
## 📋 Prerequisites
1327

1428
### Required Tools
29+
1530
- Android NDK
1631
- Build essentials (gcc, make)
1732
- YASM/NASM assembler
1833
- wget
1934
- pkg-config
2035

2136
On Ubuntu/Debian:
37+
2238
```bash
23-
sudo apt-get update
24-
sudo apt-get install build-essential gcc make yasm nasm pkg-config wget
39+
sudo apt-get update && sudo apt-get install -y \
40+
build-essential \
41+
gcc \
42+
make \
43+
yasm \
44+
nasm \
45+
pkg-config \
46+
wget
2547
```
2648

2749
On macOS:
50+
2851
```bash
2952
brew install automake yasm nasm pkg-config wget
3053
```
3154

32-
Android NDK Setup
55+
### Android NDK Setup
56+
3357
1. Download Android NDK from [Android's NDK page](https://developer.android.com/ndk/downloads)
3458
2. Extract it to a location (default: `/opt/android-ndk`)
3559
3. Update the `ANDROID_NDK_HOME` variable in the script if your NDK is installed elsewhere
60+
4. Ensure NDK toolchain is accessible
61+
62+
## 🛠️ Usage
63+
64+
1. Clone the repository:
3665

37-
## Usage
38-
1. Clone this repository:
3966
```bash
4067
git clone https://github.com/husen-hn/android-ffmpeg-builder.git
4168
cd android-ffmpeg-builder
4269
```
4370

4471
2. Make the script executable:
72+
4573
```bash
4674
chmod +x build_ffmpeg.sh
4775
```
4876

4977
3. Run the script:
78+
5079
```bash
5180
./build_ffmpeg.sh
5281
```
5382

54-
The built libraries will be in `android/project_libs/`:
83+
## 📚 Output Structure
84+
5585
```
56-
android/project_libs/
86+
android/project_output/
5787
├── arm64-v8a/
58-
│ ├── libavcodec.so
59-
│ ├── libavformat.so
60-
│ ├── libavutil.so
61-
│ ├── libswresample.so
62-
│ └── libswscale.so
88+
│ ├── bin/
89+
│ │ ├── ffmpeg
90+
│ │ └── ffprobe
91+
│ └── lib/
92+
│ ├── libavcodec.so
93+
│ ├── libavdevice.so
94+
│ ├── libavfilter.so
95+
│ ├── libavformat.so
96+
│ ├── libavutil.so
97+
│ ├── libpostproc.so
98+
│ ├── libswresample.so
99+
│ └── libswscale.so
63100
├── armeabi-v7a/
64-
└── x86_64/
101+
├── x86_64/
102+
└── build_info.txt
65103
```
66104

67-
## Configurations
68-
The script builds FFmpeg with these configurations:
105+
## 🔧 Configurations
106+
107+
The script builds FFmpeg with these features:
108+
69109
- Shared libraries enabled
70-
- Static libraries disabled
71-
- Documentation disabled
72-
- Programs (ffmpeg, ffplay, ffprobe) disabled
73-
- Hardware acceleration disabled
74-
- Minimal codec support (h264, aac, mp3)
75-
- File protocol support
76-
- MP4 and MKV container support
77-
78-
## License
79-
This project is licensed under the GNU Lesser General Public Version 3 License - see the [LICENSE](./LICENSE) file for details.
110+
- Hardware acceleration
111+
- MediaCodec support
112+
- NEON optimization
113+
- Network support
114+
- All codecs and formats
115+
- Debug symbols stripped
116+
- Size-optimized binaries
117+
118+
## 📦 Releases & Pre-built Binaries
119+
120+
### Latest Release
121+
122+
[![Latest Release](https://img.shields.io/github/v/release/husen-hn/ffmpeg-android-binary)](https://github.com/husen-hn/ffmpeg-android-binary/releases/latest)
123+
124+
Pre-built binaries are available in the [Releases](https://github.com/husen-hn/ffmpeg-android-binary/releases) section. Each release includes:
125+
126+
- Built `.so` files for all supported architectures (arm64-v8a, armeabi-v7a, x86_64)
127+
- ffmpeg and ffprobe binaries
128+
- Build information and checksums
129+
- Source code archive
130+
131+
## 🔄 Updating FFmpeg Version
132+
133+
1. Update the version in `build_ffmpeg.sh`:
134+
135+
```bash
136+
# Change this line
137+
FFMPEG_VERSION="7.1"
138+
```
139+
140+
2. Download the new FFmpeg source:
141+
142+
```bash
143+
wget https://ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.bz2
144+
```
145+
146+
3. Clean old build files:
147+
148+
```bash
149+
rm -rf ffmpeg-*
150+
rm -rf android/project_output/*
151+
```
152+
153+
4. Run the build script:
154+
155+
```bah
156+
./build_ffmpeg.sh
157+
```
158+
159+
## 📜 License
160+
161+
This project is licensed under the GNU Lesser General Public Version 3 License - see the [LICENSE](./LICENSE) file for details.

0 commit comments

Comments
 (0)