一個不知道啥牌子的網絡攝像機html
import cv2
url = 'rtsp://admin:admin@ip:554/h264/ch1/main/av_stream' cap = cv2.VideoCapture(url) while(cap.isOpened()): ret, frame = cap.read() cv2.imshow('frame', frame) if cv2.waitKey(1) & 0xFF == ord('q'): break cap.release() cv2.destroyAllWindows()
url = 'rtsp://(用戶名)admin:(密碼)admin@ip:(端口)554/h264/ch1/main/av_stream'
具體格式介紹:https://jingyan.baidu.com/article/295430f19b01bf0c7e0050d2.html