import cv2
rtsp_url = 'rtsp://10.0.58.253:9090/dss/monitor/param?cameraid=1003411%2417&substream=1'
cap = cv2.VideoCapture(rtsp_url)
while True:
ret, frame = cap.read()
if not ret:
print("Error reading stream.")
break
cv2.imshow('Stream', frame)
if cv2.waitKey(1) & 0xFF == ord('q'):
break
cap.release()
cv2.destroyAllWindows()
远程获取视频流
最新推荐文章于 2024-08-25 10:07:21 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)