diff --git a/camera_stream.py b/camera_stream.py index adb0383..98afaff 100644 --- a/camera_stream.py +++ b/camera_stream.py @@ -127,8 +127,11 @@ def _process_stream(camera): if cap is None: cap = cv2.VideoCapture(rtsp_url) if not cap.isOpened(): + print(f"[ERROR] {camera['name']} (IP: {camera['ip']}) failed to connect. Check if 401 Unauthorized or 403 Forbidden.") with lock: state["cameras"][cam_id]["status"] = "error" - time.sleep(5); cap = None; continue + time.sleep(10); cap = None; continue + + print(f"[SUCCESS] {camera['name']} (IP: {camera['ip']}) connected and streaming over TCP.") with lock: state["cameras"][cam_id]["status"] = "live" ret, frame = cap.read()