import cv2import numpycap=cv2.VideoCapture(0)#参数可改成视频路径while True: ret,frame=cap.read() print(ret,frame) cv2.imshow('frame',frame) if cv2.waitKey(1) and 0xFF==ord('q'): break