[rtsp @ 000001e16e172f00] method SETUP failed: 461 Unsupported transport
代码
-- coding: utf-8 --
import cv2
url = 'rtsp://127.0.0.1:8554/'#根据摄像头设置IP及rtsp端口
cap = cv2.VideoCapture(url)#读取视频流
while(cap.isOpened()):
# Capture frame-by-frame
ret, frame = cap.read()
# Display the resulting frame
cv2.imshow('frame',frame)
if cv2.waitKey(1) & 0xFF == ord('q'):
break
When everything done, release the capture
cap.release()
cv2.destroyAllWindows()