ffmpeg unable to detect vaapi device, but transcoding is successful when manually adding -hwaccel vaapi -vaapi_device /dev/dri/renderD128 #7378

Closed
opened 2026-02-07 04:52:40 +03:00 by OVERLORD · 2 comments
Owner

Originally created by @madmudklip on GitHub (Sep 30, 2025).

Description of the bug

Enabling Hardware encoding via Jellyfin docker (Latest Tag) fails when attempting to encode.

Reproduction steps

  1. Sing into jellyfin
  2. Enable Hardware Encoding, VAAPI with Device as /dev/dri/renderD128
  3. Attempt to play media that is not supported and requires encoding
  4. View ffmpeg Log file confirming issue
  5. Manually run same command from log file in container but specifying hardware '-hwaccel vaapi -vaapi_device /dev/dri/renderD128'

What is the current bug behavior?

With this bug hardware encoding always fails, and needs to be disabled to allow media to be played

What is the expected correct behavior?

Hardware encoding correctly determines hardware device and is able to use hardware encoding

Jellyfin Server version

10.10.0+

Specify commit id

No response

Specify unstable release number

No response

Specify version number

No response

Specify the build version

10.10.7

Environment

- OS: Ubuntu 24.04
- Linux Kernel: 6.8.0-84-generic
- Virtualization: Docker
- Clients: Browser
- Browser: Chrome Version 140.0.7339.208
- FFmpeg Version: 7.1.2-Jellyfin
- Playback Method: Transcode
- Hardware Acceleration: VAAPI
- GPU Model: Radeon 890M
- Plugins: none
- Reverse Proxy: none
- Base URL: none
- Networking: Host
- Jellyfin Data Storage: nvme SSD
- Media Storage: SMB Share
- External Integrations: None

Jellyfin logs

{"Protocol":0,"Id":"38cdfa81f20eaaa4ba661fab6edecfd9","Path":"/media/Example.avi","EncoderPath":null,"EncoderProtocol":null,"Type":0,"Container":"avi","Size":734625792,"Name":"Sorority Boys","IsRemote":false,"ETag":"7149aec758698d339c0e5954b552fe11","RunTimeTicks":56236236240,"ReadAtNativeFramerate":false,"IgnoreDts":false,"IgnoreIndex":false,"GenPtsInput":false,"SupportsTranscoding":true,"SupportsDirectStream":true,"SupportsDirectPlay":true,"IsInfiniteStream":false,"UseMostCompatibleTranscodingProfile":false,"RequiresOpening":false,"OpenToken":null,"RequiresClosing":false,"LiveStreamId":null,"BufferMs":null,"RequiresLooping":false,"SupportsProbing":true,"VideoType":0,"IsoType":null,"Video3DFormat":null,"MediaStreams":[{"Codec":"mpeg4","CodecTag":"XVID","Language":null,"ColorRange":null,"ColorSpace":null,"ColorTransfer":null,"ColorPrimaries":null,"DvVersionMajor":null,"DvVersionMinor":null,"DvProfile":null,"DvLevel":null,"RpuPresentFlag":null,"ElPresentFlag":null,"BlPresentFlag":null,"DvBlSignalCompatibilityId":null,"Rotation":null,"Comment":null,"TimeBase":"125/2997","CodecTimeBase":null,"Title":null,"VideoRange":1,"VideoRangeType":1,"VideoDoViTitle":null,"AudioSpatialFormat":0,"LocalizedUndefined":null,"LocalizedDefault":null,"LocalizedForced":null,"LocalizedExternal":null,"LocalizedHearingImpaired":null,"DisplayTitle":"360p MPEG4 SDR","NalLengthSize":null,"IsInterlaced":false,"IsAVC":false,"ChannelLayout":null,"BitRate":899100,"BitDepth":8,"RefFrames":1,"PacketLength":null,"Channels":null,"SampleRate":null,"IsDefault":false,"IsForced":false,"IsHearingImpaired":false,"Height":320,"Width":592,"AverageFrameRate":23.976,"RealFrameRate":23.976025,"ReferenceFrameRate":23.976,"Profile":null,"Type":1,"AspectRatio":"1.85:1","Index":0,"Score":null,"IsExternal":false,"DeliveryMethod":null,"DeliveryUrl":null,"IsExternalUrl":null,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Path":null,"PixelFormat":"yuv420p","Level":-99,"IsAnamorphic":false},{"Codec":"mp3","CodecTag":null,"Language":null,"ColorRange":null,"ColorSpace":null,"ColorTransfer":null,"ColorPrimaries":null,"DvVersionMajor":null,"DvVersionMinor":null,"DvProfile":null,"DvLevel":null,"RpuPresentFlag":null,"ElPresentFlag":null,"BlPresentFlag":null,"DvBlSignalCompatibilityId":null,"Rotation":null,"Comment":null,"TimeBase":"3/125","CodecTimeBase":null,"Title":null,"VideoRange":0,"VideoRangeType":0,"VideoDoViTitle":null,"AudioSpatialFormat":0,"LocalizedUndefined":null,"LocalizedDefault":"Default","LocalizedForced":null,"LocalizedExternal":"External","LocalizedHearingImpaired":null,"DisplayTitle":"MP3 - Stereo","NalLengthSize":null,"IsInterlaced":false,"IsAVC":false,"ChannelLayout":"stereo","BitRate":133248,"BitDepth":null,"RefFrames":null,"PacketLength":null,"Channels":2,"SampleRate":48000,"IsDefault":false,"IsForced":false,"IsHearingImpaired":false,"Height":null,"Width":null,"AverageFrameRate":null,"RealFrameRate":null,"ReferenceFrameRate":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}],"MediaAttachments":[],"Formats":[],"Bitrate":1045056,"FallbackMaxStreamingBitrate":null,"Timestamp":null,"RequiredHttpHeaders":{},"TranscodingUrl":null,"TranscodingSubProtocol":0,"TranscodingContainer":null,"AnalyzeDurationMs":null,"DefaultAudioStreamIndex":null,"DefaultSubtitleStreamIndex":null,"HasSegments":false}

/usr/lib/jellyfin-ffmpeg/ffmpeg -analyzeduration 200M -probesize 1G -f avi  -i file:"/media/Example.avi" -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 av1_vaapi -rc_mode VBR -b:v 4495500 -maxrate 4495500 -bufsize 8991000 -profile:v:0 main -force_key_frames:0 "expr:gte(t,n_forced*3)" -vf "setparams=color_primaries=bt709:color_trc=bt709:colorspace=bt709,scale=trunc(min(max(iw\,ih*a)\,min(592\,320*a))/2)*2:trunc(min(max(iw/a\,ih)\,min(592/a\,320))/2)*2,format=nv12,hwupload=derive_device=vaapi" -codec:a:0 libfdk_aac -ac 2 -ab 256000 -copyts -avoid_negative_ts disabled -max_muxing_queue_size 2048 -f hls -max_delay 5000000 -hls_time 3 -hls_segment_type fmp4 -hls_fmp4_init_filename "4312b5a7197fcab65fcdc3b7a77cb2ee-1.mp4" -start_number 0 -hls_segment_filename "/cache/transcodes/4312b5a7197fcab65fcdc3b7a77cb2ee%d.mp4" -hls_playlist_type vod -hls_list_size 0 -y "/cache/transcodes/4312b5a7197fcab65fcdc3b7a77cb2ee.m3u8"


ffmpeg version 7.1.2-Jellyfin Copyright (c) 2000-2025 the FFmpeg developers
  built with gcc 12 (Debian 12.2.0-14+deb12u1)
  configuration: --prefix=/usr/lib/jellyfin-ffmpeg --target-os=linux --extra-version=Jellyfin --disable-doc --disable-ffplay --disable-static --disable-libxcb --disable-sdl2 --disable-xlib --enable-lto=auto --enable-gpl --enable-version3 --enable-shared --enable-gmp --enable-gnutls --enable-chromaprint --enable-opencl --enable-libdrm --enable-libxml2 --enable-libass --enable-libfreetype --enable-libfribidi --enable-libfontconfig --enable-libharfbuzz --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libopenmpt --enable-libdav1d --enable-libsvtav1 --enable-libwebp --enable-libvpx --enable-libx264 --enable-libx265 --enable-libzvbi --enable-libzimg --enable-libfdk-aac --arch=amd64 --enable-libshaderc --enable-libplacebo --enable-vulkan --enable-vaapi --enable-amf --enable-libvpl --enable-ffnvcodec --enable-cuda --enable-cuda-llvm --enable-cuvid --enable-nvdec --enable-nvenc
  libavutil      59. 39.100 / 59. 39.100
  libavcodec     61. 19.101 / 61. 19.101
  libavformat    61.  7.100 / 61.  7.100
  libavdevice    61.  3.100 / 61.  3.100
  libavfilter    10.  4.100 / 10.  4.100
  libswscale      8.  3.100 /  8.  3.100
  libswresample   5.  3.100 /  5.  3.100
  libpostproc    58.  3.100 / 58.  3.100
[mpeg4 @ 0x63e5fc737140] looks like this file was encoded with (divx4/(old)xvid/opendivx) -> forcing low_delay flag
Input #0, avi, from 'file:/media/Example.avi':
  Metadata:
    software        : 
    title           : Example
    subject         : Example
    artist          : 
    copyright       : 
    comment         : 
  Duration: 01:33:43.62, start: 0.000000, bitrate: 1045 kb/s
  Stream #0:0: Video: mpeg4 (XVID / 0x44495658), yuv420p, 592x320 [SAR 1:1 DAR 37:20], 899 kb/s, 23.98 fps, 23.98 tbr, 23.98 tbn
  Stream #0:1: Audio: mp3 (mp3float) (U[0][0][0] / 0x0055), 48000 Hz, stereo, fltp, 133 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (mpeg4 (native) -> av1 (av1_vaapi))
  Stream #0:1 -> #0:1 (mp3 (mp3float) -> aac (libfdk_aac))
Press [q] to stop, [?] for help
[mpeg4 @ 0x63e5fc764f40] looks like this file was encoded with (divx4/(old)xvid/opendivx) -> forcing low_delay flag
[hwupload @ 0x734788012940] A hardware device reference is required to upload frames to.
[Parsed_hwupload_3 @ 0x734788012840] Query format failed for 'Parsed_hwupload_3': Invalid argument
[vf#0:0 @ 0x63e5fc77df80] Error reinitializing filters!
[vf#0:0 @ 0x63e5fc77df80] Task finished with error code: -22 (Invalid argument)
[vf#0:0 @ 0x63e5fc77df80] Terminating thread with return code -22 (Invalid argument)
[vost#0:0/av1_vaapi @ 0x63e5fc75ce40] Could not open encoder before EOF
[vost#0:0/av1_vaapi @ 0x63e5fc75ce40] Task finished with error code: -22 (Invalid argument)
[vost#0:0/av1_vaapi @ 0x63e5fc75ce40] Terminating thread with return code -22 (Invalid argument)
[out#0/hls @ 0x63e5fc776400] Nothing was written into output file, because at least one of its streams received no packets.
frame=    0 fps=0.0 q=0.0 Lsize=       0KiB time=N/A bitrate=N/A speed=N/A    
Conversion failed!

FFmpeg logs

ffmpeg is correctly detecting device when running 
docker exec -it jellyfin /usr/lib/jellyfin-ffmpeg/vainfo --display drm --device /dev/dri/renderD128

`Trying display: drm
libva info: VA-API version 1.22.0
libva info: Trying to open /usr/lib/jellyfin-ffmpeg/lib/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_1_22
amdgpu: os_same_file_description couldn't determine if two DRM fds reference the same file description.
If they do, bad things may happen!
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.22 (libva 2.22.0)
vainfo: Driver version: Mesa Gallium driver 25.0.7 for AMD Radeon 890M Graphics (radeonsi, gfx1150, ACO, DRM 3.63, 6.8.0-84-generic)
vainfo: Supported profile and entrypoints
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointEncSlice
      VAProfileH264High               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointEncSlice
      VAProfileHEVCMain               : VAEntrypointVLD
      VAProfileHEVCMain               : VAEntrypointEncSlice
      VAProfileHEVCMain10             : VAEntrypointVLD
      VAProfileHEVCMain10             : VAEntrypointEncSlice
      VAProfileJPEGBaseline           : VAEntrypointVLD
      VAProfileVP9Profile0            : VAEntrypointVLD
      VAProfileVP9Profile2            : VAEntrypointVLD
      VAProfileAV1Profile0            : VAEntrypointVLD
      VAProfileAV1Profile0            : VAEntrypointEncSlice
      VAProfileNone                   : VAEntrypointVideoProc
`

docker exec -it jellyfin /usr/lib/jellyfin-ffmpeg/ffmpeg -v debug -init_hw_device vulkan

`ffmpeg version 7.1.2-Jellyfin Copyright (c) 2000-2025 the FFmpeg developers
  built with gcc 12 (Debian 12.2.0-14+deb12u1)
  configuration: --prefix=/usr/lib/jellyfin-ffmpeg --target-os=linux --extra-version=Jellyfin --disable-doc --disable-ffplay --disable-static --disable-libxcb --disable-sdl2 --disable-xlib --enable-lto=auto --enable-gpl --enable-version3 --enable-shared --enable-gmp --enable-gnutls --enable-chromaprint --enable-opencl --enable-libdrm --enable-libxml2 --enable-libass --enable-libfreetype --enable-libfribidi --enable-libfontconfig --enable-libharfbuzz --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libopenmpt --enable-libdav1d --enable-libsvtav1 --enable-libwebp --enable-libvpx --enable-libx264 --enable-libx265 --enable-libzvbi --enable-libzimg --enable-libfdk-aac --arch=amd64 --enable-libshaderc --enable-libplacebo --enable-vulkan --enable-vaapi --enable-amf --enable-libvpl --enable-ffnvcodec --enable-cuda --enable-cuda-llvm --enable-cuvid --enable-nvdec --enable-nvenc
  libavutil      59. 39.100 / 59. 39.100
  libavcodec     61. 19.101 / 61. 19.101
  libavformat    61.  7.100 / 61.  7.100
  libavdevice    61.  3.100 / 61.  3.100
  libavfilter    10.  4.100 / 10.  4.100
  libswscale      8.  3.100 /  8.  3.100
  libswresample   5.  3.100 /  5.  3.100
  libpostproc    58.  3.100 / 58.  3.100
Splitting the commandline.
Reading option '-v' ... matched as option 'v' (set logging level) with argument 'debug'.
Reading option '-init_hw_device' ... matched as option 'init_hw_device' (initialise hardware device) with argument 'vulkan'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option v (set logging level) with argument debug.
Applying option init_hw_device (initialise hardware device) with argument vulkan.
[AVHWDeviceContext @ 0x629a2736ac00] Supported layers:
[AVHWDeviceContext @ 0x629a2736ac00]    VK_LAYER_MESA_device_select
[AVHWDeviceContext @ 0x629a2736ac00]    VK_LAYER_MESA_overlay
[AVHWDeviceContext @ 0x629a2736ac00] Using instance extension VK_KHR_portability_enumeration
[AVHWDeviceContext @ 0x629a2736ac00] GPU listing:
[AVHWDeviceContext @ 0x629a2736ac00]     0: AMD Radeon 890M Graphics (RADV GFX1150) (integrated) (0x150e)
[AVHWDeviceContext @ 0x629a2736ac00] Device 0 selected: AMD Radeon 890M Graphics (RADV GFX1150) (integrated) (0x150e)
[AVHWDeviceContext @ 0x629a2736ac00] Using device extension VK_KHR_push_descriptor
[AVHWDeviceContext @ 0x629a2736ac00] Using device extension VK_EXT_descriptor_buffer
[AVHWDeviceContext @ 0x629a2736ac00] Using device extension VK_EXT_physical_device_drm
[AVHWDeviceContext @ 0x629a2736ac00] Using device extension VK_EXT_shader_atomic_float
[AVHWDeviceContext @ 0x629a2736ac00] Using device extension VK_KHR_cooperative_matrix
[AVHWDeviceContext @ 0x629a2736ac00] Using device extension VK_EXT_shader_object
[AVHWDeviceContext @ 0x629a2736ac00] Using device extension VK_KHR_video_maintenance1
[AVHWDeviceContext @ 0x629a2736ac00] Using device extension VK_KHR_external_memory_fd
[AVHWDeviceContext @ 0x629a2736ac00] Using device extension VK_EXT_external_memory_dma_buf
[AVHWDeviceContext @ 0x629a2736ac00] Using device extension VK_EXT_image_drm_format_modifier
[AVHWDeviceContext @ 0x629a2736ac00] Using device extension VK_KHR_external_semaphore_fd
[AVHWDeviceContext @ 0x629a2736ac00] Using device extension VK_EXT_external_memory_host
[AVHWDeviceContext @ 0x629a2736ac00] Using device extension VK_KHR_video_queue
[AVHWDeviceContext @ 0x629a2736ac00] Using device extension VK_KHR_video_encode_queue
[AVHWDeviceContext @ 0x629a2736ac00] Using device extension VK_KHR_video_decode_queue
[AVHWDeviceContext @ 0x629a2736ac00] Using device extension VK_KHR_video_encode_h264
[AVHWDeviceContext @ 0x629a2736ac00] Using device extension VK_KHR_video_decode_h264
[AVHWDeviceContext @ 0x629a2736ac00] Using device extension VK_KHR_video_encode_h265
[AVHWDeviceContext @ 0x629a2736ac00] Using device extension VK_KHR_video_decode_h265
[AVHWDeviceContext @ 0x629a2736ac00] Using device extension VK_KHR_video_decode_av1
[AVHWDeviceContext @ 0x629a2736ac00] Queue families:
[AVHWDeviceContext @ 0x629a2736ac00]     0: graphics compute transfer (queues: 1)
[AVHWDeviceContext @ 0x629a2736ac00]     1: compute transfer (queues: 4)
[AVHWDeviceContext @ 0x629a2736ac00]     2: decode (queues: 1)
[AVHWDeviceContext @ 0x629a2736ac00]     3: encode (queues: 1)
[AVHWDeviceContext @ 0x629a2736ac00]     4: sparse (queues: 1)
[AVHWDeviceContext @ 0x629a2736ac00] Using device: AMD Radeon 890M Graphics (RADV GFX1150)
[AVHWDeviceContext @ 0x629a2736ac00] Alignments:
[AVHWDeviceContext @ 0x629a2736ac00]     optimalBufferCopyRowPitchAlignment: 1
[AVHWDeviceContext @ 0x629a2736ac00]     minMemoryMapAlignment:              4096
[AVHWDeviceContext @ 0x629a2736ac00]     nonCoherentAtomSize:                64
[AVHWDeviceContext @ 0x629a2736ac00]     minImportedHostPointerAlignment:    4096
[AVHWDeviceContext @ 0x629a2736ac00] Using queue family 0 (queues: 1) for graphics
[AVHWDeviceContext @ 0x629a2736ac00] Using queue family 1 (queues: 4) for compute transfers
[AVHWDeviceContext @ 0x629a2736ac00] Using queue family 2 (queues: 1) for decode
[AVHWDeviceContext @ 0x629a2736ac00] Using queue family 3 (queues: 1) for encode
Successfully parsed a group of options.
Universal media converter
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

Use -h to get full help or, even better, run 'man ffmpeg'`

When playing media requiring encoding Jellyfin attempts the following

`/usr/lib/jellyfin-ffmpeg/ffmpeg -analyzeduration 200M -probesize 1G -hwaccel vaapi -vaapi_device /dev/dri/renderD128 -f avi -i file:"/media/Example.avi" -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 hevc_vaapi -rc_mode VBR -b:v 4495500 -maxrate 4495500 -bufsize 8991000 -profile:v:0 main -force_key_frames:0 "expr:gte(t,n_forced*3)" -vf "format=nv12,hwupload=derive_device=vaapi,scale=w=592:h=-2,hwupload" -codec:a:0 libfdk_aac -ac 2 -ab 256000 -copyts -avoid_negative_ts disabled -max_muxing_queue_size 2048 -f hls -max_delay 5000000 -hls_time 3 -hls_segment_type fmp4 -hls_fmp4_init_filename "4312b5a7197fcab65fcdc3b7a77cb2ee-1.mp4" -start_number 0 -hls_segment_filename "/cache/transcodes/4312b5a7197fcab65fcdc3b7a77cb2ee%d.mp4" -hls_playlist_type vod -hls_list_size 0 -y "/cache/transcodes/4312b5a7197fcab65fcdc3b7a77cb2ee.m3u8"
`

Which results in failure

`
ffmpeg version 7.1.2-Jellyfin Copyright (c) 2000-2025 the FFmpeg developers
  built with gcc 12 (Debian 12.2.0-14+deb12u1)
  configuration: --prefix=/usr/lib/jellyfin-ffmpeg --target-os=linux --extra-version=Jellyfin --disable-doc --disable-ffplay --disable-static --disable-libxcb --disable-sdl2 --disable-xlib --enable-lto=auto --enable-gpl --enable-version3 --enable-shared --enable-gmp --enable-gnutls --enable-chromaprint --enable-opencl --enable-libdrm --enable-libxml2 --enable-libass --enable-libfreetype --enable-libfribidi --enable-libfontconfig --enable-libharfbuzz --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libopenmpt --enable-libdav1d --enable-libsvtav1 --enable-libwebp --enable-libvpx --enable-libx264 --enable-libx265 --enable-libzvbi --enable-libzimg --enable-libfdk-aac --arch=amd64 --enable-libshaderc --enable-libplacebo --enable-vulkan --enable-vaapi --enable-amf --enable-libvpl --enable-ffnvcodec --enable-cuda --enable-cuda-llvm --enable-cuvid --enable-nvdec --enable-nvenc
  libavutil      59. 39.100 / 59. 39.100
  libavcodec     61. 19.101 / 61. 19.101
  libavformat    61.  7.100 / 61.  7.100
  libavdevice    61.  3.100 / 61.  3.100
  libavfilter    10.  4.100 / 10.  4.100
  libswscale      8.  3.100 /  8.  3.100
  libswresample   5.  3.100 /  5.  3.100
  libpostproc    58.  3.100 / 58.  3.100
amdgpu: os_same_file_description couldn't determine if two DRM fds reference the same file description.
If they do, bad things may happen!
[mpeg4 @ 0x63a422916f40] looks like this file was encoded with (divx4/(old)xvid/opendivx) -> forcing low_delay flag
Input #0, avi, from 'file:/media/Example.avi':
  Metadata:
    software        : 
    title           : Example
    subject         : Example
    artist          :
    copyright       : 
    comment         :
  Duration: 01:33:43.62, start: 0.000000, bitrate: 1045 kb/s
  Stream #0:0: Video: mpeg4 (XVID / 0x44495658), yuv420p, 592x320 [SAR 1:1 DAR 37:20], 899 kb/s, 23.98 fps, 23.98 tbr, 23.98 tbn
  Stream #0:1: Audio: mp3 (mp3float) (U[0][0][0] / 0x0055), 48000 Hz, stereo, fltp, 133 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (mpeg4 (native) -> hevc (hevc_vaapi))
  Stream #0:1 -> #0:1 (mp3 (mp3float) -> aac (libfdk_aac))
Press [q] to stop, [?] for help
[mpeg4 @ 0x63a422940d00] looks like this file was encoded with (divx4/(old)xvid/opendivx) -> forcing low_delay flag
[mpeg4 @ 0x63a422940d00] No support for codec mpeg4 profile -99.
[mpeg4 @ 0x63a422940d00] Failed setup for format vaapi: hwaccel initialisation returned error.
Impossible to convert between the formats supported by the filter 'Parsed_hwupload_1' and the filter 'auto_scale_1'
[vf#0:0 @ 0x63a42294fd00] Error reinitializing filters!
[vf#0:0 @ 0x63a42294fd00] Task finished with error code: -38 (Function not implemented)
[vf#0:0 @ 0x63a42294fd00] Terminating thread with return code -38 (Function not implemented)
[vost#0:0/hevc_vaapi @ 0x63a422923080] Could not open encoder before EOF
[vost#0:0/hevc_vaapi @ 0x63a422923080] Task finished with error code: -22 (Invalid argument)
[vost#0:0/hevc_vaapi @ 0x63a422923080] Terminating thread with return code -22 (Invalid argument)
[out#0/hls @ 0x63a42295c000] Nothing was written into output file, because at least one of its streams received no packets.
frame=    0 fps=0.0 q=0.0 Lsize=       0KiB time=N/A bitrate=N/A speed=N/A
Conversion failed!
`

However manually running the same command but specifying vaapi device resolves the issue

`
/usr/lib/jellyfin-ffmpeg/ffmpeg -analyzeduration 200M -probesize 1G -f avi  -hwaccel vaapi -vaapi_device /dev/dri/renderD128 -i file:"/media/Example.avi" -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 av1_vaapi -rc_mode VBR -b:v 4495500 -maxrate 4495500 -bufsize 8991000 -profile:v:0 main -force_key_frames:0 "expr:gte(t,n_forced*3)" -vf "setparams=color_primaries=bt709:color_trc=bt709:colorspace=bt709,scale=trunc(min(max(iw\,ih*a)\,min(592\,320*a))/2)*2:trunc(min(max(iw/a\,ih)\,min(592/a\,320))/2)*2,format=nv12,hwupload=derive_device=vaapi" -codec:a:0 libfdk_aac -ac 2 -ab 256000 -copyts -avoid_negative_ts disabled -max_muxing_queue_size 2048 -f hls -max_delay 5000000 -hls_time 3 -hls_segment_type fmp4 -hls_fmp4_init_filename "4312b5a7197fcab65fcdc3b7a77cb2ee-1.mp4" -start_number 0 -hls_segment_filename "/cache/transcodes/4312b5a7197fcab65fcdc3b7a77cb2ee%d.mp4" -hls_playlist_type vod -hls_list_size 0 -y "/cache/transcodes/4312b5a7197fcab65fcdc3b7a77cb2ee.m3u8"


ffmpeg version 7.1.2-Jellyfin Copyright (c) 2000-2025 the FFmpeg developers
  built with gcc 12 (Debian 12.2.0-14+deb12u1)
  configuration: --prefix=/usr/lib/jellyfin-ffmpeg --target-os=linux --extra-version=Jellyfin --disable-doc --disable-ffplay --disable-static --disable-libxcb --disable-sdl2 --disable-xlib --enable-lto=auto --enable-gpl --enable-version3 --enable-shared --enable-gmp --enable-gnutls --enable-chromaprint --enable-opencl --enable-libdrm --enable-libxml2 --enable-libass --enable-libfreetype --enable-libfribidi --enable-libfontconfig --enable-libharfbuzz --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libopenmpt --enable-libdav1d --enable-libsvtav1 --enable-libwebp --enable-libvpx --enable-libx264 --enable-libx265 --enable-libzvbi --enable-libzimg --enable-libfdk-aac --arch=amd64 --enable-libshaderc --enable-libplacebo --enable-vulkan --enable-vaapi --enable-amf --enable-libvpl --enable-ffnvcodec --enable-cuda --enable-cuda-llvm --enable-cuvid --enable-nvdec --enable-nvenc
  libavutil      59. 39.100 / 59. 39.100
  libavcodec     61. 19.101 / 61. 19.101
  libavformat    61.  7.100 / 61.  7.100
  libavdevice    61.  3.100 / 61.  3.100
  libavfilter    10.  4.100 / 10.  4.100
  libswscale      8.  3.100 /  8.  3.100
  libswresample   5.  3.100 /  5.  3.100
  libpostproc    58.  3.100 / 58.  3.100
amdgpu: os_same_file_description couldn't determine if two DRM fds reference the same file description.
If they do, bad things may happen!
[mpeg4 @ 0x5e8b413b1f80] looks like this file was encoded with (divx4/(old)xvid/opendivx) -> forcing low_delay flag
Input #0, avi, from 'file:/media/Example.avi':
  Metadata:
    software        : 
    title           : Example
    subject         : Example
    artist          :
    copyright       : 
    comment         :
  Duration: 01:33:43.62, start: 0.000000, bitrate: 1045 kb/s
  Stream #0:0: Video: mpeg4 (XVID / 0x44495658), yuv420p, 592x320 [SAR 1:1 DAR 37:20], 899 kb/s, 23.98 fps, 23.98 tbr, 23.98 tbn
  Stream #0:1: Audio: mp3 (mp3float) (U[0][0][0] / 0x0055), 48000 Hz, stereo, fltp, 133 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (mpeg4 (native) -> av1 (av1_vaapi))
  Stream #0:1 -> #0:1 (mp3 (mp3float) -> aac (libfdk_aac))
Press [q] to stop, [?] for help
[mpeg4 @ 0x5e8b413dc300] looks like this file was encoded with (divx4/(old)xvid/opendivx) -> forcing low_delay flag
[mpeg4 @ 0x5e8b413dc300] No support for codec mpeg4 profile -99.
[mpeg4 @ 0x5e8b413dc300] Failed setup for format vaapi: hwaccel initialisation returned error.
[hls @ 0x5e8b413b7dc0] Opening '/cache/transcodes/4312b5a7197fcab65fcdc3b7a77cb2ee-1.mp4' for writing
Output #0, hls, to '/cache/transcodes/4312b5a7197fcab65fcdc3b7a77cb2ee.m3u8':
  Metadata:
    encoder         : Lavf61.7.100
  Stream #0:0: Video: av1 (Main), vaapi(tv, bt709, progressive), 592x320 [SAR 1:1 DAR 37:20], q=2-31, 4495 kb/s, 23.98 fps, 24k tbn
      Metadata:
        encoder         : Lavc61.19.101 av1_vaapi
  Stream #0:1: Audio: aac, 48000 Hz, stereo, s16, 256 kb/s
      Metadata:
        encoder         : Lavc61.19.101 libfdk_aac
      Side data:
        cpb: bitrate max/min/avg: 256000/256000/256000 buffer size: 0 vbv_delay: N/A
[hls @ 0x5e8b413b7dc0] Opening '/cache/transcodes/4312b5a7197fcab65fcdc3b7a77cb2ee0.mp4' for writing
[hls @ 0x5e8b413b7dc0] Opening '/cache/transcodes/4312b5a7197fcab65fcdc3b7a77cb2ee1.mp4' for writing
[hls @ 0x5e8b413b7dc0] Opening '/cache/transcodes/4312b5a7197fcab65fcdc3b7a77cb2ee2.mp4' for writing
[hls @ 0x5e8b413b7dc0] Opening '/cache/transcodes/4312b5a7197fcab65fcdc3b7a77cb2ee3.mp4' for writing
[hls @ 0x5e8b413b7dc0] Opening '/cache/transcodes/4312b5a7197fcab65fcdc3b7a77cb2ee4.mp4' for writing
[hls @ 0x5e8b413b7dc0] Opening '/cache/transcodes/4312b5a7197fcab65fcdc3b7a77cb2ee5.mp4' for writing
[hls @ 0x5e8b413b7dc0] Opening '/cache/transcodes/4312b5a7197fcab65fcdc3b7a77cb2ee6.mp4' for writing
[hls @ 0x5e8b413b7dc0] Opening '/cache/transcodes/4312b5a7197fcab65fcdc3b7a77cb2ee7.mp4' for writing
[hls @ 0x5e8b413b7dc0] Opening '/cache/transcodes/4312b5a7197fcab65fcdc3b7a77cb2ee8.mp4' for writing
[hls @ 0x5e8b413b7dc0] Opening '/cache/transcodes/4312b5a7197fcab65fcdc3b7a77cb2ee9.mp4' for writing
[hls @ 0x5e8b413b7dc0] Opening '/cache/transcodes/4312b5a7197fcab65fcdc3b7a77cb2ee10.mp4' for writing
[hls @ 0x5e8b413b7dc0] Opening '/cache/transcodes/4312b5a7197fcab65fcdc3b7a77cb2ee11.mp4' for writing
[hls @ 0x5e8b413b7dc0] Opening '/cache/transcodes/4312b5a7197fcab65fcdc3b7a77cb2ee12.mp4' for writing
[hls @ 0x5e8b413b7dc0] Opening '/cache/transcodes/4312b5a7197fcab65fcdc3b7a77cb2ee13.mp4' for writing
[hls @ 0x5e8b413b7dc0] Opening '/cache/transcodes/4312b5a7197fcab65fcdc3b7a77cb2ee14.mp4' for writing
[hls @ 0x5e8b413b7dc0] Opening '/cache/transcodes/4312b5a7197fcab65fcdc3b7a77cb2ee15.mp4' for writing
[hls @ 0x5e8b413b7dc0] Opening '/cache/transcodes/4312b5a7197fcab65fcdc3b7a77cb2ee16.mp4' for writing
[hls @ 0x5e8b413b7dc0] Opening '/cache/transcodes/4312b5a7197fcab65fcdc3b7a77cb2ee17.mp4' for writing
[hls @ 0x5e8b413b7dc0] Opening '/cache/transcodes/4312b5a7197fcab65fcdc3b7a77cb2ee18.mp4' for writing
[hls @ 0x5e8b413b7dc0] Opening '/cache/transcodes/4312b5a7197fcab65fcdc3b7a77cb2ee19.mp4' for writing
[hls @ 0x5e8b413b7dc0] Opening '/cache/transcodes/4312b5a7197fcab65fcdc3b7a77cb2ee20.mp4' for writing
[hls @ 0x5e8b413b7dc0] Opening '/cache/transcodes/4312b5a7197fcab65fcdc3b7a77cb2ee21.mp4' for writing
[hls @ 0x5e8b413b7dc0] Opening '/cache/transcodes/4312b5a7197fcab65fcdc3b7a77cb2ee22.mp4' for writing
[hls @ 0x5e8b413b7dc0] Opening '/cache/transcodes/4312b5a7197fcab65fcdc3b7a77cb2ee23.mp4' for writing
[hls @ 0x5e8b413b7dc0] Opening '/cache/transcodes/4312b5a7197fcab65fcdc3b7a77cb2ee24.mp4' for writing
`

Client / Browser logs

No response

Relevant screenshots or videos

No response

Additional information

No response

Originally created by @madmudklip on GitHub (Sep 30, 2025). ### Description of the bug Enabling Hardware encoding via Jellyfin docker (Latest Tag) fails when attempting to encode. ### Reproduction steps 1. Sing into jellyfin 2. Enable Hardware Encoding, VAAPI with Device as /dev/dri/renderD128 4. Attempt to play media that is not supported and requires encoding 5. View ffmpeg Log file confirming issue 6. Manually run same command from log file in container but specifying hardware '-hwaccel vaapi -vaapi_device /dev/dri/renderD128' ### What is the current _bug_ behavior? With this bug hardware encoding always fails, and needs to be disabled to allow media to be played ### What is the expected _correct_ behavior? Hardware encoding correctly determines hardware device and is able to use hardware encoding ### Jellyfin Server version 10.10.0+ ### Specify commit id _No response_ ### Specify unstable release number _No response_ ### Specify version number _No response_ ### Specify the build version 10.10.7 ### Environment ```markdown - OS: Ubuntu 24.04 - Linux Kernel: 6.8.0-84-generic - Virtualization: Docker - Clients: Browser - Browser: Chrome Version 140.0.7339.208 - FFmpeg Version: 7.1.2-Jellyfin - Playback Method: Transcode - Hardware Acceleration: VAAPI - GPU Model: Radeon 890M - Plugins: none - Reverse Proxy: none - Base URL: none - Networking: Host - Jellyfin Data Storage: nvme SSD - Media Storage: SMB Share - External Integrations: None ``` ### Jellyfin logs ```shell {"Protocol":0,"Id":"38cdfa81f20eaaa4ba661fab6edecfd9","Path":"/media/Example.avi","EncoderPath":null,"EncoderProtocol":null,"Type":0,"Container":"avi","Size":734625792,"Name":"Sorority Boys","IsRemote":false,"ETag":"7149aec758698d339c0e5954b552fe11","RunTimeTicks":56236236240,"ReadAtNativeFramerate":false,"IgnoreDts":false,"IgnoreIndex":false,"GenPtsInput":false,"SupportsTranscoding":true,"SupportsDirectStream":true,"SupportsDirectPlay":true,"IsInfiniteStream":false,"UseMostCompatibleTranscodingProfile":false,"RequiresOpening":false,"OpenToken":null,"RequiresClosing":false,"LiveStreamId":null,"BufferMs":null,"RequiresLooping":false,"SupportsProbing":true,"VideoType":0,"IsoType":null,"Video3DFormat":null,"MediaStreams":[{"Codec":"mpeg4","CodecTag":"XVID","Language":null,"ColorRange":null,"ColorSpace":null,"ColorTransfer":null,"ColorPrimaries":null,"DvVersionMajor":null,"DvVersionMinor":null,"DvProfile":null,"DvLevel":null,"RpuPresentFlag":null,"ElPresentFlag":null,"BlPresentFlag":null,"DvBlSignalCompatibilityId":null,"Rotation":null,"Comment":null,"TimeBase":"125/2997","CodecTimeBase":null,"Title":null,"VideoRange":1,"VideoRangeType":1,"VideoDoViTitle":null,"AudioSpatialFormat":0,"LocalizedUndefined":null,"LocalizedDefault":null,"LocalizedForced":null,"LocalizedExternal":null,"LocalizedHearingImpaired":null,"DisplayTitle":"360p MPEG4 SDR","NalLengthSize":null,"IsInterlaced":false,"IsAVC":false,"ChannelLayout":null,"BitRate":899100,"BitDepth":8,"RefFrames":1,"PacketLength":null,"Channels":null,"SampleRate":null,"IsDefault":false,"IsForced":false,"IsHearingImpaired":false,"Height":320,"Width":592,"AverageFrameRate":23.976,"RealFrameRate":23.976025,"ReferenceFrameRate":23.976,"Profile":null,"Type":1,"AspectRatio":"1.85:1","Index":0,"Score":null,"IsExternal":false,"DeliveryMethod":null,"DeliveryUrl":null,"IsExternalUrl":null,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Path":null,"PixelFormat":"yuv420p","Level":-99,"IsAnamorphic":false},{"Codec":"mp3","CodecTag":null,"Language":null,"ColorRange":null,"ColorSpace":null,"ColorTransfer":null,"ColorPrimaries":null,"DvVersionMajor":null,"DvVersionMinor":null,"DvProfile":null,"DvLevel":null,"RpuPresentFlag":null,"ElPresentFlag":null,"BlPresentFlag":null,"DvBlSignalCompatibilityId":null,"Rotation":null,"Comment":null,"TimeBase":"3/125","CodecTimeBase":null,"Title":null,"VideoRange":0,"VideoRangeType":0,"VideoDoViTitle":null,"AudioSpatialFormat":0,"LocalizedUndefined":null,"LocalizedDefault":"Default","LocalizedForced":null,"LocalizedExternal":"External","LocalizedHearingImpaired":null,"DisplayTitle":"MP3 - Stereo","NalLengthSize":null,"IsInterlaced":false,"IsAVC":false,"ChannelLayout":"stereo","BitRate":133248,"BitDepth":null,"RefFrames":null,"PacketLength":null,"Channels":2,"SampleRate":48000,"IsDefault":false,"IsForced":false,"IsHearingImpaired":false,"Height":null,"Width":null,"AverageFrameRate":null,"RealFrameRate":null,"ReferenceFrameRate":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}],"MediaAttachments":[],"Formats":[],"Bitrate":1045056,"FallbackMaxStreamingBitrate":null,"Timestamp":null,"RequiredHttpHeaders":{},"TranscodingUrl":null,"TranscodingSubProtocol":0,"TranscodingContainer":null,"AnalyzeDurationMs":null,"DefaultAudioStreamIndex":null,"DefaultSubtitleStreamIndex":null,"HasSegments":false} /usr/lib/jellyfin-ffmpeg/ffmpeg -analyzeduration 200M -probesize 1G -f avi -i file:"/media/Example.avi" -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 av1_vaapi -rc_mode VBR -b:v 4495500 -maxrate 4495500 -bufsize 8991000 -profile:v:0 main -force_key_frames:0 "expr:gte(t,n_forced*3)" -vf "setparams=color_primaries=bt709:color_trc=bt709:colorspace=bt709,scale=trunc(min(max(iw\,ih*a)\,min(592\,320*a))/2)*2:trunc(min(max(iw/a\,ih)\,min(592/a\,320))/2)*2,format=nv12,hwupload=derive_device=vaapi" -codec:a:0 libfdk_aac -ac 2 -ab 256000 -copyts -avoid_negative_ts disabled -max_muxing_queue_size 2048 -f hls -max_delay 5000000 -hls_time 3 -hls_segment_type fmp4 -hls_fmp4_init_filename "4312b5a7197fcab65fcdc3b7a77cb2ee-1.mp4" -start_number 0 -hls_segment_filename "/cache/transcodes/4312b5a7197fcab65fcdc3b7a77cb2ee%d.mp4" -hls_playlist_type vod -hls_list_size 0 -y "/cache/transcodes/4312b5a7197fcab65fcdc3b7a77cb2ee.m3u8" ffmpeg version 7.1.2-Jellyfin Copyright (c) 2000-2025 the FFmpeg developers built with gcc 12 (Debian 12.2.0-14+deb12u1) configuration: --prefix=/usr/lib/jellyfin-ffmpeg --target-os=linux --extra-version=Jellyfin --disable-doc --disable-ffplay --disable-static --disable-libxcb --disable-sdl2 --disable-xlib --enable-lto=auto --enable-gpl --enable-version3 --enable-shared --enable-gmp --enable-gnutls --enable-chromaprint --enable-opencl --enable-libdrm --enable-libxml2 --enable-libass --enable-libfreetype --enable-libfribidi --enable-libfontconfig --enable-libharfbuzz --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libopenmpt --enable-libdav1d --enable-libsvtav1 --enable-libwebp --enable-libvpx --enable-libx264 --enable-libx265 --enable-libzvbi --enable-libzimg --enable-libfdk-aac --arch=amd64 --enable-libshaderc --enable-libplacebo --enable-vulkan --enable-vaapi --enable-amf --enable-libvpl --enable-ffnvcodec --enable-cuda --enable-cuda-llvm --enable-cuvid --enable-nvdec --enable-nvenc libavutil 59. 39.100 / 59. 39.100 libavcodec 61. 19.101 / 61. 19.101 libavformat 61. 7.100 / 61. 7.100 libavdevice 61. 3.100 / 61. 3.100 libavfilter 10. 4.100 / 10. 4.100 libswscale 8. 3.100 / 8. 3.100 libswresample 5. 3.100 / 5. 3.100 libpostproc 58. 3.100 / 58. 3.100 [mpeg4 @ 0x63e5fc737140] looks like this file was encoded with (divx4/(old)xvid/opendivx) -> forcing low_delay flag Input #0, avi, from 'file:/media/Example.avi': Metadata: software : title : Example subject : Example artist : copyright : comment : Duration: 01:33:43.62, start: 0.000000, bitrate: 1045 kb/s Stream #0:0: Video: mpeg4 (XVID / 0x44495658), yuv420p, 592x320 [SAR 1:1 DAR 37:20], 899 kb/s, 23.98 fps, 23.98 tbr, 23.98 tbn Stream #0:1: Audio: mp3 (mp3float) (U[0][0][0] / 0x0055), 48000 Hz, stereo, fltp, 133 kb/s Stream mapping: Stream #0:0 -> #0:0 (mpeg4 (native) -> av1 (av1_vaapi)) Stream #0:1 -> #0:1 (mp3 (mp3float) -> aac (libfdk_aac)) Press [q] to stop, [?] for help [mpeg4 @ 0x63e5fc764f40] looks like this file was encoded with (divx4/(old)xvid/opendivx) -> forcing low_delay flag [hwupload @ 0x734788012940] A hardware device reference is required to upload frames to. [Parsed_hwupload_3 @ 0x734788012840] Query format failed for 'Parsed_hwupload_3': Invalid argument [vf#0:0 @ 0x63e5fc77df80] Error reinitializing filters! [vf#0:0 @ 0x63e5fc77df80] Task finished with error code: -22 (Invalid argument) [vf#0:0 @ 0x63e5fc77df80] Terminating thread with return code -22 (Invalid argument) [vost#0:0/av1_vaapi @ 0x63e5fc75ce40] Could not open encoder before EOF [vost#0:0/av1_vaapi @ 0x63e5fc75ce40] Task finished with error code: -22 (Invalid argument) [vost#0:0/av1_vaapi @ 0x63e5fc75ce40] Terminating thread with return code -22 (Invalid argument) [out#0/hls @ 0x63e5fc776400] Nothing was written into output file, because at least one of its streams received no packets. frame= 0 fps=0.0 q=0.0 Lsize= 0KiB time=N/A bitrate=N/A speed=N/A Conversion failed! ``` ### FFmpeg logs ```shell ffmpeg is correctly detecting device when running docker exec -it jellyfin /usr/lib/jellyfin-ffmpeg/vainfo --display drm --device /dev/dri/renderD128 `Trying display: drm libva info: VA-API version 1.22.0 libva info: Trying to open /usr/lib/jellyfin-ffmpeg/lib/dri/radeonsi_drv_video.so libva info: Found init function __vaDriverInit_1_22 amdgpu: os_same_file_description couldn't determine if two DRM fds reference the same file description. If they do, bad things may happen! libva info: va_openDriver() returns 0 vainfo: VA-API version: 1.22 (libva 2.22.0) vainfo: Driver version: Mesa Gallium driver 25.0.7 for AMD Radeon 890M Graphics (radeonsi, gfx1150, ACO, DRM 3.63, 6.8.0-84-generic) vainfo: Supported profile and entrypoints VAProfileH264ConstrainedBaseline: VAEntrypointVLD VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice VAProfileH264Main : VAEntrypointVLD VAProfileH264Main : VAEntrypointEncSlice VAProfileH264High : VAEntrypointVLD VAProfileH264High : VAEntrypointEncSlice VAProfileHEVCMain : VAEntrypointVLD VAProfileHEVCMain : VAEntrypointEncSlice VAProfileHEVCMain10 : VAEntrypointVLD VAProfileHEVCMain10 : VAEntrypointEncSlice VAProfileJPEGBaseline : VAEntrypointVLD VAProfileVP9Profile0 : VAEntrypointVLD VAProfileVP9Profile2 : VAEntrypointVLD VAProfileAV1Profile0 : VAEntrypointVLD VAProfileAV1Profile0 : VAEntrypointEncSlice VAProfileNone : VAEntrypointVideoProc ` docker exec -it jellyfin /usr/lib/jellyfin-ffmpeg/ffmpeg -v debug -init_hw_device vulkan `ffmpeg version 7.1.2-Jellyfin Copyright (c) 2000-2025 the FFmpeg developers built with gcc 12 (Debian 12.2.0-14+deb12u1) configuration: --prefix=/usr/lib/jellyfin-ffmpeg --target-os=linux --extra-version=Jellyfin --disable-doc --disable-ffplay --disable-static --disable-libxcb --disable-sdl2 --disable-xlib --enable-lto=auto --enable-gpl --enable-version3 --enable-shared --enable-gmp --enable-gnutls --enable-chromaprint --enable-opencl --enable-libdrm --enable-libxml2 --enable-libass --enable-libfreetype --enable-libfribidi --enable-libfontconfig --enable-libharfbuzz --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libopenmpt --enable-libdav1d --enable-libsvtav1 --enable-libwebp --enable-libvpx --enable-libx264 --enable-libx265 --enable-libzvbi --enable-libzimg --enable-libfdk-aac --arch=amd64 --enable-libshaderc --enable-libplacebo --enable-vulkan --enable-vaapi --enable-amf --enable-libvpl --enable-ffnvcodec --enable-cuda --enable-cuda-llvm --enable-cuvid --enable-nvdec --enable-nvenc libavutil 59. 39.100 / 59. 39.100 libavcodec 61. 19.101 / 61. 19.101 libavformat 61. 7.100 / 61. 7.100 libavdevice 61. 3.100 / 61. 3.100 libavfilter 10. 4.100 / 10. 4.100 libswscale 8. 3.100 / 8. 3.100 libswresample 5. 3.100 / 5. 3.100 libpostproc 58. 3.100 / 58. 3.100 Splitting the commandline. Reading option '-v' ... matched as option 'v' (set logging level) with argument 'debug'. Reading option '-init_hw_device' ... matched as option 'init_hw_device' (initialise hardware device) with argument 'vulkan'. Finished splitting the commandline. Parsing a group of options: global . Applying option v (set logging level) with argument debug. Applying option init_hw_device (initialise hardware device) with argument vulkan. [AVHWDeviceContext @ 0x629a2736ac00] Supported layers: [AVHWDeviceContext @ 0x629a2736ac00] VK_LAYER_MESA_device_select [AVHWDeviceContext @ 0x629a2736ac00] VK_LAYER_MESA_overlay [AVHWDeviceContext @ 0x629a2736ac00] Using instance extension VK_KHR_portability_enumeration [AVHWDeviceContext @ 0x629a2736ac00] GPU listing: [AVHWDeviceContext @ 0x629a2736ac00] 0: AMD Radeon 890M Graphics (RADV GFX1150) (integrated) (0x150e) [AVHWDeviceContext @ 0x629a2736ac00] Device 0 selected: AMD Radeon 890M Graphics (RADV GFX1150) (integrated) (0x150e) [AVHWDeviceContext @ 0x629a2736ac00] Using device extension VK_KHR_push_descriptor [AVHWDeviceContext @ 0x629a2736ac00] Using device extension VK_EXT_descriptor_buffer [AVHWDeviceContext @ 0x629a2736ac00] Using device extension VK_EXT_physical_device_drm [AVHWDeviceContext @ 0x629a2736ac00] Using device extension VK_EXT_shader_atomic_float [AVHWDeviceContext @ 0x629a2736ac00] Using device extension VK_KHR_cooperative_matrix [AVHWDeviceContext @ 0x629a2736ac00] Using device extension VK_EXT_shader_object [AVHWDeviceContext @ 0x629a2736ac00] Using device extension VK_KHR_video_maintenance1 [AVHWDeviceContext @ 0x629a2736ac00] Using device extension VK_KHR_external_memory_fd [AVHWDeviceContext @ 0x629a2736ac00] Using device extension VK_EXT_external_memory_dma_buf [AVHWDeviceContext @ 0x629a2736ac00] Using device extension VK_EXT_image_drm_format_modifier [AVHWDeviceContext @ 0x629a2736ac00] Using device extension VK_KHR_external_semaphore_fd [AVHWDeviceContext @ 0x629a2736ac00] Using device extension VK_EXT_external_memory_host [AVHWDeviceContext @ 0x629a2736ac00] Using device extension VK_KHR_video_queue [AVHWDeviceContext @ 0x629a2736ac00] Using device extension VK_KHR_video_encode_queue [AVHWDeviceContext @ 0x629a2736ac00] Using device extension VK_KHR_video_decode_queue [AVHWDeviceContext @ 0x629a2736ac00] Using device extension VK_KHR_video_encode_h264 [AVHWDeviceContext @ 0x629a2736ac00] Using device extension VK_KHR_video_decode_h264 [AVHWDeviceContext @ 0x629a2736ac00] Using device extension VK_KHR_video_encode_h265 [AVHWDeviceContext @ 0x629a2736ac00] Using device extension VK_KHR_video_decode_h265 [AVHWDeviceContext @ 0x629a2736ac00] Using device extension VK_KHR_video_decode_av1 [AVHWDeviceContext @ 0x629a2736ac00] Queue families: [AVHWDeviceContext @ 0x629a2736ac00] 0: graphics compute transfer (queues: 1) [AVHWDeviceContext @ 0x629a2736ac00] 1: compute transfer (queues: 4) [AVHWDeviceContext @ 0x629a2736ac00] 2: decode (queues: 1) [AVHWDeviceContext @ 0x629a2736ac00] 3: encode (queues: 1) [AVHWDeviceContext @ 0x629a2736ac00] 4: sparse (queues: 1) [AVHWDeviceContext @ 0x629a2736ac00] Using device: AMD Radeon 890M Graphics (RADV GFX1150) [AVHWDeviceContext @ 0x629a2736ac00] Alignments: [AVHWDeviceContext @ 0x629a2736ac00] optimalBufferCopyRowPitchAlignment: 1 [AVHWDeviceContext @ 0x629a2736ac00] minMemoryMapAlignment: 4096 [AVHWDeviceContext @ 0x629a2736ac00] nonCoherentAtomSize: 64 [AVHWDeviceContext @ 0x629a2736ac00] minImportedHostPointerAlignment: 4096 [AVHWDeviceContext @ 0x629a2736ac00] Using queue family 0 (queues: 1) for graphics [AVHWDeviceContext @ 0x629a2736ac00] Using queue family 1 (queues: 4) for compute transfers [AVHWDeviceContext @ 0x629a2736ac00] Using queue family 2 (queues: 1) for decode [AVHWDeviceContext @ 0x629a2736ac00] Using queue family 3 (queues: 1) for encode Successfully parsed a group of options. Universal media converter usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}... Use -h to get full help or, even better, run 'man ffmpeg'` When playing media requiring encoding Jellyfin attempts the following `/usr/lib/jellyfin-ffmpeg/ffmpeg -analyzeduration 200M -probesize 1G -hwaccel vaapi -vaapi_device /dev/dri/renderD128 -f avi -i file:"/media/Example.avi" -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 hevc_vaapi -rc_mode VBR -b:v 4495500 -maxrate 4495500 -bufsize 8991000 -profile:v:0 main -force_key_frames:0 "expr:gte(t,n_forced*3)" -vf "format=nv12,hwupload=derive_device=vaapi,scale=w=592:h=-2,hwupload" -codec:a:0 libfdk_aac -ac 2 -ab 256000 -copyts -avoid_negative_ts disabled -max_muxing_queue_size 2048 -f hls -max_delay 5000000 -hls_time 3 -hls_segment_type fmp4 -hls_fmp4_init_filename "4312b5a7197fcab65fcdc3b7a77cb2ee-1.mp4" -start_number 0 -hls_segment_filename "/cache/transcodes/4312b5a7197fcab65fcdc3b7a77cb2ee%d.mp4" -hls_playlist_type vod -hls_list_size 0 -y "/cache/transcodes/4312b5a7197fcab65fcdc3b7a77cb2ee.m3u8" ` Which results in failure ` ffmpeg version 7.1.2-Jellyfin Copyright (c) 2000-2025 the FFmpeg developers built with gcc 12 (Debian 12.2.0-14+deb12u1) configuration: --prefix=/usr/lib/jellyfin-ffmpeg --target-os=linux --extra-version=Jellyfin --disable-doc --disable-ffplay --disable-static --disable-libxcb --disable-sdl2 --disable-xlib --enable-lto=auto --enable-gpl --enable-version3 --enable-shared --enable-gmp --enable-gnutls --enable-chromaprint --enable-opencl --enable-libdrm --enable-libxml2 --enable-libass --enable-libfreetype --enable-libfribidi --enable-libfontconfig --enable-libharfbuzz --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libopenmpt --enable-libdav1d --enable-libsvtav1 --enable-libwebp --enable-libvpx --enable-libx264 --enable-libx265 --enable-libzvbi --enable-libzimg --enable-libfdk-aac --arch=amd64 --enable-libshaderc --enable-libplacebo --enable-vulkan --enable-vaapi --enable-amf --enable-libvpl --enable-ffnvcodec --enable-cuda --enable-cuda-llvm --enable-cuvid --enable-nvdec --enable-nvenc libavutil 59. 39.100 / 59. 39.100 libavcodec 61. 19.101 / 61. 19.101 libavformat 61. 7.100 / 61. 7.100 libavdevice 61. 3.100 / 61. 3.100 libavfilter 10. 4.100 / 10. 4.100 libswscale 8. 3.100 / 8. 3.100 libswresample 5. 3.100 / 5. 3.100 libpostproc 58. 3.100 / 58. 3.100 amdgpu: os_same_file_description couldn't determine if two DRM fds reference the same file description. If they do, bad things may happen! [mpeg4 @ 0x63a422916f40] looks like this file was encoded with (divx4/(old)xvid/opendivx) -> forcing low_delay flag Input #0, avi, from 'file:/media/Example.avi': Metadata: software : title : Example subject : Example artist : copyright : comment : Duration: 01:33:43.62, start: 0.000000, bitrate: 1045 kb/s Stream #0:0: Video: mpeg4 (XVID / 0x44495658), yuv420p, 592x320 [SAR 1:1 DAR 37:20], 899 kb/s, 23.98 fps, 23.98 tbr, 23.98 tbn Stream #0:1: Audio: mp3 (mp3float) (U[0][0][0] / 0x0055), 48000 Hz, stereo, fltp, 133 kb/s Stream mapping: Stream #0:0 -> #0:0 (mpeg4 (native) -> hevc (hevc_vaapi)) Stream #0:1 -> #0:1 (mp3 (mp3float) -> aac (libfdk_aac)) Press [q] to stop, [?] for help [mpeg4 @ 0x63a422940d00] looks like this file was encoded with (divx4/(old)xvid/opendivx) -> forcing low_delay flag [mpeg4 @ 0x63a422940d00] No support for codec mpeg4 profile -99. [mpeg4 @ 0x63a422940d00] Failed setup for format vaapi: hwaccel initialisation returned error. Impossible to convert between the formats supported by the filter 'Parsed_hwupload_1' and the filter 'auto_scale_1' [vf#0:0 @ 0x63a42294fd00] Error reinitializing filters! [vf#0:0 @ 0x63a42294fd00] Task finished with error code: -38 (Function not implemented) [vf#0:0 @ 0x63a42294fd00] Terminating thread with return code -38 (Function not implemented) [vost#0:0/hevc_vaapi @ 0x63a422923080] Could not open encoder before EOF [vost#0:0/hevc_vaapi @ 0x63a422923080] Task finished with error code: -22 (Invalid argument) [vost#0:0/hevc_vaapi @ 0x63a422923080] Terminating thread with return code -22 (Invalid argument) [out#0/hls @ 0x63a42295c000] Nothing was written into output file, because at least one of its streams received no packets. frame= 0 fps=0.0 q=0.0 Lsize= 0KiB time=N/A bitrate=N/A speed=N/A Conversion failed! ` However manually running the same command but specifying vaapi device resolves the issue ` /usr/lib/jellyfin-ffmpeg/ffmpeg -analyzeduration 200M -probesize 1G -f avi -hwaccel vaapi -vaapi_device /dev/dri/renderD128 -i file:"/media/Example.avi" -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 av1_vaapi -rc_mode VBR -b:v 4495500 -maxrate 4495500 -bufsize 8991000 -profile:v:0 main -force_key_frames:0 "expr:gte(t,n_forced*3)" -vf "setparams=color_primaries=bt709:color_trc=bt709:colorspace=bt709,scale=trunc(min(max(iw\,ih*a)\,min(592\,320*a))/2)*2:trunc(min(max(iw/a\,ih)\,min(592/a\,320))/2)*2,format=nv12,hwupload=derive_device=vaapi" -codec:a:0 libfdk_aac -ac 2 -ab 256000 -copyts -avoid_negative_ts disabled -max_muxing_queue_size 2048 -f hls -max_delay 5000000 -hls_time 3 -hls_segment_type fmp4 -hls_fmp4_init_filename "4312b5a7197fcab65fcdc3b7a77cb2ee-1.mp4" -start_number 0 -hls_segment_filename "/cache/transcodes/4312b5a7197fcab65fcdc3b7a77cb2ee%d.mp4" -hls_playlist_type vod -hls_list_size 0 -y "/cache/transcodes/4312b5a7197fcab65fcdc3b7a77cb2ee.m3u8" ffmpeg version 7.1.2-Jellyfin Copyright (c) 2000-2025 the FFmpeg developers built with gcc 12 (Debian 12.2.0-14+deb12u1) configuration: --prefix=/usr/lib/jellyfin-ffmpeg --target-os=linux --extra-version=Jellyfin --disable-doc --disable-ffplay --disable-static --disable-libxcb --disable-sdl2 --disable-xlib --enable-lto=auto --enable-gpl --enable-version3 --enable-shared --enable-gmp --enable-gnutls --enable-chromaprint --enable-opencl --enable-libdrm --enable-libxml2 --enable-libass --enable-libfreetype --enable-libfribidi --enable-libfontconfig --enable-libharfbuzz --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libopenmpt --enable-libdav1d --enable-libsvtav1 --enable-libwebp --enable-libvpx --enable-libx264 --enable-libx265 --enable-libzvbi --enable-libzimg --enable-libfdk-aac --arch=amd64 --enable-libshaderc --enable-libplacebo --enable-vulkan --enable-vaapi --enable-amf --enable-libvpl --enable-ffnvcodec --enable-cuda --enable-cuda-llvm --enable-cuvid --enable-nvdec --enable-nvenc libavutil 59. 39.100 / 59. 39.100 libavcodec 61. 19.101 / 61. 19.101 libavformat 61. 7.100 / 61. 7.100 libavdevice 61. 3.100 / 61. 3.100 libavfilter 10. 4.100 / 10. 4.100 libswscale 8. 3.100 / 8. 3.100 libswresample 5. 3.100 / 5. 3.100 libpostproc 58. 3.100 / 58. 3.100 amdgpu: os_same_file_description couldn't determine if two DRM fds reference the same file description. If they do, bad things may happen! [mpeg4 @ 0x5e8b413b1f80] looks like this file was encoded with (divx4/(old)xvid/opendivx) -> forcing low_delay flag Input #0, avi, from 'file:/media/Example.avi': Metadata: software : title : Example subject : Example artist : copyright : comment : Duration: 01:33:43.62, start: 0.000000, bitrate: 1045 kb/s Stream #0:0: Video: mpeg4 (XVID / 0x44495658), yuv420p, 592x320 [SAR 1:1 DAR 37:20], 899 kb/s, 23.98 fps, 23.98 tbr, 23.98 tbn Stream #0:1: Audio: mp3 (mp3float) (U[0][0][0] / 0x0055), 48000 Hz, stereo, fltp, 133 kb/s Stream mapping: Stream #0:0 -> #0:0 (mpeg4 (native) -> av1 (av1_vaapi)) Stream #0:1 -> #0:1 (mp3 (mp3float) -> aac (libfdk_aac)) Press [q] to stop, [?] for help [mpeg4 @ 0x5e8b413dc300] looks like this file was encoded with (divx4/(old)xvid/opendivx) -> forcing low_delay flag [mpeg4 @ 0x5e8b413dc300] No support for codec mpeg4 profile -99. [mpeg4 @ 0x5e8b413dc300] Failed setup for format vaapi: hwaccel initialisation returned error. [hls @ 0x5e8b413b7dc0] Opening '/cache/transcodes/4312b5a7197fcab65fcdc3b7a77cb2ee-1.mp4' for writing Output #0, hls, to '/cache/transcodes/4312b5a7197fcab65fcdc3b7a77cb2ee.m3u8': Metadata: encoder : Lavf61.7.100 Stream #0:0: Video: av1 (Main), vaapi(tv, bt709, progressive), 592x320 [SAR 1:1 DAR 37:20], q=2-31, 4495 kb/s, 23.98 fps, 24k tbn Metadata: encoder : Lavc61.19.101 av1_vaapi Stream #0:1: Audio: aac, 48000 Hz, stereo, s16, 256 kb/s Metadata: encoder : Lavc61.19.101 libfdk_aac Side data: cpb: bitrate max/min/avg: 256000/256000/256000 buffer size: 0 vbv_delay: N/A [hls @ 0x5e8b413b7dc0] Opening '/cache/transcodes/4312b5a7197fcab65fcdc3b7a77cb2ee0.mp4' for writing [hls @ 0x5e8b413b7dc0] Opening '/cache/transcodes/4312b5a7197fcab65fcdc3b7a77cb2ee1.mp4' for writing [hls @ 0x5e8b413b7dc0] Opening '/cache/transcodes/4312b5a7197fcab65fcdc3b7a77cb2ee2.mp4' for writing [hls @ 0x5e8b413b7dc0] Opening '/cache/transcodes/4312b5a7197fcab65fcdc3b7a77cb2ee3.mp4' for writing [hls @ 0x5e8b413b7dc0] Opening '/cache/transcodes/4312b5a7197fcab65fcdc3b7a77cb2ee4.mp4' for writing [hls @ 0x5e8b413b7dc0] Opening '/cache/transcodes/4312b5a7197fcab65fcdc3b7a77cb2ee5.mp4' for writing [hls @ 0x5e8b413b7dc0] Opening '/cache/transcodes/4312b5a7197fcab65fcdc3b7a77cb2ee6.mp4' for writing [hls @ 0x5e8b413b7dc0] Opening '/cache/transcodes/4312b5a7197fcab65fcdc3b7a77cb2ee7.mp4' for writing [hls @ 0x5e8b413b7dc0] Opening '/cache/transcodes/4312b5a7197fcab65fcdc3b7a77cb2ee8.mp4' for writing [hls @ 0x5e8b413b7dc0] Opening '/cache/transcodes/4312b5a7197fcab65fcdc3b7a77cb2ee9.mp4' for writing [hls @ 0x5e8b413b7dc0] Opening '/cache/transcodes/4312b5a7197fcab65fcdc3b7a77cb2ee10.mp4' for writing [hls @ 0x5e8b413b7dc0] Opening '/cache/transcodes/4312b5a7197fcab65fcdc3b7a77cb2ee11.mp4' for writing [hls @ 0x5e8b413b7dc0] Opening '/cache/transcodes/4312b5a7197fcab65fcdc3b7a77cb2ee12.mp4' for writing [hls @ 0x5e8b413b7dc0] Opening '/cache/transcodes/4312b5a7197fcab65fcdc3b7a77cb2ee13.mp4' for writing [hls @ 0x5e8b413b7dc0] Opening '/cache/transcodes/4312b5a7197fcab65fcdc3b7a77cb2ee14.mp4' for writing [hls @ 0x5e8b413b7dc0] Opening '/cache/transcodes/4312b5a7197fcab65fcdc3b7a77cb2ee15.mp4' for writing [hls @ 0x5e8b413b7dc0] Opening '/cache/transcodes/4312b5a7197fcab65fcdc3b7a77cb2ee16.mp4' for writing [hls @ 0x5e8b413b7dc0] Opening '/cache/transcodes/4312b5a7197fcab65fcdc3b7a77cb2ee17.mp4' for writing [hls @ 0x5e8b413b7dc0] Opening '/cache/transcodes/4312b5a7197fcab65fcdc3b7a77cb2ee18.mp4' for writing [hls @ 0x5e8b413b7dc0] Opening '/cache/transcodes/4312b5a7197fcab65fcdc3b7a77cb2ee19.mp4' for writing [hls @ 0x5e8b413b7dc0] Opening '/cache/transcodes/4312b5a7197fcab65fcdc3b7a77cb2ee20.mp4' for writing [hls @ 0x5e8b413b7dc0] Opening '/cache/transcodes/4312b5a7197fcab65fcdc3b7a77cb2ee21.mp4' for writing [hls @ 0x5e8b413b7dc0] Opening '/cache/transcodes/4312b5a7197fcab65fcdc3b7a77cb2ee22.mp4' for writing [hls @ 0x5e8b413b7dc0] Opening '/cache/transcodes/4312b5a7197fcab65fcdc3b7a77cb2ee23.mp4' for writing [hls @ 0x5e8b413b7dc0] Opening '/cache/transcodes/4312b5a7197fcab65fcdc3b7a77cb2ee24.mp4' for writing ` ``` ### Client / Browser logs _No response_ ### Relevant screenshots or videos _No response_ ### Additional information _No response_
OVERLORD added the bug label 2026-02-07 04:52:40 +03:00
Author
Owner

@nyanmisaka commented on GitHub (Sep 30, 2025):

Can you check in the server logs whether VAAPI device /dev/dri/renderD128 is AMD GPU exists?

If not, set it correctly in the dashboard->transcoding and restart the container and try again.

@nyanmisaka commented on GitHub (Sep 30, 2025): Can you check in the server logs whether `VAAPI device /dev/dri/renderD128 is AMD GPU` exists? If not, set it correctly in the dashboard->transcoding and restart the container and try again.
Author
Owner

@madmudklip commented on GitHub (Oct 1, 2025):

Can you check in the server logs whether VAAPI device /dev/dri/renderD128 is AMD GPU exists?

If not, set it correctly in the dashboard->transcoding and restart the container and try again.

Strange, /dev/dri/renderd128 was set as vaapi device in admin console but on reboot the server logs was not showing it.
I cleared, saved, reentered it , saved and rebooted the container and then saw it come up in the logs

`Checking server logs it does show /dev/dri/renderd128 is AMD

[23:01:37] [INF] [23] Emby.Server.Implementations.ScheduledTasks.TaskManager: Clean up collections and playlists Completed after 0 minute(s) and 1 seconds [23:01:41] [INF] [1] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: VAAPI device /dev/dri/renderD128 is AMD GPU [23:01:41] [INF] [1] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: VAAPI device /dev/dri/renderD128 supports Vulkan DRM modifier [23:01:41] [INF] [1] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: VAAPI device /dev/dri/renderD128 supports Vulkan DRM interop

`

testing encoding now and it works!

@madmudklip commented on GitHub (Oct 1, 2025): > Can you check in the server logs whether `VAAPI device /dev/dri/renderD128 is AMD GPU` exists? > > If not, set it correctly in the dashboard->transcoding and restart the container and try again. Strange, /dev/dri/renderd128 was set as vaapi device in admin console but on reboot the server logs was not showing it. I cleared, saved, reentered it , saved and rebooted the container and then saw it come up in the logs `Checking server logs it does show /dev/dri/renderd128 is AMD `[23:01:37] [INF] [23] Emby.Server.Implementations.ScheduledTasks.TaskManager: Clean up collections and playlists Completed after 0 minute(s) and 1 seconds [23:01:41] [INF] [1] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: VAAPI device /dev/dri/renderD128 is AMD GPU [23:01:41] [INF] [1] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: VAAPI device /dev/dri/renderD128 supports Vulkan DRM modifier [23:01:41] [INF] [1] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: VAAPI device /dev/dri/renderD128 supports Vulkan DRM interop` ` testing encoding now and it works!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#7378