From 9fb1a602ebe1622e626c14cc7c1ae179dadcbfea Mon Sep 17 00:00:00 2001 From: Katie Roberts Date: Mon, 12 Sep 2022 23:42:05 +0000 Subject: [PATCH] Update libs/events/utils.js --- libs/events/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/events/utils.js b/libs/events/utils.js index ec83a237..33789eb4 100644 --- a/libs/events/utils.js +++ b/libs/events/utils.js @@ -550,7 +550,7 @@ module.exports = (s,config,lang,app,io) => { outputMap += `-map 0:1 ` } const secondsBefore = parseInt(monitorDetails.detector_buffer_seconds_before) || 5 - let LiveStartIndex = parseInt(secondsBefore / 2) + let LiveStartIndex = parseInt(secondsBefore / 2 + 1) const ffmpegCommand = `-loglevel warning -live_start_index -${LiveStartIndex} -analyzeduration ${analyzeDuration} -probesize ${probeSize} -re -i "${s.dir.streams+d.ke+'/'+d.id}/detectorStream.m3u8" ${outputMap}-movflags faststart+frag_keyframe+empty_moov -fflags +igndts -c:v copy -c:a aac -strict -2 -strftime 1 -y "${s.getVideoDirectory(monitorConfig) + filename}"` s.debugLog(ffmpegCommand) activeMonitor.eventBasedRecording.process = spawn(