1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-20 18:02:44 +01:00

Fixed: Only use frames for Primary video stream for analysis

This commit is contained in:
Qstick 2024-01-15 21:11:45 -06:00
parent 374d20634d
commit 1bb404a912
2 changed files with 3 additions and 3 deletions

View File

@ -22,7 +22,7 @@ public class VideoFileInfoReader : IVideoFileInfoReader
private readonly List<FFProbePixelFormat> _pixelFormats;
public const int MINIMUM_MEDIA_INFO_SCHEMA_REVISION = 8;
public const int CURRENT_MEDIA_INFO_SCHEMA_REVISION = 11;
public const int CURRENT_MEDIA_INFO_SCHEMA_REVISION = 12;
private static readonly string[] ValidHdrColourPrimaries = { "bt2020" };
private static readonly string[] HlgTransferFunctions = { "bt2020-10", "arib-std-b67" };
@ -117,7 +117,7 @@ public MediaInfoModel GetMediaInfo(string filename)
// if it looks like PQ10 or similar HDR, do a frame analysis to figure out which type it is
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;
frames = FFProbe.AnalyseFrameJson(frameOutput);

View File

@ -360,7 +360,7 @@ private void AddQualityTokens(Dictionary<string, Func<TokenMatch, string>> token
new Dictionary<string, int>(FileNameBuilderTokenEqualityComparer.Instance)
{
{ MediaInfoVideoDynamicRangeToken, 5 },
{ MediaInfoVideoDynamicRangeTypeToken, 11 }
{ MediaInfoVideoDynamicRangeTypeToken, 12 }
};
private void AddMediaInfoTokens(Dictionary<string, Func<TokenMatch, string>> tokenHandlers, MovieFile movieFile)