如下所示:
#获得视频的格式
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
2021-12-24 19:56:09
34KB
c
mp
mp4
1