SCRCPY is the best Android screen mirroring tool on the market, and best of all, it is completely free to use. While it's super powerful, it's not the easiest thing to use and can seem a little overwhelming to new users or people trying to optimise it for specific use cases. The primary use case is usually screen recording of gameplay with a program like OBS. Since this is quite an intensive process, you'll need to run a custom SCRCPY configuration to make it work without lag spikes and latency, so follow along as we guide you through some tweaks.
Takeaways:
- Fixing Scrcpy Lag Spikes and Inconsistent Delay When Recording With OBS.
- What's the best configuration for screen recording SCRCPY with OBS?
Table of Contents
Why Does Scrcpy Sometimes Slow Down and Speed Up?
There are quite a lot of different reasons this can happen, though the two most common ones are slow devices and poor configuration/optimisation. If you have a slow phone with a slow connection, there's not much you can do to fix this problem, as your hardware will always be a bottleneck. However, if you have a high-end device, you have quite a lot of options available that should fix this issue and allow you to screen record SCRCPY with OBS without any performance problems.
How to Fix Scrcpy Lag Spikes and Inconsistent Delay When Recording With OBS
If you have primarily been using a wired connection with good hardware, try switching to the wireless version instead. It might sound silly, but if you have a solid WiFi network connection, you might end up getting better performance.
USB mirroring can sometimes introduce unstable frame pacing due to bandwidth fluctuations, USB controller behaviour, or synchronisation issues between video and audio streams. Wireless ADB avoids some of these problems by handling the stream differently.
Even though wireless mirroring sounds like it should add more delay, the actual gameplay experience can become smoother and more consistent. For recording gameplay, stable latency matters more than low latency.
If you aren't convinced, just try it and see what happens.
How to Set Up SCRCPY Wireless
If you haven't set up SCRCPY wirelessly before, here's a full guide on the process: How to set up SCRCPY Wireless. (SCRCPY Wireless setup guide). It's not the simplest thing in the world, and it requires you to do certain things each end every time you want to use it, but it might solve the problem you're having.
Optimise Android Encoder Settings for SCRCPY
Inside SCRCPY, choose a hardware-accelerated encoder instead of a software encoder. Hardware encoding reduces CPU overhead and improves frame consistency during recording sessions.
H.265 will provide smoother performance and smaller recording sizes compared to H.264, especially when storage space is limited. It's way more efficient. Some older devices won't be able to use H.265 though, so double-check before you attempt to use it.
Here are a few different performance-related commands you can try using. As always, you can tweak them if required.
If you aren't sure how to run commands, here's a guide: How to use SCRCPY Command Prompt Shortcuts.
Here's a guide for turning any command into a shortcut: How to create SCRCPY Batch file shortcuts to run multiple commands.
Max Performance H.265 + EXTRAS
scrcpy --max-size=1024 --turn-screen-off --disable-screensaver --stay-awake --video-codec=h265 --video-bit-rate=6M --audio-bit-rate=128K --max-fps=30
Max Performance H.265
scrcpy --max-size=1024 --video-codec=h265 --video-bit-rate=6M --audio-bit-rate=128K --max-fps=30
Max Performance H.264 + EXTRAS
scrcpy --max-size=1024 --turn-screen-off --disable-screensaver --stay-awake --video-codec=h264 --video-bit-rate=6M --audio-bit-rate=128K --max-fps=30
Max performance H.264
scrcpy --max-size=1024 --video-codec=h264 --video-bit-rate=6M --audio-bit-rate=128K --max-fps=30
Optimise OBS for SCRCPY Use
Again, depending on your system hardware, this time on your PC, make sure you are using optimised recording settings. This will vary a lot, but the best plan of attack is to start with moderate settings, then slowly increase them until you reach a quality level you are happy with that doesn't bounce around with lag and latency.
- Lower preview resolution
- Disable unnecessary filters
- Use hardware encoding (H.265)
- Avoid excessive scene transitions
- Keep recording FPS stable. (Don't bother going above 60FPS since most platforms can't play back in anything about 60 anyway.)
Here's a short guide on the topic: The OBS Best Settings For LOW-END PCs | OBS Lag Fix
OPTIONAL: Extra Scrcpy Buffer Command to Test
You can also test larger buffer values using this command:
scrcpy --video-buffer=300 --audio-buffer=300
Increasing the video and audio buffer can help smooth out sudden timing fluctuations and reduce the slow-motion and speed-up effect during long recording sessions. It's not a guarantee, but it's worth experimenting with.
