Skip to content

Commit

Permalink
Merge pull request #659 from HaveAGitGat/qsv_win
Browse files Browse the repository at this point in the history
Don't use scale_qsv=format=p010le on Windows
  • Loading branch information
HaveAGitGat authored Jun 5, 2024
2 parents 98858a2 + e5b1abc commit 354b2ae
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.plugin = exports.details = void 0;
var os_1 = __importDefault(require("os"));
/* eslint no-plusplus: ["error", { "allowForLoopAfterthoughts": true }] */
var details = function () { return ({
name: '10 Bit Video',
Expand Down Expand Up @@ -32,7 +36,7 @@ var plugin = function (args) {
var stream = args.variables.ffmpegCommand.streams[i];
if (stream.codec_type === 'video') {
stream.outputArgs.push('-profile:v:{outputTypeIndex}', 'main10');
if (stream.outputArgs.some(function (row) { return row.includes('qsv'); })) {
if (stream.outputArgs.some(function (row) { return row.includes('qsv'); }) && os_1.default.platform() !== 'win32') {
stream.outputArgs.push('-vf', 'scale_qsv=format=p010le');
}
else {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import os from 'os';
import {
IpluginDetails,
IpluginInputArgs,
Expand Down Expand Up @@ -37,7 +38,7 @@ const plugin = (args:IpluginInputArgs):IpluginOutputArgs => {
if (stream.codec_type === 'video') {
stream.outputArgs.push('-profile:v:{outputTypeIndex}', 'main10');

if (stream.outputArgs.some((row) => row.includes('qsv'))) {
if (stream.outputArgs.some((row) => row.includes('qsv')) && os.platform() !== 'win32') {
stream.outputArgs.push('-vf', 'scale_qsv=format=p010le');
} else {
stream.outputArgs.push('-pix_fmt:v:{outputTypeIndex}', 'p010le');
Expand Down

0 comments on commit 354b2ae

Please sign in to comment.