App shows low fps but video plays smooth with ofxHapPlayer

I’m just confused. Computer is running windows 10 and plays multiple videos with ofxHapPlayer. They all run smoothly but ofGetFrameRate() reports like 10 fps. I measured in pure ms and I got like 60 ms per update().

I’m going to switch computer but I don’t get why this is happening?

Could it be that the video is “running” on the gpu and I just get wherever it is every 10 times each second? So timing stays ok even if the e fps is low?

Hmm, ofGetFrameRate() is usually pretty accurate.
Are you in Debug or Release - VS builds will be much slower in Debug mode.

60ms per update is around 16fps, but that doesn’t account for the draw calls, so 10fps seems about right.

I might be wrong but I don’t think HAP is hardware accelerated, its mainly used for fast scrubbing access, but probably isn’t as fast as mp4 for pure playback.

Seems like the fps is right. I just don’t understand how the video can flow so smooth. But could just be that the internal clock of the player keeps in sync even tho the fps of the app is low. So video keeps sync but I only grab a frame each 10 or so frames.

There is an issue here that mentions having audio in the Hap files can make a big difference CPU wise.

I would definitely also maybe play around with some other formats if you need your app to be faster.

1 Like

Think I’ll have a look at other formats as well! Thanks!