Jellyfin Forum
Cant play media with nvidia hardware transcoding - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: Troubleshooting (https://forum.jellyfin.org/f-troubleshooting)
+--- Thread: Cant play media with nvidia hardware transcoding (/t-cant-play-media-with-nvidia-hardware-transcoding)

Pages: 1 2


Cant play media with nvidia hardware transcoding - Nickoetje - 2024-03-31

Hi i am running debian 11 with yunohost having installed jellyfin 10.8.13 i have tried many times to set jellyfin up using nvenc but never succeeded.
i am using an nvidia quadro P4000 with driver 550.54.14. see my transcoding settings in the attachment
the media i am trying to play is:
Video
Title: 4K HEVC HDR
Codec: HEVC
Profile: Main 10
Level: 153
Resolution: 3840x2160
Aspect ratio: 16:9
Interlaced: No
Framerate: 23.976025
Bitrate: 59021 kbps
Bit depth: 10 bit
Video range: HDR
Video range type: HDR10
Color space: bt2020nc
Color transfer: smpte2084
Color primaries: bt2020
Pixel format: yuv420p10le
Ref frames: 1

but other codeses dont seem to work aswell allways resulting in the error (tried h264):
Playback error the client isnt compatible with the media and the server isnt sending a compatible media format

currently the log shows:
[matroska,webm @ 0x55ef0cc2bc40] sub2video: using 3840x1600 canvas
[h264_nvenc @ 0x55ef0cc5c2c0] Cannot load libnvidia-encode.so.1
[h264_nvenc @ 0x55ef0cc5c2c0] The minimum required Nvidia driver for nvenc is 520.56.06 or newer
[vost#0:0/h264_nvenc @ 0x55ef0cc5fc40] Error initializing output stream: Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
[libfdk_aac @ 0x55ef0cc7c380] 2 frames left in the queue on closing
Conversion failed!



RE: Cant play media with nvidia hardware transcoding - TheDreadPirate - 2024-03-31

Did you install the encode/decode packages?

https://jellyfin.org/docs/general/administration/hardware-acceleration/nvidia/#configure-on-linux-host

Code:
sudo apt list --installed | grep libvn

Looking for libnvcuvid1 and libnvidia-encode1. If they are not installed

Code:
sudo apt install libnvcuvid1 libnvidia-encode1



RE: Cant play media with nvidia hardware transcoding - Nickoetje - 2024-03-31

those indeed were missing i am now still getting the error that it cant be played but the logs dotn show the missing llib arreors now they give me this

the big log shows this:
[2024-03-31 00:36:39.245 +01:00] [ERR] [29] Jellyfin.Api.Helpers.TranscodingJobHelper: FFmpeg exited with code 1
[2024-03-31 00:36:39.259 +01:00] [ERR] [14] Jellyfin.Server.Middleware.ExceptionMiddleware: Error processing request. URL "GET" "/videos/56e6507f-a62c-5028-fa88-04c3969bb88e/hls1/main/0.ts".
MediaBrowser.Common.FfmpegException: FFmpeg exited with code 1
at Jellyfin.Api.Helpers.TranscodingJobHelper.StartFfMpeg(StreamState state, String outputPath, String commandLineArguments, HttpRequest request, 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)
at lambda_method1421(Closure , Object )
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfActionResultExecutor.Execute(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 Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
at Jellyfin.Server.Middleware.ServerStartupMessageMiddleware.Invoke(HttpContext httpContext, IServerApplicationHost serverApplicationHost, ILocalizationManager localizationManager)
at Jellyfin.Server.Middleware.WebSocketHandlerMiddleware.Invoke(HttpContext httpContext, IWebSocketManager webSocketManager)
at Jellyfin.Server.Middleware.IpBasedAccessValidationMiddleware.Invoke(HttpContext httpContext, INetworkManager networkManager)
at Jellyfin.Server.Middleware.LanFilteringMiddleware.Invoke(HttpContext httpContext, INetworkManager networkManager, IServerConfigurationManager serverConfigurationManager)
at Microsoft.AspNetCore.Authorization.Policy.AuthorizationMiddlewareResultHandler.HandleAsync(RequestDelegate next, HttpContext context, AuthorizationPolicy policy, PolicyAuthorizationResult authorizeResult)
at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
at Jellyfin.Server.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.Server.Middleware.RobotsRedirectionMiddleware.Invoke(HttpContext httpContext)
at Jellyfin.Server.Middleware.LegacyEmbyRouteRewriteMiddleware.Invoke(HttpContext httpContext)
at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.InvokeCore(HttpContext context)
at Jellyfin.Server.Middleware.ResponseTimeMiddleware.Invoke(HttpContext context, IServerConfigurationManager serverConfigurationManager)
at Jellyfin.Server.Middleware.ExceptionMiddleware.Invoke(HttpContext context)


RE: Cant play media with nvidia hardware transcoding - TheDreadPirate - 2024-03-31

The big log you pasted is from an hour ago, so I'm assuming no longer relevant since the ffmpeg logs you attached look fine.

Can you attach a more up to date portion of your main jellyfin log?


RE: Cant play media with nvidia hardware transcoding - Nickoetje - 2024-03-31

i dint see that sorry my bad it was at the bottom:
[2024-03-31 01:14:38.291 +01:00] [ERR] [47] Jellyfin.Api.Helpers.TranscodingJobHelper: FFmpeg exited with code 1
[2024-03-31 01:14:38.345 +01:00] [ERR] [47] Jellyfin.Server.Middleware.ExceptionMiddleware: Error processing request. URL "GET" "/videos/d1e8c420-e553-1d4b-f206-374c89924078/hls1/main/0.ts".
MediaBrowser.Common.FfmpegException: FFmpeg exited with code 1
at Jellyfin.Api.Helpers.TranscodingJobHelper.StartFfMpeg(StreamState state, String outputPath, String commandLineArguments, HttpRequest request, 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)
at lambda_method1864(Closure , Object )
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfActionResultExecutor.Execute(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 Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
at Jellyfin.Server.Middleware.ServerStartupMessageMiddleware.Invoke(HttpContext httpContext, IServerApplicationHost serverApplicationHost, ILocalizationManager localizationManager)
at Jellyfin.Server.Middleware.WebSocketHandlerMiddleware.Invoke(HttpContext httpContext, IWebSocketManager webSocketManager)
at Jellyfin.Server.Middleware.IpBasedAccessValidationMiddleware.Invoke(HttpContext httpContext, INetworkManager networkManager)
at Jellyfin.Server.Middleware.LanFilteringMiddleware.Invoke(HttpContext httpContext, INetworkManager networkManager, IServerConfigurationManager serverConfigurationManager)
at Microsoft.AspNetCore.Authorization.Policy.AuthorizationMiddlewareResultHandler.HandleAsync(RequestDelegate next, HttpContext context, AuthorizationPolicy policy, PolicyAuthorizationResult authorizeResult)
at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
at Jellyfin.Server.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.Server.Middleware.RobotsRedirectionMiddleware.Invoke(HttpContext httpContext)
at Jellyfin.Server.Middleware.LegacyEmbyRouteRewriteMiddleware.Invoke(HttpContext httpContext)
at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.InvokeCore(HttpContext context)
at Jellyfin.Server.Middleware.ResponseTimeMiddleware.Invoke(HttpContext context, IServerConfigurationManager serverConfigurationManager)
at Jellyfin.Server.Middleware.ExceptionMiddleware.Invoke(HttpContext context)
[2024-03-31 01:22:15.352 +01:00] [WRN] [81] Microsoft.EntityFrameworkCore.Model.Validation: The entity type '"AccessSchedule"' is configured to use schema '"jellyfin"', but SQLite does not support schemas. This configuration will be ignored by the SQLite provider.
[2024-03-31 01:22:15.352 +01:00] [WRN] [81] Microsoft.EntityFrameworkCore.Model.Validation: The entity type '"ActivityLog"' is configured to use schema '"jellyfin"', but SQLite does not support schemas. This configuration will be ignored by the SQLite provider.
[2024-03-31 01:22:15.352 +01:00] [WRN] [81] Microsoft.EntityFrameworkCore.Model.Validation: The entity type '"CustomItemDisplayPreferences"' is configured to use schema '"jellyfin"', but SQLite does not support schemas. This configuration will be ignored by the SQLite provider.
[2024-03-31 01:22:15.353 +01:00] [WRN] [81] Microsoft.EntityFrameworkCore.Model.Validation: The entity type '"DisplayPreferences"' is configured to use schema '"jellyfin"', but SQLite does not support schemas. This configuration will be ignored by the SQLite provider.
[2024-03-31 01:22:15.353 +01:00] [WRN] [81] Microsoft.EntityFrameworkCore.Model.Validation: The entity type '"HomeSection"' is configured to use schema '"jellyfin"', but SQLite does not support schemas. This configuration will be ignored by the SQLite provider.
[2024-03-31 01:22:15.353 +01:00] [WRN] [81] Microsoft.EntityFrameworkCore.Model.Validation: The entity type '"ImageInfo"' is configured to use schema '"jellyfin"', but SQLite does not support schemas. This configuration will be ignored by the SQLite provider.
[2024-03-31 01:22:15.353 +01:00] [WRN] [81] Microsoft.EntityFrameworkCore.Model.Validation: The entity type '"ItemDisplayPreferences"' is configured to use schema '"jellyfin"', but SQLite does not support schemas. This configuration will be ignored by the SQLite provider.
[2024-03-31 01:22:15.353 +01:00] [WRN] [81] Microsoft.EntityFrameworkCore.Model.Validation: The entity type '"Permission"' is configured to use schema '"jellyfin"', but SQLite does not support schemas. This configuration will be ignored by the SQLite provider.
[2024-03-31 01:22:15.353 +01:00] [WRN] [81] Microsoft.EntityFrameworkCore.Model.Validation: The entity type '"Preference"' is configured to use schema '"jellyfin"', but SQLite does not support schemas. This configuration will be ignored by the SQLite provider.
[2024-03-31 01:22:15.353 +01:00] [WRN] [81] Microsoft.EntityFrameworkCore.Model.Validation: The entity type '"ApiKey"' is configured to use schema '"jellyfin"', but SQLite does not support schemas. This configuration will be ignored by the SQLite provider.
[2024-03-31 01:22:15.353 +01:00] [WRN] [81] Microsoft.EntityFrameworkCore.Model.Validation: The entity type '"Device"' is configured to use schema '"jellyfin"', but SQLite does not support schemas. This configuration will be ignored by the SQLite provider.
[2024-03-31 01:22:15.353 +01:00] [WRN] [81] Microsoft.EntityFrameworkCore.Model.Validation: The entity type '"DeviceOptions"' is configured to use schema '"jellyfin"', but SQLite does not support schemas. This configuration will be ignored by the SQLite provider.
[2024-03-31 01:22:15.353 +01:00] [WRN] [81] Microsoft.EntityFrameworkCore.Model.Validation: The entity type '"User"' is configured to use schema '"jellyfin"', but SQLite does not support schemas. This configuration will be ignored by the SQLite provider.

it does not seem to have generated a new main log file since i updated the libary?


RE: Cant play media with nvidia hardware transcoding - Nickoetje - 2024-03-31

i did some checking i indeed dont get a new main log but only the 3 ffmpeg logs showing no error except that its exiting. on the other hand h264 seems to be transcoding propperly now.

movie that loaded fine

Video
Title: 1080p H264 HDR
Codec: H264
Codec tag: avc1
AVC: Yes
Profile: High
Level: 41
Resolution: 1920x804
Aspect ratio: 2.40:1
Interlaced: No
Framerate: 23.976025
Bitrate: 2249 kbps
Bit depth: 8 bit
Video range: HDR
Video range type: HDR10
Color space: bt2020nc
Color transfer: smpte2084
Color primaries: bt2020
Pixel format: yuv420p
Ref frames: 1
NAL: 4


RE: Cant play media with nvidia hardware transcoding - TheDreadPirate - 2024-03-31

Can you share your complete jellyfin log on https://sourceb.in/ ?


RE: Cant play media with nvidia hardware transcoding - Nickoetje - 2024-03-31

i might have shot myself a bit in the leg only testing it out on chrome, seems to work fine on mobile and pc apps

(2024-03-31, 01:09 AM)TheDreadPirate Wrote: Can you share your complete jellyfin log on https://sourceb.in/ ?

there are no more new logs in the main log past 1:22am


RE: Cant play media with nvidia hardware transcoding - TheDreadPirate - 2024-03-31

Mobile and the desktop app are probably direct playing while it is trying to transcode in the browser when you play HEVC content. It should still work in Chrome via transcoding.


RE: Cant play media with nvidia hardware transcoding - Nickoetje - 2024-03-31

https://pastebin.com/VriKUCk8 here is a pastebin since sourcebin gives me anvalid request error

(2024-03-31, 01:15 AM)TheDreadPirate Wrote: Mobile and the desktop app are probably direct playing while it is trying to transcode in the browser when you play HEVC content. It should still work in Chrome via transcoding.
can confirm that the mobile app is transcoding the pc app is indeed direct playing

while transcoding on phone my cpu loads up to 40% on 24 threads

and gpu on 20%