Update flows

This commit is contained in:
HaveAGitGat 2023-08-26 17:53:07 +01:00
parent 658857fdf4
commit 25c4fab8d9
73 changed files with 4295 additions and 839 deletions

View file

@ -1,19 +1,29 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.plugin = exports.details = void 0;
var fileUtils_1 = require("../../../../FlowHelpers/1.0.0/fileUtils");
/* eslint no-plusplus: ["error", { "allowForLoopAfterthoughts": true }] */
var details = function () { return ({
name: 'Reorder Streams',
description: 'Reorder Streams',
name: 'Set Video Bitrate',
description: 'Set Video Bitrate',
style: {
borderColor: '#6efefc',
opacity: 0.5,
},
tags: 'video',
isStartPlugin: false,
sidebarPosition: -1,
icon: '',
inputs: [],
inputs: [
{
name: 'bitrate',
type: 'string',
defaultValue: '5000',
inputUI: {
type: 'text',
},
tooltip: 'Specify bitrate in kbps',
},
],
outputs: [
{
number: 1,
@ -27,6 +37,12 @@ var plugin = function (args) {
var lib = require('../../../../../methods/lib')();
// eslint-disable-next-line @typescript-eslint/no-unused-vars,no-param-reassign
args.inputs = lib.loadDefaultValues(args.inputs, details);
args.variables.ffmpegCommand.streams.forEach(function (stream) {
if (stream.codec_type === 'video') {
var ffType = (0, fileUtils_1.getFfType)(stream.codec_type);
stream.outputArgs.push("-b:".concat(ffType, ":{outputTypeIndex}"), "".concat(String(args.inputs.bitrate), "k"));
}
});
return {
outputFileObj: args.inputFileObj,
outputNumber: 1,