
Это скрипт для определения fps:
Код: Выделить всё
import cv2
if __name__ == '__main__' :
video = cv2.VideoCapture("test.mp4");
# Find OpenCV version
(major_ver, minor_ver, subminor_ver) = (cv2.__version__).split('.')
if int(major_ver) < 3 :
fps = video.get(cv2.cv.CV_CAP_PROP_FPS)
print "Frames per second using video.get(cv2.cv.CV_CAP_PROP_FPS): {0}".format(fps)
else :
fps = video.get(cv2.CAP_PROP_FPS)
print "Frames per second using video.get(cv2.CAP_PROP_FPS) : {0}".format(fps)
video.release();
Код: Выделить всё
Frames per second using video.get(cv2.CAP_PROP_FPS) : 0.0Подробнее здесь: https://stackoverflow.com/questions/490 ... ns-0-0-fps
Мобильная версия