From fb88d37c563e8762a7ba55b5c7a2bcc5b1cb2cf9 Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Mon, 15 Dec 2025 07:12:09 -0700 Subject: [PATCH] Consider audio activity when deciding if recording segments should be kept due to motion --- frigate/record/cleanup.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/frigate/record/cleanup.py b/frigate/record/cleanup.py index e15690e58..94dd43eba 100644 --- a/frigate/record/cleanup.py +++ b/frigate/record/cleanup.py @@ -119,6 +119,7 @@ class RecordingCleanup(threading.Thread): Recordings.path, Recordings.objects, Recordings.motion, + Recordings.dBFS, ) .where( (Recordings.camera == config.name) @@ -126,6 +127,7 @@ class RecordingCleanup(threading.Thread): ( (Recordings.end_time < continuous_expire_date) & (Recordings.motion == 0) + & (Recordings.dBFS == 0) ) | (Recordings.end_time < motion_expire_date) ) @@ -185,6 +187,7 @@ class RecordingCleanup(threading.Thread): mode == RetainModeEnum.motion and recording.motion == 0 and recording.objects == 0 + and recording.dBFS == 0 ) or (mode == RetainModeEnum.active_objects and recording.objects == 0) ):