import cv2 url = "rtsp://用户名:密码@192.168.0.102/Streaming/Channels/2" //在萤石云web里面查看 cap = cv2.VideoCapture(url) ret, frame = cap.read() while ret: ret, frame = cap.read() cv2.imshow("frame",frame) if cv2.waitKey(1) & 0xFF == ord('q'): break cv2.destroyAllWindows() cap.release()
#番外
VLC
媒体–>打开网络串流–>网络
在网络URL里面输入:
“rtsp://用户名:密码@192.168.0.102/Streaming/Channels/2” //在萤石云web里面查看