scrcpy
scrcpy copied to clipboard
High Keyboard Latency
Environment
- OS: Windows
- scrcpy version: 2.3.1
- installation method: Windows Release
- Windows - HP Stream 11 laptop akxxxx
- Android - TCL T602DL
- Android version: 12
Describe the bug Whilst trying to play a game, the keyboard latency is very high and I have done everything to keep it down. Mouse works fine, but text injection just doesn't work. I have the framerate set to 24 FPS, the size set to approximately half, and the bitrate set to 50M. It is wired, and I've even disabled audio. The most unbearable thing is that I'll press A or some other key to move, and a while after releasing the key I will stop. I know the bitrate is high, but having it set to the default makes it worse. Also, the MB/s fluctuates between 20 and 40 on launch, which is probably normal but I thought I might share. I have also tried HID mode, but that hasn't worked for reasons stated in the docs.
Please paste terminal output in a code block.
`D:\scrcpy-win64-v2.3.1>scrcpy -S --print-fps --max-fps=24 --no-audio -b 50M -m 780
scrcpy 2.3.1 <https://github.com/Genymobile/scrcpy>
INFO: ADB device found:
INFO: --> (usb) CMAM695TCIF6IJ8H device T602DL
D:\scrcpy-win64-v2.3.1\scrcpy-server: 1 file pushed, 0 skipped. 26.0 MB/s (66007 bytes in 0.002s)
[server] INFO: Device: [TCL] TCL T602DL (Android 12)
INFO: Renderer: direct3d
INFO: Texture: 776x360
INFO: FPS counter started
[server] INFO: Device screen turned off`
(FPS count starts)
Whilst trying to play a game, the latency is very high and I have done everything to keep it down.
The video latency, or the input latency?
What is the frame rate printed in (FPS count starts)
?
If you record (scrcpy --record=file.mp4
), it the video "laggy"?
Whilst trying to play a game, the latency is very high and I have done everything to keep it down.
The video latency, or the input latency?
What is the frame rate printed in
(FPS count starts)
?If you record (
scrcpy --record=file.mp4
), it the video "laggy"?
Upon doing a bit of investigation, it is not video latency at all - it is simply input latency for the keyboard and keyboard alone. The mouse works perfectly, (at least to mock touches) no matter what my settings are (currently at 60 fps, full size, no audio). No matter how I limit it, the keyboard will always have input delay, and I simply have to live with it.
See #109 (try --no-key-repeat
).