Unable to compile ffmpeg to support NVIDIA hardware acceleration

3k views Asked by At

I am trying to compile ffmpeg to support NVIDIA hardware acceleration. But I am getting the following errors:

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

I have installed CUDA by following the instruction on NVIDIA Developer forum. The configuration I used is:

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

The GPU on my laptop is NVIDIA Corporation GM108M [GeForce 840M].

2

There are 2 answers

0
Ivan Kolesnikov On

Try to install the CUDA UTILITY:

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

And add in configuration: --extra-cflags=-I../cudautils --extra-ldflags=-L../cudautils

In any case this manual will be better.

0
AudioBubble On

You need configure it as follow:

./configure --enable-nonfree --disable-shared --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