specify input codecs

This commit is contained in:
Luke Pulverenti 2016-12-29 14:26:45 -05:00
parent 853dbfc558
commit 72887a1f6b

View File

@ -2691,6 +2691,18 @@ namespace MediaBrowser.Api.Playback
{
//inputModifier += " -noaccurate_seek";
}
var videoStream = state.VideoStream;
if (videoStream != null && !string.IsNullOrWhiteSpace(videoStream.Codec))
{
inputModifier += " -codec:0 " + videoStream.Codec;
var audioStream = state.AudioStream;
if (audioStream != null && !string.IsNullOrWhiteSpace(audioStream.Codec))
{
inputModifier += " -codec:1 " + audioStream.Codec;
}
}
}
return inputModifier;