From fa69833d6d45fcac81a2de67d7f88ca9f20e4d9d Mon Sep 17 00:00:00 2001 From: clifford64 <32966295+clifford64@users.noreply.github.com> Date: Tue, 5 Sep 2023 16:26:18 -0400 Subject: [PATCH 1/2] Updated transfer_characteristics to color_transfer Current implementation is looking for "transfer_characteristics" within ffprobe data as an attribute that has to match to determine if a file is HDR or not. However, current ffprobe is not showing this attribute on HDR files. I am proposing changing this attribute to "color_transfer" which does show up on HDR files. --- FlowPlugins/CommunityFlowPlugins/video/checkHdr/1.0.0/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FlowPlugins/CommunityFlowPlugins/video/checkHdr/1.0.0/index.js b/FlowPlugins/CommunityFlowPlugins/video/checkHdr/1.0.0/index.js index 5c0b4cd..ca0617f 100644 --- a/FlowPlugins/CommunityFlowPlugins/video/checkHdr/1.0.0/index.js +++ b/FlowPlugins/CommunityFlowPlugins/video/checkHdr/1.0.0/index.js @@ -38,7 +38,7 @@ var plugin = function (args) { for (var i = 0; i < args.inputFileObj.ffProbeData.streams.length; i += 1) { var stream = args.inputFileObj.ffProbeData.streams[i]; if (stream.codec_type === 'video' - && stream.transfer_characteristics === 'smpte2084' + && stream.color_transfer === 'smpte2084' && stream.color_primaries === 'bt2020' && stream.color_range === 'tv') { isHdr = true; From c372a218832f0f94be6b0a95c1836fc3724b448a Mon Sep 17 00:00:00 2001 From: clifford64 <32966295+clifford64@users.noreply.github.com> Date: Tue, 5 Sep 2023 16:34:09 -0400 Subject: [PATCH 2/2] Update index.ts Current implementation is looking for "transfer_characteristics" within ffprobe data as an attribute that has to match to determine if a file is HDR or not. However, current ffprobe is not showing this attribute on HDR files. I am proposing changing this attribute to "color_transfer" which does show up on HDR files. --- .../CommunityFlowPlugins/video/checkHdr/1.0.0/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FlowPluginsTs/CommunityFlowPlugins/video/checkHdr/1.0.0/index.ts b/FlowPluginsTs/CommunityFlowPlugins/video/checkHdr/1.0.0/index.ts index 4cb054b..f28f79a 100644 --- a/FlowPluginsTs/CommunityFlowPlugins/video/checkHdr/1.0.0/index.ts +++ b/FlowPluginsTs/CommunityFlowPlugins/video/checkHdr/1.0.0/index.ts @@ -43,7 +43,7 @@ const plugin = (args: IpluginInputArgs): IpluginOutputArgs => { const stream = args.inputFileObj.ffProbeData.streams[i]; if ( stream.codec_type === 'video' - && stream.transfer_characteristics === 'smpte2084' + && stream.color_transfer === 'smpte2084' && stream.color_primaries === 'bt2020' && stream.color_range === 'tv' ) {