Skip to content

Commit faa4b84

Browse files
committed
README ⌾
1 parent 759a0df commit faa4b84

File tree

1 file changed

+79
-0
lines changed

1 file changed

+79
-0
lines changed

β€ŽREADME.md

+79
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# 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.
3+
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
11+
12+
## Prerequisites
13+
14+
### Required Tools
15+
- Android NDK
16+
- Build essentials (gcc, make)
17+
- YASM/NASM assembler
18+
- wget
19+
- pkg-config
20+
21+
On Ubuntu/Debian:
22+
```bash
23+
sudo apt-get update
24+
sudo apt-get install build-essential gcc make yasm nasm pkg-config wget
25+
```
26+
27+
On macOS:
28+
```bash
29+
brew install automake yasm nasm pkg-config wget
30+
```
31+
32+
Android NDK Setup
33+
1. Download Android NDK from [Android's NDK page](https://developer.android.com/ndk/downloads)
34+
2. Extract it to a location (default: `/opt/android-ndk`)
35+
3. Update the `ANDROID_NDK_HOME` variable in the script if your NDK is installed elsewhere
36+
37+
## Usage
38+
1. Clone this repository:
39+
```bash
40+
git clone https://github.com/husen-hn/android-ffmpeg-builder.git
41+
cd android-ffmpeg-builder
42+
```
43+
44+
2. Make the script executable:
45+
```bash
46+
chmod +x build_ffmpeg.sh
47+
```
48+
49+
3. Run the script:
50+
```bash
51+
./build_ffmpeg.sh
52+
```
53+
54+
The built libraries will be in `android/project_libs/`:
55+
```
56+
android/project_libs/
57+
β”œβ”€β”€ arm64-v8a/
58+
β”‚ β”œβ”€β”€ libavcodec.so
59+
β”‚ β”œβ”€β”€ libavformat.so
60+
β”‚ β”œβ”€β”€ libavutil.so
61+
β”‚ β”œβ”€β”€ libswresample.so
62+
β”‚ └── libswscale.so
63+
β”œβ”€β”€ armeabi-v7a/
64+
└── x86_64/
65+
```
66+
67+
## Configurations
68+
The script builds FFmpeg with these configurations:
69+
- 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.

0 commit comments

Comments
Β (0)