[FFmpeg-user] Nvenc Fails with Cannot Init CUDA

James Girotti james.girotti at gmail.com
Thu May 31 19:51:02 EEST 2018


>
> Using the strace utility I can get a little more information on the error:
>
> strace ffmpeg -i input.mp4 -c:v h264_nvenc output.mkv
>
> stat("/dev/nvidia-uvm", {st_mode=S_IFCHR|0666, st_rdev=makedev(249, 0),
> ...}) = 0
> stat("/dev/nvidia-uvm-tools", {st_mode=S_IFCHR|0666, st_rdev=makedev(249,
> 1), ...}) = 0
> openat(AT_FDCWD, "/dev/nvidia-uvm", O_RDWR|O_CLOEXEC) = -1 EIO
> (Input/output error)
> openat(AT_FDCWD, "/dev/nvidia-uvm", O_RDWR) = -1 EIO (Input/output error)
> ioctl(-5, _IOC(0, 0x00, 0x01, 0x3000), 0x7ffd8ccc67e0) = -1 EBADF (Bad file
> descriptor)
> ioctl(-5, _IOC(0, 0x00, 0x02, 0x3000), 0) = -1 EBADF (Bad file descriptor)
> close(-5)                               = -1 EBADF (Bad file descriptor)
> write(2, "\33[48;5;0m\33[38;5;51m[h264_nvenc @"..., 47[h264_nvenc @
> 0xf33d00] ) = 47
> write(2, "\33[48;5;0m\33[38;5;196mCannot init "..., 41Cannot init CUDA
> ) = 41
>
> What is the problem here?  How can I debug this further?


>From the strace it looks like there is a problem opening /dev/nvidia-uvm.
Do you have all the nvidia kernel modules loaded? Specifically nvidia-uvm?
Is there a device node /dev/nvidia-uvm?


More information about the ffmpeg-user mailing list