【发布时间】:2016-01-28 12:28:40
【问题描述】:
当我尝试使用 libx265 (./configure --enable-gpl --enable-libx265) 编译 ffmpeg 时,出现以下错误:(ERROR: x265 not found using pkg-config)。如何安装 libx265 并使用 ffmpeg 进行配置。
【问题讨论】:
当我尝试使用 libx265 (./configure --enable-gpl --enable-libx265) 编译 ffmpeg 时,出现以下错误:(ERROR: x265 not found using pkg-config)。如何安装 libx265 并使用 ffmpeg 进行配置。
【问题讨论】:
您的问题有两种解决方案。
A)
如果 CentOS 7 上没有可用的 libx265,那么您必须自己构建它。它遵循非常简单的配置/制作方法。
使用 mercurial:
hg clone http://hg.videolan.org/x265
cd x265/build/linux
./make-Makefiles.bash
make -j6
make install
ldconfig
那么在构建 ffmpeg 时一定要指定 libx265 的安装路径。使用 pkg-config:PKG_CONFIG_PATH="/usr/local/lib/pkgconfig".
B)
但在 CentOS 7 上似乎有 x265 的 rpm 条目: http://pkgs.org/centos-7/nux-dextop-x86_64/x265-devel-1.2-6.el7.nux.x86_64.rpm.html。如果它们在您的系统上兼容,您应该能够简单地安装而不是构建。
【讨论】:
libavcodec/libx265.c: In function ‘libx265_encode_set_roi’: libavcodec/libx265.c:363:16: error: ‘x265_picture’ has no member named ‘quantOffsets’ pic->quantOffsets = qoffsets;
我最近为Ubuntu写了一个脚本,但我认为它可以应用于CentOS。您需要在脚本中注释掉 Ubuntu apt-get 以使其运行。
另外在使用之前,请确保你已经安装了 git 和 mercurial。我的脚本从 git 或 mercurial 中提取必要库的最新副本。
【讨论】: