From 4775ce37a602529d3cb22b683f6741c55333ac88 Mon Sep 17 00:00:00 2001 From: HaveAGitGat <43864057+HaveAGitGat@users.noreply.github.com> Date: Mon, 9 Oct 2023 07:39:53 +0100 Subject: [PATCH] qsv 10 bit --- .../ffmpegCommand/ffmpegCommand10BitVideo/1.0.0/index.js | 8 +++++++- .../ffmpegCommand/ffmpegCommand10BitVideo/1.0.0/index.ts | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/FlowPlugins/CommunityFlowPlugins/ffmpegCommand/ffmpegCommand10BitVideo/1.0.0/index.js b/FlowPlugins/CommunityFlowPlugins/ffmpegCommand/ffmpegCommand10BitVideo/1.0.0/index.js index 95cec29..e38eaa7 100644 --- a/FlowPlugins/CommunityFlowPlugins/ffmpegCommand/ffmpegCommand10BitVideo/1.0.0/index.js +++ b/FlowPlugins/CommunityFlowPlugins/ffmpegCommand/ffmpegCommand10BitVideo/1.0.0/index.js @@ -31,7 +31,13 @@ var plugin = function (args) { for (var i = 0; i < args.variables.ffmpegCommand.streams.length; i += 1) { var stream = args.variables.ffmpegCommand.streams[i]; if (stream.codec_type === 'video') { - stream.outputArgs.push('-pix_fmt:v:{outputTypeIndex}', 'p010le', '-profile:v:{outputTypeIndex}', 'main10'); + stream.outputArgs.push('-profile:v:{outputTypeIndex}', 'main10'); + if (stream.outputArgs.includes('qsv')) { + stream.outputArgs.push('-vf', 'scale_qsv=format=p010le'); + } + else { + stream.outputArgs.push('-pix_fmt:v:{outputTypeIndex}', 'p010le'); + } } } return { diff --git a/FlowPluginsTs/CommunityFlowPlugins/ffmpegCommand/ffmpegCommand10BitVideo/1.0.0/index.ts b/FlowPluginsTs/CommunityFlowPlugins/ffmpegCommand/ffmpegCommand10BitVideo/1.0.0/index.ts index cc348a6..b5da85c 100644 --- a/FlowPluginsTs/CommunityFlowPlugins/ffmpegCommand/ffmpegCommand10BitVideo/1.0.0/index.ts +++ b/FlowPluginsTs/CommunityFlowPlugins/ffmpegCommand/ffmpegCommand10BitVideo/1.0.0/index.ts @@ -35,7 +35,13 @@ const plugin = (args:IpluginInputArgs):IpluginOutputArgs => { for (let i = 0; i < args.variables.ffmpegCommand.streams.length; i += 1) { const stream = args.variables.ffmpegCommand.streams[i]; if (stream.codec_type === 'video') { - stream.outputArgs.push('-pix_fmt:v:{outputTypeIndex}', 'p010le', '-profile:v:{outputTypeIndex}', 'main10'); + stream.outputArgs.push('-profile:v:{outputTypeIndex}', 'main10'); + + if (stream.outputArgs.includes('qsv')) { + stream.outputArgs.push('-vf', 'scale_qsv=format=p010le'); + } else { + stream.outputArgs.push('-pix_fmt:v:{outputTypeIndex}', 'p010le'); + } } }