NVENC not working - 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: NVENC not working (/t-nvenc-not-working) |
NVENC not working - friki67 - 2023-08-08 Computer: Intel Xeon 2670v3, 32GB ECC RAM, Nvidia GTX 750 (GM107, Maxwell 2nd gen) (tried a GTX 1070 too, same result) OS: Ubuntu server 22.04 + Xfce as GUI, Nvidia driver 535, nvidia-smi returning all ok. Jellyfin 10.8.10 is installed using the recommended method (curl the installation script) and works fine, except for the hw encode/decode part. I've checked user groups and all the suggestions I've found but I'm failing in make it work. This was working on my old installation. I needed to reinstall and I've been unable to get it working again. I'm suffering this in a Fedora installation too. Please check https://developer.nvidia.com/video-encode-and-decode-gpu-support-matrix-new I've tried lot of configurations, the minimal is But I always get "Playback error: the client isn't compatible with the media and the server isn't sending a compatible media format" So what am I missing? PS: all files played ok in VLC, all H.265, one of them info: Code: Codec: MPEG-H Part 2/HEVC (H.265)(hevc) EDIT: ffmpeg log for this file Quote:ffmpeg version 5.1.3-Jellyfin Copyright © 2000-2022 the FFmpeg developers EDIT2: nvidia-smi Tue Aug 8 11:07:50 2023 +---------------------------------------------------------------------------------------+ | NVIDIA-SMI 535.86.05 Driver Version: 535.86.05 CUDA Version: 12.2 | |-----------------------------------------+----------------------+----------------------+ | GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. | | | | MIG M. | |=========================================+======================+======================| | 0 NVIDIA GeForce GTX 750 Off | 00000000:03:00.0 On | N/A | | 24% 35C P8 1W / 38W | 240MiB / 1024MiB | 10% Default | | | | N/A | +-----------------------------------------+----------------------+----------------------+ +---------------------------------------------------------------------------------------+ | Processes: | | GPU GI CI PID Type Process name GPU Memory | | ID ID Usage | |=======================================================================================| | 0 N/A N/A 1346 G /usr/lib/xorg/Xorg 218MiB | | 0 N/A N/A 2398 G xfwm4 0MiB | | 0 N/A N/A 20649 G /snap/vlc/3078/usr/bin/vlc 13MiB | +---------------------------------------------------------------------------------------+ This client isn't compatible with the media and the server isn't sending a compatible media format.Playback Error This client isn't compatible with the media and the server isn't sending a compatible media format. RE: NVENC not working - nyanmisaka - 2023-08-08 This error is reported to FFmpeg by the NVDEC driver. I have to suspect it's a regression. Please try downgrading the driver to an older version. https://github.com/FFmpeg/FFmpeg/blob/b98ee1a355e45d617e2b2a19722f74b4fe724ed3/libavcodec/nvdec.c#L138-L141 Code: if (!caps.bIsSupported) { Running this command can expose more NVDEC capabilities for easy debugging. Code: /usr/lib/jellyfin-ffmpeg/ffmpeg -v verbose -init_hw_device cuda=cu:0 -hwaccel cuda -hwaccel_output_format cuda -i /path/to/the/media -an -sn -vframes 1 -f null - RE: NVENC not working - friki67 - 2023-08-09 I'm attaching two files, one with the output of the ffmpeg command using the 535 driver and one using the 525 driver (EDIT: added 515 output too), but they look to me the same. The nvidia-smi result for the 525 driver: +-----------------------------------------------------------------------------+ | NVIDIA-SMI 525.125.06 Driver Version: 525.125.06 CUDA Version: 12.0 | |-------------------------------+----------------------+----------------------+ | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. | | | | MIG M. | |===============================+======================+======================| | 0 NVIDIA GeForce ... Off | 00000000:03:00.0 On | N/A | | 23% 33C P8 1W / 38W | 117MiB / 1024MiB | 0% Default | | | | N/A | +-------------------------------+----------------------+----------------------+ +-----------------------------------------------------------------------------+ | Processes: | | GPU GI CI PID Type Process name GPU Memory | | ID ID Usage | |=============================================================================| | 0 N/A N/A 1439 G /usr/lib/xorg/Xorg 112MiB | | 0 N/A N/A 2666 G xfwm4 0MiB | +-----------------------------------------------------------------------------+ I know that the CUDA version 12 is causing issues in other softwares.... maybe something related to this? So I'm going with 515 driver (CUDA 11.7) but I'm getting same result! +-----------------------------------------------------------------------------+ | NVIDIA-SMI 515.86.01 Driver Version: 515.86.01 CUDA Version: 11.7 | |-------------------------------+----------------------+----------------------+ | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. | | | | MIG M. | |===============================+======================+======================| | 0 NVIDIA GeForce ... Off | 00000000:03:00.0 On | N/A | | 23% 33C P8 1W / 38W | 100MiB / 1024MiB | 0% Default | | | | N/A | +-------------------------------+----------------------+----------------------+ +-----------------------------------------------------------------------------+ | Processes: | | GPU GI CI PID Type Process name GPU Memory | | ID ID Usage | |=============================================================================| | 0 N/A N/A 1397 G /usr/lib/xorg/Xorg 95MiB | | 0 N/A N/A 2621 G xfwm4 0MiB | +-----------------------------------------------------------------------------+ Which driver should I install to test this in Ubuntu Server? This is a test computer, so I don't mind "play" with it EDIT: installed OBS Studio (snap one), set recording output codec to Hardware-NVENC, and it seems to work ok (h.264). The thing is that H.265 decoding/encoding was working with this card (this is GTX750, and with GTX1070) in my old installation, in Jellyfin. What is happening? I'm sure I'm missing something. RE: NVENC not working - nyanmisaka - 2023-08-09 I checked your GPU name GM107. It's 1st Gen Maxwell, so that makes sense. You may have different problems with GTX1070. GTX750/GM107 https://www.techpowerup.com/gpu-specs/nvidia-gm107.g762 GTX750/GM206 https://www.techpowerup.com/gpu-specs/nvidia-gm206.g775 RE: NVENC not working - friki67 - 2023-08-10 (2023-08-09, 01:03 PM)nyanmisaka Wrote: I checked your GPU name GM107. It's 1st Gen Maxwell, so that makes sense. You may have different problems with GTX1070. Hello again. First, thank you for your time and knowledge. So I went with my other computer. Quote:# lshw -C video Then I did the ffmpeg test and got a positive result: Quote:~# /usr/lib/jellyfin-ffmpeg/ffmpeg -v verbose -init_hw_device cuda=cu:0 -hwaccel cuda -hwaccel_output_format cuda -i '/mnt/storage/data/downloads/media/Panasonic Lumix DMC-GH4 But, when trying to play using the web interface in firefox, it fails Quote:ffmpeg version 5.1.3-Jellyfin Copyright © 2000-2022 the FFmpeg developers In configuration, I only checked H264, HEVC and "Enable enhanced NVDEC decoder", "Enable hardware encoding". I've tried to check the corresponding settings for the card, but same thing happens. As you said, it is another problem, something about a library but... What could be happening? And why? # nvidia-smi +-----------------------------------------------------------------------------+ | NVIDIA-SMI 525.116.04 Driver Version: 525.116.04 CUDA Version: 12.0 | |-------------------------------+----------------------+----------------------+ | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. | | | | MIG M. | |===============================+======================+======================| | 0 NVIDIA GeForce ... Off | 00000000:03:00.0 Off | N/A | | 0% 36C P8 6W / 151W | 154MiB / 8192MiB | 0% Default | | | | N/A | +-------------------------------+----------------------+----------------------+ +-----------------------------------------------------------------------------+ | Processes: | | GPU GI CI PID Type Process name GPU Memory | | ID ID Usage | |=============================================================================| +-----------------------------------------------------------------------------+ RE: NVENC not working - nyanmisaka - 2023-08-10 FFmpeg failed to load the "libnvidia-encode.so.1". It's a separate package and may not be included when installing drivers and CUDA. On Debian, run "sudo apt install libnvidia-encode1". On Ubuntu, run "sudo apt install libnvidia-encode". For more details please check https://jellyfin.org/docs/general/administration/hardware-acceleration/nvidia#debian-and-ubuntu-linux RE: NVENC not working - friki67 - 2023-08-11 (2023-08-10, 02:44 PM)nyanmisaka Wrote: On Ubuntu, run "sudo apt install libnvidia-encode". Hello again. I checked it and it was installed, but no so.1 was present. So I reinstalled, and then I got Quote:[AVHWDeviceContext @ 0x557337c25d80] cu->cuInit(0) failed -> CUDA_ERROR_COMPAT_NOT_SUPPORTED_ON_DEVICE: forward compatibility was attempted on non supported HW This is a library incompatibility. I think I messed up things when going driver up and down to make the testing. I'm going to reinstall my OS, and I'm sure this is going to work. Thank you for your patience and help. Best regards. |