Skip to content

Commit

Permalink
Set the loglevel for OpenCV ffmpeg messages to fatal (#14728)
Browse files Browse the repository at this point in the history
* Set the loglevel for OpenCV ffmpeg messages to fatal

* Set OPENCV_FFMPEG_LOGLEVEL in Dockerfile
  • Loading branch information
joshjryan authored Nov 2, 2024
1 parent 11068aa commit d7935ab
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions docker/main/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion frigate/util/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ async def calculate_duration(video: Optional[any]) -> float:
width = height = 0

try:
# Open the video stream
# Open the video stream using OpenCV
video = cv2.VideoCapture(url)

# Check if the video stream was opened successfully
Expand Down

0 comments on commit d7935ab

Please sign in to comment.