Allow disabling Wallclock Timestamps with conf.json parameter
- add `"wallClockTimestampAsDefault":false` to disable it.build-default-monitor-config-from-definitions
parent
b3cfcc1b4a
commit
1502d0a200
|
@ -2,6 +2,7 @@
|
|||
"port": 8080,
|
||||
"passwordType": "sha256",
|
||||
"detectorMergePamRegionTriggers": true,
|
||||
"wallClockTimestampAsDefault": true,
|
||||
"addStorage": [
|
||||
{"name":"second","path":"__DIR__/videos2"}
|
||||
],
|
||||
|
|
|
@ -40,6 +40,7 @@ module.exports = function(s){
|
|||
if(config.insertOrphans === undefined){config.insertOrphans = true}
|
||||
if(config.orphanedVideoCheckMax === undefined){config.orphanedVideoCheckMax = 2}
|
||||
if(config.detectorMergePamRegionTriggers === undefined){config.detectorMergePamRegionTriggers = false}
|
||||
if(config.wallClockTimestampAsDefault === undefined){config.wallClockTimestampAsDefault = true}
|
||||
//Child Nodes
|
||||
if(config.childNodes === undefined)config.childNodes = {};
|
||||
//enabled
|
||||
|
|
|
@ -422,7 +422,7 @@ module.exports = function(s,config,lang,onFinish){
|
|||
x.hwaccel = ''
|
||||
x.cust_input = ''
|
||||
//wallclock fix for strangely long, single frame videos
|
||||
if(e.type === 'h264' && x.cust_input.indexOf('-use_wallclock_as_timestamps 1') === -1){x.cust_input+=' -use_wallclock_as_timestamps 1';}
|
||||
if(config.wallClockTimestampAsDefault && e.type === 'h264' && x.cust_input.indexOf('-use_wallclock_as_timestamps 1') === -1){x.cust_input+=' -use_wallclock_as_timestamps 1';}
|
||||
//input - frame rate (capture rate)
|
||||
if(e.details.sfps && e.details.sfps!==''){x.input_fps=' -r '+e.details.sfps}else{x.input_fps=''}
|
||||
//input - analyze duration
|
||||
|
|
|
@ -231,6 +231,10 @@ $(document).ready(function(){
|
|||
"type": "boolean",
|
||||
"default": false
|
||||
},
|
||||
"wallClockTimestampAsDefault": {
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"defaultMjpeg": {
|
||||
"type": "string",
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue