Comments (7)
Another clue: When I call DwmGetCompositionTimingInfo on Windows 10 I'm getting these numbers:
rateRefresh = 64/1 = 64.00
rateCompose = 64/1 = 64.00
qpcRefreshPeriod = 1562500 = 15.62ms
So DWM supposedly also thinks it's running at 64hz. But it looks like that's not true.
from win32capturesample.
Windows 10 DDA capture inside RDP session with DWMFRAMEINTERVAL
registry hack shows consistent vsyncs and the dwm.exe bars don't stretch until vsync lines:
Compared with Windows 10 DDA capture inside a regular session:
from win32capturesample.
I'll need to take a closer look, but my immediate reaction is that this sounds like either a QEMU issue or something lower level than the system compositor. We can't influence the vsync in a way that would make it inconsistent like that. Even more telling that you can make it behave using RDP, as RDP uses an indirect display driver and likely circumvents the QEMU display driver.
Thanks for the report!
from win32capturesample.
It also happens with basic VGA (basicdisplay.sys), QXL drivers (qxldod.sys) and no display at all (-vga none), but only since Windows 10.
On Windows 8 and 8.1 it gets consistent 64 fps as seen in the first screenshot with QXL drivers.
from win32capturesample.
I've profiled the same Windows 10 with standard VGA just now (-vga std or -device vga) with this setup:
The test was running the DDA capture program, GPUView log and UFO Test in a browser.
As usual, connecting to RDP session and using DWMFRAMEINTERVAL
hack guarantees more than 64fps:
In a normal session, UFO Test measure 64fps and 64hz but capture shows only about ~30fps.
It seems like maybe the browser is able to render at 64fps but DWM only renders at 30?
GPUView shows a similar picture but with a few differences. Vsync is still a bit inconsistent but the frames don't actually come on every vsync timing and are sometimes delayed. Also there a few abnormal peaks:
Peak zoomed in:
After the peaks there are some delays after which I see these chunks (edited image):
from win32capturesample.
Another profile from same Windows 10, this time with VirtIO VGA (-device virtio-vga) and viogpudo.sys driver (https://github.com/virtio-win/kvm-guest-drivers-windows/tree/master/viogpu/viogpudo)
Active signal resolution -1 x -1?
RDP session with DWMFRAMEINTERVAL
hack as usual, 64fps+
Regular session is about ~20-30 fps (same results)
Slightly different GPUView, no more peaks in DDA capture program but instead some peaks in dwm.exe:
Zoomed in:
from win32capturesample.
Is there anything I can try on my end to get this solved? I could use a different driver or compile a sample WDDM driver but I'm not sure what to change as both QXL and VirtIO drivers seem to be based on WDDM examples. Any advice would be greatly appreciated as it's quite difficult to figure out how to approach this problem. Thank you!
from win32capturesample.
Related Issues (20)
- The effect of Borderless will be reset when desktop resolution changed HOT 1
- The performance overhead of capturing the desktop is too high. HOT 1
- How reliable is Windows Graphics Desktop Capture in replicating the monitor frames ? HOT 9
- Possible Problem With Some Apps HOT 1
- How to convert Bgra to Rgba HOT 1
- Windows 11 22H2 OS build 10.0.22621.2428: CreateCaptureSession(item) does not return and hangs HOT 28
- winrt::windows::Graphics::Capture::GraphicsCaptureSession.Close() hangs on Windows 10 HOT 8
- C++ docs for winrt HOT 1
- no callable 'await_resume' function found for type 'winrt::Windows::System::DispatcherQueue' HOT 2
- check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Graphics::Capture::IDirect3D11CaptureFramePoolStatics)->Create(*(void**)(&device), static_cast<int32_t>(pixelFormat), numberOfBuffers, impl::bind_in(size), &result)); HOT 4
- some questions about threading model HOT 1
- How to copy the captured frame data to CUDA directly without copy to CPU first? HOT 1
- How to convert captured frames to opencv matrix? HOT 2
- additional requirement HOT 1
- Fix GitHub Actions build
- Add Windows 26100 features HOT 1
- CreateForWindow 0x80070057 HOT 1
- GPU memory leak when stop capturing HOT 2
- Thank you HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from win32capturesample.