-
-
Notifications
You must be signed in to change notification settings - Fork 85
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 doesn't capture as expected with fullscreen game #28
Comments
Hello, Could you provide a minimal script I can run for testing? Which version of Windows? If you replace
What are the resulting screenshots? |
Hi, I'm running it on windows 8.1 x64 Which by the way is a fullscreen directX game. Here are the 2 screenshot produced by your modification https://www.dropbox.com/s/olptmi5mqisgdhf/fullscreen.png?dl=0 |
Screenshots are good. |
I don't think it's working as expected. I runned the script 2 more times and got this : run 2 : https://www.dropbox.com/s/l5nw25lw9zamj4s/monitor-1.png?dl=0 It's not always producing the same result. When you ask about the minimal snippet do you ask about the game code? this is not my game, it's a commercial game : https://www.elitedangerous.com/ |
I see, you launched the game in fullscreenmode and then the Python script to capture the screen, right? If you take a screenshot every seconde while playing, do you have constant good results? |
yes, sorry if I was not clear Launch the game I just took 100 screenchots while playing th game using this :
they all show the desktop, not the game |
OK, thank you for the report. I do not know if it is related to MSS or the Windows'windows management. I will have a look later. |
Alright, Thanks for your work. |
I’d guess this is because “Fullscreen” in games (versus “Borderless Window” or the like) uses “Exclusive Mode”/“Active Rendering” wherein the application itself works directly with the GPU to write to the screen, as opposed to to working with the window manager. It’s not impossible to take screenshots per se, but you won’t be able to do so through the window manager APIs. In the case of video games (or anything using DirectX in exclusive mode) it’s usually done through DLL injection to hook into DirectX drawcalls. (A cursory examination of |
Hello, Could you try with the latest version from the master branch? I hope that fix will help with your case. |
In the same mood as @karanlyons I just found this link for one MS developer: Ways to capture the screen. And without DLL injection it seems compromised. |
An idea could be to test using DirectX via ctypes (I have no idea if this is doable). |
Any solution? Tried with 6.1.0 and i still can't get screenshot in games, even if they're not fullscreen - but isn't windowed either - the command is just ignored. It's working perfectly on desktop and other applications like Photoshop. Any ideas? |
Turns out that it was a problem with Pynput keyboard listener, i used a shortcut to take the screenshot, it needed elevated privileges to work with games (Why?). All good, friend, sorry ;) |
Hi Mickael, thanks for the great library -- always been a big fan. I know this is an old issue but this is one of the biggest reason that made me to build a wheel. Capturing of DirectX fullscreen apps can definitely be done via ctypes: For reference -> https://github.com/ra1nty/DXcam Also, the capturing speed can be vastly improved by doing so. (See benchmarks section of DXcam). Drawback: probably need to add comtypes to dependency on win32 |
Hi,
I was under the impression that this package should be able to make game screenshot.
I did the following :
However all I'm getting is this :
https://www.dropbox.com/s/yy5qnltobdp02v6/test.png?dl=0
Is this what is expected?
Thanks.
The text was updated successfully, but these errors were encountered: