[Issue]: NVENC not working (Fedora) #4041

Closed
opened 2026-02-07 00:19:24 +03:00 by OVERLORD · 2 comments
Owner

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

- OS: Fedora 36
- Virtualization: No
- Clients: Any
- FFmpeg Version: 5.0.1
- Playback Method: Transcode
- Hardware Acceleration: NVENC
- Plugins: none
- Reverse Proxy: none
- Base URL: none
- Storage: local

Jellyfin logs

/videos/1f1f9ad4-46fb-b562-dfa1-d0ae2a25ab59/hls1/main/0.ts

{"Protocol":0,"Id":"1f1f9ad446fbb562dfa1d0ae2a25ab59","Path":"/home/dev/jf/M/265.mkv","EncoderPath":null,"EncoderProtocol":null,"Type":0,"Container":"mkv,webm","Size":50118427,"Name":"265","IsRemote":false,"ETag":"9fb8898f5e484189f5ba41832e083e3f","RunTimeTicks":1214070000,"ReadAtNativeFramerate":false,"IgnoreDts":false,"IgnoreIndex":false,"GenPtsInput":false,"SupportsTranscoding":true,"SupportsDirectStream":true,"SupportsDirectPlay":true,"IsInfiniteStream":false,"RequiresOpening":false,"OpenToken":null,"RequiresClosing":false,"LiveStreamId":null,"BufferMs":null,"RequiresLooping":false,"SupportsProbing":true,"VideoType":0,"IsoType":null,"Video3DFormat":null,"MediaStreams":[{"Codec":"hevc","CodecTag":null,"Language":null,"ColorRange":null,"ColorSpace":"bt2020nc","ColorTransfer":"smpte2084","ColorPrimaries":"bt2020","DvVersionMajor":null,"DvVersionMinor":null,"DvProfile":null,"DvLevel":null,"RpuPresentFlag":null,"ElPresentFlag":null,"BlPresentFlag":null,"DvBlSignalCompatibilityId":null,"Comment":null,"TimeBase":"1/1000","CodecTimeBase":null,"Title":null,"VideoRange":"HDR","VideoRangeType":"HDR10","VideoDoViTitle":null,"LocalizedUndefined":null,"LocalizedDefault":null,"LocalizedForced":null,"LocalizedExternal":null,"DisplayTitle":"4K HEVC HDR","NalLengthSize":null,"IsInterlaced":false,"IsAVC":null,"ChannelLayout":null,"BitRate":3302506,"BitDepth":10,"RefFrames":1,"PacketLength":null,"Channels":null,"SampleRate":null,"IsDefault":true,"IsForced":false,"Height":1616,"Width":3840,"AverageFrameRate":23.976025,"RealFrameRate":23.976025,"Profile":"Main 10","Type":1,"AspectRatio":"2.40:1","Index":0,"Score":null,"IsExternal":false,"DeliveryMethod":null,"DeliveryUrl":null,"IsExternalUrl":null,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Path":null,"PixelFormat":"yuv420p10le","Level":150,"IsAnamorphic":null},{"Codec":"vorbis","CodecTag":null,"Language":"eng","ColorRange":null,"ColorSpace":null,"ColorTransfer":null,"ColorPrimaries":null,"DvVersionMajor":null,"DvVersionMinor":null,"DvProfile":null,"DvLevel":null,"RpuPresentFlag":null,"ElPresentFlag":null,"BlPresentFlag":null,"DvBlSignalCompatibilityId":null,"Comment":null,"TimeBase":"1/1000","CodecTimeBase":null,"Title":null,"VideoRange":null,"VideoRangeType":null,"VideoDoViTitle":null,"LocalizedUndefined":null,"LocalizedDefault":null,"LocalizedForced":null,"LocalizedExternal":null,"DisplayTitle":"English - VORBIS - 7.1 - Default","NalLengthSize":null,"IsInterlaced":false,"IsAVC":null,"ChannelLayout":"7.1","BitRate":306110,"BitDepth":null,"RefFrames":null,"PacketLength":null,"Channels":8,"SampleRate":48000,"IsDefault":true,"IsForced":false,"Height":null,"Width":null,"AverageFrameRate":null,"RealFrameRate":null,"Profile":null,"Type":0,"AspectRatio":null,"Index":1,"Score":null,"IsExternal":false,"DeliveryMethod":null,"DeliveryUrl":null,"IsExternalUrl":null,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Path":null,"PixelFormat":null,"Level":0,"IsAnamorphic":null},{"Codec":"ass","CodecTag":null,"Language":"eng","ColorRange":null,"ColorSpace":null,"ColorTransfer":null,"ColorPrimaries":null,"DvVersionMajor":null,"DvVersionMinor":null,"DvProfile":null,"DvLevel":null,"RpuPresentFlag":null,"ElPresentFlag":null,"BlPresentFlag":null,"DvBlSignalCompatibilityId":null,"Comment":null,"TimeBase":"1/1000","CodecTimeBase":null,"Title":null,"VideoRange":null,"VideoRangeType":null,"VideoDoViTitle":null,"LocalizedUndefined":"Undefined","LocalizedDefault":"Default","LocalizedForced":"Forced","LocalizedExternal":"External","DisplayTitle":"English - Default - ASS","NalLengthSize":null,"IsInterlaced":false,"IsAVC":null,"ChannelLayout":null,"BitRate":null,"BitDepth":null,"RefFrames":null,"PacketLength":null,"Channels":null,"SampleRate":null,"IsDefault":true,"IsForced":false,"Height":null,"Width":null,"AverageFrameRate":null,"RealFrameRate":null,"Profile":null,"Type":2,"AspectRatio":null,"Index":2,"Score":null,"IsExternal":false,"DeliveryMethod":null,"DeliveryUrl":null,"IsExternalUrl":null,"IsTextSubtitleStream":true,"SupportsExternalStream":true,"Path":null,"PixelFormat":null,"Level":0,"IsAnamorphic":null}],"MediaAttachments":[],"Formats":[],"Bitrate":3608616,"Timestamp":null,"RequiredHttpHeaders":{},"TranscodingUrl":null,"TranscodingSubProtocol":null,"TranscodingContainer":null,"AnalyzeDurationMs":null,"DefaultAudioStreamIndex":null,"DefaultSubtitleStreamIndex":null}

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"


ffmpeg version 5.0.1 Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 12 (GCC)
  configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --docdir=/usr/share/doc/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --optflags='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection' --extra-ldflags='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 ' --extra-cflags=' -I/usr/include/rav1e' --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-version3 --enable-bzlib --enable-chromaprint --disable-crystalhd --enable-fontconfig --enable-frei0r --enable-gcrypt --enable-gnutls --enable-ladspa --enable-libaom --enable-libdav1d --enable-libass --enable-libbluray --enable-libbs2b --enable-libcdio --enable-libdrm --enable-libjack --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libilbc --enable-libmp3lame --enable-libmysofa --enable-nvenc --enable-openal --enable-opencl --enable-opengl --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librav1e --enable-librtmp --enable-librubberband --enable-libsmbclient --enable-version3 --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtesseract --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-version3 --enable-vapoursynth --enable-libvpx --enable-vulkan --enable-libglslang --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libxml2 --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-avfilter --enable-libmodplug --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-lto --enable-libmfx --enable-runtime-cpudetect
  libavutil      57. 17.100 / 57. 17.100
  libavcodec     59. 18.100 / 59. 18.100
  libavformat    59. 16.100 / 59. 16.100
  libavdevice    59.  4.100 / 59.  4.100
  libavfilter     8. 24.100 /  8. 24.100
  libswscale      6.  4.100 /  6.  4.100
  libswresample   4.  3.100 /  4.  3.100
  libpostproc    56.  3.100 / 56.  3.100
Input #0, matroska,webm, from 'file:/home/dev/jf/M/265.mkv':
  Metadata:
    title           : PSArips.com | Aladdin.2019.2160p.10bit.HDR.BluRay.8CH.x265.HEVC-PSA
    ENCODER         : Lavf59.16.100
  Duration: 00:02:01.41, start: 0.000000, bitrate: 3302 kb/s
  Stream #0:0: Video: hevc (Main 10), yuv420p10le(tv, bt2020nc/bt2020/smpte2084, progressive), 3840x1616 [SAR 1:1 DAR 240:101], 23.98 fps, 23.98 tbr, 1k tbn (default)
    Metadata:
      BPS-eng         : 3566157
      DURATION-eng    : 02:07:58.880000000
      NUMBER_OF_FRAMES-eng: 184109
      NUMBER_OF_BYTES-eng: 3423011945
      _STATISTICS_WRITING_APP-eng: mkvmerge v37.0.0 ('Leave It') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2019-09-05 11:35:41
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      ENCODER         : Lavc59.18.100 libx265
      DURATION        : 00:02:00.037000000
  Stream #0:1(eng): Audio: vorbis, 48000 Hz, 7.1, fltp (default)
    Metadata:
      BPS-eng         : 306110
      DURATION-eng    : 02:07:58.891000000
      NUMBER_OF_FRAMES-eng: 179974
      NUMBER_OF_BYTES-eng: 293823317
      _STATISTICS_WRITING_APP-eng: mkvmerge v37.0.0 ('Leave It') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2019-09-05 11:35:41
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      ENCODER         : Lavc59.18.100 libvorbis
      DURATION        : 00:02:00.000000000
  Stream #0:2(eng): Subtitle: ass (default)
    Metadata:
      BPS-eng         : 62
      DURATION-eng    : 02:07:36.614000000
      NUMBER_OF_FRAMES-eng: 2107
      NUMBER_OF_BYTES-eng: 60228
      _STATISTICS_WRITING_APP-eng: mkvmerge v37.0.0 ('Leave It') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2019-09-05 11:35:41
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      ENCODER         : Lavc59.18.100 ssa
      DURATION        : 00:02:01.407000000
Stream mapping:
  Stream #0:0 -> #0:0 (hevc (native) -> h264 (h264_nvenc))
  Stream #0:1 -> #0:1 (vorbis (native) -> aac (native))
Press [q] to stop, [?] for help
[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!

FFmpeg logs

No response

Please attach any browser or client logs here

No response

Please attach any screenshots here

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
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 ```markdown - OS: Fedora 36 - Virtualization: No - Clients: Any - FFmpeg Version: 5.0.1 - Playback Method: Transcode - Hardware Acceleration: NVENC - Plugins: none - Reverse Proxy: none - Base URL: none - Storage: local ``` ### Jellyfin logs ```shell /videos/1f1f9ad4-46fb-b562-dfa1-d0ae2a25ab59/hls1/main/0.ts {"Protocol":0,"Id":"1f1f9ad446fbb562dfa1d0ae2a25ab59","Path":"/home/dev/jf/M/265.mkv","EncoderPath":null,"EncoderProtocol":null,"Type":0,"Container":"mkv,webm","Size":50118427,"Name":"265","IsRemote":false,"ETag":"9fb8898f5e484189f5ba41832e083e3f","RunTimeTicks":1214070000,"ReadAtNativeFramerate":false,"IgnoreDts":false,"IgnoreIndex":false,"GenPtsInput":false,"SupportsTranscoding":true,"SupportsDirectStream":true,"SupportsDirectPlay":true,"IsInfiniteStream":false,"RequiresOpening":false,"OpenToken":null,"RequiresClosing":false,"LiveStreamId":null,"BufferMs":null,"RequiresLooping":false,"SupportsProbing":true,"VideoType":0,"IsoType":null,"Video3DFormat":null,"MediaStreams":[{"Codec":"hevc","CodecTag":null,"Language":null,"ColorRange":null,"ColorSpace":"bt2020nc","ColorTransfer":"smpte2084","ColorPrimaries":"bt2020","DvVersionMajor":null,"DvVersionMinor":null,"DvProfile":null,"DvLevel":null,"RpuPresentFlag":null,"ElPresentFlag":null,"BlPresentFlag":null,"DvBlSignalCompatibilityId":null,"Comment":null,"TimeBase":"1/1000","CodecTimeBase":null,"Title":null,"VideoRange":"HDR","VideoRangeType":"HDR10","VideoDoViTitle":null,"LocalizedUndefined":null,"LocalizedDefault":null,"LocalizedForced":null,"LocalizedExternal":null,"DisplayTitle":"4K HEVC HDR","NalLengthSize":null,"IsInterlaced":false,"IsAVC":null,"ChannelLayout":null,"BitRate":3302506,"BitDepth":10,"RefFrames":1,"PacketLength":null,"Channels":null,"SampleRate":null,"IsDefault":true,"IsForced":false,"Height":1616,"Width":3840,"AverageFrameRate":23.976025,"RealFrameRate":23.976025,"Profile":"Main 10","Type":1,"AspectRatio":"2.40:1","Index":0,"Score":null,"IsExternal":false,"DeliveryMethod":null,"DeliveryUrl":null,"IsExternalUrl":null,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Path":null,"PixelFormat":"yuv420p10le","Level":150,"IsAnamorphic":null},{"Codec":"vorbis","CodecTag":null,"Language":"eng","ColorRange":null,"ColorSpace":null,"ColorTransfer":null,"ColorPrimaries":null,"DvVersionMajor":null,"DvVersionMinor":null,"DvProfile":null,"DvLevel":null,"RpuPresentFlag":null,"ElPresentFlag":null,"BlPresentFlag":null,"DvBlSignalCompatibilityId":null,"Comment":null,"TimeBase":"1/1000","CodecTimeBase":null,"Title":null,"VideoRange":null,"VideoRangeType":null,"VideoDoViTitle":null,"LocalizedUndefined":null,"LocalizedDefault":null,"LocalizedForced":null,"LocalizedExternal":null,"DisplayTitle":"English - VORBIS - 7.1 - Default","NalLengthSize":null,"IsInterlaced":false,"IsAVC":null,"ChannelLayout":"7.1","BitRate":306110,"BitDepth":null,"RefFrames":null,"PacketLength":null,"Channels":8,"SampleRate":48000,"IsDefault":true,"IsForced":false,"Height":null,"Width":null,"AverageFrameRate":null,"RealFrameRate":null,"Profile":null,"Type":0,"AspectRatio":null,"Index":1,"Score":null,"IsExternal":false,"DeliveryMethod":null,"DeliveryUrl":null,"IsExternalUrl":null,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Path":null,"PixelFormat":null,"Level":0,"IsAnamorphic":null},{"Codec":"ass","CodecTag":null,"Language":"eng","ColorRange":null,"ColorSpace":null,"ColorTransfer":null,"ColorPrimaries":null,"DvVersionMajor":null,"DvVersionMinor":null,"DvProfile":null,"DvLevel":null,"RpuPresentFlag":null,"ElPresentFlag":null,"BlPresentFlag":null,"DvBlSignalCompatibilityId":null,"Comment":null,"TimeBase":"1/1000","CodecTimeBase":null,"Title":null,"VideoRange":null,"VideoRangeType":null,"VideoDoViTitle":null,"LocalizedUndefined":"Undefined","LocalizedDefault":"Default","LocalizedForced":"Forced","LocalizedExternal":"External","DisplayTitle":"English - Default - ASS","NalLengthSize":null,"IsInterlaced":false,"IsAVC":null,"ChannelLayout":null,"BitRate":null,"BitDepth":null,"RefFrames":null,"PacketLength":null,"Channels":null,"SampleRate":null,"IsDefault":true,"IsForced":false,"Height":null,"Width":null,"AverageFrameRate":null,"RealFrameRate":null,"Profile":null,"Type":2,"AspectRatio":null,"Index":2,"Score":null,"IsExternal":false,"DeliveryMethod":null,"DeliveryUrl":null,"IsExternalUrl":null,"IsTextSubtitleStream":true,"SupportsExternalStream":true,"Path":null,"PixelFormat":null,"Level":0,"IsAnamorphic":null}],"MediaAttachments":[],"Formats":[],"Bitrate":3608616,"Timestamp":null,"RequiredHttpHeaders":{},"TranscodingUrl":null,"TranscodingSubProtocol":null,"TranscodingContainer":null,"AnalyzeDurationMs":null,"DefaultAudioStreamIndex":null,"DefaultSubtitleStreamIndex":null} 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" ffmpeg version 5.0.1 Copyright (c) 2000-2022 the FFmpeg developers built with gcc 12 (GCC) configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --docdir=/usr/share/doc/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --optflags='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection' --extra-ldflags='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 ' --extra-cflags=' -I/usr/include/rav1e' --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-version3 --enable-bzlib --enable-chromaprint --disable-crystalhd --enable-fontconfig --enable-frei0r --enable-gcrypt --enable-gnutls --enable-ladspa --enable-libaom --enable-libdav1d --enable-libass --enable-libbluray --enable-libbs2b --enable-libcdio --enable-libdrm --enable-libjack --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libilbc --enable-libmp3lame --enable-libmysofa --enable-nvenc --enable-openal --enable-opencl --enable-opengl --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librav1e --enable-librtmp --enable-librubberband --enable-libsmbclient --enable-version3 --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtesseract --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-version3 --enable-vapoursynth --enable-libvpx --enable-vulkan --enable-libglslang --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libxml2 --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-avfilter --enable-libmodplug --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-lto --enable-libmfx --enable-runtime-cpudetect libavutil 57. 17.100 / 57. 17.100 libavcodec 59. 18.100 / 59. 18.100 libavformat 59. 16.100 / 59. 16.100 libavdevice 59. 4.100 / 59. 4.100 libavfilter 8. 24.100 / 8. 24.100 libswscale 6. 4.100 / 6. 4.100 libswresample 4. 3.100 / 4. 3.100 libpostproc 56. 3.100 / 56. 3.100 Input #0, matroska,webm, from 'file:/home/dev/jf/M/265.mkv': Metadata: title : PSArips.com | Aladdin.2019.2160p.10bit.HDR.BluRay.8CH.x265.HEVC-PSA ENCODER : Lavf59.16.100 Duration: 00:02:01.41, start: 0.000000, bitrate: 3302 kb/s Stream #0:0: Video: hevc (Main 10), yuv420p10le(tv, bt2020nc/bt2020/smpte2084, progressive), 3840x1616 [SAR 1:1 DAR 240:101], 23.98 fps, 23.98 tbr, 1k tbn (default) Metadata: BPS-eng : 3566157 DURATION-eng : 02:07:58.880000000 NUMBER_OF_FRAMES-eng: 184109 NUMBER_OF_BYTES-eng: 3423011945 _STATISTICS_WRITING_APP-eng: mkvmerge v37.0.0 ('Leave It') 64-bit _STATISTICS_WRITING_DATE_UTC-eng: 2019-09-05 11:35:41 _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES ENCODER : Lavc59.18.100 libx265 DURATION : 00:02:00.037000000 Stream #0:1(eng): Audio: vorbis, 48000 Hz, 7.1, fltp (default) Metadata: BPS-eng : 306110 DURATION-eng : 02:07:58.891000000 NUMBER_OF_FRAMES-eng: 179974 NUMBER_OF_BYTES-eng: 293823317 _STATISTICS_WRITING_APP-eng: mkvmerge v37.0.0 ('Leave It') 64-bit _STATISTICS_WRITING_DATE_UTC-eng: 2019-09-05 11:35:41 _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES ENCODER : Lavc59.18.100 libvorbis DURATION : 00:02:00.000000000 Stream #0:2(eng): Subtitle: ass (default) Metadata: BPS-eng : 62 DURATION-eng : 02:07:36.614000000 NUMBER_OF_FRAMES-eng: 2107 NUMBER_OF_BYTES-eng: 60228 _STATISTICS_WRITING_APP-eng: mkvmerge v37.0.0 ('Leave It') 64-bit _STATISTICS_WRITING_DATE_UTC-eng: 2019-09-05 11:35:41 _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES ENCODER : Lavc59.18.100 ssa DURATION : 00:02:01.407000000 Stream mapping: Stream #0:0 -> #0:0 (hevc (native) -> h264 (h264_nvenc)) Stream #0:1 -> #0:1 (vorbis (native) -> aac (native)) Press [q] to stop, [?] for help [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! ``` ### FFmpeg logs _No response_ ### Please attach any browser or client logs here _No response_ ### Please attach any screenshots here _No response_ ### Code of Conduct - [X] I agree to follow this project's Code of Conduct
OVERLORD added the bug label 2026-02-07 00:19:24 +03:00
Author
Owner

@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.service file to /etc/systemd/system/jellyfin.service and delete all the hardening options, systemctl daemon-reload; systemctl restart jellyfin and try again. It worked for me.

Will try and narrow down which options are causing problems when I have time later this week.

@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.service` file to `/etc/systemd/system/jellyfin.service` and delete all the hardening options, `systemctl daemon-reload; systemctl restart jellyfin` and try again. It worked for me. Will try and narrow down which options are causing problems when I have time later this week.
Author
Owner

@nyanmisaka commented on GitHub (Aug 7, 2022):

#8219 may fix this issue.

@nyanmisaka commented on GitHub (Aug 7, 2022): #8219 may fix this issue.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#4041