Scrcpy lags or crashes when mirroring a screen. How can I reduce this?
The docs say "It may be useful to decrease the bit-rate and the resolution:"
scrcpy --bit-rate 2M --max-fps 15 --max-size 960
--bit-rate 2M - reduce the bit rate being sent (amount of data per second, affecting the image quality of the mirrored screen) (default 8M)
--max-fps 15 - reduce the number of frames per second (reducing the data per second) (default 60+?)
This [fps adjust] is officially supported since Android 10, but may work on earlier versions.
--max-size 960 - make the maximum width or height 960 (the other dimension is scaled down, preserving aspect ratio). This reduces the number of pixels sent (if your display is >960p). (Default native res?)
These factors seem to reduce the load on the host CPU and the amount of data needing to be reliably sent between the guest and host over USB/wifi. It seems to reduce lag and crashes.