0823更新读取视频流
parent
410d033cfe
commit
38b5121e15
@ -0,0 +1,18 @@
|
|||||||
|
|
||||||
|
import cv2
|
||||||
|
url = 'rtsp://admin:我的密码@我的摄像头IP如169.254.115.55:554/h264/ch1/main/av_stream'
|
||||||
|
cap = cv2.VideoCapture(url)
|
||||||
|
while(cap.isOpened()):
|
||||||
|
# Capture frame-by-frame
|
||||||
|
ret, frame = cap.read()
|
||||||
|
# Display the resulting frame
|
||||||
|
|
||||||
|
# 读图保存图
|
||||||
|
cv2.imwrite("path",frame)
|
||||||
|
cv2.imshow('frame',frame)
|
||||||
|
|
||||||
|
if cv2.waitKey(1) & 0xFF == ord('q'):
|
||||||
|
break
|
||||||
|
# When everything done, release the capture
|
||||||
|
cap.release()
|
||||||
|
cv2.destroyAllWindows()
|
Loading…
Reference in New Issue