无法编译ffmpeg以支持NVIDIA硬件加速

问题描述:

我正在尝试编译ffmpeg以支持NVIDIA硬件加速。但我收到以下错误:无法编译ffmpeg以支持NVIDIA硬件加速

libavcodec/cuvid.c: In function ‘check_cu’: 
libavcodec/cuvid.c:83:5: error: implicit declaration of function ‘cuGetErrorName’ [-Werror=implicit-function-declaration] 
    cuGetErrorName(err, &err_name); 
    ^
libavcodec/cuvid.c:84:5: error: implicit declaration of function ‘cuGetErrorString’ [-Werror=implicit-function-declaration] 
    cuGetErrorString(err, &err_string); 

我已按照NVIDIA开发人员论坛上的说明安装了CUDA。我使用的配置是:

./configure --enable-nonfree --enable-nvenc --enable-cuda --enable-cuvid --enable-libx264 --enable-gpl 

的GPU在我的笔记本是NVIDIA公司GM108M [的GeForce 840M。

尝试安装CUDA UTILITY:

$ wget http://developer.download.nvidia.com/compute/redist/ffmpeg/1511-patch/cudautils.zip 
$ unzip cudautils.zip 
$ cd cudautils 
$ make 

,并添加配置:--extra-CFLAGS = -I ../ cudautils --extra-LDFLAGS = -L ../ cudautils

无论如何this manual会更好。

你需要它配置如下:

的./configure --enable-非* - 禁用共享--enable-nvenc --enable-CUDA --enable-cuvid - enable-libnpp --extra-cflags = -Ilocal/include --extra-cflags = -I ../ PATH_TO_NVENC_SDK --extra-ldflags = -L ../ PATH_TO_NVENC_SDK