aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api
diff options
context:
space:
mode:
Diffstat (limited to 'Jellyfin.Api')
-rw-r--r--Jellyfin.Api/Helpers/StreamingHelpers.cs8
1 files changed, 7 insertions, 1 deletions
diff --git a/Jellyfin.Api/Helpers/StreamingHelpers.cs b/Jellyfin.Api/Helpers/StreamingHelpers.cs
index 3cc6a393b..3a5db2f3f 100644
--- a/Jellyfin.Api/Helpers/StreamingHelpers.cs
+++ b/Jellyfin.Api/Helpers/StreamingHelpers.cs
@@ -219,11 +219,17 @@ public static class StreamingHelpers
}
else
{
+ var h264EquivalentBitrate = EncodingHelper.ScaleBitrate(
+ state.OutputVideoBitrate.Value,
+ state.ActualOutputVideoCodec,
+ "h264");
var resolution = ResolutionNormalizer.Normalize(
state.VideoStream?.BitRate,
state.OutputVideoBitrate.Value,
+ h264EquivalentBitrate,
state.VideoRequest.MaxWidth,
- state.VideoRequest.MaxHeight);
+ state.VideoRequest.MaxHeight,
+ state.TargetFramerate);
state.VideoRequest.MaxWidth = resolution.MaxWidth;
state.VideoRequest.MaxHeight = resolution.MaxHeight;