Ways to Measure FPS When Playing Video with FFmpeg and C++ in a Slint App #8997
Unanswered
metahead00
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi! I'm building a C++ app with a Slint UI that plays video using FFmpeg, and I'm trying to measure the actual FPS (frames per second) during playback.
Right now, I use a std::condition_variable to synchronize frame decoding and rendering, and I count how many frames are displayed each second to measure FPS.
It works, but I suspect that it might be affecting performance, since I get around 48–50 FPS on my PC, but only 8–9 FPS on my tablet. So I’m wondering:
Is there a better or more accurate way to measure FPS in this setup?
How do others typically measure FPS in a Slint app?
Any insight, suggestions, or best practices would be appreciated!
Thanks 🙏
Here is the C++ snippet in case:
Beta Was this translation helpful? Give feedback.
All reactions