mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-21 19:07:46 +01:00
default periodic checks to never
This commit is contained in:
parent
f1ddd0e6f7
commit
c6445898ce
@ -171,8 +171,9 @@ class DetectConfig(FrigateBaseModel):
|
||||
title="Maximum number of frames the object can dissapear before detection ends."
|
||||
)
|
||||
stationary_interval: Optional[int] = Field(
|
||||
default=0,
|
||||
title="Frame interval for checking stationary objects.",
|
||||
ge=1,
|
||||
ge=0,
|
||||
)
|
||||
|
||||
|
||||
@ -763,11 +764,6 @@ class FrigateConfig(FrigateBaseModel):
|
||||
if camera_config.detect.max_disappeared is None:
|
||||
camera_config.detect.max_disappeared = max_disappeared
|
||||
|
||||
# Default stationary_interval configuration
|
||||
stationary_interval = camera_config.detect.fps * 10
|
||||
if camera_config.detect.stationary_interval is None:
|
||||
camera_config.detect.stationary_interval = stationary_interval
|
||||
|
||||
# FFMPEG input substitution
|
||||
for input in camera_config.ffmpeg.inputs:
|
||||
input.path = input.path.format(**FRIGATE_ENV_VARS)
|
||||
|
@ -515,7 +515,10 @@ def process_frames(
|
||||
# if there hasn't been motion for 10 frames
|
||||
if obj["motionless_count"] >= 10
|
||||
# and it isn't due for a periodic check
|
||||
and obj["motionless_count"] % detect_config.stationary_interval != 0
|
||||
and (
|
||||
detect_config.stationary_interval == 0
|
||||
or obj["motionless_count"] % detect_config.stationary_interval != 0
|
||||
)
|
||||
# and it hasn't disappeared
|
||||
and object_tracker.disappeared[obj["id"]] == 0
|
||||
# and it doesn't overlap with any current motion boxes
|
||||
|
Loading…
Reference in New Issue
Block a user