From 0e0be951ad89cb53edef6644ceba48d291c7a607 Mon Sep 17 00:00:00 2001 From: HaveAGitGat <43864057+HaveAGitGat@users.noreply.github.com> Date: Mon, 2 Oct 2023 08:15:22 +0100 Subject: [PATCH] Check for yuv420p10le --- .../CommunityFlowPlugins/video/check10Bit/1.0.0/index.js | 4 +++- .../CommunityFlowPlugins/video/check10Bit/1.0.0/index.ts | 8 +++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/FlowPlugins/CommunityFlowPlugins/video/check10Bit/1.0.0/index.js b/FlowPlugins/CommunityFlowPlugins/video/check10Bit/1.0.0/index.js index 946ab41..0c6c4ba 100644 --- a/FlowPlugins/CommunityFlowPlugins/video/check10Bit/1.0.0/index.js +++ b/FlowPlugins/CommunityFlowPlugins/video/check10Bit/1.0.0/index.js @@ -37,7 +37,9 @@ var plugin = function (args) { if (Array.isArray((_b = (_a = args === null || args === void 0 ? void 0 : args.inputFileObj) === null || _a === void 0 ? void 0 : _a.ffProbeData) === null || _b === void 0 ? void 0 : _b.streams)) { 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.bits_per_raw_sample === 10) { + if (stream.codec_type === 'video' + && (stream.bits_per_raw_sample === 10 + || stream.pix_fmt === 'yuv420p10le')) { is10Bit = true; } } diff --git a/FlowPluginsTs/CommunityFlowPlugins/video/check10Bit/1.0.0/index.ts b/FlowPluginsTs/CommunityFlowPlugins/video/check10Bit/1.0.0/index.ts index a1f965d..04548c2 100644 --- a/FlowPluginsTs/CommunityFlowPlugins/video/check10Bit/1.0.0/index.ts +++ b/FlowPluginsTs/CommunityFlowPlugins/video/check10Bit/1.0.0/index.ts @@ -41,7 +41,13 @@ const plugin = (args: IpluginInputArgs): IpluginOutputArgs => { if (Array.isArray(args?.inputFileObj?.ffProbeData?.streams)) { for (let i = 0; i < args.inputFileObj.ffProbeData.streams.length; i += 1) { const stream = args.inputFileObj.ffProbeData.streams[i]; - if (stream.codec_type === 'video' && stream.bits_per_raw_sample === 10) { + if ( + stream.codec_type === 'video' + && ( + stream.bits_per_raw_sample === 10 + || stream.pix_fmt === 'yuv420p10le' + ) + ) { is10Bit = true; } }