Add Tdarr_Plugin_ER01_Transcode audio and video with HW (PC and Mac) test

make-only-subtitle-default
HaveAGitGat 4 years ago
parent 50beae72e4
commit ea5b34c849

@ -4,7 +4,6 @@
/* eslint no-bitwise: 0 */
/* eslint no-mixed-operators: 0 */
// tdarrSkipTest
const details = () => {
return {
id: 'Tdarr_Plugin_ER01_Transcode audio and video with HW (PC and Mac)',
@ -204,6 +203,7 @@ 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;
}

@ -0,0 +1,107 @@
/* 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 hevc_qsv -load_plugin hevc_hw -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 hevc_qsv -load_plugin hevc_hw -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);

@ -29,7 +29,7 @@ const run = async () => {
if (shouldRunTest) {
// eslint-disable-next-line no-await-in-loop
await new Promise((resolve) => {
childProcess.exec(`node ${pluginTestpath}`, (err, stdout, stderr) => {
childProcess.exec(`node "${pluginTestpath}"`, (err, stdout, stderr) => {
if (err) {
console.log(err);
}

Loading…
Cancel
Save