From a8df97dc1a4de896b222ef8accaa74ea78195548 Mon Sep 17 00:00:00 2001 From: Blake Blackshear Date: Sun, 30 May 2021 09:00:34 -0500 Subject: [PATCH] only send frames to ffmpeg if there are clients listening --- frigate/output.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/frigate/output.py b/frigate/output.py index b82a14260..0df0e02b5 100644 --- a/frigate/output.py +++ b/frigate/output.py @@ -111,8 +111,9 @@ def output_frames(config, video_output_queue): frame = frame_manager.get(frame_id, config.cameras[camera].frame_shape_yuv) - # send frame to ffmpeg process - converter.write(frame.tobytes()) + # send frame to ffmpeg process if websockets are connected + if len(websocket_server.manager) > 0: + converter.write(frame.tobytes()) if camera in previous_frames: frame_manager.delete(previous_frames[camera])