Jellyfin Forum
Trouble playing some media files - 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: Trouble playing some media files (/t-trouble-playing-some-media-files)

Pages: 1 2


Trouble playing some media files - gariak - 2024-06-27

I'm having trouble playing certain media files that I created myself years back using Handbrake.  These same files used to play without issue since I first installed Jellyfin a month or two ago, but it's not clear to me what changed or was upgraded since the last time it worked, which was fairly recently.  These same files also currently play well in VLC.  I'm currently running Jellyfin 10.9.7 as an essentially dedicated server on lubuntu via the Debian repo with no containerization and primarily serving over my local network.  The error I get is immediate and unhelpful: "Playback failed due to a fatal player error."  I've gone through the docs to make sure I hit all the important points of the installation.  I've tried searching various aspects of this issue, but most of what I find seems to relate to transcoding or Docker containers and I don't understand the logs well enough to grasp what's going wrong.

Unless I'm mistaken, this shouldn't be a transcoding problem, as I'm not seeing ffmpeg logs showing up at all and I should be able to play the straight files without issue.  Unless being unable to trigger a transcode IS the problem and the lack of ffmpeg logs is the diagnostic clue.  I'm fairly technically minded and happy to try whatever is suggested.

Other things I have tried since noticing the problem that have led to no improvement:
Reinstalling jellyfin-ffmpeg6
Ensuring I have a renderer and that jellyfin has been added to the proper group
Updating Jellyfin via apt
Updating everything else via apt
Rebooting
Changing my transcoding hardware acceleration settings to VAAPI and back to None
Playing via Roku Jellyfin app and on my phone

Relevant bit of my Jellyfin logs:

Code:
[2024-06-27 18:14:48.574 -04:00] [INF] User policy for "andrew". EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True
[2024-06-27 18:14:48.649 -04:00] [INF] Current HLS implementation doesn't support non-keyframe breaks but one is requested, ignoring that request
[2024-06-27 18:14:48.652 -04:00] [ERR] Error processing request. URL "GET" "/videos/38a4387f-2f8b-36b3-76d8-63cc85f9f01a/hls1/main/-1.mp4".
System.NullReferenceException: Object reference not set to an instance of an object.
  at MediaBrowser.MediaEncoding.Attachments.AttachmentExtractor.<>c.<ExtractAllAttachments>b__8_0(MediaAttachment a)
  at System.Linq.Enumerable.Any[TSource](IEnumerable`1 source, Func`2 predicate)
  at MediaBrowser.MediaEncoding.Attachments.AttachmentExtractor.ExtractAllAttachments(String inputFile, MediaSourceInfo mediaSource, String outputPath, CancellationToken cancellationToken)
  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)
  at lambda_method1614(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()
--- End of stack trace from previous location ---
  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()
--- End of stack trace from previous location ---
  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)
[2024-06-27 18:14:48.667 -04:00] [INF] User policy for "andrew". EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True
[2024-06-27 18:14:48.754 -04:00] [INF] Current HLS implementation doesn't support non-keyframe breaks but one is requested, ignoring that request
[2024-06-27 18:14:48.757 -04:00] [ERR] Error processing request. URL "GET" "/videos/38a4387f-2f8b-36b3-76d8-63cc85f9f01a/hls1/main/-1.mp4".
System.NullReferenceException: Object reference not set to an instance of an object.
  at MediaBrowser.MediaEncoding.Attachments.AttachmentExtractor.<>c.<ExtractAllAttachments>b__8_0(MediaAttachment a)
  at System.Linq.Enumerable.Any[TSource](IEnumerable`1 source, Func`2 predicate)
  at MediaBrowser.MediaEncoding.Attachments.AttachmentExtractor.ExtractAllAttachments(String inputFile, MediaSourceInfo mediaSource, String outputPath, CancellationToken cancellationToken)
  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)
  at lambda_method1614(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()
--- End of stack trace from previous location ---
  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()
--- End of stack trace from previous location ---
  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)
[2024-06-27 18:14:48.813 -04:00] [INF] Playback stopped reported by app "Jellyfin Web" "10.9.7" playing "The Dundies". Stopped at "0" ms



RE: Trouble playing some media files - TheDreadPirate - 2024-06-27

It looks like it is failing to extract the attachment. Possibly a font for ASS subtitles?

If you're playing the video with subtitles, what happens when you don't select any subtitles?

Does it only happen with a particular video or set of videos?


RE: Trouble playing some media files - jellybro - 2024-07-26

I am having the same issue. There is no transcode is triggered. The video does play when the subtitles are off. Any form of subtitles turned on crashes the stream.

It seems to be happening to a number of South Park episodes.

JF Server 10.9.8

Media Info:

Code:
General
Complete name            : South Park - S20E02 - Skank Hunt.mp4
Format                    : MPEG-4
Format profile            : Base Media
File size                : 172 MiB
Duration                  : 22 min 23 s
Overall bit rate mode    : Variable
Overall bit rate          : 1 073 kb/s
Frame rate                : 23.976 FPS
Movie name                : South Park - S20E02 - Skank Hunt
Encoded date              : 2022-02-02 14:32:39 UTC
Tagged date              : 2022-02-02 14:32:39 UTC
Writing application      : GPAC-1.1.0-DEV-rev1161-g2dfbf0c7a-master / ShieldBearer
Cover                    : Yes

Video
ID                        : 1
Format                    : HEVC
Format/Info              : High Efficiency Video Coding
Format profile            : Main 10
Format level              : 4
Format tier              : Main
Codec ID                  : hvc1
Duration                  : 22 min 22 s
Bit rate                  : 797 kb/s
Maximum bit rate          : 7 724 kb/s
Width                    : 1 920 pixels
Height                    : 1 080 pixels
Display aspect ratio      : 16:9
Frame rate mode          : Constant
Frame rate                : 23.976 (24000/1001) FPS
Color space              : YUV
Chroma subsampling        : 4:2:0
Bit depth                : 10 bits
Bits/(Pixel*Frame)        : 0.016
Stream size              : 128 MiB (74%)
Encoded date              : 2022-02-02 14:32:39 UTC
Tagged date              : 2022-02-02 14:32:40 UTC
Codec configuration box  : hvcC

Audio
ID                        : 2
Format                    : AAC LC
Format/Info              : Advanced Audio Codec
Codec ID                  : mp4a-40-2
Duration                  : 22 min 23 s
Bit rate mode            : Variable
Bit rate                  : 256 kb/s
Maximum bit rate          : 279 kb/s
Channel(s)                : 6 channels
Channel layout            : C L R Ls Rs LFE
Sampling rate            : 48.0 kHz
Frame rate                : 46.875 FPS (1024 SPF)
Compression mode          : Lossy
Stream size              : 41.0 MiB (24%)
Title                    : 5.1 Surround Sound
Language                  : English
Default                  : Yes
Alternate group          : 1
Encoded date              : 2022-02-02 14:30:20 UTC
Tagged date              : 2022-02-02 14:32:40 UTC

Text
ID                        : 3
Format                    : VobSub
Codec ID                  : mp4s-E0
Duration                  : 21 min 44 s
Bit rate mode            : Variable
Bit rate                  : 17.3 kb/s
Maximum bit rate          : 131 kb/s
Frame rate                : 0.348 FPS
Stream size              : 2.69 MiB (2%)
Title                    : English
Language                  : English
Default                  : Yes
Forced                    : No
Alternate group          : 1
Encoded date              : 2022-02-02 14:32:40 UTC
Tagged date              : 2022-02-02 14:32:40 UTC

Menu
_00_00_00_000            : Chapter 01
_00_00_33_283            : Chapter 02
_00_10_13_112            : Chapter 03
_00_16_13_889            : Chapter 04
_00_21_50_309            : Chapter 05



RE: Trouble playing some media files - TheDreadPirate - 2024-07-26

Can you post your full jellyfin logs to pastebin and link back here?


RE: Trouble playing some media files - jellybro - 2024-07-29

https://pastebin.com/U0JgkFcp

I turned on debug mode. Tried to clip a helpful segment.

Thanks!


RE: Trouble playing some media files - TheDreadPirate - 2024-07-29

Do you have transcoding disabled? It wants to transcode and burn-in the subs because the client doesn't support the subtitle type.


RE: Trouble playing some media files - jellybro - 2024-07-29

Here is a transcode log from another media file.

https://pastebin.com/mvb5vask


RE: Trouble playing some media files - TheDreadPirate - 2024-07-29

Upon further inspection, it looks like it was attempting to extract the subtitles to send to the client separately but failed.

Code:
System.NullReferenceException: Object reference not set to an instance of an object.
   at MediaBrowser.MediaEncoding.Attachments.AttachmentExtractor.<>c.<ExtractAllAttachments>b__8_0(MediaAttachment a)

I'm wondering if the subs are corrupt or something.

What happens when you try to manually remux one of the south park files?

Code:
/usr/lib/jellyfin-ffmpeg/ffmpeg -fflags +genpts -i "/path/to/library/South Park - S20E02 - Skank Hunt.mp4" -map 0 -codec copy newFile.mkv



RE: Trouble playing some media files - jellybro - 2024-07-29

The stream with subtitles work with the remux as you specified.

I should mention that the original files work with subtitles on VLC.


RE: Trouble playing some media files - TheDreadPirate - 2024-07-29

VLC isn't a good measure for whether a file is good or not. VLC will power through corrupt/malformed files.

Jellyfin does not have its own playback engine. We use open source players like MPV in Jellyfin Media Player. But all/most of our other clients we are reliant on how tolerant the device's embedded player is to malformed/corrupt files. Most tend to skew towards requiring files be formatted properly and standards compliant while having a low tolerance for corruption.