mirror of
https://github.com/gabehf/Tdarr_Plugins.git
synced 2026-03-09 07:29:04 -07:00
Tdarr_Plugin_DOOM_NVENC_Tiered_MKV_CleanAll test
This commit is contained in:
parent
8a768ab63a
commit
96de8feba7
2 changed files with 80 additions and 1 deletions
|
|
@ -1,6 +1,5 @@
|
|||
/* eslint-disable */
|
||||
|
||||
// tdarrSkipTest
|
||||
const details = () => {
|
||||
return {
|
||||
id: "Tdarr_Plugin_DOOM_NVENC_Tiered_MKV_CleanAll",
|
||||
|
|
@ -441,10 +440,15 @@ function buildVideoConfiguration(inputs, file, logger) {
|
|||
/* Determine tiered bitrate variables */
|
||||
var tier = tiered[file.video_resolution];
|
||||
|
||||
console.log(file.video_resolution);
|
||||
console.log(tier);
|
||||
|
||||
bitratecheck = parseInt(tier["bitrate"]);
|
||||
if (bitrateprobe !== null && bitrateprobe < bitratecheck) {
|
||||
console.log('here1')
|
||||
bitratetarget = parseInt((bitrateprobe * inputs.target_pct_reduction) / 1000);
|
||||
} else {
|
||||
console.log('here2')
|
||||
bitratetarget = parseInt(tier["bitrate"] / 1000);
|
||||
}
|
||||
bitratemax = bitratetarget + tier["max_increase"];
|
||||
|
|
|
|||
|
|
@ -0,0 +1,75 @@
|
|||
/* 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);
|
||||
Loading…
Add table
Add a link
Reference in a new issue