mirror of
https://github.com/gabehf/Tdarr_Plugins.git
synced 2026-03-16 02:35:54 -07:00
Merge pull request #659 from HaveAGitGat/qsv_win
Don't use scale_qsv=format=p010le on Windows
This commit is contained in:
commit
354b2aeabf
2 changed files with 7 additions and 2 deletions
|
|
@ -1,6 +1,10 @@
|
||||||
"use strict";
|
"use strict";
|
||||||
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||||
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||||
|
};
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
exports.plugin = exports.details = void 0;
|
exports.plugin = exports.details = void 0;
|
||||||
|
var os_1 = __importDefault(require("os"));
|
||||||
/* eslint no-plusplus: ["error", { "allowForLoopAfterthoughts": true }] */
|
/* eslint no-plusplus: ["error", { "allowForLoopAfterthoughts": true }] */
|
||||||
var details = function () { return ({
|
var details = function () { return ({
|
||||||
name: '10 Bit Video',
|
name: '10 Bit Video',
|
||||||
|
|
@ -32,7 +36,7 @@ var plugin = function (args) {
|
||||||
var stream = args.variables.ffmpegCommand.streams[i];
|
var stream = args.variables.ffmpegCommand.streams[i];
|
||||||
if (stream.codec_type === 'video') {
|
if (stream.codec_type === 'video') {
|
||||||
stream.outputArgs.push('-profile:v:{outputTypeIndex}', 'main10');
|
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');
|
stream.outputArgs.push('-vf', 'scale_qsv=format=p010le');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
import os from 'os';
|
||||||
import {
|
import {
|
||||||
IpluginDetails,
|
IpluginDetails,
|
||||||
IpluginInputArgs,
|
IpluginInputArgs,
|
||||||
|
|
@ -37,7 +38,7 @@ const plugin = (args:IpluginInputArgs):IpluginOutputArgs => {
|
||||||
if (stream.codec_type === 'video') {
|
if (stream.codec_type === 'video') {
|
||||||
stream.outputArgs.push('-profile:v:{outputTypeIndex}', 'main10');
|
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');
|
stream.outputArgs.push('-vf', 'scale_qsv=format=p010le');
|
||||||
} else {
|
} else {
|
||||||
stream.outputArgs.push('-pix_fmt:v:{outputTypeIndex}', 'p010le');
|
stream.outputArgs.push('-pix_fmt:v:{outputTypeIndex}', 'p010le');
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue