mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-05-04 18:09:12 +03:00
Nvidia decoding issue #6531
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @declanmarks on GitHub (Dec 1, 2024).
I have recently started to get an error when trying to play nvidia transcoded videos. When I go to play I get the error 'Playback failed due to a fatal player error'.
I have checked the docker log after playing:
[21:12:35] [INF] [14] Jellyfin.Api.Controllers.DynamicHlsController: Current HLS implementation doesn't support non-keyframe breaks but one is requested, ignoring that request [21:12:35] [INF] [14] MediaBrowser.MediaEncoding.Transcoding.TranscodeManager: /usr/lib/jellyfin-ffmpeg/ffmpeg -analyzeduration 200M -probesize 1G -f matroska -init_hw_device cuda=cu:0 -filter_hw_device cu -hwaccel cuda -hwaccel_output_format cuda -noautorotate -c:v mpeg4_cuvid -i file:"/data/media/tv/Top Gear (2002)/Top Gear - 1x01 - The Legacy Begins.mkv" -noautoscale -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 libx264 -preset veryfast -crf 23 -maxrate 292000 -bufsize 584000 -profile:v:0 high -level 51 -x264opts:0 subme=0:me_range=16:rc_lookahead=10:me=hex:open_gop=0 -force_key_frames:0 "expr:gte(t,n_forced*3)" -sc_threshold:v:0 0 -vf "setparams=color_primaries=bt709:color_trc=bt709:colorspace=bt709,scale_cuda=format=yuv420p,hwdownload,format=yuv420p" -codec:a:0 libfdk_aac -ac 2 -ab 128000 -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 "a67857c2ac19693c86ae695d25447c29-1.mp4" -start_number 0 -hls_segment_filename "/config/transcodes/a67857c2ac19693c86ae695d25447c29%d.mp4" -hls_playlist_type vod -hls_list_size 0 -y "/config/transcodes/a67857c2ac19693c86ae695d25447c29.m3u8" [21:12:35] [ERR] [54] MediaBrowser.MediaEncoding.Transcoding.TranscodeManager: FFmpeg exited with code 187 [21:12:35] [ERR] [14] Jellyfin.Api.Middleware.ExceptionMiddleware: Error processing request. URL GET /videos/8581c994-5a38-4c0d-f475-c9f05ee102b3/hls1/main/-1.mp4. MediaBrowser.Common.FfmpegException: FFmpeg exited with code 187 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, Nullable1 static, String params, String tag, String deviceProfileId, String playSessionId, String segmentContainer, Nullable1 segmentLength, Nullable1 minSegments, String mediaSourceId, String deviceId, String audioCodec, Nullable1 enableAutoStreamCopy, Nullable1 allowVideoStreamCopy, Nullable1 allowAudioStreamCopy, Nullable1 breakOnNonKeyFrames, Nullable1 audioSampleRate, Nullable1 maxAudioBitDepth, Nullable1 audioBitRate, Nullable1 audioChannels, Nullable1 maxAudioChannels, String profile, String level, Nullable1 framerate, Nullable1 maxFramerate, Nullable1 copyTimestamps, Nullable1 startTimeTicks, Nullable1 width, Nullable1 height, Nullable1 maxWidth, Nullable1 maxHeight, Nullable1 videoBitRate, Nullable1 subtitleStreamIndex, Nullable1 subtitleMethod, Nullable1 maxRefFrames, Nullable1 maxVideoBitDepth, Nullable1 requireAvc, Nullable1 deInterlace, Nullable1 requireNonAnamorphic, Nullable1 transcodingMaxAudioChannels, Nullable1 cpuCoreLimit, String liveStreamId, Nullable1 enableMpegtsM2TsMode, String videoCodec, String subtitleCodec, String transcodeReasons, Nullable1 audioStreamIndex, Nullable1 videoStreamIndex, Nullable1 context, Dictionary2 streamOptions, Boolean enableAudioVbrEncoding, Boolean alwaysBurnInSubtitleWhenTranscoding)at lambda_method1117(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.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) [21:12:35] [INF] [40] MediaBrowser.MediaEncoding.Transcoding.TranscodeManager: Deleting partial stream file(s) /config/transcodes/a67857c2ac19693c86ae695d25447c29.m3u8 [21:12:37] [INF] [40] Emby.Server.Implementations.Session.SessionManager: Playback stopped reported by app Jellyfin Web 10.10.3 playing Episode 1. Stopped at 0 msI try and run the ffmpeg command directly in a docker shell and get the following error:
[AVHWDeviceContext @ 0x632c4ecb90c0] cu->cuInit(0) failed -> CUDA_ERROR_UNKNOWN: unknown error Device creation failed: -542398533. Failed to set value 'cuda=cu:0' for option 'init_hw_device': Generic error in an external library Error parsing global options: Generic error in an external libraryHardware decoding via Nvidia gpu used to work, but I can't even remember when it stopped working. Could this be a bug?
The GPU is visible in the jellyfin docker container as I get an output from nvidia-smi.
@declanmarks commented on GitHub (Dec 1, 2024):
Testing purposes I also setup an emby instance, uses the same library and the compose file is the same for gpu access.
Emby does transcode using GPU.
@gnattu commented on GitHub (Dec 1, 2024):
You might be affected by this nvidia bug: https://github.com/NVIDIA/nvidia-container-toolkit/issues/48
@jellyfin-bot commented on GitHub (Mar 31, 2025):
This issue has gone 120 days without an update and will be closed within 21 days if there is no new activity. To prevent this issue from being closed, please confirm the issue has not already been fixed by providing updated examples or logs.
If you have any questions you can use one of several ways to contact us.
@jellyfin-bot commented on GitHub (Apr 21, 2025):
This issue was closed due to inactivity.