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

Fullscreen recording issue with extended display #330

Open
5cutters opened this issue Nov 26, 2024 · 5 comments
Open

Fullscreen recording issue with extended display #330

5cutters opened this issue Nov 26, 2024 · 5 comments

Comments

@5cutters
Copy link

5cutters commented Nov 26, 2024

I'm trying to record a fullscreen opengl app with mixed success on a two monitor setup using RecorderApi.DesktopDuplication.

If i have the desktop set to display only on monitor 1 in windows the recording works;

image

ok.log

But if i change the desktop to extended the capture records a flickering video (with intermittent black frames) and log file shows "Desktop temporarily unavailable: hr = 0x887a0026, error = The keyed mutex was abandoned." errors;

image

bad.log

The only difference is that monitor 2 is now active, but no recording is being attempted on it (and it is not set as a RecordingSource).

If the fullscreen application on monitor 1 is changed to run windowed then recording is also successful.

Any ideas or settings to change to record a fullscreen application on monitor 1 when the displays are set as extended?

Windows build is Win11 24H2, 26100.2454 if that is a factor.

@sskodje
Copy link
Owner

sskodje commented Nov 27, 2024

I'll try reproduce the issue and see if i can figure it out :)

@5cutters
Copy link
Author

Hi @sskodje , any luck recreating the issue at all - or do you think it's more likely something my end?

@sskodje
Copy link
Owner

sskodje commented Dec 19, 2024

Hi! I apologize for the late answer, i have been busy and forgot all about it 😳. I have now tried to recreate it with the OpenGL game Amnesia: Dark Descent with a 4k monitor attached as extended, but i did not manage to reproduce the issue. The recording was 60fps as expected. Which leaves us with quite a few possibilities, like the app itself, the graphics hardware or drivers, etc..

The error is described here.

DXGI_ERROR_ACCESS_LOST if the desktop duplication interface is invalid. The desktop duplication interface typically becomes invalid when a different type of image is displayed on the desktop. Examples of this situation are:

Desktop switch
Mode change
Switch from DWM on, DWM off, or other full-screen application

In this situation, the application must release the IDXGIOutputDuplication interface and create a new

Indeed this happens when you alt-tab in and out of a fullscreen application, but it should normally not happen while in fullscreen. A possible workaround could be using the Windows Graphics Capture API instead, by setting the RecorderApi property on your DisplayRecordingSource. The yellow border can also be disabled with the IsBorderRequired property.

@5cutters
Copy link
Author

Thanks.
Think the last time i tried the windows graphic capture API with a fullscreen OpenGL app it only captured a static image for video.
I'll grab the latest nvidia drivers and see if that makes a difference with either api (GPU being used is RTX4060)

@5cutters
Copy link
Author

Updated drivers and still get the same issue with extended desktop when recording a fullscreen opengl app. No luck using windows graphics capture instead either.

Not sure if it's the app or something else, a strange thing that i've noticed is that if i have the left mouse down and move the mouse on 2nd screen the recording works (?)

Anyway i guess i have a workaround and can simply call displayswitch.exe directly or via cli to change the display config to non extended before recording.

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