ra1nty / DXcam

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

The speed is not ideal #44

Open ZengXinLei opened 1 year ago

ZengXinLei commented 1 year ago

This is my code image

output image

And that's a good thing

lucasmonstrox commented 1 year ago

Do not use print, you got lag, use timeit :)

import timeit

res = timeit.repeat(lambda: camera.get_latest_frame(), repeat=10, number=1)
print(res)
vipcxj commented 1 year ago

@lucasmonstro My fps is 16, Too slow. I have used your bench code.

lucasmonstrox commented 1 year ago

@vipcxj did you use video_mode?

vipcxj commented 1 year ago

@lucasmonstro I use the method without any argument. If the video_mode is the default mode, then I use it.

AI-M-BOT commented 1 year ago

Try this https://github.com/AI-M-BOT/DXcam/releases/tag/1.0

windfocus commented 1 year ago

Try this https://github.com/AI-M-BOT/DXcam/releases/tag/1.0

I'm using this, nice!