如何使用守护-的ffmpeg-的Andr​​oid的结果? [英] How to use the result of guardian-ffmpeg-Android?

查看:233
本文介绍了如何使用守护-的ffmpeg-的Andr​​oid的结果?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想建立在Android的ffmpeg。有很多教程。有些是很老了。
所以我想尝试一个可以使用的ffmpeg和Android NDK的新版本。
经过很长一段时间搜索,我找到一个, guardianproject / Android的ffmpeg的

I am trying to build ffmpeg on Android. There are many tutorials. Some are very old. So I want to try one that can use newer version of ffmpeg and Android NDK. After long time searching, I find one, guardianproject / android-ffmpeg

该项目已于几个月前更新。
NDK R8被使用。 ffmpeg的是从放到网上,所以最新的版本。

The project was updated several months ago. NDK r8 is used. ffmpeg is put from online, so a latest version.

我遵守所有的指令后,我很困惑而导致我应该使用,以及如何使用它。
自述文件中提到的测试,如:

After I follow all the instruction, I am confused which result I should use, and how to use it. The README mentions testing, like:

# embedding metadata into a matroska video /data/local/ffmpeg -y -i test.mp4 \
    -attach attach.txt -metadata:s:2 mimetype=text/plain \
    -acodec copy -vcodec copy testattach.mkv

首先,我无法找到路径:/数据/本地
第二,这是一个命令。我将如何使用它的Andr​​oid?

First, I fail to find the path: /data/local Second, this is a command. How will I use it in Android?

Totall困惑。
任何轻?

Totall confused. Any light?

推荐答案

我presume您已经成功地建立了ffmpeg的可执行文件,并了解在构建静态和共享库之间的差异。如果没有,你应该尝试执行它在Android上的CLI之前读取了。

I presume that you have successfully built the ffmpeg executable and understand the difference between static and shared libs in the build. If not you should read up on that before trying to exec it on the CLI in android.

我觉得作者使用或者system.exec或技术的ProcessBuilder运行和使用的ffmpeg的CLI可执行文件位于./data/local/$yourSubDir在手机上....

I think that the author uses ffmpeg on the cli using either system.exec or processbuilder techniques to run and executable located on the phone in ./data/local/$yourSubDir....

讨论href=\"http://stackoverflow.com/questions/12472242/using-ffmpeg-via-command-line-in-android\">上的ffmpeg的CLI在Android和人们注意到preFER那很多使用采用Java接口的完整路径JNI来包装调用ffmpeg.main()。 IMO的JNI路线是你打算发布的应用程序更加健壮。但它工作在CLI。

see here for discussion on ffmpeg on cli in android and note that alot of people prefer to use the full JNI route employing java interfaces to wrap calls to ffmpeg.main(). IMO the JNI route is more robust for apps you intend to distribute. But it works on the cli.

这让你感到困惑只是前pressions使用的ffmpeg,将需要使用方法,你preFER(system.exec或的ProcessBuilder)的机器人被称为测试。您可以通过简单地在你的开发环境中运行在Windows / Linux版的ffmpeg熟悉的CLI测试。获得一个shell那里与在FFmpeg常见问题解答中提到的样本玩。

the tests that confused you are just expressions for using ffmpeg that would need to be called in android using the approach you prefer ( system.exec or processbuilder ). You can get familiar with the cli testing by simply running ffmpeg in windows/ linux in your dev environment. Get a shell there and play with samples mentioned in the ffmpeg faqs.

你可以看看混帐上对JNI方法的更多例子halfninja项目。

you can look at the halfninja project on git for more examples on JNI approach.

这篇关于如何使用守护-的ffmpeg-的Andr​​oid的结果?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆