Hardware acceleration transcoding error #7005

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

Originally created by @nycom83 on GitHub (May 12, 2025).

Description of the bug

When I enable hardware acceleration for transcoding, the transcoding stops working. All settings are correctly configured.
I'm getting an error when trying to play a media file that requires transcoding.

Reproduction steps

  1. Activate "hardware acceleration" with VAAPI
    Image
  2. Try to play a file

What is the current bug behavior?

Image

What is the expected correct behavior?

Playing the media file

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: Debian 12
- Linux Kernel: 6.12.25
- Virtualization: Docker
- FFmpeg Version: 7.1.1-Jellyfin
- Playback Method: web
- Hardware Acceleration: Yes
- GPU Model:  AMD Radeon Graphics (RADV GFX1150) 
- Plugins: Default
- Reverse Proxy: Traefik

Jellyfin logs

Jellyfin.Api.Helpers.MediaInfoHelper: User policy for "tit". EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True
[2025-05-12 19:46:49.382 +02:00] [INF] [313] Jellyfin.Api.Controllers.DynamicHlsController: Current HLS implementation doesn't support non-keyframe breaks but one is requested, ignoring that request
[2025-05-12 19:46:49.385 +02:00] [INF] [313] MediaBrowser.MediaEncoding.Transcoding.TranscodeManager: "/usr/lib/jellyfin-ffmpeg/ffmpeg" "-analyzeduration 200M -probesize 1G -f avi  -i file:\"/media/Séries/Tom Sawyer/(D A) Tom Sawyer L'Intégrale ( DVD Rip Fr by Tête d'eMule ) épisode 1.AVI\" -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 h264_vaapi -rc_mode VBR -b:v 4151870 -maxrate 4151870 -bufsize 8303740 -profile:v:0 high -sei -a53_cc -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(720\,576*a))/2)*2:trunc(min(max(iw/a\,ih)\,min(720/a\,576))/2)*2,format=nv12,hwupload=derive_device=vaapi\" -codec:a:0 copy -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 \"/cache/transcodes/e64c51edfe76fb8cc12451b64440be02%d.ts\" -hls_playlist_type vod -hls_list_size 0 -y \"/cache/transcodes/e64c51edfe76fb8cc12451b64440be02.m3u8\""
[2025-05-12 19:46:50.036 +02:00] [ERR] [54] MediaBrowser.MediaEncoding.Transcoding.TranscodeManager: FFmpeg exited with code 234
[2025-05-12 19:46:50.100 +02:00] [ERR] [54] Jellyfin.Api.Middleware.ExceptionMiddleware: Error processing request. URL "GET" "/videos/b999c3e2-26fe-f77e-9db4-794778826eec/hls1/main/0.ts".
MediaBrowser.Common.FfmpegException: FFmpeg exited with code 234
   at MediaBrowser.MediaEncoding.Transcoding.TranscodeManager.StartFfMpeg(StreamState state, String outputPath, String commandLineArguments, Guid userId, TranscodingJobType transcodingJobType, CancellationTokenSource cancellationTokenSource, String workingDirectory)
   at Jellyfin.Api.Controllers.DynamicHlsController.GetDynamicSegment(StreamingRequestDto streamingRequest, Int32 segmentId)
   at Jellyfin.Api.Controllers.DynamicHlsController.GetHlsVideoSegment(Guid itemId, String playlistId, Int32 segmentId, String container, Int64 runtimeTicks, Int64 actualSegmentLengthTicks, Nullable`1 static, String params, String tag, String deviceProfileId, String playSessionId, String segmentContainer, Nullable`1 segmentLength, Nullable`1 minSegments, String mediaSourceId, String deviceId, String audioCodec, Nullable`1 enableAutoStreamCopy, Nullable`1 allowVideoStreamCopy, Nullable`1 allowAudioStreamCopy, Nullable`1 breakOnNonKeyFrames, Nullable`1 audioSampleRate, Nullable`1 maxAudioBitDepth, Nullable`1 audioBitRate, Nullable`1 audioChannels, Nullable`1 maxAudioChannels, String profile, String level, Nullable`1 framerate, Nullable`1 maxFramerate, Nullable`1 copyTimestamps, Nullable`1 startTimeTicks, Nullable`1 width, Nullable`1 height, Nullable`1 maxWidth, Nullable`1 maxHeight, Nullable`1 videoBitRate, Nullable`1 subtitleStreamIndex, Nullable`1 subtitleMethod, Nullable`1 maxRefFrames, Nullable`1 maxVideoBitDepth, Nullable`1 requireAvc, Nullable`1 deInterlace, Nullable`1 requireNonAnamorphic, Nullable`1 transcodingMaxAudioChannels, Nullable`1 cpuCoreLimit, String liveStreamId, Nullable`1 enableMpegtsM2TsMode, String videoCodec, String subtitleCodec, String transcodeReasons, Nullable`1 audioStreamIndex, Nullable`1 videoStreamIndex, Nullable`1 context, Dictionary`2 streamOptions, Boolean enableAudioVbrEncoding, Boolean alwaysBurnInSubtitleWhenTranscoding)
   at lambda_method1243(Closure, Object)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfActionResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
   at Jellyfin.Api.Middleware.ServerStartupMessageMiddleware.Invoke(HttpContext httpContext, IServerApplicationHost serverApplicationHost, ILocalizationManager localizationManager)
   at Jellyfin.Api.Middleware.WebSocketHandlerMiddleware.Invoke(HttpContext httpContext, IWebSocketManager webSocketManager)
   at Jellyfin.Api.Middleware.IPBasedAccessValidationMiddleware.Invoke(HttpContext httpContext, INetworkManager networkManager)
   at Jellyfin.Api.Middleware.LanFilteringMiddleware.Invoke(HttpContext httpContext, INetworkManager networkManager, IServerConfigurationManager serverConfigurationManager)
   at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
   at Jellyfin.Api.Middleware.QueryStringDecodingMiddleware.Invoke(HttpContext httpContext)
   at Swashbuckle.AspNetCore.ReDoc.ReDocMiddleware.Invoke(HttpContext httpContext)
   at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)
   at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at Jellyfin.Api.Middleware.RobotsRedirectionMiddleware.Invoke(HttpContext httpContext)
   at Jellyfin.Api.Middleware.LegacyEmbyRouteRewriteMiddleware.Invoke(HttpContext httpContext)
   at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.InvokeCore(HttpContext context)
   at Jellyfin.Api.Middleware.ResponseTimeMiddleware.Invoke(HttpContext context, IServerConfigurationManager serverConfigurationManager)
   at Jellyfin.Api.Middleware.ExceptionMiddleware.Invoke(HttpContext context)

FFmpeg logs

{"Protocol":0,"Id":"b999c3e226fef77e9db4794778826eec","Path":"/media/S\u00E9ries/Tom Sawyer/(D A) Tom Sawyer L\u0027Int\u00E9grale ( DVD Rip Fr by T\u00EAte d\u0027eMule ) \u00E9pisode 1.AVI","EncoderPath":null,"EncoderProtocol":null,"Type":0,"Container":"avi","Size":183390208,"Name":"(D A) Tom Sawyer L\u0027Int\u00E9grale ( DVD Rip Fr by T\u00EAte d\u0027eMule ) \u00E9pisode 1","IsRemote":false,"ETag":"9060e0c3a0447c1a061eacf9692b26c8","RunTimeTicks":14242000000,"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":"1/20","CodecTimeBase":null,"Title":null,"VideoRange":1,"VideoRangeType":1,"VideoDoViTitle":null,"AudioSpatialFormat":0,"LocalizedUndefined":null,"LocalizedDefault":null,"LocalizedForced":null,"LocalizedExternal":null,"LocalizedHearingImpaired":null,"DisplayTitle":"576p MPEG4 SDR","NalLengthSize":null,"IsInterlaced":false,"IsAVC":false,"ChannelLayout":null,"BitRate":830374,"BitDepth":8,"RefFrames":1,"PacketLength":null,"Channels":null,"SampleRate":null,"IsDefault":false,"IsForced":false,"IsHearingImpaired":false,"Height":576,"Width":720,"AverageFrameRate":20,"RealFrameRate":20,"ReferenceFrameRate":20,"Profile":null,"Type":1,"AspectRatio":"5:4","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":"1/24000","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":192000,"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":1030137,"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/Séries/Tom Sawyer/(D A) Tom Sawyer L'Intégrale ( DVD Rip Fr by Tête d'eMule ) épisode 1.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 4151870 -maxrate 4151870 -bufsize 8303740 -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(720\,576*a))/2)*2:trunc(min(max(iw/a\,ih)\,min(720/a\,576))/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 "ed1be36c0b4ea6802cbf1135fad1f262-1.mp4" -start_number 0 -hls_segment_filename "/cache/transcodes/ed1be36c0b4ea6802cbf1135fad1f262%d.mp4" -hls_playlist_type vod -hls_list_size 0 -y "/cache/transcodes/ed1be36c0b4ea6802cbf1135fad1f262.m3u8"


ffmpeg version 7.1.1-Jellyfin Copyright (c) 2000-2025 the FFmpeg developers
  built with gcc 12 (Debian 12.2.0-14)
  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
Input #0, avi, from 'file:/media/Séries/Tom Sawyer/(D A) Tom Sawyer L'Intégrale ( DVD Rip Fr by Tête d'eMule ) épisode 1.AVI':
  Metadata:
    software        : VirtualDubMod 1.5.1.1a (build 1155/release)
  Duration: 00:23:44.20, start: 0.000000, bitrate: 1030 kb/s
  Stream #0:0: Video: mpeg4 (XVID / 0x44495658), yuv420p, 720x576 [SAR 1:1 DAR 5:4], 830 kb/s, 20 fps, 20 tbr, 20 tbn
  Stream #0:1: Audio: mp3 (mp3float) (U[0][0][0] / 0x0055), 48000 Hz, stereo, fltp, 192 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
[hwupload @ 0x7f369c012940] A hardware device reference is required to upload frames to.
[Parsed_hwupload_3 @ 0x7f369c012840] Query format failed for 'Parsed_hwupload_3': Invalid argument
[vf#0:0 @ 0x55e6cdb28400] Error reinitializing filters!
[vf#0:0 @ 0x55e6cdb28400] Task finished with error code: -22 (Invalid argument)
[vf#0:0 @ 0x55e6cdb28400] Terminating thread with return code -22 (Invalid argument)
[vost#0:0/av1_vaapi @ 0x55e6cdb33d40] Could not open encoder before EOF
[vost#0:0/av1_vaapi @ 0x55e6cdb33d40] Task finished with error code: -22 (Invalid argument)
[vost#0:0/av1_vaapi @ 0x55e6cdb33d40] Terminating thread with return code -22 (Invalid argument)
[out#0/hls @ 0x55e6cdb33700] 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!

Client / Browser logs

No response

Relevant screenshots or videos

No response

Additional information

It seems that '-init_hw_device vaapi=amd:/dev/dri/renderD128' is not added when trying to transcode the file.

If I add these parameters, the media is transcoded
Image

Originally created by @nycom83 on GitHub (May 12, 2025). ### Description of the bug When I enable hardware acceleration for transcoding, the transcoding stops working. All settings are correctly configured. I'm getting an error when trying to play a media file that requires transcoding. ### Reproduction steps 1. Activate "hardware acceleration" with VAAPI ![Image](https://github.com/user-attachments/assets/0265c42a-9da2-4889-9bfc-c2f611e72e12) 2. Try to play a file ### What is the current _bug_ behavior? ![Image](https://github.com/user-attachments/assets/90ee5e63-0a03-414a-8756-22e5906de070) ### What is the expected _correct_ behavior? Playing the media file ### 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: Debian 12 - Linux Kernel: 6.12.25 - Virtualization: Docker - FFmpeg Version: 7.1.1-Jellyfin - Playback Method: web - Hardware Acceleration: Yes - GPU Model: AMD Radeon Graphics (RADV GFX1150) - Plugins: Default - Reverse Proxy: Traefik ``` ### Jellyfin logs ```shell Jellyfin.Api.Helpers.MediaInfoHelper: User policy for "tit". EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True [2025-05-12 19:46:49.382 +02:00] [INF] [313] Jellyfin.Api.Controllers.DynamicHlsController: Current HLS implementation doesn't support non-keyframe breaks but one is requested, ignoring that request [2025-05-12 19:46:49.385 +02:00] [INF] [313] MediaBrowser.MediaEncoding.Transcoding.TranscodeManager: "/usr/lib/jellyfin-ffmpeg/ffmpeg" "-analyzeduration 200M -probesize 1G -f avi -i file:\"/media/Séries/Tom Sawyer/(D A) Tom Sawyer L'Intégrale ( DVD Rip Fr by Tête d'eMule ) épisode 1.AVI\" -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 h264_vaapi -rc_mode VBR -b:v 4151870 -maxrate 4151870 -bufsize 8303740 -profile:v:0 high -sei -a53_cc -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(720\,576*a))/2)*2:trunc(min(max(iw/a\,ih)\,min(720/a\,576))/2)*2,format=nv12,hwupload=derive_device=vaapi\" -codec:a:0 copy -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 \"/cache/transcodes/e64c51edfe76fb8cc12451b64440be02%d.ts\" -hls_playlist_type vod -hls_list_size 0 -y \"/cache/transcodes/e64c51edfe76fb8cc12451b64440be02.m3u8\"" [2025-05-12 19:46:50.036 +02:00] [ERR] [54] MediaBrowser.MediaEncoding.Transcoding.TranscodeManager: FFmpeg exited with code 234 [2025-05-12 19:46:50.100 +02:00] [ERR] [54] Jellyfin.Api.Middleware.ExceptionMiddleware: Error processing request. URL "GET" "/videos/b999c3e2-26fe-f77e-9db4-794778826eec/hls1/main/0.ts". MediaBrowser.Common.FfmpegException: FFmpeg exited with code 234 at MediaBrowser.MediaEncoding.Transcoding.TranscodeManager.StartFfMpeg(StreamState state, String outputPath, String commandLineArguments, Guid userId, TranscodingJobType transcodingJobType, CancellationTokenSource cancellationTokenSource, String workingDirectory) at Jellyfin.Api.Controllers.DynamicHlsController.GetDynamicSegment(StreamingRequestDto streamingRequest, Int32 segmentId) at Jellyfin.Api.Controllers.DynamicHlsController.GetHlsVideoSegment(Guid itemId, String playlistId, Int32 segmentId, String container, Int64 runtimeTicks, Int64 actualSegmentLengthTicks, Nullable`1 static, String params, String tag, String deviceProfileId, String playSessionId, String segmentContainer, Nullable`1 segmentLength, Nullable`1 minSegments, String mediaSourceId, String deviceId, String audioCodec, Nullable`1 enableAutoStreamCopy, Nullable`1 allowVideoStreamCopy, Nullable`1 allowAudioStreamCopy, Nullable`1 breakOnNonKeyFrames, Nullable`1 audioSampleRate, Nullable`1 maxAudioBitDepth, Nullable`1 audioBitRate, Nullable`1 audioChannels, Nullable`1 maxAudioChannels, String profile, String level, Nullable`1 framerate, Nullable`1 maxFramerate, Nullable`1 copyTimestamps, Nullable`1 startTimeTicks, Nullable`1 width, Nullable`1 height, Nullable`1 maxWidth, Nullable`1 maxHeight, Nullable`1 videoBitRate, Nullable`1 subtitleStreamIndex, Nullable`1 subtitleMethod, Nullable`1 maxRefFrames, Nullable`1 maxVideoBitDepth, Nullable`1 requireAvc, Nullable`1 deInterlace, Nullable`1 requireNonAnamorphic, Nullable`1 transcodingMaxAudioChannels, Nullable`1 cpuCoreLimit, String liveStreamId, Nullable`1 enableMpegtsM2TsMode, String videoCodec, String subtitleCodec, String transcodeReasons, Nullable`1 audioStreamIndex, Nullable`1 videoStreamIndex, Nullable`1 context, Dictionary`2 streamOptions, Boolean enableAudioVbrEncoding, Boolean alwaysBurnInSubtitleWhenTranscoding) at lambda_method1243(Closure, Object) at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfActionResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope) at Jellyfin.Api.Middleware.ServerStartupMessageMiddleware.Invoke(HttpContext httpContext, IServerApplicationHost serverApplicationHost, ILocalizationManager localizationManager) at Jellyfin.Api.Middleware.WebSocketHandlerMiddleware.Invoke(HttpContext httpContext, IWebSocketManager webSocketManager) at Jellyfin.Api.Middleware.IPBasedAccessValidationMiddleware.Invoke(HttpContext httpContext, INetworkManager networkManager) at Jellyfin.Api.Middleware.LanFilteringMiddleware.Invoke(HttpContext httpContext, INetworkManager networkManager, IServerConfigurationManager serverConfigurationManager) at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context) at Jellyfin.Api.Middleware.QueryStringDecodingMiddleware.Invoke(HttpContext httpContext) at Swashbuckle.AspNetCore.ReDoc.ReDocMiddleware.Invoke(HttpContext httpContext) at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext) at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider) at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) at Jellyfin.Api.Middleware.RobotsRedirectionMiddleware.Invoke(HttpContext httpContext) at Jellyfin.Api.Middleware.LegacyEmbyRouteRewriteMiddleware.Invoke(HttpContext httpContext) at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.InvokeCore(HttpContext context) at Jellyfin.Api.Middleware.ResponseTimeMiddleware.Invoke(HttpContext context, IServerConfigurationManager serverConfigurationManager) at Jellyfin.Api.Middleware.ExceptionMiddleware.Invoke(HttpContext context) ``` ### FFmpeg logs ```shell {"Protocol":0,"Id":"b999c3e226fef77e9db4794778826eec","Path":"/media/S\u00E9ries/Tom Sawyer/(D A) Tom Sawyer L\u0027Int\u00E9grale ( DVD Rip Fr by T\u00EAte d\u0027eMule ) \u00E9pisode 1.AVI","EncoderPath":null,"EncoderProtocol":null,"Type":0,"Container":"avi","Size":183390208,"Name":"(D A) Tom Sawyer L\u0027Int\u00E9grale ( DVD Rip Fr by T\u00EAte d\u0027eMule ) \u00E9pisode 1","IsRemote":false,"ETag":"9060e0c3a0447c1a061eacf9692b26c8","RunTimeTicks":14242000000,"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":"1/20","CodecTimeBase":null,"Title":null,"VideoRange":1,"VideoRangeType":1,"VideoDoViTitle":null,"AudioSpatialFormat":0,"LocalizedUndefined":null,"LocalizedDefault":null,"LocalizedForced":null,"LocalizedExternal":null,"LocalizedHearingImpaired":null,"DisplayTitle":"576p MPEG4 SDR","NalLengthSize":null,"IsInterlaced":false,"IsAVC":false,"ChannelLayout":null,"BitRate":830374,"BitDepth":8,"RefFrames":1,"PacketLength":null,"Channels":null,"SampleRate":null,"IsDefault":false,"IsForced":false,"IsHearingImpaired":false,"Height":576,"Width":720,"AverageFrameRate":20,"RealFrameRate":20,"ReferenceFrameRate":20,"Profile":null,"Type":1,"AspectRatio":"5:4","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":"1/24000","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":192000,"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":1030137,"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/Séries/Tom Sawyer/(D A) Tom Sawyer L'Intégrale ( DVD Rip Fr by Tête d'eMule ) épisode 1.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 4151870 -maxrate 4151870 -bufsize 8303740 -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(720\,576*a))/2)*2:trunc(min(max(iw/a\,ih)\,min(720/a\,576))/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 "ed1be36c0b4ea6802cbf1135fad1f262-1.mp4" -start_number 0 -hls_segment_filename "/cache/transcodes/ed1be36c0b4ea6802cbf1135fad1f262%d.mp4" -hls_playlist_type vod -hls_list_size 0 -y "/cache/transcodes/ed1be36c0b4ea6802cbf1135fad1f262.m3u8" ffmpeg version 7.1.1-Jellyfin Copyright (c) 2000-2025 the FFmpeg developers built with gcc 12 (Debian 12.2.0-14) 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 Input #0, avi, from 'file:/media/Séries/Tom Sawyer/(D A) Tom Sawyer L'Intégrale ( DVD Rip Fr by Tête d'eMule ) épisode 1.AVI': Metadata: software : VirtualDubMod 1.5.1.1a (build 1155/release) Duration: 00:23:44.20, start: 0.000000, bitrate: 1030 kb/s Stream #0:0: Video: mpeg4 (XVID / 0x44495658), yuv420p, 720x576 [SAR 1:1 DAR 5:4], 830 kb/s, 20 fps, 20 tbr, 20 tbn Stream #0:1: Audio: mp3 (mp3float) (U[0][0][0] / 0x0055), 48000 Hz, stereo, fltp, 192 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 [hwupload @ 0x7f369c012940] A hardware device reference is required to upload frames to. [Parsed_hwupload_3 @ 0x7f369c012840] Query format failed for 'Parsed_hwupload_3': Invalid argument [vf#0:0 @ 0x55e6cdb28400] Error reinitializing filters! [vf#0:0 @ 0x55e6cdb28400] Task finished with error code: -22 (Invalid argument) [vf#0:0 @ 0x55e6cdb28400] Terminating thread with return code -22 (Invalid argument) [vost#0:0/av1_vaapi @ 0x55e6cdb33d40] Could not open encoder before EOF [vost#0:0/av1_vaapi @ 0x55e6cdb33d40] Task finished with error code: -22 (Invalid argument) [vost#0:0/av1_vaapi @ 0x55e6cdb33d40] Terminating thread with return code -22 (Invalid argument) [out#0/hls @ 0x55e6cdb33700] 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! ``` ### Client / Browser logs _No response_ ### Relevant screenshots or videos _No response_ ### Additional information It seems that '-init_hw_device vaapi=amd:/dev/dri/renderD128' is not added when trying to transcode the file. If I add these parameters, the media is transcoded ![Image](https://github.com/user-attachments/assets/3bbf675d-0ae9-4c9f-a0b4-a43d7ca7a3e2)
OVERLORD added the bug label 2026-02-07 04:23:18 +03:00
Author
Owner

@felix920506 commented on GitHub (May 12, 2025):

please head to our chat rooms for troubleshooting. https://jellyfin.org/contact

@felix920506 commented on GitHub (May 12, 2025): please head to our chat rooms for troubleshooting. https://jellyfin.org/contact
Author
Owner

@stealthgun commented on GitHub (Jul 7, 2025):

Im having the exact same issue.
-init_hw_device vaapi=intel:/dev/dri/renderD129 is not added and adding it makes it work.

In the end wat worked is set vaapi and then restart jellyfin

@stealthgun commented on GitHub (Jul 7, 2025): Im having the exact same issue. -init_hw_device vaapi=intel:/dev/dri/renderD129 is not added and adding it makes it work. In the end wat worked is set vaapi and then restart jellyfin
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#7005