Comments (5)
I did see minor improvement in FPS, tested with 640*640 region
However, mss can achieve similar FPS with much lower CPU usage
It was originally built as a part of deep learning pipeline for FPS games to perform better than existed python solutions (python-mss, D3DShot).
Quote from readme
I tested 640*640 partial screenshots with mss, DXcam, d3dshot and c++ version of dxgi screenshot, all with that ufo test rendering on.
Device[0]:<Device Name:Intel(R) UHD Graphics Dedicated VRAM:128Mb VendorId:32902>
NVIDIA GeForce GTX 1660 Ti with Max-Q Design
- C++ version of dxgi screenshot always wins since it only use less than 1% of CPU and can achieve 500 FPS
- Mss can achieve my screen refresh rate (144hz) with less than 5% CPU usage
- DXcam can achieve couple more FPS value than my screen refresh rate (150 tops), however it uses a bit more than 20% of CPU
- D3DShot has similar CPU usage but can never achieve more than 70 FPS on my PC
So, as a conclusion, currently DXcam has a huge improvement compare with d3dshot, but still not good enough to use in game. Hopefully it will be better
from dxcam.
ctypes.string_at and color conversion cost most of the time
Consider that this lib is written totally in python, i will assume this is the best approach for dxgi screenshot
If want to achieve higher performance, might need to rewrite stuff in C++ or Rust if possible as python module
from dxcam.
I did see minor improvement in FPS, tested with 640*640 region However, mss can achieve similar FPS with much lower CPU usage
It was originally built as a part of deep learning pipeline for FPS games to perform better than existed python solutions (python-mss, D3DShot).
Quote from readme
I tested 640*640 partial screenshots with mss, DXcam, d3dshot and c++ version of dxgi screenshot, all with that ufo test rendering on.
Device[0]:<Device Name:Intel(R) UHD Graphics Dedicated VRAM:128Mb VendorId:32902> NVIDIA GeForce GTX 1660 Ti with Max-Q Design
- C++ version of dxgi screenshot always wins since it only use less than 1% of CPU and can achieve 500 FPS
- Mss can achieve my screen refresh rate (144hz) with less than 5% CPU usage
- DXcam can achieve couple more FPS value than my screen refresh rate (150 tops), however it uses a bit more than 20% of CPU
- D3DShot has similar CPU usage but can never achieve more than 70 FPS on my PC
So, as a conclusion, currently DXcam has a huge improvement compare with d3dshot, but still not good enough to use in game. Hopefully it will be better
Thanks for trying dxcam out!
- Yes C++ will definitely be faster. However dont know how you get 500fps with ufo test since it's synced to your monitor refresh rate (144hz), thus only 144 frame per sec will be rendered.
- I am aware of the high CPU usage, haven't find a way to workaround it. pr or suggestions will be welcome.
- For partial screenshot I haven't test what @xyk2000 pointed out. That might be a possible improvement
- I have seen numerous usage of dxcam for video games, but as you said, hardware may plays a factor. Make sure you select your 1660 but not your integrated GPU. I only tested on rtx 2000 and 3000 series with a relative high-end CPU and I was able to bound my pipeline latency to 4-5ms (200-250fps) using tensorrt and properly implemented other stacks. Usage is for a neural netowrk aimbot as well.
from dxcam.
I did see minor improvement in FPS, tested with 640*640 region However, mss can achieve similar FPS with much lower CPU usage
It was originally built as a part of deep learning pipeline for FPS games to perform better than existed python solutions (python-mss, D3DShot).
Quote from readme
I tested 640*640 partial screenshots with mss, DXcam, d3dshot and c++ version of dxgi screenshot, all with that ufo test rendering on.Device[0]:<Device Name:Intel(R) UHD Graphics Dedicated VRAM:128Mb VendorId:32902> NVIDIA GeForce GTX 1660 Ti with Max-Q Design
- C++ version of dxgi screenshot always wins since it only use less than 1% of CPU and can achieve 500 FPS
- Mss can achieve my screen refresh rate (144hz) with less than 5% CPU usage
- DXcam can achieve couple more FPS value than my screen refresh rate (150 tops), however it uses a bit more than 20% of CPU
- D3DShot has similar CPU usage but can never achieve more than 70 FPS on my PC
So, as a conclusion, currently DXcam has a huge improvement compare with d3dshot, but still not good enough to use in game. Hopefully it will be better
Thanks for trying dxcam out!
- Yes C++ will definitely be faster. However dont know how you get 500fps with ufo test since it's synced to your monitor refresh rate (144hz), thus only 144 frame per sec will be rendered.
- I am aware of the high CPU usage, haven't find a way to workaround it. pr or suggestions will be welcome.
- For partial screenshot I haven't test what @xyk2000 pointed out. That might be a possible improvement
- I have seen numerous usage of dxcam for video games, but as you said, hardware may plays a factor. Make sure you select your 1660 but not your integrated GPU. I only tested on rtx 2000 and 3000 series with a relative high-end CPU and I was able to bound my pipeline latency to 4-5ms (200-250fps) using tensorrt and properly implemented other stacks. Usage is for a neural netowrk aimbot as well.
1, I tested with my mouse move very fast, yeah if you drag your curser and move like hell on desktop, FPS value will reach a high average which i don't know why, I guess monitor for example has 144hz refresh level is its hardware limit, however in graphic memory level there is no such limit and dxgi just copy from memory???
2, Avoid unnecessary memory copy/move??? Try my compiled module?
3, I dont know
4, Did you run with a game and get 200+ fps? That is impressive
from dxcam.
I did see minor improvement in FPS, tested with 640*640 region However, mss can achieve similar FPS with much lower CPU usage
It was originally built as a part of deep learning pipeline for FPS games to perform better than existed python solutions (python-mss, D3DShot).
Quote from readme
I tested 640*640 partial screenshots with mss, DXcam, d3dshot and c++ version of dxgi screenshot, all with that ufo test rendering on.Device[0]:<Device Name:Intel(R) UHD Graphics Dedicated VRAM:128Mb VendorId:32902> NVIDIA GeForce GTX 1660 Ti with Max-Q Design
- C++ version of dxgi screenshot always wins since it only use less than 1% of CPU and can achieve 500 FPS
- Mss can achieve my screen refresh rate (144hz) with less than 5% CPU usage
- DXcam can achieve couple more FPS value than my screen refresh rate (150 tops), however it uses a bit more than 20% of CPU
- D3DShot has similar CPU usage but can never achieve more than 70 FPS on my PC
So, as a conclusion, currently DXcam has a huge improvement compare with d3dshot, but still not good enough to use in game. Hopefully it will be better
Thanks for trying dxcam out!
- Yes C++ will definitely be faster. However dont know how you get 500fps with ufo test since it's synced to your monitor refresh rate (144hz), thus only 144 frame per sec will be rendered.
- I am aware of the high CPU usage, haven't find a way to workaround it. pr or suggestions will be welcome.
- For partial screenshot I haven't test what @xyk2000 pointed out. That might be a possible improvement
- I have seen numerous usage of dxcam for video games, but as you said, hardware may plays a factor. Make sure you select your 1660 but not your integrated GPU. I only tested on rtx 2000 and 3000 series with a relative high-end CPU and I was able to bound my pipeline latency to 4-5ms (200-250fps) using tensorrt and properly implemented other stacks. Usage is for a neural netowrk aimbot as well.
1, I tested with my mouse move very fast, yeah if you drag your curser and move like hell on desktop, FPS value will reach a high average which i don't know why, I guess monitor for example has 144hz refresh level is its hardware limit, however in graphic memory level there is no such limit and dxgi just copy from memory??? 2, Avoid unnecessary memory copy/move??? Try my compiled module? 3, I dont know 4, Did you run with a game and get 200+ fps? That is impressive
- Idk if you are able to understand this: mss uses bitblt and the problem with your test methodology is cursor is drawn by OS and is not in HBITMAP in HDC.
- Not real suggestions
- .
- Yes. Screenshot speed is usually not a bottleneck in such applications. The model latency is.
Plus, u need to use ur dedicated gpu but not the integrated one.
from dxcam.
Related Issues (20)
- is there any way to "unscreenshot" a window? HOT 5
- empty black capture
- OSError: [WinError 87] error
- AttributeError: 'DXCamera' object has no attribute 'is_capturing' HOT 1
- TypeError: 'float' object cannot be interpreted as an integer
- PyPI 站没有了
- Capturing on HDR display has very bright output HOT 1
- Helllo win 7 doesn't work
- feedback BUG:camera.grab() Resolution error
- feedback BUG:camera.grab() Resolution error HOT 5
- [NOT-ISSUE] [TUTORIAL] Adding Cursor To Screen Capture HOT 1
- Is there any way to have the captured screenshots include the mouse cursor? HOT 1
- All frames taken from camera.get_latest_frame() are glitchy in a weird way!
- ValueError: could not broadcast input array from shape (640,640,3) into shape (1080,1920,3)
- How can I take screenshots based on the specified hwnd
- Capturing a screen screenshot of a virtual desktop in Windows 10
- Dxcam has no attribute 'create'
- Dxcam can't find gpu?
- access violation writing 0x4DBAF26F
- DXCAM does not respond
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dxcam.