Remove HLS List Size in favor of Buffer Time from Event
monitorConfig.details.detector_buffer_hls_list_size is now deprecated. It will be automatically calculated based on the Buffer Time from Event that is provided.timelapse-frames-through-websocket
parent
bb749f61e2
commit
344fa858c9
|
@ -3688,6 +3688,12 @@ module.exports = function(s,config,lang){
|
||||||
isFormGroupGroup: true,
|
isFormGroupGroup: true,
|
||||||
"section-class": "h_det_input h_det_1",
|
"section-class": "h_det_input h_det_1",
|
||||||
"info": [
|
"info": [
|
||||||
|
{
|
||||||
|
"name": "detail=detector_buffer_seconds_before",
|
||||||
|
"field": lang['Buffer Time from Event'],
|
||||||
|
"description": lang["fieldTextBuffetTimeFromEvent"],
|
||||||
|
"default": "5",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "detail=detector_buffer_vcodec",
|
"name": "detail=detector_buffer_vcodec",
|
||||||
"field": lang['HLS Video Encoder'],
|
"field": lang['HLS Video Encoder'],
|
||||||
|
@ -3792,14 +3798,6 @@ module.exports = function(s,config,lang){
|
||||||
"example": "",
|
"example": "",
|
||||||
"possible": ""
|
"possible": ""
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "detail=detector_buffer_hls_list_size",
|
|
||||||
"field": lang['HLS List Size'],
|
|
||||||
"description": lang["fieldTextDetectorBufferHlsListSize"],
|
|
||||||
"default": "10",
|
|
||||||
"example": "",
|
|
||||||
"possible": ""
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "detail=detector_buffer_start_number",
|
"name": "detail=detector_buffer_start_number",
|
||||||
"field": lang['HLS Start Number'],
|
"field": lang['HLS Start Number'],
|
||||||
|
@ -3820,9 +3818,9 @@ module.exports = function(s,config,lang){
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"field": lang['Buffer Preview'],
|
"field": lang['Buffer Preview'],
|
||||||
id: "monEditBufferPreview",
|
|
||||||
"fieldType": "div",
|
"fieldType": "div",
|
||||||
"style": "width:100%;height:300px;background:#eceaea;border-radius:5px;color:#333;font-family:monospace"
|
// style: `width:100%;background:#eceaea;border-radius:5px;color:#333;font-family:monospace`,
|
||||||
|
divContent: `<pre><code id="monEditBufferPreview"></code></pre>`
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -7716,7 +7714,7 @@ module.exports = function(s,config,lang){
|
||||||
"bars": 3,
|
"bars": 3,
|
||||||
"color0": "info",
|
"color0": "info",
|
||||||
"title0": lang["Video Share"],
|
"title0": lang["Video Share"],
|
||||||
"color1": "success",
|
"color1": "danger",
|
||||||
"title1": lang["Timelapse Frames Share"],
|
"title1": lang["Timelapse Frames Share"],
|
||||||
"color2": "warning",
|
"color2": "warning",
|
||||||
"title2": lang["FileBin Share"],
|
"title2": lang["FileBin Share"],
|
||||||
|
|
|
@ -1401,6 +1401,8 @@
|
||||||
"MQTT Inbound": "MQTT Inbound",
|
"MQTT Inbound": "MQTT Inbound",
|
||||||
"MQTT Outbound": "MQTT Outbound",
|
"MQTT Outbound": "MQTT Outbound",
|
||||||
"MQTT Client": "MQTT Client",
|
"MQTT Client": "MQTT Client",
|
||||||
|
"Buffer Time from Event": "Buffer Time from Event",
|
||||||
|
"fieldTextBufferTimeFromEvent": "The amount of seconds to record before the trigger happened. If this is consistently inaccutrate you will need to look at the <a target='_blank' href='https://hub.shinobi.video/articles/view/DmWIID78VtvEfnf'>optimization guide</a> or force encoding on the server.",
|
||||||
"fieldTextMode": "This is the primary task of the monitor.",
|
"fieldTextMode": "This is the primary task of the monitor.",
|
||||||
"fieldTextModeDisabled": "Inactive monitor, no process will be created in this mode.",
|
"fieldTextModeDisabled": "Inactive monitor, no process will be created in this mode.",
|
||||||
"fieldTextModeWatchOnly": "Monitor will only stream, no recording will occur unless otherwise ordered by API or Detector.",
|
"fieldTextModeWatchOnly": "Monitor will only stream, no recording will occur unless otherwise ordered by API or Detector.",
|
||||||
|
|
|
@ -534,7 +534,7 @@ module.exports = (s,config,lang,app,io) => {
|
||||||
//-t 00:'+s.timeObject(new Date(detector_timeout * 1000 * 60)).format('mm:ss')+'
|
//-t 00:'+s.timeObject(new Date(detector_timeout * 1000 * 60)).format('mm:ss')+'
|
||||||
activeMonitor.eventBasedRecording.process = spawn(
|
activeMonitor.eventBasedRecording.process = spawn(
|
||||||
config.ffmpegDir,
|
config.ffmpegDir,
|
||||||
splitForFFPMEG(('-loglevel warning -analyzeduration 1000000 -probesize 1000000 -re -i "'+s.dir.streams+d.ke+'/'+d.id+'/detectorStream.m3u8" -movflags faststart+frag_keyframe+empty_moov -fflags +igndts -c:v copy -strftime 1 "'+s.getVideoDirectory(monitorConfig) + filename + '"'))
|
splitForFFPMEG(('-loglevel warning -live_start_index -99999 -analyzeduration 1000 -probesize 32 -re -i "'+s.dir.streams+d.ke+'/'+d.id+'/detectorStream.m3u8" -movflags faststart+frag_keyframe+empty_moov -fflags +igndts -c:v copy -strftime 1 "'+s.getVideoDirectory(monitorConfig) + filename + '"'))
|
||||||
)
|
)
|
||||||
activeMonitor.eventBasedRecording.process.stderr.on('data',function(data){
|
activeMonitor.eventBasedRecording.process.stderr.on('data',function(data){
|
||||||
s.userLog(d,{
|
s.userLog(d,{
|
||||||
|
|
|
@ -679,13 +679,17 @@ module.exports = (s,config,lang) => {
|
||||||
const isCudaEnabled = hasCudaEnabled(e)
|
const isCudaEnabled = hasCudaEnabled(e)
|
||||||
const outputFilters = []
|
const outputFilters = []
|
||||||
var videoCodec = e.details.detector_buffer_vcodec
|
var videoCodec = e.details.detector_buffer_vcodec
|
||||||
|
var liveStartIndex = e.details.detector_buffer_live_start_index || '-3'
|
||||||
var audioCodec = e.details.detector_buffer_acodec ? e.details.detector_buffer_acodec : 'no'
|
var audioCodec = e.details.detector_buffer_acodec ? e.details.detector_buffer_acodec : 'no'
|
||||||
const videoCodecisCopy = videoCodec === 'copy'
|
const videoCodecisCopy = videoCodec === 'copy'
|
||||||
const videoFps = !isNaN(parseFloat(e.details.stream_fps)) && e.details.stream_fps !== '0' ? parseFloat(e.details.stream_fps) : null
|
const videoFps = !isNaN(parseFloat(e.details.stream_fps)) && e.details.stream_fps !== '0' ? parseFloat(e.details.stream_fps) : null
|
||||||
const inputMap = buildInputMap(e,e.details.input_map_choices.detector_sip_buffer)
|
const inputMap = buildInputMap(e,e.details.input_map_choices.detector_sip_buffer)
|
||||||
const { videoWidth, videoHeight } = validateDimensions(e.details.event_record_scale_x,e.details.event_record_scale_y)
|
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)}` : '2'
|
const hlsTime = !isNaN(parseInt(e.details.detector_buffer_hls_time)) ? `${parseInt(e.details.detector_buffer_hls_time)}` : '2'
|
||||||
const hlsListSize = !isNaN(parseInt(e.details.detector_buffer_hls_list_size)) ? `${parseInt(e.details.detector_buffer_hls_list_size)}` : '4'
|
// const hlsListSize = !isNaN(parseInt(e.details.detector_buffer_hls_list_size)) ? `${parseInt(e.details.detector_buffer_hls_list_size)}` : '4'
|
||||||
|
const secondsBefore = parseInt(e.details.detector_buffer_seconds_before) || 5
|
||||||
|
let hlsListSize = parseInt(secondsBefore * 0.6)
|
||||||
|
hlsListSize = hlsListSize < 3 ? 3 : hlsListSize;
|
||||||
if(inputMap)outputFlags.push(inputMap)
|
if(inputMap)outputFlags.push(inputMap)
|
||||||
if(e.details.cust_sip_record)outputFlags.push(e.details.cust_sip_record)
|
if(e.details.cust_sip_record)outputFlags.push(e.details.cust_sip_record)
|
||||||
if(videoCodec === 'auto'){
|
if(videoCodec === 'auto'){
|
||||||
|
|
Loading…
Reference in New Issue