繁体   English   中英

错误:使用 pkg-config 找不到 SvtAv1Enc

[英]ERROR: SvtAv1Enc not found using pkg-config

我正在尝试使用 SVT-AV1 编解码器编译 FFmpeg,按照此处的说明进行操作: https://github.com/OpenVisualCloud/SVT-AV1/tree/master/ffmpeg_plugin

一切顺利,但是当我尝试跑步时

./configure --enable-libsvtav1

我正进入(状态

ERROR: SvtAv1Enc 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 "ffbuild/config.log" produced by configure as this will help
solve the problem.

ffbuild/config.log 的内容: https://pastebin.com/euPriFAp

github: https://github.com/OpenVisualCloud/SVT-AV1/issues/35上有一个确切的问题,但已解决。

我已经在我的 Mac 和 Docker 容器中尝试了 Ubuntu 18.04,但得到了相同的结果。

谁能帮忙,我做错了什么?

问题在于缺少所需的库。 请在下面找到完整的安装说明。

安装编译所需的包:

sudo apt-get update
sudo apt-get install \
  autoconf \
  automake \
  build-essential \
  cmake \
  git-core \
  libass-dev \
  libfreetype6-dev \
  libsdl2-dev \
  libtool \
  libva-dev \
  libvdpau-dev \
  libvorbis-dev \
  libxcb1-dev \
  libxcb-shm0-dev \
  libxcb-xfixes0-dev \
  pkg-config \
  texinfo \
  wget \
  zlib1g-dev

安装某些库使用的汇编程序:

sudo apt-get install nasm
sudo apt-get install yasm

构建并安装 SVT-AV1:

git clone --depth=1 https://github.com/OpenVisualCloud/SVT-AV1
cd SVT-AV1
cd Build
cmake .. -G"Unix Makefiles" -DCMAKE_BUILD_TYPE=Release
make -j $(nproc)
sudo make install

应用 SVT-AV1 插件并启用 libsvtav1 到 FFmpeg:

cd ~
git clone -b release/4.2 --depth=1 https://github.com/FFmpeg/FFmpeg ffmpeg
cd ffmpeg
export LD_LIBRARY_PATH+=":/usr/local/lib"
export PKG_CONFIG_PATH+=":/usr/local/lib/pkgconfig"
git apply ../SVT-AV1/ffmpeg_plugin/0001-Add-ability-for-ffmpeg-to-run-svt-av1.patch
./configure --enable-libsvtav1

注意:如果您希望支持其他编解码器,请将所需的标志添加到./configure命令)

构建 FFmpeg:

make
make install
hash -r
source ~/.profile

现在你应该有ffmpeg命令工作并且在编码器列表中有 svt-av1:

ffmpeg -encoders
...
V..... libsvt_av1           SVT-AV1(Scalable Video Technology for AV1) encoder (codec av1)
...

我使用下一个文档作为参考:

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM