Update libs/events/utils.js

video-slicer-reencoder
Katie Roberts 2022-09-12 23:42:05 +00:00
parent 5d727f0ac0
commit 9fb1a602eb
1 changed files with 1 additions and 1 deletions

View File

@ -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(