|
1 |
| -# FFmpeg Prebuilt Android |
2 |
| -This repo contains static FFmpeg executable binary which compatible with all Android [ABIs](https://developer.android.com/ndk/guides/abis.html): |
3 |
| -- `armeabi` (Android 16+) |
4 |
| -- `armeabi-v7a` (Android 16+) |
5 |
| -- `arm64-v8a` (Android 21+) |
6 |
| -- `x86` (Android 16+) |
7 |
| -- `x86_64` (Android 21+) |
8 |
| -- `mips` (Android 16+) |
9 |
| -- `mips64` (Android 21+) |
| 1 | +[](https://android-arsenal.com/details/1/6815) |
10 | 2 |
|
11 |
| -This is main configuration, optimizes for smallest binary size with most common media codecs and container formats: |
12 |
| -``` |
13 |
| -[...] |
14 |
| - --enable-pic \ |
15 |
| - --enable-small \ |
16 |
| - --enable-gpl \ |
17 |
| - \ |
18 |
| - --disable-shared \ |
19 |
| - --enable-static \ |
20 |
| - \ |
21 |
| - --enable-ffmpeg \ |
22 |
| - --disable-ffplay \ |
23 |
| - --disable-ffprobe \ |
24 |
| - --disable-ffserver \ |
25 |
| - \ |
26 |
| - --disable-protocols \ |
27 |
| - --enable-protocol='file,pipe' \ |
28 |
| - \ |
29 |
| - --disable-demuxers \ |
30 |
| - --disable-muxers \ |
31 |
| - --enable-demuxer='aac,avi,dnxhd,flac,flv,gif,h261,h263,h264,image2,matroska,webm,mov,mp3,mp4,mpeg,ogg,srt,wav,webvtt' \ |
32 |
| - --enable-muxer='3gp,dnxhd,flac,flv,gif,image2,matroska,webm,mov,mp3,mp4,mpeg,ogg,opus,srt,wav,webvtt,ipod' \ |
33 |
| - \ |
34 |
| - --disable-encoders \ |
35 |
| - --disable-decoders \ |
36 |
| - --enable-encoder='aac,dnxhd,flac,flv,gif,libmp3lame,libopus,libshine,libvorbis,mpeg4,png,srt,subrip,webvtt' \ |
37 |
| - --enable-decoder='aac,aac_at,aac_fixed,aac_latm,dnxhd,flac,flv,h261,h263,h263i,h263p,h264,vp8,vp9,libopus,libvorbis,mp3,mpeg4,wavpack,png,rawvideo,srt,webvtt' \ |
38 |
| - \ |
39 |
| - --enable-libshine \ |
40 |
| - --enable-libmp3lame \ |
41 |
| - --enable-libopus \ |
42 |
| - --enable-libvorbis \ |
43 |
| - --enable-bsf=aac_adtstoasc \ |
44 |
| -``` |
| 3 | +# Prebuilt FFmpeg Android |
| 4 | +This repo contains build scripts to build FFmpeg executable binary for Android and also [publish prebuilt files here](https://github.com/Khang-NT/ffmpeg-binary-android/releases). |
| 5 | +There are two build flavors: _FULL_ and _LITE_ |
| 6 | + * **LITE** is a version that optimized binrary size, so it only includes small set features to work with most commom formats and codecs. |
| 7 | + + ABI and android version supported: |
| 8 | + - `armeabi` (Android 16+) |
| 9 | + - `armeabi-v7a`, `armeabi-v7a-neon`, (Android 16+) |
| 10 | + - `x86` (Android 16+) |
| 11 | + - `arm64-v8a` (Android 21+) |
| 12 | + - `x86_64` (Android 21+) |
| 13 | + - ~~`mips` (Android 16+)~~ (No longer support) |
| 14 | + - ~~`mips64` (Android 21+)~~ (No longer support) |
| 15 | + + Addition libraries: `libmp3lame`, `libshine`, `libopus`, `libvorbis` |
| 16 | + * **FULL** is a version compiled full FFmpeg feature, include **https** support protocol. |
| 17 | + + ABI and android version supported: |
| 18 | + - `armeabi` (Android **21+**) |
| 19 | + - `armeabi-v7a`, `armeabi-v7a-neon`, (Android **21+**) |
| 20 | + - `x86` (Android **21+**) |
| 21 | + - `arm64-v8a` (Android 21+) |
| 22 | + - `x86_64` (Android 21+) |
| 23 | + + Include libraries in `LITE` version, plus with: `libfdk-aac` (**non-free**), `libx264`, **`openssl`** (thanks to [leenjewel/openssl_for_ios_and_android](https://github.com/leenjewel/openssl_for_ios_and_android)) |
| 24 | + |
| 25 | +## Download |
| 26 | +Latest build: |
| 27 | +[](https://github.com/Khang-NT/ffmpeg-binary-android/releases) |
45 | 28 |
|
46 | 29 | ## Build
|
47 |
| -You can build it and customize as you want using build scripts in [build_scripts](build_scripts) folder. (Recommended using Android NDK r15). |
48 |
| -``` |
49 |
| -export NDK="path/to/ndk-r15" |
50 |
| -./build_all.sh |
| 30 | + |
| 31 | +Prerequisites: |
| 32 | + * Android NDK r15 |
| 33 | + * `export NDK=path/to/android-ndk` |
| 34 | + |
| 35 | +Build: |
| 36 | +```bash |
| 37 | +export NDK=path/to/android-ndk |
| 38 | +cd build_scripts |
| 39 | + |
| 40 | +FLAVOR=full # or "lite" |
| 41 | +TARGET=armv7-a # Support targets: "arm", "armv7-a", "arm-v7n", "arm64-v8a", "i686", "x86_64" |
| 42 | +BUILD_DIR=$(pwd)/build_dir |
| 43 | +FINAL_DIR=$(pwd)/final/$TARGET |
| 44 | + |
| 45 | +./build_ffmpeg.sh $TARGET $FLAVOR $BUILD_DIR $FINAL_DIR |
51 | 46 | ```
|
52 | 47 |
|
53 |
| -## Referent |
| 48 | +The `ffmpeg` binary should in folder `$FINAL_DIR/$TARGET/$FLAVOR/ffmpeg` after build succeed. |
| 49 | + |
| 50 | +## References |
54 | 51 | - [FFmpegMediaPlayer](https://github.com/wseemann/FFmpegMediaPlayer) by [wseemann](https://github.com/wseemann)
|
| 52 | + - [PrebuiltOpenSSL](https://github.com/leenjewel/openssl_for_ios_and_android) |
55 | 53 |
|
56 | 54 | ## FFmpeg license
|
57 | 55 | This software uses code of <a href="http://ffmpeg.org">FFmpeg</a> licensed under the <a href="http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html">LGPLv2.1</a> and its source can be downloaded <a href="build_scripts/ffmpeg-3.3.2.tar.bz2">here</a>.
|
|
0 commit comments