在 Android-NDK 中使用 FFmpeg [英] Using FFmpeg with Android-NDK

查看:31
本文介绍了在 Android-NDK 中使用 FFmpeg的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将 FFmpegAndroid-NDK 一起使用,我在本节中非常基础,我需要一些帮助并且我之前在网上研究过这个主题,但没有得到满意的解决方案.

I want to use FFmpeg with Android-NDK and I am very basic in this section, I need some help and I research about this topic before on the net, but got no satisfactory solution.

1 - 如何通过 Windows 操作系统使用 FFmpeg.(我不想使用Ubuntu,请不要建议.)

1 - How can I use FFmpeg through Windows OS. (I do not want to use Ubuntu, please do not suggest.)

2 - 如何通过 NDK 插入 FFmpeg 命令?

2 - How can I inset FFmpeg commands via NDK?

最后通知:我使用 android-ndk-r7bCygwin.

Last notice : I using android-ndk-r7b and Cygwin.

任何建议将不胜感激.

推荐答案

从你的问题中很难说出你到底想要/需要什么......所以这里有一些一般信息:

From your question it is hard to tell what exactly you want/need... so here some general information:

  • Using FFmpeg with Android
  • Good starting point for FFmpeg on Android based on ndkr5
  • Another good starting point for building FFmpeg for Android
  • Helpful information to build FFmpeg for android see here, here and here
  • Make sure that you use Windows paths instead of /cydrive... when doing ffmpeg/android/cygwin/windows dev

如果您需要进一步的帮助,请准确说明您想要实现的目标以及无法实现的目标...

If you need further help please explain exactly what you want to achieve and what is not working...

更新 - 根据评论:

要在 Android 上通过命令行使用 ffmpeg,您需要将 ffmpeg 复制到应用程序的 files 目录和 chmod 755 使用 getRuntime.exec()代码> 然后你可以使用以下行运行 ffmpeg 例如:

To use ffmpeg via command line on Android you need to copy ffmpeg into your application's files directory and chmod 755 it using getRuntime.exec() then you can run ffmpeg with the following line for example:

Process p = Runtime.getRuntime().exec("/data/data/yourpackagename/files/ffmpeg -i infile.mp4 outfile.mp4")

这篇关于在 Android-NDK 中使用 FFmpeg的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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