call ip The camera was fine , And then somehow report an error
cv2.namedWindow("camera", 2) # Turn on ip camera video = "http://admin:[email protected]:8081/" # here @ After ipv4 The address needs to be changed to app Address provided cap = cv2.VideoCapture(video) # Turn on the camera while True: ret, image_np = cap.read() cv2.imshow('camera', image_np) key = cv2.waitKey(10) # Press the key to handle if key == 27: # esc Key to exit print("esc break...") break print(cap.get(cv2.cv2.CAP_PROP_FRAME_COUNT)) cap.release() cv2.destroyAllWindows()