picamera
picamera copied to clipboard
Getting actual framerate/frame timing
I would like to know the camera's actual frame rate. This might seem trivial, but I could not find an obvious solution. I'm using PiCamera 1.13 with Python 3.7.3.
My current approach is
with picamera.PiCamera(resolution='416x416', framerate=60) as camera:
time.sleep(2)
camera.start_preview()
while True:
fps = camera.framerate.numerator / camera.framerate.denominator
camera.wait_recording(0.01)
...
But I've found that camera.framerate only follows the framerate that I set, even if it's something absurd like
picamera.PiCamera(resolution='416x416', framerate=500)
I'm fairly sure the Pi HQ camera does not support 500 FPS, but that's what camera.framerate returns.
Is there a way to know the PiCamera's actual framerate? Or at least frame time so I may calculate it myself.