'Mouse is playing at a fraction of the actual recording speed

the code is simple

import mouse
events = mouse.record(button='right', target_types=('down',))
mouse.play(events, speed_factor=1.0, include_clicks=True, include_moves=True, include_wheel=True)

the problem that I am facing is that mouse.play() is way slower than my recording, for example if in the recording I clicked every 2 seconds, when it plays the recording it clicks every 6 seconds, same thing with mouse movement, the speed is a fraction of the actual recording speed.

I tried running the same code on another PC and it works fine (both windows 11)

  • after the script execution, the PC freezes for about 1 minute
  • I have tried reinstalling mouse package but the problem stays


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source