update transcoding for chrome

This commit is contained in:
Luke Pulverenti
2015-12-12 02:05:36 -05:00
parent 02938e7bcb
commit 4999b47b47
2 changed files with 25 additions and 5 deletions

View File

@@ -2178,7 +2178,18 @@ namespace MediaBrowser.Api.Playback
inputModifier += " " + videoDecoder;
}
//inputModifier += " -noaccurate_seek";
if (state.VideoRequest != null)
{
var videoCodec = GetVideoEncoder(state);
// See if we can save come cpu cycles by avoiding encoding
if (string.Equals(videoCodec, "copy", StringComparison.OrdinalIgnoreCase))
{
if (string.Equals(state.OutputContainer, "mkv", StringComparison.OrdinalIgnoreCase))
{
inputModifier += " -noaccurate_seek";
}
}
}
return inputModifier;
}