mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-05-04 18:09:12 +03:00
[Issue]: NVENC not working (Fedora) #4041
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @glenskie16 on GitHub (Jul 15, 2022).
Please describe your bug
Hello,
I am having issues with getting Nvidia NVENC working. Saying this ' CUDA_ERROR_NO_DEVICE: no CUDA-capable device is detected'.
System - Fedora 36 with RTX 3060
Here is the error with ffmpeg
[h264_nvenc @ 0x55cdcb94ba80] dl_fn->cuda_dl->cuInit(0) failed -> CUDA_ERROR_NO_DEVICE: no CUDA-capable device is detected
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
[aac @ 0x55cdcb966a00] Qavg: 64492.316
[aac @ 0x55cdcb966a00] 2 frames left in the queue on closing
Conversion failed!
Here is nvidia-smi output.
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 515.57 Driver Version: 515.57 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:01:00.0 Off | N/A |
| 0% 40C P8 13W / 170W | 3MiB / 12288MiB | 0% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| 0 N/A N/A 9336 G /usr/bin/gnome-shell 2MiB |
+-----------------------------------------------------------------------------+
I know that its something very easy (like not installing something).
thank you in advance!
Jellyfin Version
Other
if other:
10.8.1
Environment
Jellyfin logs
FFmpeg logs
No response
Please attach any browser or client logs here
No response
Please attach any screenshots here
No response
Code of Conduct
@Trezamere commented on GitHub (Aug 7, 2022):
I'm also having this error, are you using the .rpm packages and the default systemd unit? If yes, I believe the settings for the systemd service are to restrictive. Try running the ffmpeg command (should be the second line in the transcode log) directly from your shell as the jellyfin user,
runas -u jellyfin -- ffmpeg -analyzeduration 200M -i file:"/home/dev/jf/M/265.mkv" -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 h264_nvenc -preset p4 -b:v 5504177 -maxrate 5504177 -bufsize 11008354 -profile:v:0 high -g:v:0 72 -keyint_min:v:0 72 -vf "setparams=color_primaries=bt709:color_trc=bt709:colorspace=bt709,scale=trunc(min(max(iw\,ih*a)\,min(3840\,1616*a))/2)*2:trunc(min(max(iw/a\,ih)\,min(3840/a\,1616))/2)*2,format=nv12" -codec:a:0 aac -ac 6 -ab 640000 -copyts -avoid_negative_ts disabled -max_muxing_queue_size 2048 -f hls -max_delay 5000000 -hls_time 3 -hls_segment_type mpegts -start_number 0 -hls_segment_filename "/var/lib/jellyfin/transcodes/64beb80a1482090df5f5b29a2d55ad7e%d.ts" -hls_playlist_type vod -hls_list_size 0 -y "/var/lib/jellyfin/transcodes/64beb80a1482090df5f5b29a2d55ad7e.m3u8"If, like me, that succeeds try copying the
/usr/lib/systemd/system/jellyfin.servicefile to/etc/systemd/system/jellyfin.serviceand delete all the hardening options,systemctl daemon-reload; systemctl restart jellyfinand try again. It worked for me.Will try and narrow down which options are causing problems when I have time later this week.
@nyanmisaka commented on GitHub (Aug 7, 2022):
#8219 may fix this issue.