Add Tdarr_Plugin_SV6x_Smoove1FFMPEG_NVENC_H264 test

make-only-subtitle-default
HaveAGitGat 4 years ago
parent 10a693bc5c
commit 9df4e56c16

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

@ -0,0 +1,106 @@
/* 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,
infoLog: 'File is already H264 but file is not in mkv. Remuxing \n',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
container: '.mkv',
preset: ', -map 0 -c copy ',
},
},
{
input: {
file: (() => {
const file = _.cloneDeep(require('../sampleData/media/sampleH264_1.json'));
file.container = 'mkv';
return file;
})(),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: false,
infoLog: 'File is already H264 and in mkv \n',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
container: '.mkv',
},
},
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH265_1.json')),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: false,
infoLog: 'Target bitrate could not be calculated. Skipping this plugin. \n',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
container: '.mkv',
},
},
{
input: {
file: (() => {
const file = _.cloneDeep(require('../sampleData/media/sampleH264_1.json'));
file.ffProbeData.streams[0].codec_name = 'hevc';
return file;
})(),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: true,
infoLog: 'Container for output selected as mkv. \n'
+ 'Current bitrate = 1526 \n'
+ 'Bitrate settings: \n'
+ 'Target = 1526 \n'
+ 'Minimum = 1068 \n'
+ 'Maximum = 1983 \n'
+ 'File is not h264. Transcoding. \n',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
container: '.mkv',
preset: 'undefined,-map 0 -c:v h264_nvenc -preset fast -crf 23 -tune film -b:v 1526k -minrate 1068k -maxrate 1983k -bufsize 1526k -c:a copy -c:s copy -max_muxing_queue_size 9999 -pix_fmt yuv420p ',
},
},
{
input: {
file: _.cloneDeep(require('../sampleData/media/sampleH264_1.json')),
librarySettings: {},
inputs: {
container: 'mp4',
},
otherArguments: {},
},
output: {
processFile: false,
infoLog: 'File is already H264 and in mp4 \n',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
container: '.mp4',
},
},
];
run(tests);
Loading…
Cancel
Save