The Free Software Media System - Server Backend & API
add comment explaining GetMinBitrate
dkanada65fa61a6369b
diff --git a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.csindex 849cf70835..2984efec37 100644--- a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs+++ b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs@@ -1086,7 +1086,7 @@ namespace MediaBrowser.Controller.MediaEncodingif (videoStream != null){var isUpscaling = request.Height.HasValue && videoStream.Height.HasValue &&- request.Height.Value > videoStream.Height.Value && request.Width.HasValue && videoStream.Width.HasValue &&+ request.Height.Value > videoStream.Height.Value && request.Width.HasValue && videoStream.Width.HasValue &&request.Width.Value > videoStream.Width.Value;// Don't allow bitrate increases unless upscaling@@ -1116,6 +1116,7 @@ namespace MediaBrowser.Controller.MediaEncodingprivate int GetMinBitrate(int sourceBitrate, int requestedBitrate){+ // these values were chosen from testing to improve low bitrate streamsif (sourceBitrate <= 2000000){sourceBitrate = Convert.ToInt32(sourceBitrate * 2.5);