Plugin update

This commit is contained in:
HaveAGitGat 2021-12-11 19:48:53 +00:00
parent 5f68989571
commit 90e2b3923a
85 changed files with 2093 additions and 1007 deletions

View file

@ -1,22 +1,26 @@
const loadDefaultValues = require('../methods/loadDefaultValues');
/* eslint no-plusplus: ["error", { "allowForLoopAfterthoughts": true }] */
function details() {
return {
id: 'Tdarr_Plugin_MC93_Migz1FFMPEG',
Stage: 'Pre-processing',
Name: 'Migz-Transcode Using Nvidia GPU & FFMPEG',
Type: 'Video',
Operation: 'Transcode',
Description: `Files not in H265 will be transcoded into H265 using Nvidia GPU with ffmpeg.
const details = () => ({
id: 'Tdarr_Plugin_MC93_Migz1FFMPEG',
Stage: 'Pre-processing',
Name: 'Migz-Transcode Using Nvidia GPU & FFMPEG',
Type: 'Video',
Operation: 'Transcode',
Description: `Files not in H265 will be transcoded into H265 using Nvidia GPU with ffmpeg.
Settings are dependant on file bitrate
Working by the logic that H265 can support the same ammount of data at half the bitrate of H264.
NVDEC & NVENC compatable GPU required.
This plugin will skip any files that are in the VP9 codec.`,
Version: '3.0',
Link: 'https://github.com/HaveAGitGat/Tdarr_Plugins/blob/master/Community/Tdarr_Plugin_MC93_Migz1FFMPEG.js',
Tags: 'pre-processing,ffmpeg,video only,nvenc h265,configurable',
Inputs: [{
name: 'container',
tooltip: `Specify output container of file
Version: '3.0',
Tags: 'pre-processing,ffmpeg,video only,nvenc h265,configurable',
Inputs: [{
name: 'container',
type: 'string',
defaultValue: 'mkv',
inputUI: {
type: 'text',
},
tooltip: `Specify output container of file
\\n Ensure that all stream types you may have are supported by your chosen container.
\\n mkv is recommended.
\\nExample:\\n
@ -24,10 +28,15 @@ function details() {
\\nExample:\\n
mp4`,
},
{
name: 'bitrate_cutoff',
type: 'string',
defaultValue: '',
inputUI: {
type: 'text',
},
{
name: 'bitrate_cutoff',
tooltip: `Specify bitrate cutoff, files with a current bitrate lower then this will not be transcoded.
tooltip: `Specify bitrate cutoff, files with a current bitrate lower then this will not be transcoded.
\\n Rate is in kbps.
\\n Leave empty to disable.
\\nExample:\\n
@ -35,19 +44,29 @@ function details() {
\\nExample:\\n
4000`,
},
{
name: 'enable_10bit',
type: 'string',
defaultValue: 'false',
inputUI: {
type: 'text',
},
{
name: 'enable_10bit',
tooltip: `Specify if output file should be 10bit. Default is false.
tooltip: `Specify if output file should be 10bit. Default is false.
\\nExample:\\n
true
\\nExample:\\n
false`,
},
{
name: 'enable_bframes',
type: 'string',
defaultValue: 'false',
inputUI: {
type: 'text',
},
{
name: 'enable_bframes',
tooltip: `Specify if b frames should be used.
tooltip: `Specify if b frames should be used.
\\n Using B frames should decrease file sizes but are only supported on newer GPUs.
\\n Default is false.
\\nExample:\\n
@ -55,10 +74,15 @@ function details() {
\\nExample:\\n
false`,
},
{
name: 'force_conform',
type: 'string',
defaultValue: 'false',
inputUI: {
type: 'text',
},
{
name: 'force_conform',
tooltip: `Make the file conform to output containers requirements.
tooltip: `Make the file conform to output containers requirements.
\\n Drop hdmv_pgs_subtitle/eia_608/subrip/timed_id3 for MP4.
\\n Drop data streams/mov_text/eia_608/timed_id3 for MKV.
\\n Default is false.
@ -67,12 +91,14 @@ function details() {
\\nExample:\\n
false`,
},
],
};
}
},
],
});
function plugin(file, librarySettings, inputs) {
// eslint-disable-next-line no-unused-vars
const plugin = (file, librarySettings, inputs, otherArguments) => {
// eslint-disable-next-line no-unused-vars,no-param-reassign
inputs = loadDefaultValues(inputs, details);
const response = {
processFile: false,
preset: '',
@ -288,6 +314,6 @@ function plugin(file, librarySettings, inputs) {
response.processFile = true;
response.infoLog += 'File is not hevc or vp9. Transcoding. \n';
return response;
}
};
module.exports.details = details;
module.exports.plugin = plugin;