aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Helpers/DynamicHlsHelper.cs
diff options
context:
space:
mode:
authorBond-009 <bond.009@outlook.com>2024-08-27 22:24:34 +0200
committerGitHub <noreply@github.com>2024-08-27 22:24:34 +0200
commit6281cd707dae40a26c419c0069fd22f494d50f7f (patch)
tree84d4a49bc42b993ff2ed88f39736f8b08fb44719 /Jellyfin.Api/Helpers/DynamicHlsHelper.cs
parented572467aab96d6149c85dc0d0b406bc6c5106e2 (diff)
parentd4472074896a8ed3f66a6eb2c7cd438b97787ae4 (diff)
Merge pull request #11250 from nyanmisaka/fix-hwa-video-rotation
Fix the broken video orientation (+-90/180)
Diffstat (limited to 'Jellyfin.Api/Helpers/DynamicHlsHelper.cs')
-rw-r--r--Jellyfin.Api/Helpers/DynamicHlsHelper.cs11
1 files changed, 11 insertions, 0 deletions
diff --git a/Jellyfin.Api/Helpers/DynamicHlsHelper.cs b/Jellyfin.Api/Helpers/DynamicHlsHelper.cs
index 6f040cfae..ba92d811c 100644
--- a/Jellyfin.Api/Helpers/DynamicHlsHelper.cs
+++ b/Jellyfin.Api/Helpers/DynamicHlsHelper.cs
@@ -198,6 +198,17 @@ public class DynamicHlsHelper
AddSubtitles(state, subtitleStreams, builder, _httpContextAccessor.HttpContext.User);
}
+ // Video rotation metadata is only supported in fMP4 remuxing
+ if (state.VideoStream is not null
+ && state.VideoRequest is not null
+ && (state.VideoStream?.Rotation ?? 0) != 0
+ && EncodingHelper.IsCopyCodec(state.OutputVideoCodec)
+ && !string.IsNullOrWhiteSpace(state.Request.SegmentContainer)
+ && !string.Equals(state.Request.SegmentContainer, "mp4", StringComparison.OrdinalIgnoreCase))
+ {
+ playlistUrl += "&AllowVideoStreamCopy=false";
+ }
+
var basicPlaylist = AppendPlaylist(builder, state, playlistUrl, totalBitrate, subtitleGroup);
if (state.VideoStream is not null && state.VideoRequest is not null)