From 4963a7be013272186a8dd46fbac41ef40f81b0cd Mon Sep 17 00:00:00 2001 From: joshjryan Date: Fri, 1 Nov 2024 19:11:43 -0600 Subject: [PATCH] Set OPENCV_FFMPEG_LOGLEVEL in Dockerfile --- docker/main/Dockerfile | 3 +++ frigate/util/services.py | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docker/main/Dockerfile b/docker/main/Dockerfile index ac4d277bd..9d2f442f0 100644 --- a/docker/main/Dockerfile +++ b/docker/main/Dockerfile @@ -211,6 +211,9 @@ ENV TOKENIZERS_PARALLELISM=true # https://github.com/huggingface/transformers/issues/27214 ENV TRANSFORMERS_NO_ADVISORY_WARNINGS=1 +# Set OpenCV ffmpeg loglevel to fatal: https://ffmpeg.org/doxygen/trunk/log_8h.html +ENV OPENCV_FFMPEG_LOGLEVEL=8 + ENV PATH="/usr/local/go2rtc/bin:/usr/local/tempio/bin:/usr/local/nginx/sbin:${PATH}" ENV LIBAVFORMAT_VERSION_MAJOR=60 diff --git a/frigate/util/services.py b/frigate/util/services.py index eb576f84e..9ee6da999 100644 --- a/frigate/util/services.py +++ b/frigate/util/services.py @@ -585,8 +585,6 @@ async def get_video_properties( try: # 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