aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-07-29 13:34:16 +0200
committerChocobozzz <me@florianbigard.com>2021-07-29 13:34:16 +0200
commitd0ea3e34d082eef87a8712a9f3441a096002f29c (patch)
treeeebdebeb3a93aff1bef99bec5d5eacb1ea363782 /server/helpers
parentd6886027109af42be2e3ec5d14ad166199add11d (diff)
downloadPeerTube-d0ea3e34d082eef87a8712a9f3441a096002f29c.tar.gz
PeerTube-d0ea3e34d082eef87a8712a9f3441a096002f29c.tar.zst
PeerTube-d0ea3e34d082eef87a8712a9f3441a096002f29c.zip
Log ffmpeg command
Diffstat (limited to 'server/helpers')
-rw-r--r--server/helpers/ffmpeg-utils.ts6
1 files changed, 5 insertions, 1 deletions
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: {
703 const { command, silent = false, job } = options 703 const { command, silent = false, job } = options
704 704
705 return new Promise<void>((res, rej) => { 705 return new Promise<void>((res, rej) => {
706 let shellCommand: string
707
708 command.on('start', cmdline => { shellCommand = cmdline })
709
706 command.on('error', (err, stdout, stderr) => { 710 command.on('error', (err, stdout, stderr) => {
707 if (silent !== true) logger.error('Error in ffmpeg.', { stdout, stderr }) 711 if (silent !== true) logger.error('Error in ffmpeg.', { stdout, stderr })
708 712
@@ -710,7 +714,7 @@ async function runCommand (options: {
710 }) 714 })
711 715
712 command.on('end', (stdout, stderr) => { 716 command.on('end', (stdout, stderr) => {
713 logger.debug('FFmpeg command ended.', { stdout, stderr }) 717 logger.debug('FFmpeg command ended.', { stdout, stderr, shellCommand })
714 718
715 res() 719 res()
716 }) 720 })