【问题标题】:ERROR: SvtAv1Enc not found using pkg-config错误:使用 pkg-config 找不到 SvtAv1Enc
【发布时间】:2020-07-21 23:29:03
【问题描述】:

我正在尝试使用 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 进行了尝试,但得到了相同的结果。

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

【问题讨论】:

    标签: linux plugins ffmpeg build


    【解决方案1】:

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

    安装编译所需的包:

    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)
    ...
    

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

    【讨论】:

      猜你喜欢
      • 2014-06-05
      • 2020-08-06
      • 1970-01-01
      • 2013-02-13
      • 2018-10-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多