|
|
@ -300,7 +300,7 @@ namespace MediaBrowser.Api.Playback
|
|
|
|
case EncodingQuality.HighSpeed:
|
|
|
|
case EncodingQuality.HighSpeed:
|
|
|
|
return 2;
|
|
|
|
return 2;
|
|
|
|
case EncodingQuality.HighQuality:
|
|
|
|
case EncodingQuality.HighQuality:
|
|
|
|
return isWebm ? Math.Max(Environment.ProcessorCount - 1, 2) : 0;
|
|
|
|
return isWebm ? Math.Max((int)((Environment.ProcessorCount -1) / 2) , 2) : 0;
|
|
|
|
case EncodingQuality.MaxQuality:
|
|
|
|
case EncodingQuality.MaxQuality:
|
|
|
|
return isWebm ? Math.Max(Environment.ProcessorCount - 1, 2) : 0;
|
|
|
|
return isWebm ? Math.Max(Environment.ProcessorCount - 1, 2) : 0;
|
|
|
|
default:
|
|
|
|
default:
|
|
|
@ -364,14 +364,16 @@ namespace MediaBrowser.Api.Playback
|
|
|
|
switch (qualitySetting)
|
|
|
|
switch (qualitySetting)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
case EncodingQuality.HighSpeed:
|
|
|
|
case EncodingQuality.HighSpeed:
|
|
|
|
crf = "18";
|
|
|
|
crf = "12";
|
|
|
|
profileScore++;
|
|
|
|
profileScore = 2;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case EncodingQuality.HighQuality:
|
|
|
|
case EncodingQuality.HighQuality:
|
|
|
|
crf = "10";
|
|
|
|
crf = "8";
|
|
|
|
|
|
|
|
profileScore = 1;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case EncodingQuality.MaxQuality:
|
|
|
|
case EncodingQuality.MaxQuality:
|
|
|
|
crf = "4";
|
|
|
|
crf = "4";
|
|
|
|
|
|
|
|
//profilescore aready set to 0
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
default:
|
|
|
|
throw new ArgumentException("Unrecognized quality setting");
|
|
|
|
throw new ArgumentException("Unrecognized quality setting");
|
|
|
@ -379,7 +381,7 @@ namespace MediaBrowser.Api.Playback
|
|
|
|
|
|
|
|
|
|
|
|
if (isVc1)
|
|
|
|
if (isVc1)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
profileScore++;
|
|
|
|
profileScore = 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// http://www.webmproject.org/docs/encoder-parameters/
|
|
|
|
// http://www.webmproject.org/docs/encoder-parameters/
|
|
|
|