I have a camera setup and running in my local network. I can see the video stream via VLC without any issues. Now I am trying to run the following code to also observe the stream with python + opencv.
I am using:
import cv2
cap = cv2.VideoCapture(
"rtsp://192.168.234.127:8554/h264",
)
while cap.isOpened():
status, frame = cap.read()
cv2.namedWindow("frame", cv2.WINDOW_NORMAL)
cv2.imshow("frame", frame)
if cv2.waitKey(20) & 0xFF == ord('q'):
break
cap.release()
cv2.destroyAllWindows()
This results in the script being stuck at cap.read()
with the following error occuring in the background: [rtsp @ 0000020008b7cd40] method SETUP failed: 501 Not Implemented
. Note that cap.isOpened()
returns True
.
I tried:
edit:
Http error 501 - The request method is not supported by the server and cannot be processed. Try check your server, camera. Try use http with mp4 or like it.