Fixed: Only use frames for Primary video stream for analysis
(cherry picked from commit 581828b0dcfcd4aa1ae581b899f812071457c9ca)
This commit is contained in:
parent
0685896ed8
commit
ec91142c85
|
@ -22,7 +22,7 @@ namespace NzbDrone.Core.MediaFiles.MediaInfo
|
||||||
private readonly List<FFProbePixelFormat> _pixelFormats;
|
private readonly List<FFProbePixelFormat> _pixelFormats;
|
||||||
|
|
||||||
public const int MINIMUM_MEDIA_INFO_SCHEMA_REVISION = 8;
|
public const int MINIMUM_MEDIA_INFO_SCHEMA_REVISION = 8;
|
||||||
public const int CURRENT_MEDIA_INFO_SCHEMA_REVISION = 9;
|
public const int CURRENT_MEDIA_INFO_SCHEMA_REVISION = 10;
|
||||||
|
|
||||||
private static readonly string[] ValidHdrColourPrimaries = { "bt2020" };
|
private static readonly string[] ValidHdrColourPrimaries = { "bt2020" };
|
||||||
private static readonly string[] HlgTransferFunctions = { "bt2020-10", "arib-std-b67" };
|
private static readonly string[] HlgTransferFunctions = { "bt2020-10", "arib-std-b67" };
|
||||||
|
@ -117,7 +117,7 @@ namespace NzbDrone.Core.MediaFiles.MediaInfo
|
||||||
// if it looks like PQ10 or similar HDR, do a frame analysis to figure out which type it is
|
// if it looks like PQ10 or similar HDR, do a frame analysis to figure out which type it is
|
||||||
if (PqTransferFunctions.Contains(mediaInfoModel.VideoTransferCharacteristics))
|
if (PqTransferFunctions.Contains(mediaInfoModel.VideoTransferCharacteristics))
|
||||||
{
|
{
|
||||||
var frameOutput = FFProbe.GetFrameJson(filename, ffOptions: new () { ExtraArguments = "-read_intervals \"%+#1\" -select_streams v" });
|
var frameOutput = FFProbe.GetFrameJson(filename, ffOptions: new () { ExtraArguments = $"-read_intervals \"%+#1\" -select_streams v:{primaryVideoStream?.Index ?? 0}" });
|
||||||
mediaInfoModel.RawFrameData = frameOutput;
|
mediaInfoModel.RawFrameData = frameOutput;
|
||||||
|
|
||||||
frames = FFProbe.AnalyseFrameJson(frameOutput);
|
frames = FFProbe.AnalyseFrameJson(frameOutput);
|
||||||
|
|
|
@ -686,7 +686,7 @@ namespace NzbDrone.Core.Organizer
|
||||||
new Dictionary<string, int>(FileNameBuilderTokenEqualityComparer.Instance)
|
new Dictionary<string, int>(FileNameBuilderTokenEqualityComparer.Instance)
|
||||||
{
|
{
|
||||||
{ MediaInfoVideoDynamicRangeToken, 5 },
|
{ MediaInfoVideoDynamicRangeToken, 5 },
|
||||||
{ MediaInfoVideoDynamicRangeTypeToken, 9 }
|
{ MediaInfoVideoDynamicRangeTypeToken, 10 }
|
||||||
};
|
};
|
||||||
|
|
||||||
private void AddMediaInfoTokens(Dictionary<string, Func<TokenMatch, string>> tokenHandlers, EpisodeFile episodeFile)
|
private void AddMediaInfoTokens(Dictionary<string, Func<TokenMatch, string>> tokenHandlers, EpisodeFile episodeFile)
|
||||||
|
|
Loading…
Reference in New Issue