android - 如何在 github 上为 android-ffmpeg 项目构建最新的 ffmpeg

标签 android video github ffmpeg

我正在研究https://github.com/guardianproject/android-ffmpeg项目。 在这个项目中,它使用ffmpeg版本0.11.1。 我如何使用最新的 ffmpeg 版本构建这个项目?

我尝试删除该项目中的 ffmpeg 文件夹。在 url 中查看最新的 ffmpeg 版本:[git://git.videolan.org/ffmpeg.git]。之后,我正常运行命令 ./configure_make_everything.sh 但出现错误:

    File to patch: 
Skip this patch? [y] 
Skipping patch.
3 out of 3 hunks ignored
patching file libavutil/arm/intmath.h
Reversed (or previously applied) patch detected!  Skipping patch.
3 out of 3 hunks ignored
patching file configure
Reversed (or previously applied) patch detected!  Skipping patch.
1 out of 1 hunk ignored
~/workspace/android-ffmpeg/ffmpeg ~/workspace/android-ffmpeg ~/workspace/android-ffmpeg
**ERROR: freetype2 not found**

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
<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="7d1b1b100d181a50080e180f3d1b1b100d181a53120f1a" rel="noreferrer noopener nofollow">[email protected]</a> 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.
~/workspace/android-ffmpeg ~/workspace/android-ffmpeg
~/workspace/android-ffmpeg
~/workspace/android-ffmpeg ~/workspace/android-ffmpeg
~/workspace/android-ffmpeg/ffmpeg ~/workspace/android-ffmpeg ~/workspace/android-ffmpeg
Makefile:2: config.mak: No such file or directory
Makefile:53: /common.mak: No such file or directory
Makefile:93: /libavutil/Makefile: No such file or directory
Makefile:93: /library.mak: No such file or directory
Makefile:95: /doc/Makefile: No such file or directory
Makefile:178: /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
Makefile:53: /common.mak: No such file or directory
Makefile:93: /libavutil/Makefile: No such file or directory
Makefile:93: /library.mak: No such file or directory
Makefile:95: /doc/Makefile: No such file or directory
Makefile:178: /tests/Makefile: No such file or directory
make: *** No rule to make target `/tests/Makefile'.  Stop.
~/workspace/android-ffmpeg ~/workspace/android-ffmpeg
~/workspace/android-ffmpeg
admin@ubuntu:~/workspace/android-ffmpeg$

我收到错误:找不到 Freetype2,但如果我使用包含在该项目中的原始 ffmpeg 进行构建,则不会发生此错误。

我该如何修复它?请帮忙

最佳答案

我在为桌面构建 ffmpeg 时遇到了同样的问题。就我而言,ffmpeg 正在/usr/include/freetype 而不是/usr/include/freetype2 中查找 freetype2 header 。

这个解决方案很丑陋,但我创建了一个符号链接(symbolic link)

sudo ln -s /usr/include/freetype2/ /usr/include/freetype

然后./configure就成功了。

您也许可以通过修补 ffmpeg 以替换 的所有实例来实现相同的目的

#include <freetype/config/ftheader.h>

#include <freetype2/config/ftheader.h>

看起来这只是在libavfilter/vf_drawtext.c

由于您似乎是针对不同的 CPU 进行构建,因此您可能需要使用适合您的架构的 freetype2 的正确位置来修改路径。

关于android - 如何在 github 上为 android-ffmpeg 项目构建最新的 ffmpeg,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22496072/

相关文章:

android - 从 Android 中的 WebView 获取所有图像

安卓 :voice recognition service

android - 截取整个 ListView 的屏幕截图,即使整个 ListView 元素在屏幕上不完全可见

ios - 用于附加 .MOV 的 UIImagePickerController 流类型?

github - 跨作业重用 github 操作的一部分

git - GitHub 消息 : push declined due to email privacy restrictions 的含义

android - 更改 TextInputLayout 错误字体?

c# - 如何播放视频文件?

flash - 如何录制/拼接FLV片段?

github - 如何在 GitHub 中设置文件权限