From a7b7a571c301cfd4264750af62f71ed25d20ed48 Mon Sep 17 00:00:00 2001 From: ahmedmujtaba-gif Date: Fri, 17 Apr 2026 13:26:20 +0500 Subject: [PATCH] Server 0.6 --- camera_stream.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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()