NVR with realtime local object detection for IP cameras
TypeScript aicameragoogle-coralhome-assistanthome-automationhomeautomationmqttnvrobject-detectionrealtimertsptensorflow
check frame time for segment
Josh Hawkins613f1f6bd66e
diff --git a/frigate/record/maintainer.py b/frigate/record/maintainer.pyindex 8f55e9442c..cdd1340aa2 100644--- a/frigate/record/maintainer.py+++ b/frigate/record/maintainer.py@@ -265,10 +265,16 @@ class RecordingMaintainer(threading.Thread):self.end_time_cache.pop(cache_path, None)# else retain days includes this segmentelse:- record_mode = self.config.cameras[camera].record.retain.mode- return await self.move_segment(- camera, start_time, end_time, duration, cache_path, record_mode- )+ most_recently_processed_frame_time = self.object_recordings_info[camera][+ -1+ ][0]++ # ensure delayed segment info does not lead to lost segments+ if most_recently_processed_frame_time >= start_time:+ record_mode = self.config.cameras[camera].record.retain.mode+ return await self.move_segment(+ camera, start_time, end_time, duration, cache_path, record_mode+ )def segment_stats(self, camera: str, start_time: datetime.datetime, end_time: datetime.datetime