]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Log ffmpeg command
authorChocobozzz <me@florianbigard.com>
Thu, 29 Jul 2021 11:34:16 +0000 (13:34 +0200)
committerChocobozzz <me@florianbigard.com>
Thu, 29 Jul 2021 11:34:16 +0000 (13:34 +0200)
server/helpers/ffmpeg-utils.ts

index 9ad4b7f3b61d2e361893eb81699a63478cd13e51..61c8a6db26bd83ac84e7c3ce8bea14913164135d 100644 (file)
@@ -703,6 +703,10 @@ async function runCommand (options: {
   const { command, silent = false, job } = options
 
   return new Promise<void>((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()
     })