From 736797177408c3febad49a096525c0de85100f32 Mon Sep 17 00:00:00 2001 From: joshjryan Date: Fri, 1 Nov 2024 15:54:24 -0600 Subject: [PATCH] Set the loglevel for OpenCV ffmpeg messages to fatal --- frigate/util/services.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frigate/util/services.py b/frigate/util/services.py index a71729263..eb576f84e 100644 --- a/frigate/util/services.py +++ b/frigate/util/services.py @@ -584,7 +584,9 @@ async def get_video_properties( width = height = 0 try: - # Open the video stream + # Open the video stream using OpenCV + # Only print fatal or worse output: https://ffmpeg.org/doxygen/trunk/log_8h.html + os.environ["OPENCV_FFMPEG_LOGLEVEL"] = "8" video = cv2.VideoCapture(url) # Check if the video stream was opened successfully