add RTSP example
This commit is contained in:
@ -2,8 +2,10 @@
|
||||
|
||||
import cv2
|
||||
|
||||
cam_port = 2
|
||||
cam = cv2.VideoCapture(cam_port)
|
||||
RTSP_ADDR = 'rtsp://localhost:8554/cam'
|
||||
DEVICE_ADDR = 2
|
||||
|
||||
cam = cv2.VideoCapture(DEVICE_ADDR)
|
||||
|
||||
while True:
|
||||
result, image = cam.read()
|
||||
@ -17,5 +19,6 @@ while True:
|
||||
break
|
||||
|
||||
cam.release()
|
||||
|
||||
cv2.destroyWindow('Camera')
|
||||
cv2.destroyAllWindows()
|
Reference in New Issue
Block a user