gpt4 book ai didi

ffmpeg - CentOS 7.4.1708 : ERROR: x265 not found using pkg-config

转载 作者:行者123 更新时间:2023-12-04 23:34:59 25 4
gpt4 key购买 nike

我正在尝试按照 https://trac.ffmpeg.org/wiki/CompilationGuide/Centos 上的指南编译具有 Nvidia 支持的 ffmpeg和 https://developer.nvidia.com/ffmpeg .我最终得到了以下命令:
PATH="$HOME/bin:$PATH" PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure --enable-pthreads --disable-w32threads --prefix="$HOME/ffmpeg_build" --pkg-config-flags="--static" --extra-cflags="-I$HOME/ffmpeg_build/include -I/usr/local/cuda/include" --extra-ldflags="-L$HOME/ffmpeg_build/lib -L/usr/local/cuda/lib64" --extra-libs='-lpthread -lm' --bindir="$HOME/bin" --enable-gpl --enable-libfdk_aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree --enable-cuda --enable-cuvid --enable-nvenc --enable-nonfree --enable-libnpp
我得到了奇妙的错误

ERROR: x265 not found using pkg-config



正在查看 ffbuild/config.log显示以下错误:
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -I/home/agilbert/ffmpeg_build/include -I/usr/local/cuda/include -std=c11 -fomit-frame-pointer -pthread -I/home/agilbert/ffmpeg_build/include -I/usr/include/freetype2 -I/home/agilbert/ffmpeg_build/include/opus -I/home/agilbert/ffmpeg_build/include/opus -I/home/agilbert/ffmpeg_build/include -I/home/agilbert/ffmpeg_build/include -I/home/agilbert/ffmpeg_build/include -I/home/agilbert/ffmpeg_build/include -I/home/agilbert/ffmpeg_build/include -I/home/agilbert/ffmpeg_build/include -I/home/agilbert/ffmpeg_build/include -I/home/agilbert/ffmpeg_build/include -L/home/agilbert/ffmpeg_build/lib -c -o /tmp/ffconf.MfrVBc4k/test.o /tmp/ffconf.MfrVBc4k/test.c
In file included from /tmp/ffconf.MfrVBc4k/test.c:1:0:
/home/agilbert/ffmpeg_build/include/x265.h:1753:40: error: expected ';', ',' or ')' before '&' token
FILE* x265_csvlog_open(const x265_param& param);
^
/home/agilbert/ffmpeg_build/include/x265.h:1757:40: error: expected ';', ',' or ')' before '&' token
void x265_csvlog_frame(const x265_param& param, const x265_picture& pic);
^
/home/agilbert/ffmpeg_build/include/x265.h:1762:64: error: expected ';', ',' or ')' before '&' token
void x265_csvlog_encode(x265_encoder *encoder, const x265_stats& stats, int argc, char** argv);
^
/home/agilbert/ffmpeg_build/include/x265.h:1766:36: error: expected ';', ',' or ')' before '&' token
void x265_dither_image(x265_picture& pic, int picWidth, int picHeight, int16_t *errorBuf, int bitDepth);
^
/home/agilbert/ffmpeg_build/include/x265.h:1815:50: error: expected ';', ',' or ')' before '&' token
FILE* (*csvlog_open)(const x265_param&);
^
/home/agilbert/ffmpeg_build/include/x265.h:1816:51: error: expected ';', ',' or ')' before '&' token
void (*csvlog_frame)(const x265_param&, const x265_picture&);
^
/home/agilbert/ffmpeg_build/include/x265.h:1817:67: error: expected ';', ',' or ')' before '&' token
void (*csvlog_encode)(x265_encoder*, const x265_stats&, int, char**);
^
/home/agilbert/ffmpeg_build/include/x265.h:1818:47: error: expected ';', ',' or ')' before '&' token
void (*dither_image)(x265_picture&, int, int, int16_t*, int);
^
/home/agilbert/ffmpeg_build/include/x265.h:1820:1: warning: no semicolon at end of struct or union [enabled by default]
} x265_api;
^

gcc 版本是 gcc-4.8.5-16.el7.x86_64

根据以下问题:是的 - x265 是根据 https://trac.ffmpeg.org/wiki/CompilationGuide/Centos 安装的是的 pkg-config 正在找到它。编译错误让我认为我缺少 --pkg-config-flags 选项的标志,但我找不到一个有效的标志。

有谁知道我应该将什么传递给 pkg-config 以使其启用 x265?

最佳答案

万一这对其他人有帮助,我最后发现我不需要提供选项 --enable-libx265当您还指定 --enable-nvenc .

我仍然不知道编译错误是什么,但是 --enable-nvenc您可以使用基于 nVidia 的 GPU 加速在 H.265 中进行编码。

关于ffmpeg - CentOS 7.4.1708 : ERROR: x265 not found using pkg-config,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47251674/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com