update interlaced detection
This commit is contained in:
parent
552694bb38
commit
025958a22d
|
@ -292,16 +292,25 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the video codec is not some form of mpeg, then take a shortcut and limit this to containers that are likely to have interlaced content
|
|
||||||
if ((videoStream.Codec ?? string.Empty).IndexOf("mpeg", StringComparison.OrdinalIgnoreCase) == -1)
|
|
||||||
{
|
|
||||||
var formats = (video.Container ?? string.Empty).Split(',').ToList();
|
var formats = (video.Container ?? string.Empty).Split(',').ToList();
|
||||||
|
var enableInterlacedDection = formats.Contains("vob", StringComparer.OrdinalIgnoreCase) &&
|
||||||
|
formats.Contains("m2ts", StringComparer.OrdinalIgnoreCase) &&
|
||||||
|
formats.Contains("ts", StringComparer.OrdinalIgnoreCase) &&
|
||||||
|
formats.Contains("mpegts", StringComparer.OrdinalIgnoreCase) &&
|
||||||
|
formats.Contains("wtv", StringComparer.OrdinalIgnoreCase);
|
||||||
|
|
||||||
if (!formats.Contains("vob", StringComparer.OrdinalIgnoreCase) &&
|
// If it's mpeg based, assume true
|
||||||
!formats.Contains("m2ts", StringComparer.OrdinalIgnoreCase) &&
|
if ((videoStream.Codec ?? string.Empty).IndexOf("mpeg", StringComparison.OrdinalIgnoreCase) != -1)
|
||||||
!formats.Contains("ts", StringComparer.OrdinalIgnoreCase) &&
|
{
|
||||||
!formats.Contains("mpegts", StringComparer.OrdinalIgnoreCase) &&
|
if (enableInterlacedDection)
|
||||||
!formats.Contains("wtv", StringComparer.OrdinalIgnoreCase))
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// If the video codec is not some form of mpeg, then take a shortcut and limit this to containers that are likely to have interlaced content
|
||||||
|
if (!enableInterlacedDection)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user