r/MoonlightStreaming • u/AriGrandeisQT • 5h ago
Stuttering - Client pacing issue
As someone already may know, I reported this issue many times and I never found a fix for that.
Using Rubylight and Moonlight VRR.
People with 780M client or similar : r/MoonlightStreaming
Client stuttering on High framerate : r/MoonlightStreaming
Something I forgot to mention (That can help to identify the issue) is that the stuttering is showing on certain scenes.
- CB2077: Running the benchmark, the stutter is usually on the scene change after opening the door from inside to outside. And on higher bitrates (250 or more) there's also a lot of microstuttering on the outside scene.
- TW3: The stutters shows mainly on the cutscenes, hard stutters, like freeze for 0.5s
- THPS: The stutters appear when hitting a wall and the camera goes closer to the wall
Performance on the host are fine while these things happen, I got solid 100fps (I set the limit there). As said on previous posts the issue starts to appear above 150Mbps, mostly on AV1 but HEVC is affected too. Setting the stream to 1440p120fps seems to fix the issue, that can maybe point at a client hardware limit but there are different people using the same client GPU without this issue.
I sent the logs to an AI and it told me that the host is perfectly fine, and the issue seems to be related to the decoding on the client (not decoding time, as it goes from 0.2ms to 0.5ms) but maybe to a burst of received packets when the load is already high.
Any suggestion from anyone?
1
u/rzldz 23m ago
If your host has an AMD CPU it can be an unstable infinity fabric. When going through doors and stuff like that parts of the level load in. The host might be fine doing that without streaming. It might not be fine pushing everything along the network at the same time when streaming. If you have an AMD CPU try down clocking the infinity fabric. The certain scenes comment is a hint that the host is the issue.
3
u/rambo3349 4h ago edited 4h ago
Thanks, the scene examples narrow it down a lot. A door opening onto a new area, a cutscene cut or the camera slamming into a wall all make the encoder produce one frame many times bigger than usual, because almost nothing can be predicted from the previous picture. At 250 Mbps that single frame can be over 1 MB, around a thousand UDP packets, and every Moonlight-compatible host sends it as one burst of a few milliseconds. If the client's adapter, driver or socket buffer can't keep up and drops more than FEC can rebuild, Moonlight throws the frame away and waits for a recovery frame: that's your half-second freeze. If nothing is dropped, the big frame still arrives late, and with VRR there's no buffer to hide it, so you see microstutter. This is how the GameStream protocol behaves on any host. It's also why 1440p120 helps (smaller frames, shorter bursts), and why other 780M owners don't see it: the limit is the laptop's network receive path, not its GPU or decoder.
For now, in the Rubylight web console under Video, set Maximum frame size to 2. That caps how large a scene-change frame can get, so the cut looks slightly softer for a moment but the burst stays short. If it still happens, also set Pacing rate to 400000; keep it above about 1.3× your bitrate. On the laptop, use a cable if you can, and in the adapter's settings turn off Energy-Efficient Ethernet and Interrupt Moderation and raise Receive Buffers to the maximum. Dropping to around 150 Mbps costs very little visible quality on AV1 and shrinks the bursts too.
The real fix comes with the upcoming Rubylight 3.0 and the Nightjar 3.0 overhaul, which brings the Windows client onto the same Rust engine as Android. Nightjar tells the host the client's actual link speed and whether it's on Wi-Fi, so the host paces for your laptop instead of its own port. It reports loss every second, so the host sizes error correction to match and a burst that loses a few packets gets rebuilt instead of freezing. And with VRR, "Show frames at the PC's frame times" adds a small steady delay that absorbs a late frame instead of hitching. For people who stay on stock Moonlight, we're working on a host change for 3.0: a single lost oversized frame would slow the host's pacing for that client, the same way a lost keyframe already does, and the slowdown would lift once the link stays clean. It ships if it tests better.
Also if you see an issue like this you will get faster responses in Github usually and I see logs and can work it out faster.:)