diff --git a/libs/ffmpeg/builders.js b/libs/ffmpeg/builders.js index f321b0c8..1cffa87f 100644 --- a/libs/ffmpeg/builders.js +++ b/libs/ffmpeg/builders.js @@ -9,9 +9,6 @@ module.exports = (s,config,lang) => { const { validateDimensions, } = require('./utils.js')(s,config,lang) - const { - roundNearest5, - } = require('../basic/utils.js')(process.cwd(),config) if(!config.outputsWithAudio)config.outputsWithAudio = ['hls','flv','mp4','rtmp']; if(!config.outputsNotCapableOfPresets)config.outputsNotCapableOfPresets = []; const hasCudaEnabled = (monitor) => { @@ -690,8 +687,8 @@ module.exports = (s,config,lang) => { const { videoWidth, videoHeight } = validateDimensions(e.details.event_record_scale_x,e.details.event_record_scale_y) const hlsTime = !isNaN(parseInt(e.details.detector_buffer_hls_time)) ? `${parseInt(e.details.detector_buffer_hls_time)}` : '5' // const hlsListSize = !isNaN(parseInt(e.details.detector_buffer_hls_list_size)) ? `${parseInt(e.details.detector_buffer_hls_list_size)}` : '4' - const secondsBefore = roundNearest5(parseInt(e.details.detector_buffer_seconds_before)) || 5 - let hlsListSize = parseInt(secondsBefore / 5 + 3) + const secondsBefore = parseInt(e.details.detector_buffer_seconds_before) || 5 + let hlsListSize = parseInt(secondsBefore / 2 + 3) // hlsListSize = hlsListSize < 5 ? 5 : hlsListSize; if(inputMap)outputFlags.push(inputMap) if(e.details.cust_sip_record)outputFlags.push(e.details.cust_sip_record)