diff --git a/src/cli/add.py b/src/cli/add.py index 3106055b..e97c627e 100644 --- a/src/cli/add.py +++ b/src/cli/add.py @@ -109,7 +109,7 @@ video_capture = pyv4l2_reader(config.get("video", "device_path"), config.get("video", "device_format")) else: # Start video capture on the IR camera through OpenCV - video_capture = cv2.VideoCapture(config.get("video", "device_path")) + video_capture = cv2.VideoCapture(config.get("video", "device_path"), cv2.CAP_V4L) # Force MJPEG decoding if true if config.getboolean("video", "force_mjpeg", fallback=False): diff --git a/src/cli/test.py b/src/cli/test.py index 16fadb14..d221470a 100644 --- a/src/cli/test.py +++ b/src/cli/test.py @@ -21,7 +21,7 @@ sys.exit(12) # Start capturing from the configured webcam -video_capture = cv2.VideoCapture(config.get("video", "device_path")) +video_capture = cv2.VideoCapture(config.get("video", "device_path"), cv2.CAP_V4L) # Force MJPEG decoding if true if config.getboolean("video", "force_mjpeg", fallback=False): diff --git a/src/compare.py b/src/compare.py index 98c6b72c..c316feff 100644 --- a/src/compare.py +++ b/src/compare.py @@ -124,7 +124,7 @@ def stop(status): video_capture = pyv4l2_reader(config.get("video", "device_path"), config.get("video", "device_format")) else: # Start video capture on the IR camera through OpenCV - video_capture = cv2.VideoCapture(config.get("video", "device_path")) + video_capture = cv2.VideoCapture(config.get("video", "device_path"), cv2.CAP_V4L) # Force MJPEG decoding if true if config.getboolean("video", "force_mjpeg", fallback=False):