Set the loglevel for OpenCV ffmpeg messages to fatal

This commit is contained in:
joshjryan 2024-11-01 15:54:24 -06:00
parent e5ebf938f6
commit 7367971774

View File

@ -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