ERROR: x265 not found using pkg-config

问题

在通过以下方法编译过x265之后

hg clone http://hg.videolan.org/x265
cd x265/build
cmake ../source
make -j8;make install

编译ffmpeg时–enable-libx265遇到以下错误:

ERROR: x265 not found using pkg-config
解决

这里是因为pkg-config没有安装; 安装pkg-config:

  • 下载安装包
    在 https://www.freedesktop.org/wiki/Software/pkg-config/ 下载所需版本,这里选择的是0.29.2:
wget https://pkg-config.freedesktop.org/releases/pkg-config-0.29.2.tar.gz
  • 编译
tar -xvf pkg-config-0.29.2.tar.gz
cd pkg-config-0.29.2
./configure  --with-internal-glib
make -j9
make install

然后

pkg-config --list-all|grep x265

可以看到

x265                  x265 - H.265/HEVC video encoder

再重新编译ffmpeg即成功。

猜你喜欢

转载自blog.csdn.net/BigerBang/article/details/106649566