jellyfin / jellyfin-webos

WebOS Client for Jellyfin
https://jellyfin.org
Mozilla Public License 2.0
647 stars 68 forks source link

Unable to play media with DTS #104

Open gracid opened 2 years ago

gracid commented 2 years ago

When I try to play remuxed content with only DTS audio it fails with "The client isn't compatible...".
Recent LGTV's don't support DTS audio directly.

Is it even possible to transcode just audio for this?

Media info:

Your Name. (2016) [imdb-tt5311514][Remux-2160p][PQ][DTS-HD MA 5.1][JA][HEVC]-FGT
Container: mkv
Path: /data/media/movies/Your Name. (2016)/Your Name. (2016) [imdb-tt5311514][Remux-2160p][PQ][DTS-HD MA 5.1][JA][HEVC]-FGT.mkv
Size: 51279 MB

Subtitle
Title: English-PGS - Default - Forced - PGSSUB
Language: eng
Codec: PGSSUB
Default: Yes
Forced: Yes
External: No

Video
Title: Your.Name.2016.JAPANESE.2160p.BluRay.REMUX.HEVC.DTS-HD.MA.5.1-FGT - 4K - HDR
Codec: HEVC
Profile: Main 10
Level: 153
Resolution: 3840x2160
Aspect ratio: 16:9
Interlaced: No
Framerate: 23.976025
Bitrate: 67258 kbps
Bit depth: 10 bit
Video range: HDR
Video range type: HDR10
Colour space: bt2020nc
Colour transfer: smpte2084
Colour primaries: bt2020
Pixel format: yuv420p10le
Ref frames: 1

Audio
Title: Your.Name.2016.JAPANESE.2160p.BluRay.REMUX.HEVC.DTS-HD.MA.5.1-FGT - DTS-HD MA - Default
Language: jpn
Codec: DTS
Profile: DTS-HD MA
Layout: 5.1
Channels: 6 ch
Bitrate: 3595 kbps
Sample rate: 48000 Hz
Bit depth: 24 bit
Default: Yes
Forced: No
External: No

Audio
Title: Your.Name.2016.JAPANESE.2160p.BluRay.REMUX.HEVC.DTS-HD.MA.5.1-FGT - DTS-HD MA - Stereo
Language: jpn
Codec: DTS
Profile: DTS-HD MA
Layout: stereo
Channels: 2 ch
Bitrate: 1640 kbps
Sample rate: 48000 Hz
Bit depth: 24 bit
Default: No
Forced: No
External: No

Audio
Title: Your.Name.2016.JAPANESE.2160p.BluRay.REMUX.HEVC.DTS-HD.MA.5.1-FGT - DTS-HD MA
Language: jpn
Codec: DTS
Profile: DTS-HD MA
Layout: 5.1
Channels: 6 ch
Bitrate: 3603 kbps
Sample rate: 48000 Hz
Bit depth: 24 bit
Default: No
Forced: No
External: No

Audio
Title: Your.Name.2016.JAPANESE.2160p.BluRay.REMUX.HEVC.DTS-HD.MA.5.1-FGT - DTS-HD MA - Stereo
Language: jpn
Codec: DTS
Profile: DTS-HD MA
Layout: stereo
Channels: 2 ch
Bitrate: 1666 kbps
Sample rate: 48000 Hz
Bit depth: 24 bit
Default: No
Forced: No
External: No

Subtitle
Title: Japanese-PGS - PGSSUB
Language: jpn
Codec: PGSSUB
Default: No
Forced: No
External: No

Subtitle
Title: Chinese-PGS - PGSSUB
Language: chi
Codec: PGSSUB
Default: No
Forced: No
External: No

Subtitle
Title: English-PGS - PGSSUB
Language: eng
Codec: PGSSUB
Default: No
Forced: No
External: No

Image
Codec: MJPEG
Profile: Baseline
Resolution: 1067x600
Bit depth: 8 bit
Colour space: bt470bg
Pixel format: yuvj444p
Ref frames: 1

Image
Codec: MJPEG
Profile: Baseline
Resolution: 120x176
Bit depth: 8 bit
Colour space: bt470bg
Pixel format: yuvj444p
Ref frames: 1

Image
Codec: MJPEG
Profile: Baseline
Resolution: 213x120
Bit depth: 8 bit
Colour space: bt470bg
Pixel format: yuvj444p
Ref frames: 1

Image
Codec: MJPEG
Profile: Baseline
Resolution: 600x882
Bit depth: 8 bit
Colour space: bt470bg
Pixel format: yuvj444p
Ref frames: 1

Subtitle
Title: English - SUBRIP - External
Language: eng
Codec: SUBRIP
Default: No
Forced: No
External: Yes

Logs

[2022-08-09 22:54:00.988 +03:00] [INF] [80] Jellyfin.Api.Helpers.TranscodingJobHelper: "/usr/lib/jellyfin-ffmpeg/ffmpeg" "-analyzeduration 200M -init_hw_device vaapi=va:,driver=iHD,kernel_driver=i915 -init_hw_device qsv=qs@va -filter_hw_device qs -hwaccel vaapi -hwaccel_output_format vaapi -autorotate 0 -i file:\"/data/media/movies/Your Name. (2016)/Your Name. (2016) [imdb-tt5311514][Remux-2160p][PQ][DTS-HD MA 5.1][JA][HEVC]-FGT.mkv\" -autoscale 0 -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 h264_qsv -preset 7 -look_ahead 0 -b:v 112097915 -maxrate 112097915 -bufsize 224195830 -profile:v:0 high -level 51 -g:v:0 72 -keyint_min:v:0 72 -vf \"setparams=color_primaries=bt709:color_trc=bt709:colorspace=bt709,scale_vaapi=format=nv12,hwmap=derive_device=qsv,format=qsv\" -codec:a:0 libfdk_aac -ac 6 -ab 640000 -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 \"/config/data/transcodes/be8aed72bcf441c9b24505dff0efa9c7%d.ts\" -hls_playlist_type vod -hls_list_size 0 -y \"/config/data/transcodes/be8aed72bcf441c9b24505dff0efa9c7.m3u8\""
[2022-08-09 22:54:01.279 +03:00] [ERR] [13] Jellyfin.Api.Helpers.TranscodingJobHelper: FFmpeg exited with code 1
[2022-08-09 22:54:01.304 +03:00] [ERR] [13] Jellyfin.Server.Middleware.ExceptionMiddleware: Error processing request. URL "GET" "/videos/695a2d22-cbed-6d7d-43f4-6a679c86c2de/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, 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_method1347(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)
[2022-08-09 22:54:01.341 +03:00] [INF] [13] Jellyfin.Api.Helpers.TranscodingJobHelper: Deleting partial stream file(s) "/config/data/transcodes/be8aed72bcf441c9b24505dff0efa9c7.m3u8"
[2022-08-09 22:54:02.848 +03:00] [INF] [61] Emby.Server.Implementations.Session.SessionManager: Playback stopped reported by app "Jellyfin Web" "10.8.3" playing "Your Name.". Stopped at "0" ms
[2022-08-09 22:54:02.977 +03:00] [WRN] [61] Jellyfin.Server.Middleware.ResponseTimeMiddleware: Slow HTTP Response from "http://192.168.0.101:8096/Sessions/Playing/Stopped" to "192.168.0.190" in 0:00:01.6372641 with Status Code 204
anthonylavado commented 2 years ago

As part of #56, DTS audio should be transcoded as of Jellyfin server 10.8+. What version are you using?

gracid commented 2 years ago

Latest linuxserver docker, jellyfinn is 10.8.3

anthonylavado commented 2 years ago

Linking to #105