我看过一些关于如何为 Android 编译和使用 FFmpeg 的文章。
这是 2 个很好的例子 - example1和example2
不幸的是,非他们,或者我发现的其他人帮助了我。在这两个示例中,创建了 build_android.sh 并配置了 FFmpeg 的配置文件并调用 make。每次运行脚本时,我都会收到以下错误:
c:\android\development\android-ndk-r9\sources\ffmpeg>sh build_android.sh
c:/android/development/android-ndk-r9/toolchains/arm-linux-androideabi-4.8/prebu
ilt/windows-x86_64/arm-linux-androideabi/bin/bin/arm-linux-androideabi-gcc is un
able to create an executable file.
C compiler test failed.
If you think configure made a mistake, make sure you are using the latest
version from Git. If the latest version fails, report the problem to the
ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "config.log" produced by configure as this will help
solving the problem.
Makefile:2: config.mak: No such file or directory
Makefile:49: /common.mak: No such file or directory
Makefile:92: /libavutil/Makefile: No such file or directory
Makefile:92: /library.mak: No such file or directory
Makefile:169: /doc/Makefile: No such file or directory
Makefile:170: /tests/Makefile: No such file or directory
make: *** No rule to make target `/tests/Makefile'. Stop.
Makefile:2: config.mak: No such file or directory
如果有人遇到并解决了这个问题,将不胜感激!
在尝试了建议的脚本后,我遇到了一个无法解决的新问题,这是脚本的输出:
.... 启用的组件列表....
在列表的最后,我得到了以下信息:
启用 indevs:dv1394 v4l2i fbdev
启用 outdevs:fbdev v4l2
许可证:LGPL 2.1 或更高版本正在创建 config.mak、config.h 和 doc/config.texi...
警告:C:/android/development/android-ndk-r9/toolchains/arm-linux-androideabi-4.8/prebuilt/windows-x86_64/bin/arm-linux-androideabi-pkg-config 未找到,库检测可能失败. make: *** 没有规则可以使目标libavfilter/libavfilter.so', needed by
全部为 ye s'。停止。make: *** 没有规则让目标install-libavfilter-shared', needed by
安装 l-libs-yes'。停止。