编译Nvidia Video_Codec_SDK
官方下载地址 https://developer.nvidia.com/nvidia-video-codec-sdk/download
下载需要注册会员,我已经下好上传了方便大家自取=>https://download.csdn.net/download/qq_23282479/20433871?spm=1001.2014.3001.5501
解压后需要编译,cmake编译的时候有一些依赖库(centos可能参考这篇比较好https://blog.csdn.net/quantum7/article/details/106954231)
Perhaps you should add the directory containing `libavcodec.pc'
to the PKG_CONFIG_PATH environment variable
Package 'libavcodec', required by 'world', not found
其中1个就是ffmpeg的,加入ffmpeg的pkgconfig路径即可。如果没有直接apt install ffmpeg 应该也可以
export PKG_CONFIG_PATH=/usr/local/ffmpeg/lib/pkgconfig
还有其他错误:
EGL_LIB
linked by target "AppEncGL" in directory /home/AppEncode/AppEncGL
FREEGLUT_LIB
linked by target "AppEncGL" in directory /home/AppEncode/AppEncGL
GLEW32_LIB
linked by target "AppEncGL" in directory /home/AppEncode/AppEncGL
GL_LIB
linked by target "AppEncGL" in directory /home/AppEncode/AppEncGL
X11_LIB
linked by target "AppEncGL" in directory /home/AppEncode/AppEncGL
Perhaps you should add the directory containing `vulkan.pc'
to the PKG_CONFIG_PATH environment variable
Package 'vulkan', required by 'world', not found
也需要安装,不懂安装包可以用apt-cache search glew 这种命令去查,我安装了以下几个就直接搞定了
apt-get install libgles2-mesa-dev
apt-get install libglew-dev
apt install freeglut3-dev
apt install libvulkan-dev
cmake成功,Makefile也出来了,直接make之后也顺利通过