Skip to content

Commit 9aca708

Browse files
committed
发布版本1.0.0
1 parent 3776527 commit 9aca708

File tree

2 files changed

+130
-2
lines changed

2 files changed

+130
-2
lines changed

AndroidFFmpegLibrary/build.gradle

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,68 @@ dependencies {
3131
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
3232
compile 'com.excellence:exec:1.0.0'
3333
}
34+
35+
/*********************上传jCenter依赖*********************/
36+
apply plugin: 'com.novoda.bintray-release'
37+
38+
buildscript {
39+
repositories {
40+
jcenter()
41+
}
42+
dependencies {
43+
classpath 'com.android.tools.build:gradle:2.3.3'
44+
classpath 'com.novoda:bintray-release:0.8.0'
45+
// NOTE: Do not place your application dependencies here; they belong
46+
// in the individual module build.gradle files
47+
}
48+
}
49+
50+
/**避免中文注释:编码GBK的不可映射字符**/
51+
tasks.withType(Javadoc) {
52+
options {
53+
encoding "UTF-8"
54+
charSet 'UTF-8'
55+
links "http://docs.oracle.com/javase/7/docs/api"
56+
}
57+
}
58+
59+
/**避免Javadocs错误:找不到引用**/
60+
tasks.withType(Javadoc) {
61+
options.addStringOption('Xdoclint:none', '-quiet')
62+
options.addStringOption('encoding', 'UTF-8')
63+
}
64+
65+
/**发布到我的Bintray仓库**/
66+
def user = getPropertyValue('bintrayUser')
67+
def key = getPropertyValue('bintrayKey')
68+
def org = getPropertyValue('userOrg')
69+
70+
publish {
71+
bintrayUser = user
72+
bintrayKey = key
73+
dryRun = false
74+
userOrg = org
75+
groupId = 'com.excellence'
76+
artifactId = 'ffmpeg'
77+
publishVersion = '1.0.0'
78+
desc = 'android执行FFmpeg命令'
79+
website = 'https://github.com/VeiZhang/FFmpegAndroid'
80+
licences = ['Apache-2.0']
81+
}
82+
83+
/**读取bintray.key文件的key**/
84+
def getPropertyValue(String key) {
85+
if (key == null || key.length() == 0)
86+
return null
87+
88+
File file = project.rootProject.file('../../bintray.key')
89+
if (!file.exists())
90+
return null
91+
92+
InputStream inputStream = file.newDataInputStream()
93+
Properties properties = new Properties()
94+
properties.load(inputStream)
95+
96+
//读取Key
97+
return properties.getProperty(key)
98+
}

README.md

Lines changed: 65 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,53 @@
11
# FFmpeg for Android
22

3+
[![Download][icon_download]][download]
4+
5+
```
6+
implementation 'com.excellence:ffmpeg:_latestVersion'
7+
```
8+
9+
## AndroidFFmpeg使用
10+
11+
```
12+
// 初始化,默认:不限制并发线程数;指令超时10s终止
13+
FFmpeg.init(context);
14+
15+
// 自定义初始化参数:超时1s终止
16+
FFmpeg.init(context, new CommanderOptions.Builder().setTimeOut(1000).build())
17+
18+
// 获取FFmpeg工具路径
19+
FFmpeg.checkFFmpeg()
20+
21+
// 创建执行命令
22+
FFmpeg.addTask(cmd, new IListener() {
23+
@Override
24+
public void onPre(String command) {
25+
Log.i(TAG, "onPre: " + command);
26+
}
27+
28+
@Override
29+
public void onProgress(String message) {
30+
Log.i(TAG, "onProgress: " + message);
31+
}
32+
33+
@Override
34+
public void onError(Throwable t) {
35+
t.printStackTrace();
36+
}
37+
38+
@Override
39+
public void onSuccess(String message) {
40+
Log.i(TAG, "onSuccess: " + message);
41+
}
42+
});
43+
44+
// 终止命令
45+
CommandTask.discard()
46+
47+
// 终止所有命令
48+
FFmpeg.destory()
49+
```
50+
351
## FFmpeg命令
452

553
[FFMpeg官网][FFMpeg官网]
@@ -183,7 +231,11 @@
183231
```
184232
185233
186-
## AndroidFFmpeg使用
234+
## 版本更新
235+
236+
| 版本 | 描述 |
237+
| --- | ---- |
238+
| [1.0.0][FFmpeg1.0.0] | 集成FFmpeg命令行执行 **2017-8-17** |
187239
188240
189241
## 感谢
@@ -193,9 +245,20 @@
193245
> - [c060604][c060604]
194246
195247
248+
<!-- 网站链接 -->
249+
250+
[download]:https://bintray.com/veizhang/maven/ffmpeg/_latestVersion "Latest version"
196251
[FFMpeg官网]:http://ffmpeg.org/
197252
[Windows工具下载]:https://ffmpeg.zeranoe.com/builds/
198253
[ffmpeg-android-java]:https://github.com/WritingMinds/ffmpeg-android-java "FFmpeg在Android中示例"
199254
[ffmpeg-android]:https://github.com/WritingMinds/ffmpeg-android "编译FFmpeg可执行文件"
200255
[hiliving]:https://github.com/hiliving/VideoEdit "FFmpeg命令示例"
201-
[c060604]:https://github.com/c060604/ffmpeg-usage "FFmpeg命令讲解"
256+
[c060604]:https://github.com/c060604/ffmpeg-usage "FFmpeg命令讲解"
257+
258+
<!-- 图片链接 -->
259+
260+
[icon_download]:https://api.bintray.com/packages/veizhang/maven/ffmpeg/images/download.svg
261+
262+
<!-- 版本 -->
263+
264+
[FFmpeg1.0.0]:https://bintray.com/veizhang/maven/ffmpeg/1.0.0

0 commit comments

Comments
 (0)