You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I try to use MSS library to capture screen game on my Windows PC, however capture frame rates are not getting higher than 60FPS.
Although game is running on 160 FPS, MSS is limited to only 60.
I tried:
Changing Monitor Framerate to 30 and mss fps also dropped to 30.
Changing Monitor resolution, nothing changed
Changing size of screen capture (Region of Interest), it did not change FPS
So I suspect, the problem is not Hardware related and limitation comes from software.
Code
width = 512 # roi
height = 512 # roi
mon = {
# "left": int(3840 / 2 - width / 2),
# "top": int(2160 / 2 - height / 2),
"left": int(1920 / 2 - width / 2),
"top": int(1080 / 2 - height / 2),
"width": width,
"height": height,
}
sct = mss()
fps = [i for i in range(30)]
index = 0
prev_bytes = None
while True:
if (
not disabed_capture
):
start_time = time.time()
_bytes = sct.grab(mon)
if prev_bytes is not None and _bytes == prev_bytes:
print("SAME!")
continue
prev_bytes = _bytes
frame = np.array(_bytes)
queue.put([time.time(), frame])
index = (index + 1) % len(fps)
fps[index] = 1 / (time.time() - start_time)
if index % 30 == 0:
print("SCREENSHOT FPS: ", sum(fps) / len(fps))
Upvote & Fund
We're using Polar.sh so you can upvote and help fund this issue.
We receive the funding once the issue is completed & confirmed by you.
Thank you in advance for helping prioritize & fund our backlog.
The text was updated successfully, but these errors were encountered:
General information:
Description
I try to use MSS library to capture screen game on my Windows PC, however capture frame rates are not getting higher than 60FPS.
Although game is running on 160 FPS, MSS is limited to only 60.
I tried:
So I suspect, the problem is not Hardware related and limitation comes from software.
Code
Upvote & Fund
The text was updated successfully, but these errors were encountered: