Skip to content

Commit c7520b7

Browse files
authored
Merge pull request #8 from Khang-NT/open_ssl
Support OpenSSL and Libx264
2 parents 20854f9 + 24e81d2 commit c7520b7

File tree

5 files changed

+226
-562
lines changed

5 files changed

+226
-562
lines changed

.circleci/config.yml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,13 @@ defaults: &defaults
1414
mkdir -p build_logs;
1515
export FINAL_DIR=$(pwd)/artifacts/$TARGET;
1616
export BUILD_DIR=$(pwd)/build_scripts/build_dir && mkdir -p $BUILD_DIR;
17-
./build_scripts/build_ffmpeg.sh $TARGET $BUILD_DIR $FINAL_DIR;
17+
./build_scripts/build_ffmpeg.sh $TARGET full $BUILD_DIR $FINAL_DIR;
18+
./build_scripts/build_ffmpeg.sh $TARGET lite $BUILD_DIR $FINAL_DIR;
1819
- run:
1920
name: Copy error report
2021
command: |
2122
mkdir -p build_logs/ffmpeg;
22-
cp build_scripts/ffmpeg-$FFMPEG_VERSION/config.log build_logs/ffmpeg/ || true;
23+
cp ffmpeg-$FFMPEG_VERSION/config.log build_logs/ffmpeg/ || true;
2324
when: on_fail
2425
- store_artifacts:
2526
path: build_logs
@@ -49,12 +50,12 @@ jobs:
4950
TARGET: arm64-v8a
5051
<< : *defaults
5152

52-
build_arm_x86:
53+
build_x86:
5354
environment:
5455
TARGET: i686
5556
<< : *defaults
5657

57-
build_arm_x86_64:
58+
build_x86_64:
5859
environment:
5960
TARGET: x86_64
6061
<< : *defaults
@@ -100,8 +101,8 @@ workflows:
100101
- build_arm_v7a
101102
- build_arm_v7a_neon
102103
- build_arm_v8a
103-
- build_arm_x86
104-
- build_arm_x86_64
104+
- build_x86
105+
- build_x86_64
105106
- build_native_linux
106107
- hold:
107108
type: approval
@@ -110,14 +111,14 @@ workflows:
110111
- build_arm_v7a
111112
- build_arm_v7a_neon
112113
- build_arm_v8a
113-
- build_arm_x86
114-
- build_arm_x86_64
114+
- build_x86
115+
- build_x86_64
115116
- build_native_linux
116-
- create_release:
117-
requires:
118-
- hold
119117
filters:
120118
branches:
121119
only: master
120+
- create_release:
121+
requires:
122+
- hold
122123

123124

README.md

Lines changed: 46 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,55 @@
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+
[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-Prebuilt%20FFmpeg%20Android-brightgreen.svg?style=flat-square)](https://android-arsenal.com/details/1/6815)
102

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+
[![Latest build](https://img.shields.io/github/release/Khang-NT/ffmpeg-binary-android.svg?style=for-the-badge)](https://github.com/Khang-NT/ffmpeg-binary-android/releases)
4528

4629
## 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
5146
```
5247

53-
## Referent
48+
The `ffmpeg` binary should in folder `$FINAL_DIR/$TARGET/$FLAVOR/ffmpeg` after build succeed.
49+
50+
## References
5451
- [FFmpegMediaPlayer](https://github.com/wseemann/FFmpegMediaPlayer) by [wseemann](https://github.com/wseemann)
52+
- [PrebuiltOpenSSL](https://github.com/leenjewel/openssl_for_ios_and_android)
5553

5654
## FFmpeg license
5755
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>.

build_scripts/build_all.sh

Lines changed: 0 additions & 53 deletions
This file was deleted.

0 commit comments

Comments
 (0)