Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}
outputFilePath = `${outputFilePath}_${argv.degrees}_${argv.type}.mp4`
break
case 0:
if (argv.type === 'mono' || argv.type === '2d') {
outputFilePath = `${outputFilePath}_2dff.mp4`
} else if (argv.type === 'sbs' || argv.type === 'ou') {
if (argv.subtitles) {
term.bold(`Subtitles not supported for 3D video.\n`)
process.exit(1)
}
outputFilePath = `${outputFilePath}_3dff_${argv.type}.mp4`
}
break
default:
term.bold(`Video degrees not specified; see --help for usage information.\n`)
process.exit(1)
break
}
term.underline.red(`Outputting PSVR sideload video to ${outputFilePath}\n`)
/* Analyze the video file to determine exact encoding targets
* Then perform the transcode and output an interleaved MP4 */
analyze(videoFile).then((videoData) => {
return encode(videoFile, videoData, outputFilePath, argv)
}).then((encodedVideoFile) => {
term.bold(`Encoding complete. Output path: ${encodedVideoFile}`)
}).catch(err => {
term.bold(`${err}\n`)
process.exit(1)
}).catch(err => {
term.bold(`Dependencies not satisfied. Exiting.\n`)
process.exit(1)
})