Revert "Add new tests (#311)"

This reverts commit 2a0a7e1bfc.
This commit is contained in:
HaveAGitGat 2022-05-22 17:43:42 +01:00
parent 2a0a7e1bfc
commit c729fad9f5
113 changed files with 102 additions and 7662 deletions

View file

@ -20,4 +20,4 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
- run: npm i
- run: npm run checkPlugins && npm run lint && npm run test
- run: npm run checkPlugins && npm run lint

View file

@ -84,8 +84,8 @@ const plugin = (file, librarySettings, inputs, otherArguments) => {
processFile: false,
preset: '',
container: '',
handbrakeMode: false,
ffmpegMode: false,
handBrakeMode: false,
FFmpegMode: false,
reQueueAfter: false,
infoLog: '',
};

View file

@ -117,7 +117,7 @@ const plugin = (file, librarySettings, inputs, otherArguments) => {
for (let i = 0; i < items.length; i += 1) {
const matchedStreams = [];
for (let j = 0; j < streams.length; j += 1) {
if (String(sortType.getValue(streams[j])) === String(items[i])) {
if (String(sortType.getValue(streams[j])).includes(String(items[i]))) {
if (
streams[j].codec_long_name
&& (

View file

@ -1,5 +1,4 @@
/* eslint-disable */
// tdarrSkipTest
const details = () => {
return {
id: "Tdarr_Plugin_078d_Output_embedded_subs_to_SRT_and_remove",

View file

@ -1,5 +1,4 @@
/* eslint-disable */
// tdarrSkipTest
const details = () => {
return {
id: 'Tdarr_Plugin_43az_add_to_radarr',

View file

@ -203,7 +203,6 @@ const plugin = (file, librarySettings, inputs, otherArguments) => {
if (inputs.bitrate_cutoff !== '') {
// Checks if currentBitrate is below inputs.bitrate_cutoff
// If so then don't convert video.
console.log(currentBitrate)
if (currentBitrate <= inputs.bitrate_cutoff) {
convertVideo = false;
}

View file

@ -86,7 +86,6 @@ Audio: (Only one audio stream is used!!)
/// ///////////////////////////////////////////////////////////////////////////////////////////////////
*/
// tdarrSkipTest
const details = () => ({
id: 'Tdarr_Plugin_JB69_JBHEVCQSV_MinimalFile',
Stage: 'Pre-processing',

View file

@ -148,7 +148,6 @@
//
//////////////////////////////////////////////////////////////////////////////////////////////////////
// tdarrSkipTest
const details = () => {
return {
id: "Tdarr_Plugin_JB69_JBHEVCQSZ_PostFix",

View file

@ -3,7 +3,6 @@ module.exports.dependencies = [
];
/* eslint no-plusplus: ["error", { "allowForLoopAfterthoughts": true }] */
// tdarrSkipTest
const details = () => ({
id: 'Tdarr_Plugin_MC93_MigzPlex_Autoscan',
Stage: 'Post-processing',

View file

@ -14,7 +14,6 @@
var secondPass = false;
var logOutFile = '';
// tdarrSkipTest
const details = () => {
return {
id: "Tdarr_Plugin_NIfPZuCLU_2_Pass_Loudnorm_Audio_Normalisation",

View file

@ -1,7 +1,6 @@
/* eslint-disable */
// tdarrSkipTest
const details = () => {
return {
id: "Tdarr_Plugin_O8O0dCTlb_Set_File_Permissions_For_UnRaid",

View file

@ -3,7 +3,6 @@
// https://github.com/HaveAGitGat/Tdarr_Plugins/blob/master/Community/Tdarr_Plugin_MC93_Migz1FFMPEG.js
// Seriously, all I did was make it work for converting things to h264 instead of hevc
// tdarrSkipTest
const details = () => ({
id: 'Tdarr_Plugin_SV6x_Smoove1FFMPEG_NVENC_H264',
Stage: 'Pre-processing', // Preprocessing or Post-processing. Determines when the plugin will be executed.

View file

@ -4,7 +4,6 @@ module.exports.dependencies = [
];
/* eslint no-plusplus: ["error", { "allowForLoopAfterthoughts": true }] */
// tdarrSkipTest
const details = () => ({
id: 'Tdarr_Plugin_TD01_TOAD_Autoscan',
Stage: 'Post-processing',

View file

@ -1,5 +1,4 @@
/* eslint max-classes-per-file: ["error", 2] */
// tdarrSkipTest
const details = () => ({
id: 'Tdarr_Plugin_VP92_VP9_Match_Bitrate_One_Pass',
Stage: 'Pre-processing',

View file

@ -1,6 +1,5 @@
// eslint-disable-next-line import/no-unresolved
// tdarrSkipTest
const details = () => ({
id: 'Tdarr_Plugin_a9hf_New_file_duration_check',
Stage: 'Pre-processing',

View file

@ -62,7 +62,6 @@ const plugin = (file, librarySettings, inputs, otherArguments) => {
const lib = require('../methods/lib')();
// eslint-disable-next-line no-unused-vars,no-param-reassign
inputs = lib.loadDefaultValues(inputs, details);
var response = {
processFile: false,
preset: "",
@ -71,17 +70,15 @@ const plugin = (file, librarySettings, inputs, otherArguments) => {
FFmpegMode: false,
reQueueAfter: false,
infoLog: "",
addInfo(status, info) {
this.infoLog += (status ? "☑" : "☒") + " " + info + "\n";
},
};
const addInfo = (status, info) => {
response.infoLog += (status ? "☑" : "☒") + " " + info + "\n";
}
// Check the file is a video
if (file.fileMedium !== "video") {
console.log("File is not video");
addInfo(BAD, `File is not video`);
response.addInfo(BAD, `File is not video`);
response.processFile = false;
return response;
}
@ -90,7 +87,7 @@ const plugin = (file, librarySettings, inputs, otherArguments) => {
let preset = getPreset(inputs.FFmpeg_preset);
if (preset === null) {
addInfo(
response.addInfo(
BAD,
`Invalid Preset, \"${inputs.FFmpeg_preset}\" please select from (slow,medium,fast,veryfast)`
);
@ -128,10 +125,10 @@ const plugin = (file, librarySettings, inputs, otherArguments) => {
}
if (hasBadSubs)
addInfo(BAD, "File contains unsupported sub(s), dropping these!");
response.addInfo(BAD, "File contains unsupported sub(s), dropping these!");
if (file.ffProbeData.streams[0].codec_name != "h264") {
addInfo(BAD, "File is not in h264!");
response.addInfo(BAD, "File is not in h264!");
response.preset =
", -map_metadata -1 -map 0:V " +
subMap +
@ -142,11 +139,11 @@ const plugin = (file, librarySettings, inputs, otherArguments) => {
response.FFmpegMode = true;
return response;
} else {
addInfo(GOOD, "File is already in h264!");
response.addInfo(GOOD, "File is already in h264!");
}
if (file.meta.Title != undefined && !jsonString.includes("aac") && hasSubs) {
addInfo(BAD, "File has title metadata and no aac and subs");
response.addInfo(BAD, "File has title metadata and no aac and subs");
response.preset =
", -map_metadata -1 -map 0:v " +
subMap +
@ -159,7 +156,7 @@ const plugin = (file, librarySettings, inputs, otherArguments) => {
}
if (!jsonString.includes("aac") && hasSubs) {
addInfo(BAD, "File has no aac track and has subs");
response.addInfo(BAD, "File has no aac track and has subs");
response.preset =
", -map 0:v " +
subMap +
@ -172,7 +169,7 @@ const plugin = (file, librarySettings, inputs, otherArguments) => {
}
if (file.meta.Title != undefined && hasSubs) {
addInfo(BAD, "File has title and has subs");
response.addInfo(BAD, "File has title and has subs");
response.preset =
", -map_metadata -1 -map 0:v " +
subMap +
@ -185,7 +182,7 @@ const plugin = (file, librarySettings, inputs, otherArguments) => {
}
if (file.meta.Title != undefined) {
addInfo(BAD, "File has title metadata");
response.addInfo(BAD, "File has title metadata");
response.preset =
", -map_metadata -1 -map 0:v " +
subMap +
@ -196,11 +193,11 @@ const plugin = (file, librarySettings, inputs, otherArguments) => {
response.FFmpegMode = true;
return response;
} else {
addInfo(GOOD, "File has no title metadata");
response.addInfo(GOOD, "File has no title metadata");
}
if (!jsonString.includes("aac")) {
addInfo(BAD, "File has no aac track");
response.addInfo(BAD, "File has no aac track");
response.preset =
", -map 0:v " +
subMap +
@ -211,14 +208,14 @@ const plugin = (file, librarySettings, inputs, otherArguments) => {
response.FFmpegMode = true;
return response;
} else {
addInfo(GOOD, "File has aac track");
response.addInfo(GOOD, "File has aac track");
}
if (hasSubs) {
if (hasBadSubs) {
addInfo(BAD, "File has incompatible subs, dropping these...");
response.addInfo(BAD, "File has incompatible subs, dropping these...");
} else {
addInfo(BAD, "File has compatible subs, copying...");
response.addInfo(BAD, "File has compatible subs, copying...");
}
response.preset =
", -map 0:v " + subMap + " -map 0:a -c:v copy -c:a copy " + subType;
@ -226,10 +223,10 @@ const plugin = (file, librarySettings, inputs, otherArguments) => {
response.FFmpegMode = true;
return response;
} else {
addInfo(GOOD, "File has no/compatible subs");
response.addInfo(GOOD, "File has no/compatible subs");
}
addInfo(GOOD, "File meets conditions!");
response.addInfo(GOOD, "File meets conditions!");
return response;
}

View file

@ -4,14 +4,14 @@ const details = () => {
return {
id: "Tdarr_Plugin_drdd_standardise_all_in_one",
Stage: "Pre-processing",
Name: "DrDD H265 MKV AC3 audio subtitles [VAAPI & NVENC]",
Name: "DrDD H265 MKV AC3 audio subtitles [QSV & NVENC]",
Stage: "Pre-processing",
Type: "Video",
Operation: "Transcode",
Description:
"In a single pass ensures all files are in MKV containers and where possible encoded in h265 (settings dependant on file bitrate), converts all multi channel audio to AC3, removes audio commentary and removes subtitles that are not in the configured language or marked as commentary. This plugin is opinionated based on how I like my library to be configured and based on the work done by Migz with his plugins (Thanks!).",
Version: "1.0",
Tags: "pre-processing,ffmpeg,vaapi,h265, nvenc h265",
Tags: "pre-processing,ffmpeg,qsv h265, nvenc h265",
Inputs: [
{
name: "nvenc",
@ -346,7 +346,7 @@ function buildVideoConfiguration(inputs, file, logger) {
configuration.RemoveOutputSetting("-c:v copy");
configuration.AddOutputSetting(`-c:v hevc_vaapi ${bitrateSettings}`);
logger.AddError("Transcoding to HEVC using VAAPI");
logger.AddError("Transcoding to HEVC using QSV");
}
/**

View file

@ -1,6 +1,5 @@
/* eslint-disable */
// tdarrSkipTest
const details = () => {
return {
id: "Tdarr_Plugin_e5c3_CnT_Add_Subtitles",

View file

@ -1,6 +1,5 @@
/* eslint-disable */
// tdarrSkipTest
const details = () => {
return {
id: "Tdarr_Plugin_e5c3_CnT_Remove_Letterbox",

View file

@ -1,4 +1,3 @@
// tdarrSkipTest
const details = () => ({
id: 'Tdarr_Plugin_goof1_URL_Plex_Refresh',
Stage: 'Post-processing',

View file

@ -1,6 +1,5 @@
/* eslint-disable no-await-in-loop */
module.exports.dependencies = ['axios', '@cospired/i18n-iso-languages'];
// tdarrSkipTest
const details = () => ({
id: 'Tdarr_Plugin_henk_Keep_Native_Lang_Plus_Eng',
Stage: 'Pre-processing',

View file

@ -23,6 +23,9 @@ const plugin = (file, librarySettings, inputs, otherArguments) => {
FFmpegMode: true,
reQueueAfter: true,
infoLog: '',
file,
removeFromDB: false,
updateDB: false,
container: `.${file.container}`,
};

View file

@ -1,4 +1,3 @@
// tdarrSkipTest
const details = () => ({
id: 'Tdarr_Plugin_rr01_drpeppershaker_extract_subs_to_SRT',
Stage: 'Pre-processing',

View file

@ -1,5 +1,4 @@
/* eslint-disable */
// tdarrSkipTest
const details = () => {
return {
id: "Tdarr_Plugin_s710_nick_h265_nvenc_4K",

View file

@ -1,5 +1,4 @@
/* eslint-disable */
// tdarrSkipTest
const details = () => {
return {
id: "Tdarr_Plugin_s7x9_winsome_h265_10bit",

View file

@ -1,5 +1,4 @@
/* eslint-disable */
// tdarrSkipTest
const details = () => {
return {
id: "Tdarr_Plugin_s7x9_winsome_h265_nvenc",

View file

@ -1,5 +1,4 @@
/* eslint-disable */
// tdarrSkipTest
const details = () => {
return {
id: "Tdarr_Plugin_sdd3_Remove_Commentary_Tracks",

View file

@ -1,5 +1,4 @@
/* eslint-disable */
// tdarrSkipTest
const details = () => {
return {
id: "Tdarr_Plugin_sdf5_Thierrrrry_Remove_Non_English_Audio",

View file

@ -1,5 +1,4 @@
/* eslint-disable */
// tdarrSkipTest
const details = () => {
return {
id: "Tdarr_Plugin_vdka_Remove_DataStreams",

View file

@ -1,4 +1,3 @@
// tdarrSkipTest
const details = () => ({
id: 'Tdarr_Plugin_vdka_Tiered_CPU_CRF_Based_Configurable',
Stage: 'Pre-processing',

View file

@ -1,5 +1,4 @@
/* eslint-disable */
// tdarrSkipTest
const details = () => {
return {
id: 'Tdarr_Plugin_vdka_Tiered_NVENC_CQV_BASED_CONFIGURABLE',

View file

@ -1,5 +1,4 @@
/* eslint-disable */
// tdarrSkipTest
const details = () => {
return {
id: "Tdarr_Plugin_x7ab_Remove_Subs",

View file

@ -1,4 +1,3 @@
// tdarrSkipTest
const details = () => ({
id: 'Tdarr_Plugin_x7ac_Remove_Closed_Captions',
Stage: 'Pre-processing',

View file

@ -1,4 +1,3 @@
// tdarrSkipTest
const details = () => ({
id: 'Tdarr_Plugin_z0ab_TheRealShadoh_FFmpeg_Subs_H264_Medium',
Stage: 'Pre-processing',

View file

@ -1,6 +1,5 @@
/* eslint-disable */
// tdarrSkipTest
const details = () => {
return {
id: "Tdarr_Plugin_z18s_rename_files_based_on_codec",

View file

@ -1,4 +1,3 @@
// tdarrSkipTest
const details = () => ({
id: 'Tdarr_Plugin_z18t_rename_files_based_on_codec_and_resolution',
Stage: 'Post-processing',

View file

@ -1,4 +1,3 @@
// tdarrSkipTest
const details = () => ({
id: 'Tdarr_Plugin_z1ab_TheRealShadoh_FFmpeg_Subs_H264_Fast',
Stage: 'Pre-processing',

View file

@ -1,4 +1,3 @@
// tdarrSkipTest
const details = () => ({
id: 'Tdarr_Plugin_z2ab_TheRealShadoh_FFmpeg_Subs_H264_Slow',
Stage: 'Pre-processing',

View file

@ -1,4 +1,3 @@
// tdarrSkipTest
const details = () => ({
id: 'Tdarr_Plugin_z3ab_TheRealShadoh_FFmpeg_Subs_H264_VeryFast',
Stage: 'Pre-processing',

View file

@ -4,7 +4,6 @@ module.exports.dependencies = [
'touch',
];
// tdarrSkipTest
const details = () => ({
id: 'Tdarr_Plugin_z80t_keep_original_date',
Stage: 'Post-processing',

147
package-lock.json generated
View file

@ -174,12 +174,6 @@
"es-abstract": "^1.18.0-next.1"
}
},
"assertion-error": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz",
"integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==",
"dev": true
},
"ast-types-flow": {
"version": "0.0.7",
"resolved": "https://registry.npmjs.org/ast-types-flow/-/ast-types-flow-0.0.7.tgz",
@ -233,27 +227,14 @@
"callsites": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",
"integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ=="
},
"chai": {
"version": "4.3.6",
"resolved": "https://registry.npmjs.org/chai/-/chai-4.3.6.tgz",
"integrity": "sha512-bbcp3YfHCUzMOvKqsztczerVgBKSsEijCySNlHHbX3VG1nskvqjz5Rfso1gGwD6w6oOV3eI60pKuMOV5MV7p3Q==",
"dev": true,
"requires": {
"assertion-error": "^1.1.0",
"check-error": "^1.0.2",
"deep-eql": "^3.0.1",
"get-func-name": "^2.0.0",
"loupe": "^2.3.1",
"pathval": "^1.1.1",
"type-detect": "^4.0.5"
}
"integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==",
"dev": true
},
"chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
"integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
"dev": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
@ -263,6 +244,7 @@
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"requires": {
"color-convert": "^2.0.1"
}
@ -271,6 +253,7 @@
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"requires": {
"color-name": "~1.1.4"
}
@ -278,29 +261,26 @@
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true
},
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ=="
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true
},
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"requires": {
"has-flag": "^4.0.0"
}
}
}
},
"check-error": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz",
"integrity": "sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA==",
"dev": true
},
"color-convert": {
"version": "1.9.3",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
@ -366,15 +346,6 @@
"ms": "2.1.2"
}
},
"deep-eql": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz",
"integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==",
"dev": true,
"requires": {
"type-detect": "^4.0.0"
}
},
"deep-is": {
"version": "0.1.3",
"resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz",
@ -503,57 +474,6 @@
"table": "^5.2.3",
"text-table": "^0.2.0",
"v8-compile-cache": "^2.0.3"
},
"dependencies": {
"ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"requires": {
"color-convert": "^2.0.1"
}
},
"chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dev": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true
},
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true
},
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"requires": {
"has-flag": "^4.0.0"
}
}
}
},
"eslint-config-airbnb-base": {
@ -870,12 +790,6 @@
"integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=",
"dev": true
},
"get-func-name": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz",
"integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=",
"dev": true
},
"get-intrinsic": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.0.1.tgz",
@ -959,9 +873,10 @@
"dev": true
},
"import-fresh": {
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz",
"integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==",
"version": "3.2.2",
"resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.2.tgz",
"integrity": "sha512-cTPNrlvJT6twpYy+YmKUKrTSjWFs3bjYjAhCwm+z4EOCubZxAuO+hHpRN64TqjEaYSHs7tJAE0w1CKMGmsG/lw==",
"dev": true,
"requires": {
"parent-module": "^1.0.0",
"resolve-from": "^4.0.0"
@ -1176,16 +1091,8 @@
"lodash": {
"version": "4.17.21",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
},
"loupe": {
"version": "2.3.4",
"resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.4.tgz",
"integrity": "sha512-OvKfgCC2Ndby6aSTREl5aCCPTNIzlDfQZvZxNUrBrihDhL3xcrYegTblhmEiCrg2kKQz4XsFIaemE5BF4ybSaQ==",
"dev": true,
"requires": {
"get-func-name": "^2.0.0"
}
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
"dev": true
},
"lru-cache": {
"version": "6.0.0",
@ -1342,6 +1249,7 @@
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz",
"integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==",
"dev": true,
"requires": {
"callsites": "^3.0.0"
}
@ -1388,12 +1296,6 @@
"pify": "^2.0.0"
}
},
"pathval": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz",
"integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==",
"dev": true
},
"pify": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
@ -1473,7 +1375,8 @@
"resolve-from": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz",
"integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g=="
"integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==",
"dev": true
},
"rimraf": {
"version": "3.0.2",
@ -1674,12 +1577,6 @@
"prelude-ls": "^1.2.1"
}
},
"type-detect": {
"version": "4.0.8",
"resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz",
"integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==",
"dev": true
},
"type-fest": {
"version": "0.8.1",
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz",

View file

@ -1,22 +1,17 @@
{
"name": "tdarr_plugins",
"version": "1.0.0",
"description": "Tdar Plugins Repo",
"main": "",
"dependencies": {
"chalk": "^4.1.2",
"import-fresh": "^3.3.0",
"lodash": "^4.17.21"
},
"description": "There are two types of plugin:",
"main": "Tdarr_Plugin_aaaa_Pre_Proc_Example.js",
"dependencies": {},
"devDependencies": {
"chai": "^4.3.6",
"eslint": "^7.14.0",
"eslint-config-airbnb-base": "^14.2.1",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-jsx-a11y": "^6.4.1"
},
"scripts": {
"test": "node ./tests/runTests.js",
"test": "echo \"Error: no test specified\" && exit 1",
"lint": "eslint Community methods examples tests --ext js",
"lint:fix": "eslint Community methods examples tests --ext js --fix",
"checkPlugins": "node ./tests/checkPlugins.js"

View file

@ -1,92 +0,0 @@
/* eslint max-len: 0 */
const run = require('../helpers/run');
const tests = [
{
input: {
file: require('../sampleData/media/sampleH264_1.json'),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: true,
preset: ',-map 0:v -map 0:1 -map 0:a -map 0:s? -map 0:d? -c copy -c:a:0 aac -ac 2',
container: '.mp4',
handBrakeMode: false,
FFmpegMode: false,
reQueueAfter: true,
infoLog: 'The required channel count 2 is lower than the highest available channel count (6). Adding! \n',
handbrakeMode: false,
ffmpegMode: true,
},
},
{
input: {
file: require('../sampleData/media/sampleH264_1.json'),
librarySettings: {},
inputs: {
audioCodec: 'eac3',
},
otherArguments: {},
},
output: {
processFile: true,
preset: ',-map 0:v -map 0:1 -map 0:a -map 0:s? -map 0:d? -c copy -c:a:0 eac3 -ac 2',
container: '.mp4',
handBrakeMode: false,
FFmpegMode: false,
reQueueAfter: true,
infoLog: 'The required channel count 2 is lower than the highest available channel count (6). Adding! \n',
handbrakeMode: false,
ffmpegMode: true,
},
},
{
input: {
file: require('../sampleData/media/sampleH264_1.json'),
librarySettings: {},
inputs: {
audioCodec: 'eac3',
channels: 6,
},
otherArguments: {},
},
output: {
processFile: true,
preset: ',-map 0:v -map 0:1 -map 0:a -map 0:s? -map 0:d? -c copy -c:a:0 eac3 -ac 6',
container: '.mp4',
handBrakeMode: false,
FFmpegMode: false,
reQueueAfter: true,
infoLog: 'The required channel count 6 is lower than the highest available channel count (6). Adding! \n',
handbrakeMode: false,
ffmpegMode: true,
},
},
{
input: {
file: require('../sampleData/media/sampleH264_1.json'),
librarySettings: {},
inputs: {
audioCodec: 'eac3',
channels: 8,
language: 'fr',
},
otherArguments: {},
},
output: {
processFile: true,
preset: ',-map 0:v -map 0:1 -map 0:a -map 0:s? -map 0:d? -c copy -c:a:0 eac3 -ac 6',
container: '.mp4',
handBrakeMode: false,
FFmpegMode: false,
reQueueAfter: true,
infoLog: 'The required channel count (8) is higher than the highest channel available in specified lang tag (6). Adding lower channel track. \n',
handbrakeMode: false,
ffmpegMode: true,
},
},
];
run(tests);

View file

@ -1,74 +0,0 @@
/* eslint max-len: 0 */
const run = require('../helpers/run');
const tests = [
{
input: {
file: require('../sampleData/media/sampleH264_1.json'),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: true,
preset: '-Z "Very Fast 1080p30" -e x265 --all-subtitles',
container: '.mkv',
handBrakeMode: false,
FFmpegMode: false,
reQueueAfter: true,
infoLog: 'File is being transcoded using HandBrake \n',
handbrakeMode: true,
ffmpegMode: false,
},
},
{
input: {
file: require('../sampleData/media/sampleH264_1.json'),
librarySettings: {},
inputs: {
handbrakePreset: 'Fast 576p25',
videoEncoder: 'nvenc_h265',
keepSubtitles: 'true',
container: 'mp4',
},
otherArguments: {},
},
output: {
processFile: true,
preset: '-Z "Fast 576p25" -e nvenc_h265 --all-subtitles',
container: '.mp4',
handBrakeMode: false,
FFmpegMode: false,
reQueueAfter: true,
infoLog: 'File is being transcoded using HandBrake \n',
handbrakeMode: true,
ffmpegMode: false,
},
},
{
input: {
file: require('../sampleData/media/sampleH264_1.json'),
librarySettings: {},
inputs: {
handbrakePreset: 'Fast 576p25',
videoEncoder: 'nvenc_h265',
keepSubtitles: 'false',
container: 'mov',
},
otherArguments: {},
},
output: {
processFile: true,
preset: '-Z "Fast 576p25" -e nvenc_h265 ',
container: '.mov',
handBrakeMode: false,
FFmpegMode: false,
reQueueAfter: true,
infoLog: 'File is being transcoded using HandBrake \n',
handbrakeMode: true,
ffmpegMode: false,
},
},
];
run(tests);

View file

@ -1,66 +0,0 @@
/* eslint max-len: 0 */
const run = require('../helpers/run');
const tests = [
{
input: {
file: require('../sampleData/media/sampleH264_1.json'),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: true,
preset: '<io> -map 0 -c copy',
container: '.mkv',
handbrakeMode: false,
ffmpegMode: true,
reQueueAfter: true,
infoLog: 'File is being transcoded using custom arguments \n',
},
},
{
input: {
file: require('../sampleData/media/sampleH264_1.json'),
librarySettings: {},
inputs: {
cli: 'handbrake',
arguments: '-Z "Very Fast 1080p30" --all-subtitles --all-audio',
container: 'mp4',
},
otherArguments: {},
},
output: {
processFile: true,
preset: '-Z "Very Fast 1080p30" --all-subtitles --all-audio',
container: '.mp4',
handbrakeMode: true,
ffmpegMode: false,
reQueueAfter: true,
infoLog: 'File is being transcoded using custom arguments \n',
},
},
{
input: {
file: require('../sampleData/media/sampleH264_1.json'),
librarySettings: {},
inputs: {
cli: 'ffmpeg',
arguments: '<io>-c:v libx265 -crf 23 -ac 6 -c:a aac -preset veryfast',
container: 'mov',
},
otherArguments: {},
},
output: {
processFile: true,
preset: '<io>-c:v libx265 -crf 23 -ac 6 -c:a aac -preset veryfast',
container: '.mov',
handbrakeMode: false,
ffmpegMode: true,
reQueueAfter: true,
infoLog: 'File is being transcoded using custom arguments \n',
},
},
];
run(tests);

View file

@ -1,89 +0,0 @@
/* eslint max-len: 0 */
const run = require('../helpers/run');
const tests = [
{
input: {
file: require('../sampleData/media/sampleH264_1.json'),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: true,
preset: ',-map 0:v -map 0:1 -map 0:s? -map 0:d? -c copy -c:a:0 aac -ac 2',
container: '.mp4',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: 'No en streams. The required channel count 2 is lower than the highest available channel count (6).Adding it and removing others! \n',
handbrakeMode: false,
},
},
{
input: {
file: require('../sampleData/media/sampleH264_1.json'),
librarySettings: {},
inputs: {
audioCodec: 'eac3',
},
otherArguments: {},
},
output: {
processFile: true,
preset: ',-map 0:v -map 0:1 -map 0:s? -map 0:d? -c copy -c:a:0 eac3 -ac 2',
container: '.mp4',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: 'No en streams. The required channel count 2 is lower than the highest available channel count (6).Adding it and removing others! \n',
handbrakeMode: false,
},
},
{
input: {
file: require('../sampleData/media/sampleH264_1.json'),
librarySettings: {},
inputs: {
audioCodec: 'eac3',
language: 'fr',
channels: '6',
},
otherArguments: {},
},
output: {
processFile: true,
preset: ',-map 0:v -map 0:1 -map 0:s? -map 0:d? -c copy -c:a:0 eac3 -ac 6',
container: '.mp4',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: 'No fr streams. The required channel count 6 is lower than the highest available channel count (6).Adding it and removing others! \n',
handbrakeMode: false,
},
},
{
input: {
file: require('../sampleData/media/sampleH264_1.json'),
librarySettings: {},
inputs: {
audioCodec: 'aac',
language: 'und',
channels: '8',
},
otherArguments: {},
},
output: {
processFile: false,
preset: '',
container: '.mp4',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: 'The best und stream already exists. It is the only audio stream. \n',
handbrakeMode: false,
},
},
];
run(tests);

View file

@ -1,72 +0,0 @@
/* eslint max-len: 0 */
const run = require('../helpers/run');
const tests = [
{
input: {
file: require('../sampleData/media/sampleH264_1.json'),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: false,
preset: '',
container: '.mp4',
handBrakeMode: false,
FFmpegMode: true,
infoLog: 'Streams are in the correct order!',
},
},
{
// orig
// 0 vid h264
// 1 flac eng
// 2 ac3 eng
// 3 eac3 eng
// 4 aac fre
// 5 aac eng
// 6 sub fre
// expect
// 4 aac fre
// 2 ac3 eng
// 1 flac eng
// 3 eac3 eng
// 5 aac eng
// 6 sub fre
// 0 vid h264
// console.log(streams.map(stream => {
// return {
// "index": stream.index,
// codec_name: stream.codec_name,
// codec_type: stream.codec_type,
// language: stream.tags.language,
// }
// }))
input: {
file: require('../sampleData/media/sampleH264_2.json'),
librarySettings: {},
inputs: {
processOrder: 'codecs,channels,languages,streamTypes',
languages: 'fre,eng',
streamTypes: 'audio,subtitle,video',
codecs: 'ac3,flac,eac3,aac',
channels: '7.1,5.1,2,1',
},
otherArguments: {},
},
output: {
processFile: true,
preset: '<io> -c copy -map 0:4 -map 0:2 -map 0:1 -map 0:3 -map 0:5 -map 0:6 -map 0:0',
container: '.mkv',
handBrakeMode: false,
FFmpegMode: true,
infoLog: 'Streams are not in the correct order!',
},
},
];
run(tests);

View file

@ -1,65 +0,0 @@
/* eslint max-len: 0 */
const run = require('../helpers/run');
const tests = [
{
input: {
file: require('../sampleData/media/sampleH264_1.json'),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: true,
preset: ', -map 0 -c copy',
container: '.mkv',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: 'File is not in mkv \n',
handbrakeMode: false,
},
},
{
input: {
file: require('../sampleData/media/sampleH264_1.json'),
librarySettings: {},
inputs: {
container: 'mkv',
},
otherArguments: {},
},
output: {
processFile: true,
preset: ', -map 0 -c copy',
container: '.mkv',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: 'File is not in mkv \n',
handbrakeMode: false,
},
},
{
input: {
file: require('../sampleData/media/sampleH264_1.json'),
librarySettings: {},
inputs: {
container: 'mp4',
},
otherArguments: {},
},
output: {
processFile: false,
preset: ', -map 0 -c copy',
container: '.mp4',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: 'File is already in mp4 \n',
handbrakeMode: false,
},
},
];
run(tests);

View file

@ -1,66 +0,0 @@
/* eslint max-len: 0 */
const run = require('../helpers/run');
const tests = [
{
input: {
file: require('../sampleData/media/sampleH264_1.json'),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: false,
preset: '',
container: '.mp4',
handBrakeMode: false,
FFmpegMode: false,
reQueueAfter: true,
infoLog: "File does not have any audio streams which aren't in aac \n",
handbrakeMode: false,
ffmpegMode: true,
},
},
{
input: {
file: require('../sampleData/media/sampleH264_2.json'),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: true,
preset: ',-map 0:v -map 0:a -map 0:s? -map 0:d? -c copy -c:a:0 aac -c:a:1 aac -c:a:2 aac',
container: '.mkv',
handBrakeMode: false,
FFmpegMode: false,
reQueueAfter: true,
infoLog: "File has audio streams which aren't in aac \n",
handbrakeMode: false,
ffmpegMode: true,
},
},
{
input: {
file: require('../sampleData/media/sampleH264_2.json'),
librarySettings: {},
inputs: {
audioCodec: 'eac3',
},
otherArguments: {},
},
output: {
processFile: true,
preset: ',-map 0:v -map 0:a -map 0:s? -map 0:d? -c copy -c:a:0 eac3 -c:a:1 eac3 -c:a:3 eac3 -c:a:4 eac3',
container: '.mkv',
handBrakeMode: false,
FFmpegMode: false,
reQueueAfter: true,
infoLog: "File has audio streams which aren't in eac3 \n",
handbrakeMode: false,
ffmpegMode: true,
},
},
];
run(tests);

View file

@ -1,64 +0,0 @@
/* eslint max-len: 0 */
const run = require('../helpers/run');
const tests = [
{
input: {
file: require('../sampleData/media/sampleH264_2.json'),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: true,
infoLog: '☑File bitrate is within filter limits. Moving to next plugin.',
},
},
{
input: {
file: require('../sampleData/media/sampleH264_1.json'),
librarySettings: {},
inputs: {
upperBound: 500,
lowerBound: 0,
},
otherArguments: {},
},
output: {
processFile: false,
infoLog: '☒File bitrate is not within filter limits. Breaking out of plugin stack.\n',
},
},
{
input: {
file: require('../sampleData/media/sampleH264_1.json'),
librarySettings: {},
inputs: {
upperBound: 10000,
lowerBound: 0,
},
otherArguments: {},
},
output: {
processFile: true,
infoLog: '☑File bitrate is within filter limits. Moving to next plugin.',
},
},
{
input: {
file: require('../sampleData/media/sampleH264_1.json'),
librarySettings: {},
inputs: {
upperBound: 10000,
lowerBound: 9000,
},
otherArguments: {},
},
output: {
processFile: false,
infoLog: '☒File bitrate is not within filter limits. Breaking out of plugin stack.\n',
},
},
];
run(tests);

View file

@ -1,59 +0,0 @@
const run = require('../helpers/run');
const tests = [
{
input: {
file: require('../sampleData/media/sampleH264_1.json'),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: { processFile: false, infoLog: '' },
},
{
input: {
file: require('../sampleData/media/sampleH264_1.json'),
librarySettings: {},
inputs: {
codecsToProcess: 'h264',
},
otherArguments: {},
},
output: { processFile: true, infoLog: 'File is in codecsToProcess. Moving to next plugin.' },
},
{
input: {
file: require('../sampleData/media/sampleH264_1.json'),
librarySettings: {},
inputs: {
codecsToProcess: 'h265',
},
otherArguments: {},
},
output: { processFile: false, infoLog: 'File is not in codecsToProcess. Breaking out of plugin stack.' },
},
{
input: {
file: require('../sampleData/media/sampleH264_1.json'),
librarySettings: {},
inputs: {
codecsToNotProcess: 'h264',
},
otherArguments: {},
},
output: { processFile: false, infoLog: 'File is in codecsToNotProcess. Breaking out of plugin stack.' },
},
{
input: {
file: require('../sampleData/media/sampleH264_1.json'),
librarySettings: {},
inputs: {
codecsToNotProcess: 'h265',
},
otherArguments: {},
},
output: { processFile: true, infoLog: 'File is not in codecsToNotProcess. Moving to next plugin.' },
},
];
run(tests);

View file

@ -1,59 +0,0 @@
const run = require('../helpers/run');
const tests = [
{
input: {
file: require('../sampleData/media/sampleH264_1.json'),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: { processFile: false, infoLog: '' },
},
{
input: {
file: require('../sampleData/media/sampleH264_1.json'),
librarySettings: {},
inputs: {
codecTagStringsToProcess: 'avc1,rand',
},
otherArguments: {},
},
output: { processFile: true, infoLog: 'File is in codecTagStringsToProcess. Moving to next plugin.' },
},
{
input: {
file: require('../sampleData/media/sampleH264_1.json'),
librarySettings: {},
inputs: {
codecTagStringsToNotProcess: 'avc1,rand',
},
otherArguments: {},
},
output: { processFile: false, infoLog: 'File is in codecTagStringsToNotProcess. Breaking out of plugin stack.' },
},
{
input: {
file: require('../sampleData/media/sampleH265_1.json'),
librarySettings: {},
inputs: {
codecTagStringsToProcess: 'avc1,rand',
},
otherArguments: {},
},
output: { processFile: false, infoLog: 'File is not in codecTagStringsToProcess. Breaking out of plugin stack.' },
},
{
input: {
file: require('../sampleData/media/sampleH265_1.json'),
librarySettings: {},
inputs: {
codecTagStringsToNotProcess: 'avc1,rand',
},
otherArguments: {},
},
output: { processFile: true, infoLog: 'File is not in codecTagStringsToNotProcess. Moving to next plugin.' },
},
];
run(tests);

View file

@ -1,74 +0,0 @@
/* eslint max-len: 0 */
const run = require('../helpers/run');
const tests = [
{
input: {
file: require('../sampleData/media/sampleH264_1.json'),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: false, infoLog: '',
},
},
{
input: {
file: require('../sampleData/media/sampleH264_1.json'),
librarySettings: {},
inputs: {
resolutionsToProcess: '480p,720p',
},
otherArguments: {},
},
output: {
processFile: true,
infoLog: 'File is in resolutionsToProcess. Moving to next plugin.',
},
},
{
input: {
file: require('../sampleData/media/sampleH264_1.json'),
librarySettings: {},
inputs: {
resolutionsToProcess: '480p,1080p',
},
otherArguments: {},
},
output: {
processFile: false,
infoLog: 'File is not in resolutionsToProcess. Breaking out of plugin stack.',
},
},
{
input: {
file: require('../sampleData/media/sampleH264_1.json'),
librarySettings: {},
inputs: {
resolutionsToNotProcess: '480p,720p',
},
otherArguments: {},
},
output: {
processFile: false,
infoLog: 'File is in resolutionsToNotProcess. Breaking out of plugin stack.',
},
},
{
input: {
file: require('../sampleData/media/sampleH264_1.json'),
librarySettings: {},
inputs: {
resolutionsToNotProcess: '480p,1080p',
},
otherArguments: {},
},
output: {
processFile: true,
infoLog: 'File is not in resolutionsToNotProcess. Moving to next plugin.',
},
},
];
run(tests);

View file

@ -1,64 +0,0 @@
/* eslint max-len: 0 */
const run = require('../helpers/run');
const tests = [
{
input: {
file: require('../sampleData/media/sampleH264_1.json'),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: true,
infoLog: 'File is within lower and upper bound size limits. Moving to next plugin.',
},
},
{
input: {
file: require('../sampleData/media/sampleH264_1.json'),
librarySettings: {},
inputs: {
upperBound: 0.5,
lowerBound: 0,
},
otherArguments: {},
},
output: {
processFile: false,
infoLog: 'File is not within lower and upper bound size limits. Breaking out of plugin stack.',
},
},
{
input: {
file: require('../sampleData/media/sampleH264_1.json'),
librarySettings: {},
inputs: {
upperBound: 2,
lowerBound: 0,
},
otherArguments: {},
},
output: {
processFile: true,
infoLog: 'File is within lower and upper bound size limits. Moving to next plugin.',
},
},
{
input: {
file: require('../sampleData/media/sampleH264_1.json'),
librarySettings: {},
inputs: {
upperBound: 4,
lowerBound: 2,
},
otherArguments: {},
},
output: {
processFile: false,
infoLog: 'File is not within lower and upper bound size limits. Breaking out of plugin stack.',
},
},
];
run(tests);

View file

@ -1,41 +0,0 @@
/* eslint max-len: 0 */
const run = require('../helpers/run');
const tests = [
{
input: {
file: require('../sampleData/media/sampleH264_1.json'),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: true,
preset: ',-map 0:v -map 0:a -map 0:s? -map 0:d? -c copy -c:v:0 libx265 -max_muxing_queue_size 9999',
container: '.mkv',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: '☑File is a video! \n☒File is not hevc! \n',
},
},
{
input: {
file: require('../sampleData/media/sampleH265_1.json'),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: false,
preset: '',
container: '.mp4',
handBrakeMode: false,
FFmpegMode: false,
reQueueAfter: false,
infoLog: '☑File is a video! \n☑File is already in hevc! \n',
},
},
];
run(tests);

View file

@ -1,81 +0,0 @@
/* eslint max-len: 0 */
const run = require('../helpers/run');
const tests = [
{
input: {
file: require('../sampleData/media/sampleH264_1.json'),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: true,
preset: '-Z "Very Fast 1080p30" --all-subtitles --all-audio',
container: '.mkv',
handBrakeMode: true,
FFmpegMode: false,
reQueueAfter: true,
infoLog: '☒File is not in desired codec! \n',
},
},
{
input: {
file: require('../sampleData/media/sampleH265_1.json'),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: false,
preset: '',
container: '.mp4',
handBrakeMode: false,
FFmpegMode: false,
reQueueAfter: false,
infoLog: '☑File is already in hevc! \n',
},
},
{
input: {
file: require('../sampleData/media/sampleH264_1.json'),
librarySettings: {},
inputs: {
codecs_to_exclude: 'h264',
},
otherArguments: {},
},
output: {
processFile: false,
preset: '',
container: '.mp4',
handBrakeMode: false,
FFmpegMode: false,
reQueueAfter: false,
infoLog: '☑File is already in h264! \n',
},
},
{
input: {
file: require('../sampleData/media/sampleH264_1.json'),
librarySettings: {},
inputs: {
codecs_to_exclude: 'hevc',
cli: 'handbrake',
transcode_arguments: '-Z "Very Fast 480p30"',
},
otherArguments: {},
},
output: {
processFile: true,
preset: '-Z "Very Fast 480p30"',
container: '.mkv',
handBrakeMode: true,
FFmpegMode: false,
reQueueAfter: true,
infoLog: '☒File is not in desired codec! \n',
},
},
];
run(tests);

View file

@ -1,41 +0,0 @@
/* eslint max-len: 0 */
const run = require('../helpers/run');
const tests = [
{
input: {
file: require('../sampleData/media/sampleH264_1.json'),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: true,
preset: ',-map 0:v -map 0:a -c copy -c:v:0 libx265 -max_muxing_queue_size 9999',
container: '.mkv',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: '☑File is a video! \n☒File is not hevc! \n',
},
},
{
input: {
file: require('../sampleData/media/sampleH265_1.json'),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: false,
preset: '',
container: '.mp4',
handBrakeMode: false,
FFmpegMode: false,
reQueueAfter: false,
infoLog: '☑File is a video! \n☑File is already in hevc! \n',
},
},
];
run(tests);

View file

@ -1,41 +0,0 @@
/* eslint max-len: 0 */
const run = require('../helpers/run');
const tests = [
{
input: {
file: require('../sampleData/media/sampleH264_1.json'),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: true,
preset: ',-map 0:v -map 0:a -c copy -c:v:0 libx265 -crf 20',
container: '.mkv',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: '☑File is a video! \n☒File is not hevc! \n',
},
},
{
input: {
file: require('../sampleData/media/sampleH265_1.json'),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: false,
preset: '',
container: '.mp4',
handBrakeMode: false,
FFmpegMode: false,
reQueueAfter: false,
infoLog: '☑File is a video! \n☑File is already in hevc! \n',
},
},
];
run(tests);

View file

@ -1,41 +0,0 @@
/* eslint max-len: 0 */
const run = require('../helpers/run');
const tests = [
{
input: {
file: require('../sampleData/media/sampleH264_1.json'),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: true,
preset: ',-map 0:v -map 0:a -c copy -c:v:0 hevc_nvenc -crf 20',
container: '.mkv',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: '☑File is a video! \n☒File is not hevc! \n',
},
},
{
input: {
file: require('../sampleData/media/sampleH265_1.json'),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: false,
preset: '',
container: '.mp4',
handBrakeMode: false,
FFmpegMode: false,
reQueueAfter: false,
infoLog: '☑File is a video! \n☑File is already in hevc! \n',
},
},
];
run(tests);

View file

@ -1,43 +0,0 @@
/* eslint max-len: 0 */
const run = require('../helpers/run');
const tests = [
{
input: {
file: require('../sampleData/media/sampleH264_2.json'),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: false,
preset: '',
container: '.mp4',
handBrakeMode: false,
FFmpegMode: false,
reQueueAfter: false,
infoLog: '☑ Preferred language is already first audio track! \n',
},
},
{
input: {
file: require('../sampleData/media/sampleH264_2.json'),
librarySettings: {},
inputs: {
preferred_language: 'fre',
},
otherArguments: {},
},
output: {
processFile: true,
preset: ', -c copy -map 0:v -map 0:a:3 -disposition:a:0 default -map 0:a:0 -map 0:a:1 -disposition:a:1 0 -map 0:a:2 -disposition:a:2 0 -disposition:a:3 0 -map 0:a:4 -disposition:a:4 0 -map 0:s? -map 0:d? ',
container: '.mkv',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: '☒ Desired audio lang is not first audio stream, moving! \n',
},
},
];
run(tests);

View file

@ -1,62 +0,0 @@
/* eslint max-len: 0 */
const run = require('../helpers/run');
const tests = [
{
input: {
file: require('../sampleData/media/sampleH264_2.json'),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: false,
preset: '',
container: '.mp4',
handBrakeMode: false,
FFmpegMode: false,
reQueueAfter: false,
infoLog: '☒ No subtitle tracks in desired language! \n',
},
},
{
input: {
file: require('../sampleData/media/sampleH264_2.json'),
librarySettings: {},
inputs: {
preferred_language: 'fre',
},
otherArguments: {},
},
output: {
processFile: false,
preset: '',
container: '.mp4',
handBrakeMode: false,
FFmpegMode: false,
reQueueAfter: false,
infoLog: '☑ Preferred language is already first subtitle track! \n',
},
}, {
input: {
file: require('../sampleData/media/sampleH264_3.json'),
librarySettings: {},
inputs: {
preferred_language: 'fre',
},
otherArguments: {},
},
output: {
processFile: true,
preset: ', -c copy -map 0:v -map 0:a -map 0:s:1 -disposition:s:0 default -map 0:s:0 -disposition:s:1 0 -map 0:d? ',
container: '.mkv',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: '☒ Desired subtitle lang is not first subtitle stream, moving! \n',
},
},
];
run(tests);

View file

@ -1,44 +0,0 @@
/* eslint max-len: 0 */
const run = require('../helpers/run');
const tests = [
{
input: {
file: require('../sampleData/media/sampleH264_1.json'),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: false,
preset: '',
container: '.mp4',
handBrakeMode: false,
FFmpegMode: false,
reQueueAfter: false,
infoLog: '☑ File is already in h264, no need to transcode! \n',
},
},
{
input: {
file: require('../sampleData/media/sampleH265_1.json'),
librarySettings: {},
inputs: {
handbrake_preset: 'Very Fast 1080p30',
output_container: '.mp4',
},
otherArguments: {},
},
output: {
processFile: true,
preset: '-Z "Very Fast 1080p30" -e nvenc_h264 --all-audio --all-subtitles',
container: '.mp4',
handBrakeMode: true,
FFmpegMode: false,
reQueueAfter: true,
infoLog: '☒ File is not in h264, transcoding! \n',
},
},
];
run(tests);

View file

@ -1,112 +0,0 @@
/* eslint max-len: 0 */
const _ = require('lodash');
const run = require('../helpers/run');
const tests = [
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH264_1.json')),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: true,
preset: '-vsync 0 -hwaccel cuda -hwaccel_output_format cuda -c:v h264_cuvid ,-map 0:v -map 0:a -map 0:s? -map -:d? -c copy -c:v:0 hevc_nvenc -preset medium -profile:v main10 -rc-lookahead 32 -spatial_aq:v 1 -aq-strength:v 8 -max_muxing_queue_size 4096 -b:v 967680 -maxrate 1257984 -minrate 677376 -bufsize 1205959 -map_metadata:g -1',
container: '.mp4',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: 'No valid resolution selected, defaulting to 8KUHD.\n'
+ 'Video details: h264-720p \n'
+ ' 1280x720x25@8 bits.\n'
+ 'Video bitrate is 1206Kbps, overall is 1591Kbps. Calculated target is 1613Kbps.\n'
+ '☒H264 Resolution is 720p, bitrate was 1206Kbps. HEVC target bitrate will be 968Kbps.\n'
+ '☒Transcoding to HEVC.',
},
}, {
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH265_1.json')),
librarySettings: {},
inputs: {
ffmpegPreset: 'veryslow',
container: 'mkv',
},
otherArguments: {},
},
output: {
processFile: true,
preset: '-vsync 0 -hwaccel cuda -hwaccel_output_format cuda -c:v hevc_cuvid ,-map 0:v -map 0:a -map 0:s? -map -:d? -c copy -c:v:0 hevc_nvenc -preset veryslow -profile:v main10 -rc-lookahead 32 -spatial_aq:v 1 -aq-strength:v 8 -max_muxing_queue_size 4096 -b:v 3207442 -maxrate 4717440 -minrate 2540160 -bufsize 3628800 -map_metadata:g -1',
container: '.mkv',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: 'No valid resolution selected, defaulting to 8KUHD.\n'
+ 'Video details: hevc-1080p \n'
+ ' 1920x1080x25@8 bits.\n'
+ 'Video bitrate is NaNKbps, overall is 3207Kbps. Calculated target is 3629Kbps.\n'
+ '☒HEVC Bitrate for 1080p could not be determined, \n'
+ ' using sensible default of 3207Kbps.\n'
+ '☒Transcoding to HEVC.',
},
},
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH265_1.json')),
librarySettings: {},
inputs: {
maxResolution: '720p',
ffmpegPreset: 'veryslow',
container: 'mkv',
},
otherArguments: {},
},
output: {
processFile: true,
preset: '-vsync 0 -hwaccel cuda -hwaccel_output_format cuda -c:v hevc_cuvid -resize 1280x720 ,-map 0:v -map 0:a -map 0:s? -map -:d? -c copy -c:v:0 hevc_nvenc -preset veryslow -profile:v main10 -rc-lookahead 32 -spatial_aq:v 1 -aq-strength:v 8 -max_muxing_queue_size 4096 -b:v 1612800 -maxrate 2096640 -minrate 1128960 -bufsize 1612800 -map_metadata:g -1',
container: '.mkv',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: 'Resizing to 1280x720.\n'
+ 'Video details: hevc-1080p \n'
+ ' 1920x1080x25@8 bits.\n'
+ 'Video bitrate is NaNKbps, overall is 3207Kbps. Calculated target is 1613Kbps.\n'
+ '☒HEVC Bitrate for 1080p could not be determined, \n'
+ ' using sensible default of 1613Kbps.\n'
+ '☒Transcoding to HEVC.',
},
},
{
input: {
file: (() => {
// modify so no processing needed
const file = _.cloneDeep(require('../sampleData/media/sampleH264_2.json'));
file.ffProbeData.streams[0].codec_name = 'hevc';
return file;
})(),
librarySettings: {},
inputs: {
maxResolution: '1080p',
ffmpegPreset: 'veryslow',
container: 'mkv',
compressionFactor: '1',
},
otherArguments: {},
},
output: {
processFile: false,
preset: '-vsync 0 -hwaccel cuda -hwaccel_output_format cuda -c:v hevc_cuvid ,-map 0:v -map 0:a -map 0:s? -map -:d? -c copy -c:v:0 hevc_nvenc -preset veryslow -profile:v main10 -rc-lookahead 32 -spatial_aq:v 1 -aq-strength:v 8 -max_muxing_queue_size 4096 ',
container: '.mkv',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: 'Video details: hevc-1080p \n'
+ ' 1918x1080x25@8 bits.\n'
+ 'Video bitrate is 6454Kbps, overall is 8249Kbps. Calculated target is 51786Kbps.\n'
+ '☑HEVC Bitrate is within limits.\n',
},
},
];
run(tests);

View file

@ -1,75 +0,0 @@
/* eslint max-len: 0 */
const _ = require('lodash');
const run = require('../helpers/run');
const tests = [
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH264_1.json')),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
container: '.mkv',
FFmpegMode: true,
handBrakeMode: false,
infoLog: '☒ Removing audio track in language und\n'
+ '☒ *** All audio tracks would have been removed. Defaulting to keeping all tracks for this file.\n'
+ '☒ Transcoding to HEVC using NVidia NVENC\n'
+ '☑ No subtitle processing necessary',
processFile: true,
preset: ' -c:v h264_cuvid,-map 0 -map -0:d -c:v hevc_nvenc -qmin 0 -cq:v 30 -b:v 602k -maxrate:v 2602k -preset medium -rc-lookahead 32 -spatial_aq:v 1 -aq-strength:v 8 -c:a copy -c:s copy -max_muxing_queue_size 9999 -bf 5 -analyzeduration 2147483647 -probesize 2147483647',
reQueueAfter: true,
},
},
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH265_1.json')),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
container: '.mkv',
FFmpegMode: true,
handBrakeMode: false,
infoLog: '☑ File is in HEVC codec and in MKV\n'
+ '☑ No video processing necessary\n'
+ '☑ No subtitle processing necessary\n'
+ '☑ No need to process file',
processFile: false,
preset: ',-map 0 -map -0:d -c:v copy -c:a copy -c:s copy -max_muxing_queue_size 9999 -bf 5 -analyzeduration 2147483647 -probesize 2147483647',
reQueueAfter: true,
},
},
{
input: {
file: (() => {
const file = _.cloneDeep(require('../sampleData/media/sampleH264_1.json'));
file.ffProbeData.streams[0].bit_rate = undefined;
return file;
})(),
librarySettings: {},
inputs: {
target_bitrate_720p: '1500000',
},
otherArguments: {},
},
output: {
container: '.mkv',
FFmpegMode: true,
handBrakeMode: false,
infoLog: '☒ Removing audio track in language und\n'
+ '☒ *** All audio tracks would have been removed. Defaulting to keeping all tracks for this file.\n'
+ '☒ Transcoding to HEVC using NVidia NVENC\n'
+ '☑ No subtitle processing necessary',
processFile: true,
preset: ' -c:v h264_cuvid,-map 0 -map -0:d -c:v hevc_nvenc -qmin 0 -cq:v 30 -b:v 1500k -maxrate:v 3500k -preset medium -rc-lookahead 32 -spatial_aq:v 1 -aq-strength:v 8 -c:a copy -c:s copy -max_muxing_queue_size 9999 -bf 5 -analyzeduration 2147483647 -probesize 2147483647',
reQueueAfter: true,
},
},
];
run(tests);

View file

@ -1,107 +0,0 @@
/* eslint max-len: 0 */
const _ = require('lodash');
const run = require('../helpers/run');
const tests = [
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH264_1.json')),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
container: '.mkv',
processFile: true,
preset: ', -sn -map 0:v -c:v copy -b:v 758k -minrate 530k -maxrate 985k -bufsize 1517k -map 0:a -c:a copy ',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: 'Converting video, NOT resizing. 720p, h264 --> 720p, hevc. bitrate = 1517 --> 758, multiplier 0.5. \n'
+ 'Not converting audio. \n'
+ '2 channels - \n'
+ '6 channels - und aac \n'
+ '8 channels - ',
},
},
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH265_1.json')),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
container: '.mkv',
processFile: false,
preset: '',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: 'File is processed already, nothing to do',
},
},
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH264_2.json')),
librarySettings: {},
inputs: {
resize: 'true',
},
otherArguments: {},
},
output: {
container: '.mkv',
processFile: false,
preset: '',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: 'File is processed already, nothing to do',
},
},
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH264_2.json')),
librarySettings: {},
inputs: {
bitrate_cutoff: '6000',
},
otherArguments: {},
},
output: {
container: '.mkv',
processFile: true,
preset: ', -sn -map 0:v -c:v copy -b:v 3933k -minrate 2753k -maxrate 5112k -bufsize 7866k -map 0:a -c:a copy ',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: 'Converting video, NOT resizing. 1080p, h264 --> 1080p, hevc. bitrate = 7866 --> 3933, multiplier 0.5. \n'
+ 'Not converting audio. \n'
+ '2 channels - eng flac \n'
+ '6 channels - \n'
+ '8 channels - ',
},
},
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH264_2.json')),
librarySettings: {},
inputs: {
bitrate_cutoff: '8000',
},
otherArguments: {},
},
output: {
container: '.mkv',
processFile: false,
preset: '',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: 'File is processed already, nothing to do',
},
},
];
run(tests);

View file

@ -1,59 +0,0 @@
/* eslint max-len: 0 */
const _ = require('lodash');
const run = require('../helpers/run');
const tests = [
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH264_1.json')),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
preset: ', -map_metadata 0 -id3v2_version 3 -b:a 320k',
container: '.mp3',
handbrakeMode: false,
ffmpegMode: true,
processFile: false,
reQueueAfter: true,
infoLog: 'undefined☒Codec excluded \n ☑Codec not excluded \n',
},
},
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleAAC_1.json')),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
preset: ', -map_metadata 0 -id3v2_version 3 -b:a 320k',
container: '.mp3',
handbrakeMode: false,
ffmpegMode: true,
processFile: false,
reQueueAfter: true,
infoLog: 'undefined☒Codec excluded \n ☑Codec not excluded \n',
},
},
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleMP3_1.json')),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
preset: ', -map_metadata 0 -id3v2_version 3 -b:a 320k',
container: '.mp3',
handbrakeMode: false,
ffmpegMode: true,
processFile: false,
reQueueAfter: true,
infoLog: 'undefined☒Codec excluded \n ☒Codec excluded \n',
},
},
];
run(tests);

View file

@ -1,145 +0,0 @@
/* eslint max-len: 0 */
const _ = require('lodash');
const run = require('../helpers/run');
const tests = [
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH264_1.json')),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: true,
preset: '-c:v h264_cuvid, -map 0 -c:v hevc_nvenc -cq:v 19 -b:v 758k -minrate 530k -maxrate 985k -bufsize 1517k -spatial_aq:v 1 -rc-lookahead:v 32 -c:a copy -c:s copy -max_muxing_queue_size 9999 ',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: 'Container for output selected as mkv. \n'
+ 'Current bitrate = 1517 \n'
+ 'Bitrate settings: \n'
+ 'Target = 758 \n'
+ 'Minimum = 530 \n'
+ 'Maximum = 985 \n'
+ 'File is not hevc or vp9. Transcoding. \n',
container: '.mkv',
},
},
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH265_1.json')),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: false,
preset: '',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: 'File is already hevc or vp9 & in mkv. \n',
container: '.mkv',
},
},
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH264_1.json')),
librarySettings: {},
inputs: {
container: 'mp4',
enable_10bit: 'true',
force_conform: 'true',
},
otherArguments: {},
},
output: {
processFile: true,
preset: '-c:v h264_cuvid, -map 0 -c:v hevc_nvenc -cq:v 19 -b:v 758k -minrate 530k -maxrate 985k -bufsize 1517k -spatial_aq:v 1 -rc-lookahead:v 32 -c:a copy -c:s copy -max_muxing_queue_size 9999 -pix_fmt p010le ',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: 'Container for output selected as mp4. \n'
+ 'Current bitrate = 1517 \n'
+ 'Bitrate settings: \n'
+ 'Target = 758 \n'
+ 'Minimum = 530 \n'
+ 'Maximum = 985 \n'
+ 'File is not hevc or vp9. Transcoding. \n',
container: '.mp4',
},
},
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH264_1.json')),
librarySettings: {},
inputs: {
container: 'mp4',
enable_10bit: 'true',
force_conform: 'true',
bitrate_cutoff: '10000',
},
otherArguments: {},
},
output: {
processFile: false,
preset: '',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: 'Current bitrate is below set cutoff of 10000. Cancelling plugin. \n',
container: '.mp4',
},
},
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH264_1.json')),
librarySettings: {},
inputs: {
container: 'mp4',
enable_10bit: 'true',
force_conform: 'true',
bitrate_cutoff: '1000',
},
otherArguments: {},
},
output: {
processFile: true,
preset: '-c:v h264_cuvid, -map 0 -c:v hevc_nvenc -cq:v 19 -b:v 758k -minrate 530k -maxrate 985k -bufsize 1517k -spatial_aq:v 1 -rc-lookahead:v 32 -c:a copy -c:s copy -max_muxing_queue_size 9999 -pix_fmt p010le ',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: 'Container for output selected as mp4. \n'
+ 'Current bitrate = 1517 \n'
+ 'Bitrate settings: \n'
+ 'Target = 758 \n'
+ 'Minimum = 530 \n'
+ 'Maximum = 985 \n'
+ 'File is not hevc or vp9. Transcoding. \n',
container: '.mp4',
},
},
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH265_1.json')),
librarySettings: {},
inputs: {
container: 'mp4',
force_conform: 'false',
},
otherArguments: {},
},
output: {
processFile: true,
preset: ', -map 0 -c copy ',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: 'File is hevc or vp9 but is not in mp4 container. Remuxing. \n',
container: '.mp4',
},
},
];
run(tests);

View file

@ -1,145 +0,0 @@
/* eslint max-len: 0 */
const _ = require('lodash');
const run = require('../helpers/run');
const tests = [
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH264_1.json')),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: true,
preset: ',-map 0 -c:v libx265 -b:v 758k -minrate 530k -maxrate 985k -bufsize 1517k -c:a copy -c:s copy -max_muxing_queue_size 9999 ',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: 'Container for output selected as mkv. \n'
+ 'Current bitrate = 1517 \n'
+ 'Bitrate settings: \n'
+ 'Target = 758 \n'
+ 'Minimum = 530 \n'
+ 'Maximum = 985 \n'
+ 'File is not hevc or vp9. Transcoding. \n',
container: '.mkv',
},
},
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH265_1.json')),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: false,
preset: '',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: 'File is already hevc or vp9 & in mkv. \n',
container: '.mkv',
},
},
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH264_1.json')),
librarySettings: {},
inputs: {
container: 'mp4',
enable_10bit: 'true',
force_conform: 'true',
},
otherArguments: {},
},
output: {
processFile: true,
preset: ',-map 0 -c:v libx265 -b:v 758k -minrate 530k -maxrate 985k -bufsize 1517k -c:a copy -c:s copy -max_muxing_queue_size 9999 -pix_fmt p010le ',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: 'Container for output selected as mp4. \n'
+ 'Current bitrate = 1517 \n'
+ 'Bitrate settings: \n'
+ 'Target = 758 \n'
+ 'Minimum = 530 \n'
+ 'Maximum = 985 \n'
+ 'File is not hevc or vp9. Transcoding. \n',
container: '.mp4',
},
},
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH264_1.json')),
librarySettings: {},
inputs: {
container: 'mp4',
enable_10bit: 'true',
force_conform: 'true',
bitrate_cutoff: '10000',
},
otherArguments: {},
},
output: {
processFile: false,
preset: '',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: 'Current bitrate is below set bitrate cutoff of 10000. Nothing to do, cancelling plugin. \n',
container: '.mp4',
},
},
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH264_1.json')),
librarySettings: {},
inputs: {
container: 'mp4',
enable_10bit: 'true',
force_conform: 'true',
bitrate_cutoff: '1000',
},
otherArguments: {},
},
output: {
processFile: true,
preset: ',-map 0 -c:v libx265 -b:v 758k -minrate 530k -maxrate 985k -bufsize 1517k -c:a copy -c:s copy -max_muxing_queue_size 9999 -pix_fmt p010le ',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: 'Container for output selected as mp4. \n'
+ 'Current bitrate = 1517 \n'
+ 'Bitrate settings: \n'
+ 'Target = 758 \n'
+ 'Minimum = 530 \n'
+ 'Maximum = 985 \n'
+ 'File is not hevc or vp9. Transcoding. \n',
container: '.mp4',
},
},
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH265_1.json')),
librarySettings: {},
inputs: {
container: 'mp4',
force_conform: 'false',
},
otherArguments: {},
},
output: {
processFile: true,
preset: ', -map 0 -c copy ',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: 'File is hevc or vp9 but is not in mp4 container. Remuxing. \n',
container: '.mp4',
},
},
];
run(tests);

View file

@ -1,45 +0,0 @@
/* eslint max-len: 0 */
const _ = require('lodash');
const run = require('../helpers/run');
const tests = [
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH264_1.json')),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: true,
preset: ', -map 0 -c copy -max_muxing_queue_size 9999 ',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: '☒File is mp4 but requested to be mkv container. Remuxing. \n',
container: '.mkv',
},
},
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH264_1.json')),
librarySettings: {},
inputs: {
container: 'mp4',
force_conform: 'true',
},
otherArguments: {},
},
output: {
processFile: false,
preset: '',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: '☑File is already in mp4 container. \n',
container: '.mp4',
},
},
];
run(tests);

View file

@ -1,46 +0,0 @@
/* eslint max-len: 0 */
const _ = require('lodash');
const run = require('../helpers/run');
const tests = [
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH264_1.json')),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: true,
preset: ', -metadata title= -c copy -map 0 -max_muxing_queue_size 9999',
container: '.mp4',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: '☒File has title metadata. Removing \n',
},
},
{
input: {
file: (() => {
const file = _.cloneDeep(require('../sampleData/media/sampleH264_1.json'));
file.meta.Title = undefined;
return file;
})(),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: false,
preset: '',
container: '.mp4',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: false,
infoLog: '☑File has no title metadata \n',
},
},
];
run(tests);

View file

@ -1,98 +0,0 @@
/* eslint max-len: 0 */
const _ = require('lodash');
const run = require('../helpers/run');
const tests = [
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH264_1.json')),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: false,
preset: '',
container: '.mp4',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: false,
infoLog: "☑File doesn't contain audio tracks which are unwanted or that require tagging.\n",
},
},
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH264_2.json')),
librarySettings: {},
inputs: {
language: 'eng',
},
otherArguments: {},
},
output: {
processFile: true,
preset: ', -map 0 -map -0:a:3 -c copy -max_muxing_queue_size 9999',
container: '.mkv',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: '☒Audio stream 0:a:3 has unwanted language tag fre, removing. \n',
},
},
{
input: {
file: (() => {
const file = _.cloneDeep(require('../sampleData/media/sampleH264_2.json'));
file.ffProbeData.streams[3].tags.title = 'description';
return file;
})(),
librarySettings: {},
inputs: {
language: 'eng',
commentary: 'true',
},
otherArguments: {},
},
output: {
processFile: true,
preset: ', -map 0 -map -0:a:2 -map -0:a:3 -c copy -max_muxing_queue_size 9999',
container: '.mkv',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: '☒Audio stream 0:a:2 detected as being descriptive, removing. \n'
+ '☒Audio stream 0:a:3 has unwanted language tag fre, removing. \n',
},
},
{
input: {
file: (() => {
const file = _.cloneDeep(require('../sampleData/media/sampleH264_2.json'));
file.ffProbeData.streams[2].tags.title = 'description';
file.ffProbeData.streams[3].tags.language = 'und';
return file;
})(),
librarySettings: {},
inputs: {
language: 'eng',
commentary: 'true',
tag_language: 'eng',
},
otherArguments: {},
},
output: {
processFile: true,
preset: ', -map 0 -map -0:a:1 -map -0:a:2 -metadata:s:a:2 language=eng -map -0:a:3 -c copy -max_muxing_queue_size 9999',
container: '.mkv',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: '☒Audio stream 0:a:1 detected as being descriptive, removing. \n'
+ '☒Audio stream 0:a:2 has unwanted language tag und, removing. \n'
+ '☒Audio stream 0:a:2 detected as having no language, tagging as eng. \n'
+ '☒Audio stream 0:a:3 has unwanted language tag fre, removing. \n',
},
},
];
run(tests);

View file

@ -1,72 +0,0 @@
/* eslint max-len: 0 */
const _ = require('lodash');
const run = require('../helpers/run');
const tests = [
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH264_1.json')),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: false,
preset: '',
container: '.mp4',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: false,
infoLog: "☑File doesn't contain subtitle tracks which are unwanted or that require tagging.\n",
},
},
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH264_2.json')),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: true,
preset: ', -map 0 -map -0:s:0 -c copy -max_muxing_queue_size 9999',
container: '.mkv',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: '☒Subtitle stream 0:s:0 has unwanted language tag fre, removing. \n',
},
},
{
input: {
file: (() => {
const file = _.cloneDeep(require('../sampleData/media/sampleH264_2.json'));
file.ffProbeData.streams[7] = _.cloneDeep(file.ffProbeData.streams[6]);
file.ffProbeData.streams[6].tags.title = 'description';
file.ffProbeData.streams[7].tags.language = 'und';
return file;
})(),
librarySettings: {},
inputs: {
language: 'eng,und',
commentary: 'true',
tag_language: 'eng',
},
otherArguments: {},
},
output: {
processFile: true,
preset: ', -map 0 -map -0:s:0 -map -0:s:0 -metadata:s:s:1 language=eng -c copy -max_muxing_queue_size 9999',
container: '.mkv',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: '☒Subtitle stream 0:s:0 has unwanted language tag fre, removing. \n'
+ '☒Subtitle stream 0:s:0 detected as being descriptive, removing. \n'
+ '☒Subtitle stream 0:s:1 has no language, tagging as eng. \n',
},
},
];
run(tests);

View file

@ -1,90 +0,0 @@
/* eslint max-len: 0 */
const _ = require('lodash');
const run = require('../helpers/run');
const tests = [
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH264_1.json')),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: false,
container: '.mp4',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: '☒Plugin has not been configured, please configure required options. Skipping this plugin. \n',
},
},
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH264_1.json')),
librarySettings: {},
inputs: {
aac_stereo: 'true',
},
otherArguments: {},
},
output: {
processFile: false,
container: '.mp4',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: '☑File contains all required audio formats. \n',
},
},
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH264_2.json')),
librarySettings: {},
inputs: {
aac_stereo: 'true',
},
otherArguments: {},
},
output: {
processFile: true,
container: '.mkv',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: '☒Audio track is 2 channel but is not AAC. Converting. \n'
+ '☒Audio track is 2 channel but is not AAC. Converting. \n'
+ '☒Audio track is 2 channel but is not AAC. Converting. \n',
preset: ', -map 0 -c:v copy -c:a copy -c:a:0 aac -c:a:1 aac -c:a:2 aac -strict -2 -c:s copy -max_muxing_queue_size 9999 ',
},
},
{
input: {
file: (() => {
const file = _.cloneDeep(require('../sampleData/media/sampleH264_2.json'));
file.ffProbeData.streams[1].channels = 8;
return file;
})(),
librarySettings: {},
inputs: {
aac_stereo: 'false',
downmix: 'true',
},
otherArguments: {},
},
output: {
processFile: true,
container: '.mkv',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: '☒Audio track is 8 channel, no 6 channel exists. Creating 6 channel from 8 channel. \n',
preset: ', -map 0 -c:v copy -c:a copy -map 0:1 -c:a:0 ac3 -ac 6 -metadata:s:a:0 title="5.1" -strict -2 -c:s copy -max_muxing_queue_size 9999 ',
},
},
];
run(tests);

View file

@ -1,103 +0,0 @@
/* eslint max-len: 0 */
const _ = require('lodash');
const run = require('../helpers/run');
const tests = [
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH264_1.json')),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: false,
preset: '',
container: '.mp4',
handBrakeMode: false,
FFmpegMode: true,
infoLog: '☑ Streams are in expected order. \n ',
},
},
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH264_2.json')),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: false,
preset: '',
container: '.mkv',
handBrakeMode: false,
FFmpegMode: true,
infoLog: '☑ Streams are in expected order. \n ',
},
},
{
input: {
file: (() => {
const file = _.cloneDeep(require('../sampleData/media/sampleH264_2.json'));
file.ffProbeData.streams[1].channels = 8;
file.ffProbeData.streams[2].channels = 6;
return file;
})(),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: true,
preset: ',-map 0:0 -map 0:3 -map 0:4 -map 0:5 -map 0:2 -map 0:1 -map 0:6 -c copy -max_muxing_queue_size 9999',
container: '.mkv',
handBrakeMode: false,
FFmpegMode: true,
infoLog: '☒ Audio 6ch not second. \n'
+ '☒ Audio 2ch not first. \n'
+ '☒ Audio 2ch not first. \n'
+ '☒ Audio 2ch not first. \n'
+ '☒ Streams are out of order, reorganizing streams. Video, Audio, Subtitles. \n',
reQueueAfter: true,
},
},
{
input: {
file: (() => {
const file = _.cloneDeep(require('../sampleData/media/sampleH264_2.json'));
file.ffProbeData.streams[1].channels = 8;
file.ffProbeData.streams[2].channels = 6;
const video = file.ffProbeData.streams.splice(0, 1)[0];
file.ffProbeData.streams.push(video);
const subs = file.ffProbeData.streams.splice(5, 1)[0];
file.ffProbeData.streams.unshift(subs);
return file;
})(),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: true,
preset: ',-map 0:6 -map 0:3 -map 0:4 -map 0:5 -map 0:2 -map 0:1 -map 0:0 -c copy -max_muxing_queue_size 9999',
container: '.mkv',
handBrakeMode: false,
FFmpegMode: true,
infoLog: '☒ Audio not second. \n'
+ '☒ Audio not second. \n'
+ '☒ Audio 6ch not second. \n'
+ '☒ Audio not second. \n'
+ '☒ Audio 2ch not first. \n'
+ '☒ Audio not second. \n'
+ '☒ Audio 2ch not first. \n'
+ '☒ Audio not second. \n'
+ '☒ Audio 2ch not first. \n'
+ '☒ Video not first. \n'
+ '☒ Streams are out of order, reorganizing streams. Video, Audio, Subtitles. \n',
reQueueAfter: true,
},
},
];
run(tests);

View file

@ -1,46 +0,0 @@
/* eslint max-len: 0 */
const _ = require('lodash');
const run = require('../helpers/run');
const tests = [
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH264_1.json')),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: false,
preset: '',
handBrakeMode: false,
container: '.mp4',
FFmpegMode: true,
reQueueAfter: true,
infoLog: "☑File doesn't contain any unwanted image format streams.\n",
},
},
{
input: {
file: (() => {
const file = _.cloneDeep(require('../sampleData/media/sampleH264_2.json'));
file.ffProbeData.streams[0].codec_name = 'mjpeg';
return file;
})(),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: true,
preset: ',-map 0 -c copy -max_muxing_queue_size 9999 -map -v:0 ',
handBrakeMode: false,
container: '.mkv',
FFmpegMode: true,
reQueueAfter: true,
infoLog: '☒File has image format stream, removing. \n',
},
},
];
run(tests);

View file

@ -1,47 +0,0 @@
/* eslint max-len: 0 */
const _ = require('lodash');
const run = require('../helpers/run');
const tests = [
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH264_1.json')),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: false,
preset: '',
container: '.mp4',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: false,
infoLog: "☑File doesn't contain subtitle or audio codecs which were unwanted or that require tagging.\n",
},
},
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH264_2.json')),
librarySettings: {},
inputs: {
tag_subtitle_codecs: 'subrip',
tag_audio_codecs: 'aac',
},
otherArguments: {},
},
output: {
processFile: true,
preset: ', -map 0 -map -0:a:3 -map -0:a:4 -map -0:s:0 -c copy -max_muxing_queue_size 4096',
container: '.mkv',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: '☒audio stream detected as unwanted. removing audio stream 0:a:3 - Français E-AC3 2.0 - aac \n'
+ '☒audio stream detected as unwanted. removing audio stream 0:a:4 - Anglais E-AC3 2.0 - aac \n'
+ '☒Subtitle stream detected as unwanted. removing subtitle stream 0:s:0 - Français - subrip. \n',
},
},
];
run(tests);

View file

@ -1,107 +0,0 @@
/* eslint max-len: 0 */
const _ = require('lodash');
const run = require('../helpers/run');
const tests = [
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH264_1.json')),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: true,
preset: ' -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format vaapi ,-map 0:v -map 0:a -map 0:s? -map 0:d? -map 0:t? -c copy -c:v:0 hevc_vaapi -b:v 758k -minrate 530k -maxrate 985k -bufsize 1M -max_muxing_queue_size 1024 ',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: false,
infoLog: '☒ Video stream 0 is not HEVC, transcode required.\n'
+ ' ☑ Stream analysis complete, processing required.\n'
+ ' ',
container: 'mp4',
},
},
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH265_1.json')),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: false,
preset: '',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: false,
infoLog: '☑ Stream analysis complete, no processing required.\n',
},
},
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH264_1.json')),
librarySettings: {},
inputs: {
minBitrate: '4000',
},
otherArguments: {},
},
output: {
processFile: true,
preset: ' -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format vaapi ,-map 0:v -map 0:a -map 0:s? -map 0:d? -map 0:t? -c copy ',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: false,
infoLog: "☒ Input file's bitrate 1517 is lower than the minimum bitrate threshold of 4000. Skipping this plugin.\n"
+ '☑ Stream analysis complete, processing required.\n'
+ ' ',
container: 'mp4',
},
},
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH264_1.json')),
librarySettings: {},
inputs: {
remuxOnly: 'true',
},
otherArguments: {},
},
output: {
processFile: false,
preset: '',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: false,
infoLog: '☒ RemuxOnly is enabled and file is not a remux. Unable to process.\n',
},
},
{
input: {
file: (() => {
const file = _.cloneDeep(require('../sampleData/media/sampleH264_2.json'));
file.file = `remux ${file.file}`;
return file;
})(),
librarySettings: {},
inputs: {
remuxOnly: 'true',
},
otherArguments: {},
},
output: {
processFile: true,
preset: ' -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format vaapi ,-map 0:v -map 0:a -map 0:s? -map 0:d? -map 0:t? -c copy -c:v:0 hevc_vaapi -b:v 3933k -minrate 2753k -maxrate 5112k -bufsize 1M -max_muxing_queue_size 1024 ',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: false,
infoLog: '☒ Video stream 0 is not HEVC, transcode required.\n'
+ ' ☑ Stream analysis complete, processing required.\n'
+ ' ',
container: 'mkv',
},
},
];
run(tests);

View file

@ -1,42 +0,0 @@
/* eslint max-len: 0 */
const _ = require('lodash');
const run = require('../helpers/run');
const tests = [
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH264_1.json')),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: true,
preset: ',-map_metadata -1 -map 0 -c copy',
container: '.mp4',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: '☒File has title metadata \n',
},
},
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH265_1.json')),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: false,
preset: '',
container: '.mp4',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: false,
infoLog: '☑File has no title metadata \n☑File meets conditions! \n',
},
},
];
run(tests);

View file

@ -1,66 +0,0 @@
/* eslint max-len: 0 */
const _ = require('lodash');
const run = require('../helpers/run');
const tests = [
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH264_1.json')),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: true,
preset: ',-map_metadata -1 -map 0 -c copy',
container: '.mp4',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: '☑File is already in h264! \n☑File has no subs \n☒File has title metadata \n',
},
},
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH265_1.json')),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: true,
preset: '-Z "Very Fast 1080p30"',
container: '.mp4',
handBrakeMode: true,
FFmpegMode: false,
reQueueAfter: true,
infoLog: '☒File is not in h264! \n',
},
},
{
input: {
file: (() => {
const file = _.cloneDeep(require('../sampleData/media/sampleH264_1.json'));
file.meta.Title = undefined;
return file;
})(),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: false,
preset: '',
container: '.mp4',
handBrakeMode: false,
FFmpegMode: false,
reQueueAfter: false,
infoLog: '☑File is already in h264! \n'
+ '☑File has no subs \n'
+ '☑File has no title metadata☑File has aac track \n'
+ '☑File meets conditions! \n',
},
},
];
run(tests);

View file

@ -1,66 +0,0 @@
/* eslint max-len: 0 */
const _ = require('lodash');
const run = require('../helpers/run');
const tests = [
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH264_1.json')),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: true,
preset: ',-map_metadata -1 -map 0 -c copy',
container: '.mp4',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: '☑File is already in h264! \n☑File has no subs \n☒File has title metadata \n',
},
},
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH265_1.json')),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: true,
preset: '-Z "Fast 1080p30"',
container: '.mp4',
handBrakeMode: true,
FFmpegMode: false,
reQueueAfter: true,
infoLog: '☒File is not in h264! \n',
},
},
{
input: {
file: (() => {
const file = _.cloneDeep(require('../sampleData/media/sampleH264_1.json'));
file.meta.Title = undefined;
return file;
})(),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: false,
preset: '',
container: '.mp4',
handBrakeMode: false,
FFmpegMode: false,
reQueueAfter: false,
infoLog: '☑File is already in h264! \n'
+ '☑File has no subs \n'
+ '☑File has no title metadata☑File has aac track \n'
+ '☑File meets conditions! \n',
},
},
];
run(tests);

View file

@ -1,45 +0,0 @@
/* eslint max-len: 0 */
const run = require('../helpers/run');
const tests = [
{
input: {
file: require('../sampleData/media/sampleH264_1.json'),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: false,
preset: '',
container: '.mp4',
handBrakeMode: false,
FFmpegMode: false,
reQueueAfter: false,
infoLog: '☑ File does not have any streams that need to be transcoded! \n',
},
},
{
input: {
file: require('../sampleData/media/sampleH264_1.json'),
librarySettings: {},
inputs: {
codecs_to_transcode: 'aac',
codec: 'eac3',
bitrate: '640k',
},
otherArguments: {},
},
output: {
processFile: true,
preset: ', -c copy -map 0:v -map 0:1 -c:1 eac3 -b:a 640k -map 0:s? -map 0:d? -max_muxing_queue_size 9999',
container: '.mp4',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: "☒ File has streams which aren't in desired codec! \n",
},
},
];
run(tests);

View file

@ -1,68 +0,0 @@
/* eslint max-len: 0 */
const _ = require('lodash');
const run = require('../helpers/run');
const tests = [
{
input: {
file: require('../sampleData/media/sampleH264_1.json'),
librarySettings: {},
inputs: {},
otherArguments: {
originalLibraryFile: require('../sampleData/media/sampleH264_1.json'),
},
},
output: {
processFile: false,
preset: '',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: 'New file has size 1.008 MB which is 100% of original file size: 1.008 MB',
},
},
{
input: {
file: require('../sampleData/media/sampleH264_1.json'),
librarySettings: {},
inputs: {
upperBound: '110',
lowerBound: '35',
},
otherArguments: {
originalLibraryFile: (() => {
const file = _.cloneDeep(require('../sampleData/media/sampleH264_1.json'));
file.file_size = 3;
return file;
})(),
},
},
output: 'New file size not within limits. New file has size 1.008 MB which is 33% of original file size: 3.000 MB. lowerBound is 35%',
error: {
shouldThrow: true,
},
},
{
input: {
file: require('../sampleData/media/sampleH264_1.json'),
librarySettings: {},
inputs: {
upperBound: '120',
lowerBound: '35',
},
otherArguments: {
originalLibraryFile: (() => {
const file = _.cloneDeep(require('../sampleData/media/sampleH264_1.json'));
file.file_size = 0.1;
return file;
})(),
},
},
output: 'New file size not within limits. New file has size 1.008 MB which is 1007% of original file size: 0.100 MB. upperBound is 120%',
error: {
shouldThrow: true,
},
},
];
run(tests);

View file

@ -1,45 +0,0 @@
/* eslint max-len: 0 */
const _ = require('lodash');
const run = require('../helpers/run');
const tests = [
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH264_1.json')),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: true,
preset: ', -map 0 -c copy -c:v:0 libx265 -preset:v slow -pix_fmt yuv420p10le -x265-params "crf=22:aq-mode=3"',
container: '.mkv',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: '☒File is not in hevc! \n',
},
},
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH265_1.json')),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: false,
preset: '',
container: '.mp4',
handBrakeMode: false,
FFmpegMode: false,
reQueueAfter: false,
infoLog: '☑File is already in hevc! \n'
+ '☑ All audio streams are in aac! \n'
+ '☑File has no title metadata \n'
+ '☑File meets conditions! \n',
},
},
];
run(tests);

View file

@ -1,59 +0,0 @@
/* eslint max-len: 0 */
const _ = require('lodash');
const run = require('../helpers/run');
const tests = [
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH264_1.json')),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: true,
preset: ',-map 0 -c:v copy -c:a copy -c:a:0 ac3 -c:s copy -c:d copy',
container: '.mp4',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: '☒ File has surround audio which is NOT in ac3! \n',
},
},
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH264_2.json')),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: false,
preset: '',
container: '.mp4',
handBrakeMode: false,
FFmpegMode: false,
reQueueAfter: false,
infoLog: '☑ All surround audio streams are in ac3! \n☑File meets conditions! \n',
},
},
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH265_1.json')),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: false,
preset: '',
container: '.mp4',
handBrakeMode: false,
FFmpegMode: false,
reQueueAfter: false,
infoLog: '☑ All surround audio streams are in ac3! \n☑File meets conditions! \n',
},
},
];
run(tests);

View file

@ -1,86 +0,0 @@
/* eslint max-len: 0 */
const _ = require('lodash');
const run = require('../helpers/run');
const tests = [
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH264_1.json')),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: true,
preset: '-fflags +genpts -hwaccel qsv -c:v h264_qsv<io> -map 0 -c:v hevc_qsv -b:v 759k -minrate 569k -maxrate 949k -bufsize 1517k -preset slow \n'
+ ' -c:a copy -c:s copy -max_muxing_queue_size 9999 ',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: '☑ It looks like the current bitrate is 1517k. \n'
+ '\n'
+ 'Container for output selected as mkv. \n'
+ 'Encode variable bitrate settings: \n'
+ 'Target = 759k \n'
+ 'Minimum = 569k \n'
+ 'Maximum = 949k \n'
+ 'File Transcoding... \n',
container: '.mkv',
},
},
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH264_1.json')),
librarySettings: {},
inputs: {
container: 'mp4',
encoder_speedpreset: 'fast',
enable_10bit: 'true',
},
otherArguments: {},
},
output: {
processFile: true,
preset: '-fflags +genpts -hwaccel qsv<io> -map 0 -c:v hevc_qsv -b:v 759k -minrate 569k -maxrate 949k -bufsize 1517k -preset fast \n'
+ ' -c:a copy -c:s copy -max_muxing_queue_size 9999 -profile:v main10 -pix_fmt p010le ',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: '☑ It looks like the current bitrate is 1517k. \n'
+ '10 bit encode enabled. Setting Main10 Profile & 10 bit pixel format \n'
+ '\n'
+ 'Container for output selected as mp4. \n'
+ 'Encode variable bitrate settings: \n'
+ 'Target = 759k \n'
+ 'Minimum = 569k \n'
+ 'Maximum = 949k \n'
+ 'File Transcoding... \n',
container: '.mp4',
},
},
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH264_1.json')),
librarySettings: {},
inputs: {
container: 'mp4',
encoder_speedpreset: 'fast',
enable_10bit: 'true',
bitrate_cutoff: '2000',
},
otherArguments: {},
},
output: {
processFile: false,
preset: '',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: '☑ It looks like the current bitrate is 1517k. \n'
+ '☑ Current bitrate is below set cutoff of 2000k. Cancelling plugin. \n',
container: '.mp4',
},
},
];
run(tests);

View file

@ -1,49 +0,0 @@
/* eslint max-len: 0 */
const _ = require('lodash');
const run = require('../helpers/run');
const tests = [
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH264_1.json')),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: false,
preset: '',
container: '.mp4',
handBrakeMode: false,
FFmpegMode: true,
infoLog: '☑ No 2 channel audio stream exists. \n ',
},
},
{
input: {
file: (() => {
const file = _.cloneDeep(require('../sampleData/media/sampleH264_2.json'));
file.ffProbeData.streams[1].channels = 6;
return file;
})(),
librarySettings: {},
inputs: {
channels: '6',
},
otherArguments: {},
},
output: {
processFile: true,
preset: ',-map 0 -c copy -disposition:1 default -disposition:2 0 -disposition:3 0 -disposition:4 0 -disposition:5 0 ',
container: '.mkv',
handBrakeMode: false,
FFmpegMode: true,
infoLog: '☒ Matching audio stream is not set to default. \n'
+ '☒ Setting 6 channel matching audio stream to default. Remove default from all other audio streams \n',
reQueueAfter: true,
},
},
];
run(tests);

View file

@ -1,50 +0,0 @@
/* eslint max-len: 0 */
const _ = require('lodash');
const run = require('../helpers/run');
const tests = [
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH264_1.json')),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: true,
preset: '-c:v h264_cuvid,-map 0 -dn -c:v hevc_nvenc -pix_fmt p010le -qmin 0 -cq:v 30 -b:v 964k -maxrate:v 2964k -preset slow -rc-lookahead 32 -spatial_aq:v 1 -aq-strength:v 8 -a53cc 0 -c:a copy -c:s copy',
container: '.mkv',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: '☑File is a video! \n'
+ '☒File is 720p!\n'
+ '☒File is not hevc!\n'
+ '☒File bitrate is 1205kb!\n'
+ 'File bitrate is LOWER than the Default Target Bitrate!\n'
+ '☒Target Bitrate set to 964kb!\n'
+ 'File is being transcoded!\n',
maxmux: false,
},
},
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH265_1.json')),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: false,
preset: '',
container: '.mkv',
handBrakeMode: false,
FFmpegMode: false,
reQueueAfter: true,
infoLog: '☑File is a video! \n☑File is already in hevc! \n',
maxmux: false,
},
},
];
run(tests);

View file

@ -1,47 +0,0 @@
/* eslint max-len: 0 */
const _ = require('lodash');
const run = require('../helpers/run');
const tests = [
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH264_1.json')),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: false,
preset: '',
container: '.mp4',
handBrakeMode: false,
FFmpegMode: false,
reQueueAfter: true,
infoLog: '☑File is a video Without Mjpeg! \n',
},
},
{
input: {
file: (() => {
const file = _.cloneDeep(require('../sampleData/media/sampleH264_1.json'));
file.ffProbeData.streams[0].codec_name = 'mjpeg';
return file;
})(),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: false,
preset: ',-map 0 -map -0:v:1 -c:v copy -c:a copy -c:s copy',
container: '.mp4',
handBrakeMode: false,
FFmpegMode: false,
reQueueAfter: true,
infoLog: '☒File is not a video but has Mjpeg Stream! \n'
+ '☑File is a video With Mjpeg! \n',
},
},
];
run(tests);

View file

@ -1,62 +0,0 @@
/* eslint max-len: 0 */
const _ = require('lodash');
const run = require('../helpers/run');
const tests = [
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH264_1.json')),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: true,
preset: ', -map_metadata -1 -map 0:v -map 0:a -c:v copy -c:a copy -c:s mov_text',
container: '.mp4',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: '☑ File is already in h264!\n☒ File has title metadata\n',
},
},
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH265_1.json')),
librarySettings: {},
inputs: {
},
otherArguments: {},
},
output: {
processFile: true,
preset: ', -map_metadata -1 -map 0:V -map 0:a -c:v libx264 -preset medium -c:a aac -strict -2 -c:s mov_text',
container: '.mp4',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: '☒ File is not in h264!\n',
},
},
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH265_1.json')),
librarySettings: {},
inputs: {
FFmpeg_preset: 'fast',
},
otherArguments: {},
},
output: {
processFile: true,
preset: ', -map_metadata -1 -map 0:V -map 0:a -c:v libx264 -preset fast -c:a aac -strict -2 -c:s mov_text',
container: '.mp4',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: '☒ File is not in h264!\n',
},
},
];
run(tests);

View file

@ -1,110 +0,0 @@
/* eslint max-len: 0 */
const _ = require('lodash');
const run = require('../helpers/run');
const tests = [
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH264_1.json')),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
container: '.mkv',
FFmpegMode: true,
handBrakeMode: false,
infoLog: '☒ Will convert multi channel audio to AC3\n'
+ '☒ Transcoding to HEVC (software)\n'
+ 'Encoder configuration:\n'
+ '• Original Bitrate: 1517\n'
+ '• Target Bitrate: 1517\n'
+ '• Minimum Bitrate: 1061\n'
+ '• Maximum Bitrate: 1972\n'
+ '\n'
+ '☑ No subtitle processing necessary',
processFile: true,
preset: ',-map 0 -map -0:d -c:v libx265 -b:v 1517k -minrate 1061k -maxrate 1972k -bufsize 1517k -c:a copy -c:a:0 ac3 -c:s copy -max_muxing_queue_size 4096',
reQueueAfter: false,
},
},
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH264_1.json')),
librarySettings: {},
inputs: {
nvenc: 'true',
},
otherArguments: {},
},
output: {
container: '.mkv',
FFmpegMode: true,
handBrakeMode: false,
infoLog: '☒ Will convert multi channel audio to AC3\n'
+ '☒ Transcoding to HEVC using NVidia NVENC\n'
+ 'Encoder configuration:\n'
+ '• Original Bitrate: 1517\n'
+ '• Target Bitrate: 1517\n'
+ '• Minimum Bitrate: 1061\n'
+ '• Maximum Bitrate: 1972\n'
+ '\n'
+ '☑ No subtitle processing necessary',
processFile: true,
preset: '-c:v h264_cuvid,-map 0 -map -0:d -c:v hevc_nvenc -cq:v 19 -b:v 1517k -minrate 1061k -maxrate 1972k -bufsize 1517k -spatial_aq:v 1 -rc-lookahead:v 32 -c:a copy -c:a:0 ac3 -c:s copy -max_muxing_queue_size 4096',
reQueueAfter: false,
},
},
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH264_1.json')),
librarySettings: {},
inputs: {
nvenc: 'false',
qsv: 'true',
},
otherArguments: {},
},
output: {
container: '.mkv',
FFmpegMode: true,
handBrakeMode: false,
infoLog: '☒ Will convert multi channel audio to AC3\n'
+ '☒ Transcoding to HEVC using VAAPI\n'
+ 'Encoder configuration:\n'
+ '• Original Bitrate: 1517\n'
+ '• Target Bitrate: 1517\n'
+ '• Minimum Bitrate: 1061\n'
+ '• Maximum Bitrate: 1972\n'
+ '\n'
+ '☑ No subtitle processing necessary',
processFile: true,
preset: '-hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format vaapi,-map 0 -map -0:d -c:v hevc_vaapi -b:v 1517k -minrate 1061k -maxrate 1972k -bufsize 1517k -c:a copy -c:a:0 ac3 -c:s copy -max_muxing_queue_size 4096',
reQueueAfter: false,
},
},
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH265_1.json')),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
container: '.mkv',
FFmpegMode: true,
handBrakeMode: false,
infoLog: '☑ No multi channel audio found\n'
+ '☑ No audio processing necessary\n'
+ '☑ File is in HEVC codec and in MKV\n'
+ '☑ No video processing necessary\n'
+ '☑ No subtitle processing necessary\n'
+ '☑ No need to process file',
processFile: false,
preset: ',-map 0 -map -0:d -c:v copy -c:a copy -c:s copy -max_muxing_queue_size 4096',
reQueueAfter: false,
},
},
];
run(tests);

View file

@ -1,97 +0,0 @@
/* eslint max-len: 0 */
const _ = require('lodash');
const run = require('../helpers/run');
const tests = [
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH264_1.json')),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: true,
preset: '-Z "H.264 MKV 480p30"',
container: '.mkv',
handBrakeMode: true,
FFmpegMode: false,
reQueueAfter: true,
infoLog: '☒File is not h264 480p! \n',
},
},
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH265_1.json')),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: true,
preset: '-Z "H.264 MKV 480p30"',
container: '.mkv',
handBrakeMode: true,
FFmpegMode: false,
reQueueAfter: true,
infoLog: '☒File is not h264 480p! \n',
},
},
{
input: {
file: (() => {
const file = _.cloneDeep(require('../sampleData/media/sampleH264_1.json'));
file.ffProbeData.streams[0].width = 720;
file.ffProbeData.streams[0].height = 480;
return file;
})(),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: true,
preset: ',-map_metadata -1 -map 0 -c copy',
container: '.mkv',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: '☑File is h264 480p! \n'
+ '☑File has no title and has no subs \n'
+ '☒File has title metadata \n',
},
},
{
input: {
file: (() => {
const file = _.cloneDeep(require('../sampleData/media/sampleH264_1.json'));
file.ffProbeData.streams[0].width = 720;
file.ffProbeData.streams[0].height = 480;
file.meta.Title = undefined;
file.container = 'mkv';
return file;
})(),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: false,
preset: '',
container: '.mp4',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: false,
infoLog: '☑File is h264 480p! \n'
+ '☑File has no title and has no subs \n'
+ '☑File has no title metadata \n'
+ '☑File has no subs \n'
+ '☑File is in mkv container! \n'
+ '☑File meets conditions! \n',
},
},
];
run(tests);

View file

@ -1,99 +0,0 @@
/* eslint max-len: 0 */
const _ = require('lodash');
const run = require('../helpers/run');
const tests = [
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH264_1.json')),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: true,
preset: ',-map_metadata -1 -map 0 -c copy',
container: '.mkv',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: '☑File is h264 720p! \n'
+ '☑File has no title and has no subs \n'
+ '☒File has title metadata \n',
},
},
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH265_1.json')),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: true,
preset: '-Z "H.264 MKV 720p30"',
container: '.mkv',
handBrakeMode: true,
FFmpegMode: false,
reQueueAfter: true,
infoLog: '☒File is not h264 720p! \n',
},
},
{
input: {
file: (() => {
const file = _.cloneDeep(require('../sampleData/media/sampleH264_1.json'));
file.ffProbeData.streams[0].width = 1280;
file.ffProbeData.streams[0].height = 720;
return file;
})(),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: true,
preset: ',-map_metadata -1 -map 0 -c copy',
container: '.mkv',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: '☑File is h264 720p! \n'
+ '☑File has no title and has no subs \n'
+ '☒File has title metadata \n',
},
},
{
input: {
file: (() => {
const file = _.cloneDeep(require('../sampleData/media/sampleH264_1.json'));
file.ffProbeData.streams[0].width = 1280;
file.ffProbeData.streams[0].height = 720;
file.meta.Title = undefined;
file.container = 'mkv';
return file;
})(),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: false,
preset: '',
container: '.mp4',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: false,
infoLog: '☑File is h264 720p! \n'
+ '☑File has no title and has no subs \n'
+ '☑File has no title metadata \n'
+ '☑File has no subs \n'
+ '☑File is in mkv container! \n'
+ '☑File meets conditions! \n',
},
},
];
run(tests);

View file

@ -1,96 +0,0 @@
/* eslint max-len: 0 */
const _ = require('lodash');
const run = require('../helpers/run');
const tests = [
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH264_1.json')),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: true,
preset: ',-map_metadata -1 -map 0 -c copy',
container: '.mkv',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: '☑File is h264 1080p!☑File has no title and has no subs \n'
+ '☒File has title metadata \n',
},
},
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH265_1.json')),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: true,
preset: '-Z "H.264 MKV 1080p30"',
container: '.mkv',
handBrakeMode: true,
FFmpegMode: false,
reQueueAfter: true,
infoLog: '☒File is not h264 1080p! \n',
},
},
{
input: {
file: (() => {
const file = _.cloneDeep(require('../sampleData/media/sampleH264_1.json'));
file.ffProbeData.streams[0].width = 1920;
file.ffProbeData.streams[0].height = 1080;
return file;
})(),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: true,
preset: ',-map_metadata -1 -map 0 -c copy',
container: '.mkv',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: '☑File is h264 1080p!☑File has no title and has no subs \n'
+ '☒File has title metadata \n',
},
},
{
input: {
file: (() => {
const file = _.cloneDeep(require('../sampleData/media/sampleH264_1.json'));
file.ffProbeData.streams[0].width = 1920;
file.ffProbeData.streams[0].height = 1080;
file.meta.Title = undefined;
file.container = 'mkv';
return file;
})(),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: false,
preset: '',
container: '.mp4',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: false,
infoLog: '☑File is h264 1080p!☑File has no title and has no subs \n'
+ '☑File has no title metadata \n'
+ '☑File has no subs \n'
+ '☑File is in mkv container! \n'
+ '☑File meets conditions! \n',
},
},
];
run(tests);

View file

@ -1,94 +0,0 @@
/* eslint max-len: 0 */
const _ = require('lodash');
const run = require('../helpers/run');
const tests = [
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH264_1.json')),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: false,
preset: ', -map 0:v',
container: '.mkv',
handBrakeMode: false,
FFmpegMode: false,
reQueueAfter: false,
infoLog: 'Removing unwanted audio...\n'
+ 'Found unwanted: und: 1\n'
+ 'Found unwanted: und: 1\n'
+ 'No unwanted audio found!\n',
},
},
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH265_1.json')),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: false,
preset: ', -map 0:v -map 0:1',
container: '.mkv',
handBrakeMode: false,
FFmpegMode: false,
reQueueAfter: false,
infoLog: 'Removing unwanted audio...\nAdded undefined: 1\nNo unwanted audio found!\n',
},
},
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH264_2.json')),
librarySettings: {},
inputs: {
languages: 'fre',
container: 'mp4',
},
otherArguments: {},
},
output: {
processFile: true,
preset: ', -map 0:v -map 0:4 -map 0:s? -c copy',
container: 'mp4',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: 'Removing unwanted audio...\n'
+ 'Found wanted fre: 4\n'
+ 'Found unwanted audio\n'
+ 'It will be removed\n',
},
},
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH264_2.json')),
librarySettings: {},
inputs: {
languages: 'eng',
container: 'mp4',
},
otherArguments: {},
},
output: {
processFile: true,
preset: ', -map 0:v -map 0:1 -map 0:2 -map 0:3 -map 0:5 -map 0:s? -c copy',
container: 'mp4',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: 'Removing unwanted audio...\n'
+ 'Found wanted eng: 1\n'
+ 'Found wanted eng: 2\n'
+ 'Found wanted eng: 3\n'
+ 'Found wanted eng: 5\n'
+ 'Found unwanted audio\n'
+ 'It will be removed\n',
},
},
];
run(tests);

View file

@ -1,48 +0,0 @@
/* eslint max-len: 0 */
const _ = require('lodash');
const run = require('../helpers/run');
const tests = [
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH264_1.json')),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: false,
preset: '',
container: '.mp4',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: false,
infoLog: '☒File is not a 4K video \n',
},
},
{
input: {
file: (() => {
const file = _.cloneDeep(require('../sampleData/media/sampleH264_2.json'));
file.video_resolution = '4KUHD';
return file;
})(),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: true,
preset: ',-sn -map 0 -c copy',
container: '.mkv',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: '☑File does not have only AC3 track commentaries! \n'
+ '☑File has AC3 track! \n'
+ '☒File has subs! \n',
},
},
];
run(tests);

View file

@ -1,85 +0,0 @@
/* eslint max-len: 0 */
const _ = require('lodash');
const run = require('../helpers/run');
const tests = [
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH264_1.json')),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: false,
preset: ', -c copy -map 0:v ',
container: '.mp4',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: false,
infoLog: '☒File is not mkv \n',
},
},
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH264_2.json')),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: false,
preset: ', -c copy -map 0:v -map 0:a:0? -c:a:0 copy -map 0:a:1? -c:a:1 copy -map 0:a:2? -c:a:2 copy -map 0:a:3? -c:a:3 copy -map 0:a:4? -c:a:4 copy ',
container: '.mkv',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: false,
infoLog: "☑File doesn't contain audio tracks with the specified codec.\n",
},
},
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH264_2.json')),
librarySettings: {},
inputs: {
input_codecs: 'aac',
output_codec: 'eac3',
},
otherArguments: {},
},
output: {
processFile: true,
preset: ', -c copy -map 0:v -map 0:a:0? -c:a:0 copy -map 0:a:1? -c:a:1 copy -map 0:a:2? -c:a:2 copy -map 0:a:3? -c:a:3 copy -map 0:a:3? -c:a:4 eac3 -b:a:4 128k -metadata:s:a:4 title="" -metadata:s:a:4 copyright="henk_asac" -disposition:a:4 0 -map 0:a:4? -c:a:5 copy -map 0:a:4? -c:a:6 eac3 -b:a:6 128k -metadata:s:a:6 title="" -metadata:s:a:6 copyright="henk_asac" -disposition:a:6 0 -map 0:s? ',
container: '.mkv',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: '',
},
},
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH264_2.json')),
librarySettings: {},
inputs: {
input_codecs: 'aac',
output_codec: 'eac3',
bitrate: '256',
auto_adjust: 'false',
position_new_audio: 'before',
},
otherArguments: {},
},
output: {
processFile: true,
preset: ', -c copy -map 0:v -map 0:a:0? -c:a:0 copy -map 0:a:1? -c:a:1 copy -map 0:a:2? -c:a:2 copy -map 0:a:3? -c:a:3 eac3 -b:a:3 256k -metadata:s:a:3 title="" -metadata:s:a:3 copyright="henk_asac" -disposition:a:3 0 -map 0:a:3? -c:a:4 copy -map 0:a:4? -c:a:5 eac3 -b:a:5 256k -metadata:s:a:5 title="" -metadata:s:a:5 copyright="henk_asac" -disposition:a:5 0 -map 0:a:4? -c:a:6 copy -map 0:s? ',
container: '.mkv',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: '',
},
},
];
run(tests);

View file

@ -1,68 +0,0 @@
/* eslint max-len: 0 */
const _ = require('lodash');
const run = require('../helpers/run');
const tests = [
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH264_1.json')),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: true,
preset: ',-map_metadata -1 -c:v copy -c:a copy',
container: '.mp4',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: '☒File has title metadata \n',
},
},
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH265_1.json')),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: true,
preset: ', -c:v copy -c:a copy',
container: '.mp4',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: '☑File has no title metadata \n'
+ '☑File has no subs \n'
+ '☒File is not in mp4 container! \n',
},
},
{
input: {
file: (() => {
const file = _.cloneDeep(require('../sampleData/media/sampleH265_1.json'));
file.container = 'mp4';
return file;
})(),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: false,
preset: '',
container: '.mp4',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: false,
infoLog: '☑File has no title metadata \n'
+ '☑File has no subs \n'
+ '☑File is in mp4 container! \n'
+ '☑File meets conditions! \n',
},
},
];
run(tests);

View file

@ -1,66 +0,0 @@
/* eslint max-len: 0 */
const _ = require('lodash');
const run = require('../helpers/run');
const tests = [
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH264_1.json')),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: true,
preset: ',-map_metadata -1 -map 0 -c copy',
container: '.mp4',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: '☑File is in mp4 container! \n☒File has title metadata \n',
},
},
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH265_1.json')),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: true,
preset: ', -map 0 -c copy',
container: '.mp4',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: '☒File is not in mp4 container! \n',
},
},
{
input: {
file: (() => {
const file = _.cloneDeep(require('../sampleData/media/sampleH265_1.json'));
file.container = 'mp4';
return file;
})(),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: false,
preset: '',
container: '.mp4',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: false,
infoLog: '☑File is in mp4 container! \n'
+ '☑File has no title metadata \n'
+ '☑File has aac track \n'
+ '☑File meets conditions! \n',
},
},
];
run(tests);

View file

@ -1,42 +0,0 @@
/* eslint max-len: 0 */
const _ = require('lodash');
const run = require('../helpers/run');
const tests = [
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH264_1.json')),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: true,
preset: '-sn <io> -vcodec copy -scodec copy -acodec aac -filter:a "dynaudnorm,pan=stereo|FL < 1.0*FL + 0.707*FC + 0.707*BL|FR < 1.0*FR + 0.707*FC + 0.707*BR"',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: 'File matches requirements for processing. Downmixing and applying DRC!',
container: '.mp4',
},
},
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH264_2.json')),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: false,
preset: '',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: 'File has more than 1 audio track - not processing',
container: '.mkv',
},
},
];
run(tests);

View file

@ -1,50 +0,0 @@
/* eslint max-len: 0 */
const _ = require('lodash');
const run = require('../helpers/run');
const tests = [
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH264_1.json')),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: false,
preset: '',
container: '.mp4',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: false,
infoLog: 'File has video in first stream\n File meets conditions!\n',
},
},
{
input: {
file: (() => {
const file = _.cloneDeep(require('../sampleData/media/sampleH264_1.json'));
const audio = file.ffProbeData.streams[1];
// eslint-disable-next-line prefer-destructuring
file.ffProbeData.streams[1] = file.ffProbeData.streams[0];
file.ffProbeData.streams[0] = audio;
return file;
})(),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: true,
preset: ',-map 0:v? -map 0:a? -map 0:s? -map 0:d? -map 0:t? -c copy',
container: '.mp4',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: 'Video is not in the first stream',
},
},
];
run(tests);

Some files were not shown because too many files have changed in this diff Show more