Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect behavior of MinUpdateInterval for values ​​less than 1ms #82

Open
artths opened this issue Oct 6, 2024 · 1 comment
Open

Comments

@artths
Copy link

artths commented Oct 6, 2024

There is essentially no documentation for the new 26100 APIs, but it is clear from the sample that MinUpdateInterval is used to limit the capture frequency.
In my tests, this API works properly for all values ​​greater than 1 ms, for example, if the content being captured is 144 fps, a value of 25 ms will capture at only 40 fps, 17 ms - about 60 fps, and so on.
However, when I set it to 0 ms, I expect it to capture without limits, i.e. at least the framerate of the captured window (if I want to capture all 144 frames), but instead the WGC captures only about 50 fps. Moreover, this behavior remains for all values ​​greater than 0 but less than 1 ms. For example, with a value of std::chrono::microseconds(1000) it captures 144 fps, and a value of std::chrono::microseconds(999) and any number less, including 0 only captures 50 fps.
The worst part is that the default value is 0, and until you figure out to call this API, you will have such poor results.

Another question concerns the performance of the WGC capture in general. When the game is paused and GPU consumption is low, the WGC captures all 144 frames. When game resumed, the GPU consumption increases to about 50% and the number of captured frames is close to 100 fps.
I tried to use CaptureFramePool::Create as well as CaptureFramePool::CreateFreeThreaded, different number of pool buffers, close the frame immediately or after processing - the result is always the same.
Do you have any advice on how to increase the capture performance? It's strange to me that Desktop Duplication worked much faster before it was broken in 24H2 (see #83).
My software critically depends on the capture performance and I am looking for at least one working option for 24H2 and future versions.
Thank you.

@robmikh
Copy link
Owner

robmikh commented Oct 18, 2024

Can you share a bit more about your monitor configuration (primarily which is the primary and what is the refresh rate) and what applications you're using to test? I'm not able to reproduce what you've described with MinUpdateInterval.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants