aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/Playback/BaseStreamingService.cs
diff options
context:
space:
mode:
authorLuke <luke.pulverenti@gmail.com>2014-04-02 13:57:44 -0400
committerLuke <luke.pulverenti@gmail.com>2014-04-02 13:57:44 -0400
commitdcf2e70f039a79dd93ac4f6f3cd5b2c8c9a4dcc8 (patch)
treeaacb2aa0e40e7d18b3e62a0d354aa39f43219043 /MediaBrowser.Api/Playback/BaseStreamingService.cs
parent6fe7264f7828aff196e19cfa3497835c5921a7f9 (diff)
parentfcff9a6df566171235e7a5a5e7625900399f6f70 (diff)
Merge pull request #761 from tikuf/master
Stop judder in webm from high bitrate source files
Diffstat (limited to 'MediaBrowser.Api/Playback/BaseStreamingService.cs')
-rw-r--r--MediaBrowser.Api/Playback/BaseStreamingService.cs10
1 files changed, 5 insertions, 5 deletions
diff --git a/MediaBrowser.Api/Playback/BaseStreamingService.cs b/MediaBrowser.Api/Playback/BaseStreamingService.cs
index 297bbad5c..b9eb4db07 100644
--- a/MediaBrowser.Api/Playback/BaseStreamingService.cs
+++ b/MediaBrowser.Api/Playback/BaseStreamingService.cs
@@ -294,7 +294,7 @@ namespace MediaBrowser.Api.Playback
{
if (isWebm)
{
- return Math.Max(Environment.ProcessorCount - 1, 1);
+ return Math.Max(Environment.ProcessorCount - 1, 2);
}
return 0;
@@ -309,9 +309,9 @@ namespace MediaBrowser.Api.Playback
case EncodingQuality.HighSpeed:
return 2;
case EncodingQuality.HighQuality:
- return isWebm ? Math.Max(Environment.ProcessorCount - 1, 1) : 0;
+ return isWebm ? Math.Max(Environment.ProcessorCount - 1, 2) : 0;
case EncodingQuality.MaxQuality:
- return isWebm ? Math.Max(Environment.ProcessorCount - 1, 1) : 0;
+ return isWebm ? Math.Max(Environment.ProcessorCount - 1, 2) : 0;
default:
throw new Exception("Unrecognized MediaEncodingQuality value.");
}
@@ -1005,8 +1005,8 @@ namespace MediaBrowser.Api.Playback
}
// With vpx when crf is used, b:v becomes a max rate
- // https://trac.ffmpeg.org/wiki/vpxEncodingGuide
- return string.Format(" -b:v {0}", bitrate.Value.ToString(UsCulture));
+ // https://trac.ffmpeg.org/wiki/vpxEncodingGuide. But higher bitrate source files -b:v causes judder so limite the bitrate but dont allow it to "saturate" the bitrate. So dont contrain it down just up.
+ return string.Format(" -maxrate:v {0} -bufsize:v ({0}*2) -b:v {0}", bitrate.Value.ToString(UsCulture));
}
if (string.Equals(videoCodec, "msmpeg4", StringComparison.OrdinalIgnoreCase))