Questions tagged [desktop-duplication]
48 questions
1
vote
1 answer
High CPU usage, with different timeouts interval, between frames acquiring in Desktop Duplication API
I'm trying to capture the screen with 16ms of the timeout, and i'm getting 60-65 FPS when the capture is tested on full screen 4k 60fps video. CPU usage, in this case, is approximately 0-1%. But when the mouse cursor is moving on the screen, the FPS…

KKomrade
- 95
- 4
1
vote
1 answer
DXGI API: AcquireNextFrame() never grabs an updated image, always blank
I've been playing around with someone else's code that implements the DXGI desktop duplication API and I've run into a strange issue. Here's the github link to the code I am…

AcolyticSubstrate
- 49
- 8
0
votes
1 answer
Alternatives to Desktop Duplication API that work when screen is locked
Does that even make sense in principle?
Desktop Duplication API returns DXGI_ERROR_ACCESS_LOST, which makes sense, because the display output is taken over by the logon session.
However, DirectX games continue to run in the background, and a cursory…

LOST
- 2,956
- 3
- 25
- 40
0
votes
0 answers
Desktop Duplication API returns blank image inside Windows Sandbox
I am fiddling with recording the screen of Windows Sandbox based on https://github.com/mika-f/dotnet-window-capture :
var hr = _duplication.TryAcquireNextFrame(100, out _, out var desktopResourceOut);
if (hr.Failure)
return null;
using var…

LOST
- 2,956
- 3
- 25
- 40
0
votes
0 answers
(windows nvidia video codec sdk) How to set up an hevc encode session in c++ that asynchrnously encodes a dxgi surface texture and outputs to stdout?
I'm working on a c++ executable that grabs my display output using DXGI output duplication in the form of DXGI surface textures(I think), directly encodes it in HEVC using my GPU hardware encoder, which then downloads the bitstream to system memory…

Tiger Yang
- 61
- 4
0
votes
0 answers
Windows Capture Performance (DXGI) Bug
I find that Microsoft's decision to provide cursor updates in the AcquireNextFrame loop causes a huge performance hit when the cursor is being moved around.
When I turn on a millisecond-level clock in the browser, AcquireNextFrame can capture 60…

yanrk
- 49
- 5
0
votes
0 answers
lDesktopResource->QueryInterface(I&lAcquiredDesktopImage); is stopping the second loop
I am using this code to take a series of screen shot using desktop duplication api.
The code is only for a single shot.
Thus I am looping over it.
However looping the entire code gives fps of 3-4. So I am not looping over the declarations and…

user541396
- 163
- 1
- 9
0
votes
1 answer
DXGI/NvEnc YUV44 10bit format compatability
Using DirectX 11, DXGI DDA and NvEnc. I have to support YUV420, YUV444, 8bit, and 10bit.
I have the conversions working great for YUV420, YUV444, and 8bit. With 10bit i Run into a bit of a problem of DXGI_FORMAT compatibility with the…

vulkur
- 21
- 5
0
votes
0 answers
C++ Innacessible methods of an exnternal struct within a scope resolution operator
So I'm developing an app that uses the desktop duplication API, however, when using the IDXGIDevice interface and trying to access its getParent method I get the following error
class "IDXGIDevice" has no member "GetParent"
When using header files…
0
votes
0 answers
Is it possible to crop screenshot at gpu level
My final goal is to get screenshots of a cropped area on the screen as fast as possible.
I'm using the the desktop duplication api with sharpdx to retrieve the full screenshot from windows according to the official sample…

Perfect28
- 11,089
- 3
- 25
- 45
0
votes
2 answers
Error when trying to capture desktop using DXGI and DirectX11 on intel 630 HD
I get the below error when trying to use DXGI to capture the builtin screen on my laptop that runs on an Intel 630 HD with the latest driver. The code works when I capture the external screen running on my GTX 1070.
SharpDX.SharpDXException
…

Jacob Harrand
- 3
- 3
0
votes
1 answer
Window Capture with DXGI
I have a working version of desktop capture using DXGI.
Is there a way to capture a separate window(HWND) using the same manager?

Nikolay
- 13
- 3
0
votes
0 answers
How to encode IMFSample from Windows Duplication API to H264?
I'm looking for a working alternative to make this work
My target is a Generic Computer(so it would tentatively work on every's client computer),
i've tried for months with the IMFTransform library, but on my computer (even with different filters on…

Ezequiel Berazategui
- 41
- 5
0
votes
0 answers
DXGI Desktop Duplication causes stuttering with FreeSync/G-Sync
Using DXGI Desktop duplication with FreeSync/G-Sync monitor causes stuttering in full screen games. It happens in games which are in the "borderless fullscreen" mode by Windows 10 (you can check it e.g. when you change volume, you see the slider in…

Daniel
- 58
- 6
0
votes
0 answers
Windows Desktop Duplication API AcquireNextFrame avoid DXGI_ERROR_WAIT_TIMEOUT
I am using the desktop duplication API right now to record my desktop. I want it to record at at least 30FPS. I noticed that AcquireNextFrame would often return DXGI_ERROR_WAIT_TIMEOUT if I set the time out period to be 33 (33ms is approximately…

ktb92677
- 407
- 4
- 16