parent
a3e63ed696
commit
305769c13b
@ -0,0 +1,111 @@
|
|||||||
|
/* 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:s? -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:s? -map 0:a -c:v libx264 -preset fast -c:a aac -c:s mov_text',
|
||||||
|
container: '.mp4',
|
||||||
|
handBrakeMode: false,
|
||||||
|
FFmpegMode: true,
|
||||||
|
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 title metadata \n'
|
||||||
|
+ '☑File has aac track \n'
|
||||||
|
+ '☑File has no/compatible subs \n'
|
||||||
|
+ '☑File meets conditions! \n',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
input: {
|
||||||
|
file: (() => {
|
||||||
|
const file = _.cloneDeep(require('../sampleData/media/sampleH264_1.json'));
|
||||||
|
file.meta.Title = undefined;
|
||||||
|
file.ffProbeData.streams[1].codec_name = 'ac3';
|
||||||
|
return file;
|
||||||
|
})(),
|
||||||
|
librarySettings: {},
|
||||||
|
inputs: {},
|
||||||
|
otherArguments: {},
|
||||||
|
},
|
||||||
|
output: {
|
||||||
|
processFile: true,
|
||||||
|
preset: ', -map 0:v -map 0:s? -map 0:a -c:v copy -c:a aac -c:s mov_text',
|
||||||
|
container: '.mp4',
|
||||||
|
handBrakeMode: false,
|
||||||
|
FFmpegMode: true,
|
||||||
|
reQueueAfter: true,
|
||||||
|
infoLog: '☑File is already in h264! \n'
|
||||||
|
+ '☑File has no title metadata \n'
|
||||||
|
+ '☒File has no aac track \n',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
input: {
|
||||||
|
file: _.cloneDeep(require('../sampleData/media/sampleH264_2.json')),
|
||||||
|
librarySettings: {},
|
||||||
|
inputs: {},
|
||||||
|
otherArguments: {},
|
||||||
|
},
|
||||||
|
output: {
|
||||||
|
processFile: true,
|
||||||
|
preset: ', -map 0:v -map 0:s? -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 no title metadata \n'
|
||||||
|
+ '☑File has aac track \n'
|
||||||
|
+ '☒File has incompatible subs \n',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
run(tests);
|
||||||
Loading…
Reference in new issue