From e89ad75f71023aa5bfd7db20f81c67330bb24c3a Mon Sep 17 00:00:00 2001 From: Moe Date: Sat, 16 Oct 2021 15:46:13 -0700 Subject: [PATCH] add stimeout to snapshot ffmpeg command --- libs/monitor/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/monitor/utils.js b/libs/monitor/utils.js index ea2b5698..cfcf8446 100644 --- a/libs/monitor/utils.js +++ b/libs/monitor/utils.js @@ -136,7 +136,7 @@ module.exports = (s,config,lang) => { }) } const temporaryImageFile = streamDir + s.gid(5) + '.jpg' - const ffmpegCmd = splitForFFPMEG(`-loglevel warning -re -probesize 100000 -analyzeduration 100000 ${inputOptions.join(' ')} -i "${url}" ${outputOptions.join(' ')} -f image2 -an -vf "fps=1" -vframes 1 "${temporaryImageFile}"`) + const ffmpegCmd = splitForFFPMEG(`-loglevel warning -re -stimeout 30000000 -probesize 100000 -analyzeduration 100000 ${inputOptions.join(' ')} -i "${url}" ${outputOptions.join(' ')} -f image2 -an -vf "fps=1" -vframes 1 "${temporaryImageFile}"`) const snapProcess = spawn('ffmpeg',ffmpegCmd,{detached: true}) snapProcess.stderr.on('data',function(data){ // s.debugLog(data.toString())