python opencv读取RTSP视频流程序

import cv2 
cap = cv2.VideoCapture("rtsp://admin:[email protected]:554//Streaming/Channels/1")
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()
--------------------- 
作者:天天_ 
来源:CSDN 
原文:https://blog.csdn.net/qq_28013751/article/details/83506271 
版权声明:本文为博主原创文章,转载请附上博文链接!

你可能感兴趣的:(opencv)