merge media encoder changes from dev
This commit is contained in:
parent
e71a3c516a
commit
475c54e283
|
@ -505,7 +505,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
||||||
{
|
{
|
||||||
return "libx264";
|
return "libx264";
|
||||||
}
|
}
|
||||||
if (string.Equals(codec, "h265", StringComparison.OrdinalIgnoreCase))
|
if (string.Equals(codec, "h265", StringComparison.OrdinalIgnoreCase) || string.Equals(codec, "hevc", StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
return "libx265";
|
return "libx265";
|
||||||
}
|
}
|
||||||
|
|
|
@ -258,17 +258,17 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
||||||
|
|
||||||
var mediaInfo = new ProbeResultNormalizer(_logger, FileSystem).GetMediaInfo(result, videoType, isAudio, primaryPath, protocol);
|
var mediaInfo = new ProbeResultNormalizer(_logger, FileSystem).GetMediaInfo(result, videoType, isAudio, primaryPath, protocol);
|
||||||
|
|
||||||
//var videoStream = mediaInfo.MediaStreams.FirstOrDefault(i => i.Type == MediaStreamType.Video);
|
var videoStream = mediaInfo.MediaStreams.FirstOrDefault(i => i.Type == MediaStreamType.Video);
|
||||||
|
|
||||||
//if (videoStream != null)
|
if (videoStream != null)
|
||||||
//{
|
{
|
||||||
// var isInterlaced = await DetectInterlaced(mediaInfo, videoStream, inputPath, probeSizeArgument).ConfigureAwait(false);
|
var isInterlaced = await DetectInterlaced(mediaInfo, videoStream, inputPath, probeSizeArgument).ConfigureAwait(false);
|
||||||
|
|
||||||
// if (isInterlaced)
|
if (isInterlaced)
|
||||||
// {
|
{
|
||||||
// videoStream.IsInterlaced = true;
|
videoStream.IsInterlaced = true;
|
||||||
// }
|
}
|
||||||
//}
|
}
|
||||||
|
|
||||||
return mediaInfo;
|
return mediaInfo;
|
||||||
}
|
}
|
||||||
|
@ -292,9 +292,11 @@ 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();
|
||||||
|
|
||||||
// Take a shortcut and limit this to containers that are likely to have interlaced content
|
|
||||||
if (!formats.Contains("vob", StringComparer.OrdinalIgnoreCase) &&
|
if (!formats.Contains("vob", StringComparer.OrdinalIgnoreCase) &&
|
||||||
!formats.Contains("m2ts", StringComparer.OrdinalIgnoreCase) &&
|
!formats.Contains("m2ts", StringComparer.OrdinalIgnoreCase) &&
|
||||||
!formats.Contains("ts", StringComparer.OrdinalIgnoreCase) &&
|
!formats.Contains("ts", StringComparer.OrdinalIgnoreCase) &&
|
||||||
|
@ -303,6 +305,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var args = "{0} -i {1} -map 0:v:{2} -filter:v idet -frames:v 500 -an -f null /dev/null";
|
var args = "{0} -i {1} -map 0:v:{2} -filter:v idet -frames:v 500 -an -f null /dev/null";
|
||||||
|
|
||||||
|
|
|
@ -864,7 +864,7 @@ namespace MediaBrowser.MediaEncoding.Probing
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ExtractTimestamp(Model.MediaInfo.MediaInfo video)
|
private void ExtractTimestamp(MediaInfo video)
|
||||||
{
|
{
|
||||||
if (video.VideoType == VideoType.VideoFile)
|
if (video.VideoType == VideoType.VideoFile)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user