From 4046ef1c13129cba22ab9b2f0806406d3df346e6 Mon Sep 17 00:00:00 2001 From: gnattu Date: Fri, 7 Jun 2024 17:58:35 +0800 Subject: [PATCH] Overwrite supported codecs for livetv Only changeing streamingRequest is not enough. The internal logic will do codec shifting based on supported codecs, need to overwrite all of them. Signed-off-by: gnattu --- Jellyfin.Api/Helpers/StreamingHelpers.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Jellyfin.Api/Helpers/StreamingHelpers.cs b/Jellyfin.Api/Helpers/StreamingHelpers.cs index af4a9e689..535ef27c3 100644 --- a/Jellyfin.Api/Helpers/StreamingHelpers.cs +++ b/Jellyfin.Api/Helpers/StreamingHelpers.cs @@ -154,6 +154,11 @@ public static class StreamingHelpers // Some channels from HDHomerun will experience A/V sync issues streamingRequest.SegmentContainer = "ts"; streamingRequest.VideoCodec = "h264"; + streamingRequest.AudioCodec = "aac"; + state.SupportedVideoCodecs = ["h264"]; + state.Request.VideoCodec = "h264"; + state.SupportedAudioCodecs = ["aac"]; + state.Request.AudioCodec = "aac"; } var liveStreamInfo = await mediaSourceManager.GetLiveStreamWithDirectStreamProvider(streamingRequest.LiveStreamId, cancellationToken).ConfigureAwait(false);