【发布时间】:2019-01-25 20:31:34
【问题描述】:
我正在尝试在 Win10 上使用 x265 编译 FFMPEG。我正在使用来自 xhmikosr 的最新完整 MinGW 版本:
http://xhmikosr.1f0.de/tools/msys/
没有 x265 的 FFMEPG 编译没有问题,编译 x265 独立也没有问题。 但是,当我在 ffmpeg 中使用 --enable-libx265 时,出现以下错误:
ERROR: x265 not found using pkg-config
这来自 config.log:
require_pkg_config libx265 x265 x265.h x265_api_get
check_pkg_config libx265 x265 x265.h x265_api_get
test_pkg_config libx265 x265 x265.h x265_api_get
false --exists --print-errors x265
ERROR: x265 not found using pkg-config
我的配置路径似乎都设置正确。
$ echo $PKG_CONFIG_PATH
C:\MYSYS\local\x86_64-w64-mingw32\lib\pkgconfig
当我寻找 x265 库时:
$ pkg-config --list-all
...
x265 x265 - H.265/HEVC video encoder
...
这里是调试日志:
$ pkg-config --debug
...
File 'x265.pc' appears to be a .pc file
Will find package 'x265' in file 'C:/MYSYS/local/x86_64-w64-mingw32/lib/pkgconfig\x265.pc'
...
为什么我尝试编译时 pkg-config 仍然找不到 x265 库?
【问题讨论】:
-
您找到解决方案了吗?我有同样的问题。 x265 出现在
pkg-config --list-all中,但在构建期间提供x265 not found using pkg-config -
不,从来没有。我不再安装 MinGW。它必须与交叉编译器如何调用库有关。我确实记得如果 x265 混合使用,x265 甚至会导致编译其他 FFMPEG 库出现问题。但我真的对此知之甚少。
-
在 MinGW/msys2 上有同样的问题。将 x265 构建为共享库并将 libx265.lib 重命名为 x265.lib 似乎已经为我解决了这个问题(知道 pkg-config 实际上可以看到它)。
标签: ffmpeg mingw pkg-config libx265