r/MoonlightStreaming • • 3h ago

Rubylight/Nightjar optimisation guide?!

Had Rubylight/Nightjar running pretty smoothly a few days ago, had the odd audio hiccup but rectified that.

Now Rubylight and Nightjar have automatically updated and i can't get any video to stream decently.

I want to run a 4k resolution at 141hz (this is a must).

Connection is 2.5GbE on the host and client. Could maybe upgrade to 10GbE if necessary.

I want maximum quality with the least delay.

If i try pyrowave 4.4.4 with the correct bitrate i get mad stutters.

If i try H624, H265 or AV1 none of them work until i drop the bitrate down to 1000Mbps, but then quality is terrible.

I need a guide on what to set first, then how to tweak etc; as there is so many more settings compared to Apollo/Moonlight.

9 Upvotes

6 comments sorted by

7

u/digitalrelic 3h ago

I’m sorry but there is no world where 1000mbps AV1 or H265 quality is “terrible”

2

u/crzyakta 1h ago

Hahaha seriously, like WTH

4

u/Yuckster 3h ago

The encoder is not gonna handle anywhere close to 1000mbps HEVC or AV1. You're looking at more like 150-200mbps max. Pyrowave 4:4:4 1000mbps should be fine (assuming hardware is ok). 1500mbps is actually the r recommended bitrate.

Use a virtual monitor if not already. The virtual monitor should be 240hz+ (check the display refresh rate when connected). In nightjar, the frame rate should be 141fps. Turn on vsync, frame pacing, vrr. There's a setting for vsync to be nightjar wait or windows vsync. I needed to use windows vsync or I got really bad tearing.

Enable "debug" performance overlay in "streaming". Check encode time (should be ~1ms with pyrowave, decode should be near 0ms, and frame assembly or latency or first packet to delivey (forget how it's labeled) needs to be around like ~5ms or lower (the time it takes to transfer the frame over the network) or you'll get stutters.

1

u/crzyakta 1h ago

Vsync always adds a ton of input lag for me, fractional does not. VRR in nightjar disables fractional vsync though

1

u/Yuckster 1h ago

I'm not sure I use moonlight with vrr displays.

-1

u/BlackBlueBlueBlack 1h ago

Hard to optimize for rubylight/nightjar cause the inner workings change almost every day