From 60adcbc8e68ecd251c518a24ca78a59dd4015347 Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Sat, 8 Jul 2023 13:03:59 -0500 Subject: [PATCH] only update tracked obj position when ptz stopped --- frigate/ptz/autotrack.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frigate/ptz/autotrack.py b/frigate/ptz/autotrack.py index 079560fbb..3895689b4 100644 --- a/frigate/ptz/autotrack.py +++ b/frigate/ptz/autotrack.py @@ -234,7 +234,10 @@ class PtzAutoTracker: def autotrack_object(self, camera, obj): camera_config = self.config.cameras[camera] - if camera_config.onvif.autotracking.enabled: + if ( + camera_config.onvif.autotracking.enabled + and self.camera_metrics[camera]["ptz_stopped"].is_set() + ): # either this is a brand new object that's on our camera, has our label, entered the zone, is not a false positive, # and is not initially motionless - or one we're already tracking, which assumes all those things are already true if (