如下所示:
1、计算总帧数
import os
import cv2
video_cap = cv2.VideoCapture('ffmpeg_test.avi')
frame_count = 0
all_frames = []
while(True):
ret, frame = video_cap.read()
if ret is False:
break
all_frames.append(frame)
frame_count = frame_count + 1
# The value below are both the number of frames
pri
2021-11-06 17:53:56
35KB
c
nc
op
1