import cv2
import os
import glob
list1 = []
# m = glob.glob('H:\mypython_lib\output\*\*\*.mp4')
m = os.listdir(r"H:\mypython_lib\test_real")
for index, i in enumerate(m):
videoCapture = cv2.VideoCapture(os.path.join(r"H:\mypython_lib\test_real", i))
frames = videoCapture.get(cv2.CAP_PROP_FRAME_COUNT)
fps = videoCapture.get(cv2.CAP_PROP_FPS)
print(fps,frames)
python获取视频总帧数和帧率
最新推荐文章于 2024-06-03 20:49:41 发布