如何使用Android NDK R9B编译FFMPEG为Android如何使用、Android、NDK、R9B

2023-09-06 02:55:52 作者:追逐我的明天。

我想设计一个Android应用程序可以播放和编辑视频通过FFMPEG命令。 但我不知道如何使用FFMPEG在Android上。我试图从谷歌搜索的方法很多,但他们都太老了实现。 现在,FFMPEG的最新版本是2.1.1和Android的NDK版本是R9B。我的操作系统是Linux Mint的15。 如何使用Eclipse IDE中我的操作系统上实现一个Android应用程序有FFmpeg的最新德codeR和连接codeR?

I want to design an Android app which can play and edit video by FFMPEG commands. But I don't know how to use FFMPEG on Android. I have tried many methods searched from Google, but they are too old to implement. Now, the newest version of FFMPEG is 2.1.1 and the Android-NDK's version is r9b. My operating system is Linux mint 15. How can I use eclipse IDE on my OS to implement an Android app which has FFMPEG's newest decoder and encoder?

推荐答案

IJKplayer 编译ffmpeg的使用为Android NDK为化妆过程的一部分。该配置文件可以略作修改,以允许发生的ffmpeg二进制的机器人。

IJKplayer compiles ffmpeg for android using ndk as part of its make process. The configuration files can be slightly modified to enable generation of ffmpeg binary for android.

具体注释掉配置线/ module-lite.sh运行编译ffmpeg的脚本之前:

Specifically comment out lines in config/module-lite.sh before running the compile-ffmpeg script:

export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-programs"
export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-ffmpeg"
export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-avfilter"

和它会产生FFmpeg的可执行文件。

And it will generate the ffmpeg executable.

借助 IJKplayer 项目还将为您提供有关如何使用的ffmpeg在Android的程序提示。

The IJKplayer project will also give you a hint on how to use ffmpeg in android programs.