用于 android 的 ffmpeg(使用教程:“ffmpeg 和 Android.mk") [英] ffmpeg for a android (using tutorial: "ffmpeg and Android.mk")

查看:41
本文介绍了用于 android 的 ffmpeg(使用教程:“ffmpeg 和 Android.mk")的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试为 android 编译 ffmpeg.我发现了一些关于这个主题的帖子,但这些帖子似乎都不起作用.如果尝试构建 ffmpeg,就像在 [1] 上发布的那样.有人使用这些教程成功编译了 ffmpeg 吗?我不知道如何实现第 4 步到第 5 步.

I am trying to compile ffmpeg for a android. I have found several posts on this theme but non of these seems to work. If tried to build ffmpeg like it is posted on [1]. Did anybody successfully compile ffmpeg using theses tutorial? I am not sure how to realize step 4 to 5.

第 4 步:配置 ...

STEP4: Configuring ...

第5步:cd到你的NDK根目录,输入make TARGET_ARCH=arm APP=ffmpeg-org

STEP5: cd to your NDK root dir, type make TARGET_ARCH=arm APP=ffmpeg-org

在我看来,构建第 5 步教程中所解释的应用程序需要一些先前的步骤.不幸的是,我在文件夹中没有要制作的应用程序.我正在使用当前的 android ndk 版本 3,并查看了 [3] 和 [4] 中的实际 ffmpeg 版本.我很感谢每一个建议.

It seems to me that building an application like it is explained in the tutorial in step 5 need some previous steps. Unfortunately I have no app in the folder to make. I am using the current android ndk release 3 and checked out the actual ffmpeg releases from [3] and [4]. I am thankful for every advice.

[1] http://slworkthings.wordpress.com/
[2] http://gitorious.org/~olvaffe/ffmpeg/ffmpeg-android
[3] http://ffmpeg.org/download.html

推荐答案

环顾网络后.我找到的唯一可行的解​​决方案是 Bambuser 提供的,它移植了 ffmpeg 以在他们的 android 应用程序中使用.

After looking around the net. The only working solution I found is supplied by Bambuser which ported ffmpeg to use in their android application.

代码在这里:http://bambuser.com/opensource

基本上,您将 .so 文件以及您可能需要的任何 .h 文件复制到 jni/lib 目录,通过 javah 创建一个 JNI 包装器,然后它就可以工作了.

Basically you copy the .so files to your jni/lib directory, along with any .h files you might need, create a JNI wrapper through javah, and it works.

由于这篇文章是为 android 编写的几个打包的 ffmpeg 项目浮出水面,最容易编译和使用的项目之一是在这里:https://github.com/guardianproject/android-ffmpeg.

Since this post was written a few packaged ffmpeg projects for android surfaced, one of the easiest ones to compile and use is here: https://github.com/guardianproject/android-ffmpeg .

它采用静态编译二进制文件(不是库)的方法,该二进制文件在运行时通过 shell 命令运行.在 github 上搜索android ffmpeg"以获取 fork 和相关项目.

It takes the approach of statically compiling a binary (not a library) that is ran through shell command in run time. Search github for 'android ffmpeg' for forks and related projects.

虽然没有找到基于 JNI 实现的封装良好的方法.

Did not find a well packaged method based JNI implementation, though.

这篇关于用于 android 的 ffmpeg(使用教程:“ffmpeg 和 Android.mk")的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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