如下所示: #获得视频的格式 videoCapture = cv2.VideoCapture('/home/lw/3661.mp4') #获得码率及尺寸 fps = videoCapture.get(cv2.CAP_PROP_FPS) size = (int(videoCapture.get(cv2.CAP_PROP_FRAME_WIDTH)), int(videoCapture.get(cv2.CAP_PROP_FRAME_HEIGHT))) fNUMS = videoCapture.get(cv2.CAP_PROP_FRAME_COUNT) #读帧 success, frame = v