From 3bcff2a6298491b4dfefee5d2a10e77b67ffdb4c Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Tue, 31 Oct 2023 06:34:51 -0600 Subject: [PATCH] Ensure that birdseye error correction uses a resolution that is divisible by 4 --- frigate/output.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frigate/output.py b/frigate/output.py index 8842d1610..2f240cef7 100644 --- a/frigate/output.py +++ b/frigate/output.py @@ -63,8 +63,8 @@ def get_canvas_shape(width: int, height: int) -> tuple[int, int]: a_w, a_h = get_standard_aspect_ratio(width, height) if round(a_w / a_h, 2) != round(width / height, 2): - canvas_width = width - canvas_height = int((canvas_width / a_w) * a_h) + canvas_width = int(width // 4 * 4) + canvas_height = int((canvas_width / a_w * a_h) // 4 * 4) logger.warning( f"The birdseye resolution is a non-standard aspect ratio, forcing birdseye resolution to {canvas_width} x {canvas_height}" )