program
.option('-v, --video [videoUUID]', 'Video UUID')
+ .option('-r, --resolution [resolution]', 'Video resolution (integer)')
.parse(process.argv)
if (program['video'] === undefined) {
process.exit(-1)
}
+if (program.resolution !== undefined && Number.isNaN(+program.resolution)) {
+ console.error('The resolution must be an integer (example: 1080).')
+ process.exit(-1)
+}
+
run()
.then(() => process.exit(0))
.catch(err => {
const dataInput = {
videoUUID: video.uuid,
- isNewVideo: false
+ isNewVideo: false,
+ resolution: undefined
+ }
+
+ if (program.resolution !== undefined) {
+ dataInput.resolution = program.resolution
}
await JobQueue.Instance.init()