我需要使用 ffmpeg(v2.8( 将 mp4 转换为 webp,如何使用 libwebp for android 构建 ffmpeg
?我用谷歌搜索了一下,但几乎没有信息来构建 libwebp 的 ffmpeg。
我尝试添加配置:
--enable-libwebp
--enable-muxer=webp
--enable-encoder=libwebp
但是我得到了以下编译错误。
ERROR: libwebp not found using pkg-config
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
solve the problem.
配置.log为:
check_pkg_config libwebp >= 0.2.0 webp/encode.h WebPGetEncoderVersion
false --exists --print-errors libwebp >= 0.2.0
ERROR: libwebp not found using pkg-config
我按照以下步骤解决了这个问题:
- 通过 NDK-build 构建 libwebp
- 将 *.a 和 *.h 添加到项目下的文件夹(例如 libwebp-armv7a(中
- 在没有 PKG 配置的情况下链接 WebP
评论中提到的@halfelf方式是针对PC构建的,而不是针对Android移动平台的。