ra1nty / DXcam

A Python high-performance screen capture library for Windows using Desktop Duplication API
MIT License
457 stars 67 forks source link

is there any way to "unscreenshot" a window? #71

Open dvdco opened 11 months ago

dvdco commented 11 months ago

working on using yolo to realtime mark objects on user's screen and setting an overlay to display the result. is there anyway to stop dxcam to capture my topmost overlay window but only the content below it?

AI-M-BOT commented 11 months ago

Impossible using AcquireNextFrame which dxcam is using Possible with TryGetNextFrame

Plus, some anti-cheat engine started to detect screenshot api usage (by hooking i guess), some popular streaming or remote software are whitelisted but definitely not yours. Which is why we are developing a capture card with only 6ms latency (worth 150 bucks i assume). Finally, take care and have fun

Agade09 commented 10 months ago

@AI-M-BOT Do you know if using this "GraphicsCaptureItem" API, to screenshot a window instead of screenshotting the desktop, I could bypass the WDM's (WIndows Desktop Manager) Vsync? I need to screenshot at very high framerates (~ 1000FPS) and WDM basically caps the frame rate to the monitor's framerate, unless I run the game in fullscreen with disabled "fullscreen optimizations".

Jtonna commented 10 months ago

Impossible using AcquireNextFrame which dxcam is using Possible with TryGetNextFrame

Plus, some anti-cheat engine started to detect screenshot api usage (by hooking i guess), some popular streaming or remote software are whitelisted but definitely not yours. Which is why we are developing a capture card with only 6ms latency (worth 150 bucks i assume). Finally, take care and have fun

ive already made a hardware based solution for colorbotting and ai-aimassist using a HD60X though obs with a fluxuating latency of 30-66ms (the latency is on the capture card side not the obs, obs only seems to add 1ms of preview latency)

id love to chat with yall about this cap card.

AI-M-BOT commented 10 months ago

@AI-M-BOT Do you know if using this "GraphicsCaptureItem" API, to screenshot a window instead of screenshotting the desktop, I could bypass the WDM's (WIndows Desktop Manager) Vsync? I need to screenshot at very high framerates (~ 1000FPS) and WDM basically caps the frame rate to the monitor's framerate, unless I run the game in fullscreen with disabled "fullscreen optimizations".

No, you cannot bypass Vsync, sadly not sure if you can achieve 1000 FPS (cuz i don't have a good cpu to perform such test) ~but i found that "GraphicsCaptureItem" API on my PC might have extra delays (for example, each frame it captured has a 5~10ms delay although each call only takes ~1ms), maybe due to my weak cpu~

AI-M-BOT commented 10 months ago

I am not sure when will be the time to release that capture card since manufacturing and signing agreements takes time By the way, how much was the card you purchased?