The script is just suppose to grab a frame from the RTSP stream and save it every 60 seconds. The block below checks if it is a valid connection. I.e User/Password and IP is correct and in this case to wait if the camera becomes disconnected.
The script connects and saves the frame correctly.
video = cv2.VideoCapture('rtsp://user:[email protected]/stream/', cv2.CAP_FFMPEG)
try:
if video.isOpened():
ref, frame = video.read()
cv2.imwrite("frame%d.jpg" % ref, frame)
except Exception as e:
print(e)
However after that it throws a notice
[rtsp @ 0000022c41432c0] method DESCRIBE failed: 401 Unauthorized
Am I not setting up the device correctly? Or is it possible the device does not support DESCRIBE or is implemented poorly?