I’ve build opencv c++ and python from source but it run slower than opencv-python which i’ve install through pip install.
my code bendmark run time above
import cv2
import time
FPS_SMOOTHING = 0.9
cap = cv2.VideoCapture("file.mp4")
fps = 0.0
prev = time.time()
while True:
now = time.time()
fps = (fps*FPS_SMOOTHING + (1/(now - prev))*(1.0 - FPS_SMOOTHING))
prev = now
print("fps: {:.1f}".format(fps))
got, frame = cap.read()
if not got:
break