diff options
| author | dkanada <dkanada@users.noreply.github.com> | 2019-06-20 16:44:27 -0700 |
|---|---|---|
| committer | dkanada <dkanada@users.noreply.github.com> | 2019-06-20 16:44:27 -0700 |
| commit | 65fa61a6369bef8c7aa7cc2b9e6be383a2de3cb6 (patch) | |
| tree | e65e0feb4aa8d3186ddf648264ebc72c00171cc8 /MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs | |
| parent | 012e4a3e63f8b0997d5f070b37ac93d257f894e7 (diff) | |
add comment explaining GetMinBitrate
Diffstat (limited to 'MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs')
| -rw-r--r-- | MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs index 849cf7083..2984efec3 100644 --- a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs +++ b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs @@ -1086,7 +1086,7 @@ namespace MediaBrowser.Controller.MediaEncoding if (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.MediaEncoding private int GetMinBitrate(int sourceBitrate, int requestedBitrate) { + // these values were chosen from testing to improve low bitrate streams if (sourceBitrate <= 2000000) { sourceBitrate = Convert.ToInt32(sourceBitrate * 2.5); |
