ofVideoGrabber frame rate

A (simple?) question about ofVideoGrabber’s frame rate –

Does the frame rate match the window’s drawing rate, or is it slower?

If slower, is there a way to know when a new frame is available?

I’m interested in frame-difference motion detection. The catch is – if there are some window-drawing cycles where the camera hasn’t updated, then the difference to the previous window frame is 0, which would result in jittery data.

(I’ve seen movement vector from video but it’ll take more time to digest.)


To know if a new frame is available, there is a method called isFrameNew https://openframeworks.cc/documentation/video/ofVideoPlayer/.

AFAIK, the window’s frame rate and the video’s frame rate are two separated things. If you play a video that its made in 24 fps, OF tries do draw its textures on screen at 60 fps.