[FFmpeg-trac] #7530(avcodec:new): cuviddec/nvdec/nvenc: driver checking errors
FFmpeg
trac at avcodec.org
Fri Nov 2 14:22:45 EET 2018
#7530: cuviddec/nvdec/nvenc: driver checking errors
-------------------------------------+-------------------------------------
Reporter: msiders | Type: defect
Status: new | Priority: normal
Component: avcodec | Version: git-
Keywords: cuviddec, | master
nvdec, nvenc | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Summary of the bug:
When executing the FFmpeg tool with an ancient NVidia driver, the output
ins't clear about the incompatibility of the driver.
This is the regular output when this error appears:
{{{
[AVHWDeviceContext @ 0x1f2d000] Loaded lib: libcuda.so.1
[AVHWDeviceContext @ 0x1f2d000] Loaded sym: cuInit
[AVHWDeviceContext @ 0x1f2d000] Loaded sym: cuDeviceGetCount
[AVHWDeviceContext @ 0x1f2d000] Loaded sym: cuDeviceGet
[AVHWDeviceContext @ 0x1f2d000] Loaded sym: cuDeviceGetName
[AVHWDeviceContext @ 0x1f2d000] Cannot load cuDeviceGetUuid
[AVHWDeviceContext @ 0x1f2d000] Could not dynamically load CUDA
[h264_cuvid @ 0x1eec3c0] Error creating a CUDA device
}}}
Take note that the driver is installed and the card is working. However,
when using a ''recent'' version of FFmpeg, in this case the error
appears... as the driver version is too old. So, ''no errors at all'' when
using a previous version of FFmpeg.
Here are the three points where the driver version is checked:
https://github.com/FFmpeg/FFmpeg/blob/master/libavcodec/cuviddec.c#L727
https://github.com/FFmpeg/FFmpeg/blob/master/libavcodec/nvdec.c#L97
https://github.com/FFmpeg/FFmpeg/blob/master/libavcodec/nvenc.c#L122
First of all, the function to check the driver version should be
centralized (perhaps in "hwcontext_cuda.c"). And second, the function
needs to log every time the minimum version required and the current
version. This will help the user to identificate the problem.
I hope you can fix this soon.
Regards.
--
Ticket URL: <https://trac.ffmpeg.org/ticket/7530>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list