mirror of
https://github.com/gabehf/Tdarr_Plugins.git
synced 2026-03-10 07:50:29 -07:00
67 lines
1.7 KiB
JavaScript
67 lines
1.7 KiB
JavaScript
/* 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 -codec copy -bsf:v "filter_units=remove_types=6"',
|
|
container: '.mp4',
|
|
handBrakeMode: false,
|
|
FFmpegMode: true,
|
|
reQueueAfter: true,
|
|
infoLog: '☑Closed captions have not been detected on this file \n',
|
|
},
|
|
},
|
|
{
|
|
input: {
|
|
file: (() => {
|
|
const file = _.cloneDeep(require('../sampleData/media/sampleH264_1.json'));
|
|
file.hasClosedCaptions = true;
|
|
return file;
|
|
})(),
|
|
librarySettings: {},
|
|
inputs: {},
|
|
otherArguments: {},
|
|
},
|
|
output: {
|
|
processFile: true,
|
|
preset: ',-map 0 -codec copy -bsf:v "filter_units=remove_types=6"',
|
|
container: '.mp4',
|
|
handBrakeMode: false,
|
|
FFmpegMode: true,
|
|
reQueueAfter: true,
|
|
infoLog: '☒This file has closed captions \n',
|
|
},
|
|
},
|
|
{
|
|
input: {
|
|
file: (() => {
|
|
const file = _.cloneDeep(require('../sampleData/media/sampleH264_1.json'));
|
|
file.ffProbeData.streams[0].closed_captions = 1;
|
|
return file;
|
|
})(),
|
|
librarySettings: {},
|
|
inputs: {},
|
|
otherArguments: {},
|
|
},
|
|
output: {
|
|
processFile: true,
|
|
preset: ',-map 0 -codec copy -bsf:v "filter_units=remove_types=6"',
|
|
container: '.mp4',
|
|
handBrakeMode: false,
|
|
FFmpegMode: true,
|
|
reQueueAfter: true,
|
|
infoLog: '☒This file has burnt closed captions \n',
|
|
},
|
|
},
|
|
];
|
|
|
|
void run(tests);
|