From 6815f1b2ec3e637f9a0177220baab0299d861232 Mon Sep 17 00:00:00 2001 From: leccelecce <24962424+leccelecce@users.noreply.github.com> Date: Wed, 18 Mar 2026 11:59:38 +0000 Subject: [PATCH] Manual events: don't save annotated jpeg; store frame time --- frigate/camera/state.py | 27 --------------------------- frigate/track/object_processing.py | 1 + 2 files changed, 1 insertion(+), 27 deletions(-) diff --git a/frigate/camera/state.py b/frigate/camera/state.py index 375700c65..f609a05f9 100644 --- a/frigate/camera/state.py +++ b/frigate/camera/state.py @@ -546,33 +546,6 @@ class CameraState: ) as p: p.write(webp.tobytes()) - # write jpg snapshot with optional annotations - if draw.get("boxes") and isinstance(draw.get("boxes"), list): - for box in draw.get("boxes"): - x = int(box["box"][0] * self.camera_config.detect.width) - y = int(box["box"][1] * self.camera_config.detect.height) - width = int(box["box"][2] * self.camera_config.detect.width) - height = int(box["box"][3] * self.camera_config.detect.height) - - draw_box_with_label( - img_frame, - x, - y, - x + width, - y + height, - label, - f"{box.get('score', '-')}% {int(width * height)}", - thickness=2, - color=box.get("color", (255, 0, 0)), - ) - - ret, jpg = cv2.imencode(".jpg", img_frame) - with open( - os.path.join(CLIPS_DIR, f"{self.camera_config.name}-{event_id}.jpg"), - "wb", - ) as j: - j.write(jpg.tobytes()) - # create thumbnail with max height of 175 and save width = int(175 * img_frame.shape[1] / img_frame.shape[0]) thumb = cv2.resize(img_frame, dsize=(width, 175), interpolation=cv2.INTER_AREA) diff --git a/frigate/track/object_processing.py b/frigate/track/object_processing.py index 0756d6765..1a15e27ee 100644 --- a/frigate/track/object_processing.py +++ b/frigate/track/object_processing.py @@ -548,6 +548,7 @@ class TrackedObjectProcessor(threading.Thread): and include_recording, "has_snapshot": True, "snapshot_clean": True, + "snapshot_frame_time": frame_time, "type": source_type, "draw": draw, },