Jellyfin Forum
Transcoding /cuda error - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: Troubleshooting (https://forum.jellyfin.org/f-troubleshooting)
+--- Thread: Transcoding /cuda error (/t-transcoding-cuda-error)



Transcoding /cuda error - daddysmackdown - 2023-10-23

Hi, I'm running proxmox 8.0 with a docker and NVIDIA driver 535.104.06 with vgpu unlocked.  For certain videos, i'm getting the error below.  It looks like CUDA error but I'm not sure how to fix it. 

It also looks like HEVC is the only one that i'm having problem with

ffmpeg version 5.1.3-Jellyfin Copyright © 2000-2022 the FFmpeg developers
  built with gcc 11 (Ubuntu 11.4.0-1ubuntu1~22.04)
  configuration: --prefix=/usr/lib/jellyfin-ffmpeg --target-os=linux --extra-libs=-lfftw3f --extra-version=Jellyfin --disable-doc --disable-ffplay --disable-ptx-compression --disable-static --disable-libxcb --disable-sdl2 --disable-xlib --enable-lto --enable-gpl --enable-version3 --enable-shared --enable-gmp --enable-gnutls --enable-chromaprint --enable-libdrm --enable-libass --enable-libfreetype --enable-libfribidi --enable-libfontconfig --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libopenmpt --enable-libdav1d --enable-libwebp --enable-libvpx --enable-libx264 --enable-libx265 --enable-libzvbi --enable-libzimg --enable-libfdk-aac --arch=amd64 --enable-libsvtav1 --enable-libshaderc --enable-libplacebo --enable-vulkan --enable-opencl --enable-vaapi --enable-amf --enable-libmfx --enable-ffnvcodec --enable-cuda --enable-cuda-llvm --enable-cuvid --enable-nvdec --enable-nvenc
  libavutil      57. 28.100 / 57. 28.100
  libavcodec    59. 37.100 / 59. 37.100
  libavformat    59. 27.100 / 59. 27.100
  libavdevice    59.  7.100 / 59.  7.100
  libavfilter    8. 44.100 /  8. 44.100
  libswscale      6.  7.100 /  6.  7.100
  libswresample  4.  7.100 /  4.  7.100
  libpostproc    56.  6.100 / 56.  6.100
[AVHWDeviceContext @ 0x55c643060d40] cu->cuInit(0) failed -> CUDA_ERROR_UNKNOWN: unknown error
Device creation failed: -542398533.
Failed to set value 'cuda=cu:0' for option 'init_hw_device': Generic error in an external library
Error parsing global options: Generic error in an external library

Hope someone can help please


RE: Transcoding /cuda error - TheDreadPirate - 2023-10-23

Can you share your jellyfin and ffmpeg logs with us?


RE: Transcoding /cuda error - Finallf - 2024-04-07

I have the same error, I decided not to open a new topic and post it here, if necessary, I can open a new one.

Jellyfin LOG: https://pastebin.com/HEyVSXjU

FFmpeg LOG: 
.txt   FFmpegLOG.txt (Size: 8.41 KB / Downloads: 18)


RE: Transcoding /cuda error - TheDreadPirate - 2024-04-07

Which Nvidia GPU? Can you share your docker compose?


RE: Transcoding /cuda error - Finallf - 2024-04-10

I use a GTX 1070
I managed to solve it, in my case, it was happening because the nvidia-uvm module was not starting for some reason.

So I created this script that starts with the system:

Code:
DUNAME=/lib/modules/`uname -r`/
DIDKMS=/lib/modules/`uname -r`/updates/dkms/

echo "§§ Checking if nvidia modules are started... §§"
if [[ ! -f "$DUNAME"nvidia-uvm.ko ]]; then
  echo "§§ nvidia-uvm.ko does not exist, creating module with symbolic link... §§"
  sudo ln -s "$DIDKMS"nvidia-current-uvm.ko "$DUNAME"nvidia-uvm.ko
  echo "§§ Updating the module list... §§"
  sudo depmod -a
  echo "§§ Starting Nvidia modules... §§"
  sudo nvidia-container-cli -k -d /dev/tty info
else
  echo "§§ nvidia-uvm.ko exists, checking if it is started... §§"
  if [[ ! -f /dev/nvidia-uvm ]]; then
    echo "§§ nvidia-uvm not started, starting... §§"
    sudo nvidia-container-cli -k -d /dev/tty info
  else
echo "§§ nvidia-uvm is already started. §§"
  fi
fi
## Configure NVIDIA runtime in docker
echo "§§ Configuring Nvidia runtime in docker... §§"
RUNCHK=$(find /etc/docker/daemon.json -exec grep -l -i "nvidia-container-runtime" {} \;)

if [ -z "$RUNCHK" ]; then
  sudo nvidia-ctk runtime configure --runtime=docker
  echo "§§ Nvidia runtime configured. §§"
  echo "§§ Restarting Docker §§"
  sudo systemctl restart docker
else
  echo "§§ NVIDIA runtime is already configured. §§"
fi