Guardian项目文件ffmpeg android [英] Documentation on Guardian project ffmpeg android
问题描述
我从以下链接获得了Gaurdian项目FFMPEG android java。
I got the Gaurdian Project FFMPEG android java from the following link
https://github.com/guardianproject/android-ffmpeg-java
有没有什么好的文件可以使用库代码。它难以使用,无需文档。 Plz帮助我。
Is there any good documents available to use the library for code. Its difficult to use without documentation. Plz help me.
推荐答案
我设法让它工作。
首先,下载保护项目ffmpeg 图书馆项目:
First, download the guardian project ffmpeg library project:
然后在eclipse中导入它。 (不需要遵循他们的构建过程,NDK只需直接在eclipse中导入他们的项目)
Then import it in eclipse. (no need to follow their Build Procedure, with the NDK just import their project in eclipse directly)
然后右键单击您的主项目(而不是库项目) - >属性 - > Android - >库 - >添加
Then right click on your Main project (not the library project) -> Properties -> Android -> Library -> Add
然后,使用它:
File fileTmp = context.getActivity().getCacheDir();
File fileAppRoot = new File(context.getActivity().getApplicationInfo().dataDir);
FfmpegController fc = new FfmpegController(fileTmp, fileAppRoot);
final Clip out = new Clip("compiled.mp4");
fc.concatAndTrimFilesMP4Stream(videos, out, true, false, new ShellUtils.ShellCallback() {
@Override
public void shellOut(String shellLine) {
System.out.println("MIX> " + shellLine);
}
@Override
public void processComplete(int exitValue) {
if (exitValue != 0) {
System.err.println("concat non-zero exit: " + exitValue);
Log.d("ffmpeg","Compilation error. FFmpeg failed");
} else {
if(new File(out.path).exists()) {
Log.d("ffmpeg","Success file:"+out.path);
}
}
}
});
使用视频的 ArrayList< Clip>
你想连接。
这篇关于Guardian项目文件ffmpeg android的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!