Skip to content

Commit

Permalink
Update mineral.py
Browse files Browse the repository at this point in the history
  • Loading branch information
kishorsumathi authored Dec 7, 2023
1 parent efe4e8c commit daf25b6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/margsoft/mineral.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ def get_video_capture(rtsp_url):
print("Failed to open the stream.")
return None
return cap

cap = get_video_capture(rtsp)

cap = cv2.VideoCapture(rtsp, cv2.CAP_FFMPEG)
# cap = get_video_capture(rtsp)
class_names = []
with open(names_file, "r") as f:
class_names = [cname.strip() for cname in f.readlines()]
Expand Down Expand Up @@ -65,6 +66,7 @@ def get_video_capture(rtsp_url):
cap = get_video_capture(rtsp)
else:
# Attempt to reconnect if the capture is None
print("Error in frame")
time.sleep(3)
cap = get_video_capture(rtsp)

Expand Down

0 comments on commit daf25b6

Please sign in to comment.