From d0ea3e34d082eef87a8712a9f3441a096002f29c Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 29 Jul 2021 13:34:16 +0200 Subject: [PATCH] Log ffmpeg command --- server/helpers/ffmpeg-utils.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/server/helpers/ffmpeg-utils.ts b/server/helpers/ffmpeg-utils.ts index 9ad4b7f3b..61c8a6db2 100644 --- a/server/helpers/ffmpeg-utils.ts +++ b/server/helpers/ffmpeg-utils.ts @@ -703,6 +703,10 @@ async function runCommand (options: { const { command, silent = false, job } = options return new Promise((res, rej) => { + let shellCommand: string + + command.on('start', cmdline => { shellCommand = cmdline }) + command.on('error', (err, stdout, stderr) => { if (silent !== true) logger.error('Error in ffmpeg.', { stdout, stderr }) @@ -710,7 +714,7 @@ async function runCommand (options: { }) command.on('end', (stdout, stderr) => { - logger.debug('FFmpeg command ended.', { stdout, stderr }) + logger.debug('FFmpeg command ended.', { stdout, stderr, shellCommand }) res() })