From 6893900a878d4e3ab0d209b2613283f710c5cbf2 Mon Sep 17 00:00:00 2001 From: FeliciaWen Date: Tue, 26 Jul 2022 12:41:19 +0800 Subject: [PATCH] Add sleep delay --- howdy/src/recorders/video_capture.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/howdy/src/recorders/video_capture.py b/howdy/src/recorders/video_capture.py index 07c4320..6e0d1a2 100755 --- a/howdy/src/recorders/video_capture.py +++ b/howdy/src/recorders/video_capture.py @@ -3,6 +3,7 @@ # Import required modules import configparser +from time import sleep import cv2 import os import sys @@ -83,6 +84,7 @@ def read_frame(self): ret, frame = self.internal.read() i = 0 while not ret and i<=4: + sleep(i*.5) ret, frame = self.internal.read() if i == 4: print(_("Failed to read camera specified in the 'device_path' config option, aborting"))