Closed nergnezor closed 2 years ago
I haven't had any framerate issues. Could you share some details about your system? Are you running a multi-GPU system like a laptop?
Oh, also are you sure your screen is actually updating at 60Hz? Windows.Graphics.Capture may not push new frames if the compositor decided not to draw (e.g. no changes on screen).
Yes. When I remove the encoding I can see that I get frames at 60hz. Yes, it's a multi-GPU laptop. Both the CPU and Intel GPU are almost idling while the Nvidia GPU is encoding at 50%. It's a 2015 laptop though, so maybe it's just outdated. I just got really good performance doing the same but using c++/winrt previously with help from MS (ScreenCaptureforHWND) & Nvidia examples.
The issue is likely that the monitor you're recording is on a different GPU than the one you're using to capture or encode. That will incur a performance penalty. Unfortunately, displayrecorder isn't really tuned to handle this scenario and I've mainly tested it with single GPU systems.
You can try forcing a different GPU by using the Graphics settings page in the Settings app to see if that makes a difference. I got there by searching "GPU" in the search box inside the Settings app, and it took me to the "Graphics settings" page. From there you can click "Browse", select displayrecorder, and then pick a different GPU.
Let me know what you find.
Sorry for the late reply. I had actually tried this before as setting it to high performance was needed to use NVIDIA H.264 Encoder MFT at all and not panic during encoder setup.
Btw, I've switched from video encoding to image encoding on my project and I've used your screenshot-rs as a template (instead of displayrecorder) and it works great
I'm stuck at around 15 fps (capturing 4k@60 Hz) even though I'm using Nvidia hw encoding. My CPU is pretty much idling. I assume it's the encoder keeping the frames for too long and missing new frames. Are you getting decent framerates?