properly expose some object detection options

build-default-monitor-config-from-definitions
Moe 2020-05-13 15:32:53 -07:00
parent b0c3f38049
commit f5c3467ea7
2 changed files with 46 additions and 40 deletions

View File

@ -2107,6 +2107,36 @@ module.exports = function(s,config,lang){
}
]
},
{
hidden: true,
"form-group-class": "h_det_input h_det_1",
"name": "detail=detector_fps",
"field": lang["Detector Rate"],
"description": "How many frames a second to send to the motion detector; 2 is the default.",
"default": "2",
"example": "",
"possible": ""
},
{
hidden: true,
"form-group-class": "h_det_input h_det_1",
"name": "detail=detector_scale_x",
"field": lang["Feed-in Image Width"],
"description": "Width of the image being detected. Smaller sizes take less CPU.",
"default": "",
"example": "640",
"possible": ""
},
{
hidden: true,
"form-group-class": "h_det_input h_det_1",
"name": "detail=detector_scale_y",
"field": lang["Feed-in Image Height"],
"description": "Height of the image being detected. Smaller sizes take less CPU.",
"default": "",
"example": "480",
"possible": ""
},
{
hidden: true,
"name": "detail=detector_lock_timeout",
@ -2137,36 +2167,6 @@ module.exports = function(s,config,lang){
}
]
},
{
hidden: true,
"name": "detail=detector_fps",
"field": lang["Detector Rate"],
"description": "How many frames a second to send to the motion detector; 2 is the default.",
"default": "2",
"example": "",
"form-group-class": "h_det_input h_det_1",
"possible": ""
},
{
hidden: true,
"name": "detail=detector_scale_x",
"field": lang["Feed-in Image Width"],
"description": "Width of the image being detected. Smaller sizes take less CPU.",
"default": "",
"example": "640",
"form-group-class": "h_det_input h_det_1",
"possible": ""
},
{
hidden: true,
"name": "detail=detector_scale_y",
"field": lang["Feed-in Image Height"],
"description": "Height of the image being detected. Smaller sizes take less CPU.",
"default": "",
"example": "480",
"form-group-class": "h_det_input h_det_1",
"possible": ""
},
{
hidden: true,
"name": "detail=detector_record_method",
@ -2434,6 +2434,7 @@ module.exports = function(s,config,lang){
"name": "detail=snap_seconds_inward",
"field": lang['Delay for Snapshot'],
"description": lang['in seconds'],
"form-group-class": "h_det_input h_det_1",
"default": "0",
},
{
@ -3048,10 +3049,9 @@ module.exports = function(s,config,lang){
"name": "detail=detector_fps_object",
"field": lang['Frame Rate'],
"description": "",
"default": "1",
"default": "2",
"example": "",
"form-group-class": "h_det_mot_fir_input h_det_mot_fir_1",
"form-group-class-pre-layer": "h_det_pam_input h_det_pam_1",
"form-group-class": "h_casc_input h_casc_1",
"fieldType": "number",
"numberMin": "1",
"possible": ""
@ -3063,8 +3063,7 @@ module.exports = function(s,config,lang){
"description": "",
"default": "",
"example": "",
"form-group-class": "h_det_mot_fir_input h_det_mot_fir_1",
"form-group-class-pre-layer": "h_det_pam_input h_det_pam_1",
"form-group-class": "h_casc_input h_casc_1",
"fieldType": "number",
"numberMin": "1",
"possible": ""
@ -3076,8 +3075,7 @@ module.exports = function(s,config,lang){
"description": "",
"default": "",
"example": "",
"form-group-class": "h_det_mot_fir_input h_det_mot_fir_1",
"form-group-class-pre-layer": "h_det_pam_input h_det_pam_1",
"form-group-class": "h_casc_input h_casc_1",
"fieldType": "number",
"numberMin": "1",
"possible": ""

View File

@ -808,10 +808,18 @@ module.exports = function(s,config,lang,onFinish){
var h264Output = ' -q:v 1 -an -c:v libx264 -f hls -tune zerolatency -g 1 -hls_time 2 -hls_list_size 3 -start_number 0 -live_start_index 3 -hls_allow_cache 0 -hls_flags +delete_segments+omit_endlist "'+e.sdir+'detectorStreamX.m3u8"'
var setObjectDetectValues = () => {
//for object detection
x.detector_fps_object = '2'
x.pipe += s.createFFmpegMap(e,e.details.input_map_choices.detector)
if(e.details.detector_scale_x_object&&e.details.detector_scale_x_object!==''&&e.details.detector_scale_y_object&&e.details.detector_scale_y_object!==''){x.dobjratio=' -s '+e.details.detector_scale_x_object+'x'+e.details.detector_scale_y_object}else{x.dobjratio=x.dratio}
if(e.details.detector_fps_object){x.detector_fps_object = e.details.detector_fps_object}
if(
e.details.detector_scale_x_object &&
e.details.detector_scale_x_object !=='' &&
e.details.detector_scale_y_object &&
e.details.detector_scale_y_object!==''
){
x.dobjratio = ' -s '+e.details.detector_scale_x_object+'x'+e.details.detector_scale_y_object
}else{
x.dobjratio = x.dratio
}
x.detector_fps_object = e.details.detector_fps_object || '2'
x.pipe += ' -r ' + x.detector_fps_object + x.dobjratio + x.cust_detect
}
if(e.details.detector_pam === '1'){