From 2fe978744e5b74eb824e4d79c1bb9b840169f125 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 21 Apr 2023 14:58:43 +0200 Subject: Remove transcoding scripts We don't have enough energy to maintain them --- scripts/print-transcode-command.ts | 48 -------------------------------------- 1 file changed, 48 deletions(-) delete mode 100644 scripts/print-transcode-command.ts (limited to 'scripts/print-transcode-command.ts') diff --git a/scripts/print-transcode-command.ts b/scripts/print-transcode-command.ts deleted file mode 100644 index ac60ff8a5..000000000 --- a/scripts/print-transcode-command.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { program } from 'commander' -import ffmpeg from 'fluent-ffmpeg' -import { exit } from 'process' -import { buildVODCommand, runCommand, TranscodeVODOptions } from '@server/helpers/ffmpeg' -import { VideoTranscodingProfilesManager } from '@server/lib/transcoding/default-transcoding-profiles' - -program - .arguments('') - .requiredOption('-r, --resolution [resolution]', 'video resolution') - .action((path, cmd) => { - if (cmd.resolution !== undefined && Number.isNaN(+cmd.resolution)) { - console.error('The resolution must be an integer (example: 1080).') - process.exit(-1) - } - - run(path, cmd) - .then(() => process.exit(0)) - .catch(err => { - console.error(err) - process.exit(-1) - }) - }) - .parse(process.argv) - -async function run (path: string, cmd: any) { - const options = { - type: 'video' as 'video', - inputPath: path, - outputPath: '/dev/null', - - availableEncoders: VideoTranscodingProfilesManager.Instance.getAvailableEncoders(), - profile: 'default', - - resolution: +cmd.resolution - } as TranscodeVODOptions - - let command = ffmpeg(options.inputPath) - .output(options.outputPath) - - command = await buildVODCommand(command, options) - - command.on('start', (cmdline) => { - console.log(cmdline) - exit() - }) - - await runCommand({ command }) -} -- cgit v1.2.3