Spaces:
Sleeping
Sleeping
Update live_streaming_flask.py
Browse files- live_streaming_flask.py +2 -2
live_streaming_flask.py
CHANGED
@@ -26,11 +26,11 @@ JSON_FOLDER_PATH = os.path.join(OUTPUT_FOLDER, "EXTRACTED_JSON")
|
|
26 |
for path in [OUTPUT_FOLDER, IMAGE_FOLDER_PATH, DETECTED_IMAGE_FOLDER_PATH, PDF_FOLDER_PATH, JSON_FOLDER_PATH]:
|
27 |
os.makedirs(path, exist_ok=True)
|
28 |
|
29 |
-
camera = cv2.VideoCapture('rtsp://freja.hiof.no:1935/rtplive/_definst_/hessdalen03.stream') # use 0 for web camera
|
30 |
# for cctv camera use rtsp://username:password@ip_address:554/user=username_password='password'_channel=channel_number_stream=0.sdp' instead of camera
|
31 |
# for local webcam use
|
32 |
# camera= cv2.VideoCapture(0)
|
33 |
-
|
34 |
ret, frame = camera.read()
|
35 |
if not ret:
|
36 |
raise RuntimeError("❌ Failed to connect to RTSP stream. Check URL or connectivity.")
|
|
|
26 |
for path in [OUTPUT_FOLDER, IMAGE_FOLDER_PATH, DETECTED_IMAGE_FOLDER_PATH, PDF_FOLDER_PATH, JSON_FOLDER_PATH]:
|
27 |
os.makedirs(path, exist_ok=True)
|
28 |
|
29 |
+
# camera = cv2.VideoCapture('rtsp://freja.hiof.no:1935/rtplive/_definst_/hessdalen03.stream') # use 0 for web camera
|
30 |
# for cctv camera use rtsp://username:password@ip_address:554/user=username_password='password'_channel=channel_number_stream=0.sdp' instead of camera
|
31 |
# for local webcam use
|
32 |
# camera= cv2.VideoCapture(0)
|
33 |
+
camera = cv2.VideoCapture("http://wmccpinetop.axiscam.net/mjpg/video.mjpg")
|
34 |
ret, frame = camera.read()
|
35 |
if not ret:
|
36 |
raise RuntimeError("❌ Failed to connect to RTSP stream. Check URL or connectivity.")
|