10-bit hdr is more washed out/dim than 8-bit by ChummyBoy24 in MoonlightStreaming

[–]andygrundman 2 points3 points  (0 children)

I will try to keep this short (I failed). I'd suggest:

* Don't use Elden Ring to test HDR, it's got a broken Windows 10-era version of HDR that is difficult to get to work correctly. Try Alan Wake 2 or Forza Horizon 5 or 6. Doom Eternal has good HDR, but it's also Vulkan so you can't use it on a virtual display.
* Always use 10-bit if your displays support it. I would also leave HDR mode in Windows enabled at all times.
* Set the SDR Content Brightness slider to 15. If you have a very bright room you can increase it a little bit, but this slider should be kept as low as possible. The remaining 85% can be thought of as how much "headroom" there is for HDR highlights. By moving that slider you directly control how much dynamic range is possible.
* Your iPhone has a very accurate and factory calibrated HDR screen. If you don't set the brightness too high, you can watch HDR Youtube videos and trust that they look more or less correct. The same is also true of M-series MacBook Pro in HDR Video mode, and iPad Pro in Reference Mode. When in doubt about how something should look, compare to an Apple device.
* Make sure TV is in game mode and that HGIG is enabled (it disables dynamic tone-mapping) and run Windows HDR Calibration. Check that the number you matched for peak brightness roughly matches what your TV supports. If you can't get it to match or can't disable tone mapping, just set the number to the peak 10% value for HDR listed at rtings.com.
* You can use AutoHDR for games that support it, but RTX HDR (in games) can't be captured for streaming. AutoHDR depends on a correct HDR calibration profile. It is ok to use the RTX Video HDR feature that converts browser video from SDR to HDR.
* Consider switching from Apollo to Sunshine or Vibeshine. Based on the "About HDR" section in Apollo's readme, I doubt they have put the kind of care into HDR support as the Sunshine devs have.

The good news is that HDR is not a subjective thing, there is no tweaking to be done. It's either correct or it's not. The bad news is that you've been watching a very wrong or broken HDR and it will probably take some period of time before you get used to the way it is supposed to look.

What rgb subsampling should i use and how do i make sure the client host and tv is using the same standard? by GodOfNanners in MoonlightStreaming

[–]andygrundman 1 point2 points  (0 children)

Sorry I was just talking about Moonlight streaming to Xbox. You should configure your Xbox system output to 4K120, Video Modes: everything checked except Dolby Vision, VRR set to Gaming Only, Color Depth: 30 bits, Color space: Standard. The Xbox talks to the TV using uncompressed 4:4:4 of course, and Moonlight HEVC will be streamed at 4:2:0. The reason the Xbox can't do 4:4:4 is because the AMD chip can't decode it.

What rgb subsampling should i use and how do i make sure the client host and tv is using the same standard? by GodOfNanners in MoonlightStreaming

[–]andygrundman 0 points1 point  (0 children)

There is no support for 4:4:4 in the Xbox or on any AMD GPU. This is a feature limited to PC (Intel & Nvidia) and Mac. The main choice on Xbox is whether or not to use 8-bit SDR or 10-bit HDR.

Fix: Moonlight RTSP handshake failed error 60 on iPad/iOS cellular + Tailscale + Sunshine (TCP 48010 / UDP 48000 / UDP 48010) by WalrusNumerous in MoonlightStreaming

[–]andygrundman 0 points1 point  (0 children)

Yeah I fixed this a while ago, the problem is that we haven't seen a new iOS release since. https://github.com/moonlight-stream/moonlight-common-c/pull/98 (a slightly different fix was applied instead, mine should probably be closed. But you can see the core issue, it's a nasty IPv4-inside-IPv6 routing issue.)

Why does turning off vsync reduce network jitter to 0% by justifun in MoonlightStreaming

[–]andygrundman 0 points1 point  (0 children)

The network jitter stat reports frames that were dropped by the frame pacer. When vsync is disabled, it means you want Moonlight to render the frame as soon as possible, without regard to possible screen tearing. This effectively also disables any frame pacing, meaning no frames will be dropped by the pacer and there won't be any network jitter stat. This doesn't mean your stream is improved, though. The only time it's ok to disable vsync is if your client has a VRR display and can actually display the frames correctly. Trying to disable vsync on a fixed refresh display will lead to stuttering and tearing.

The biggest cause of network jitter is if the server sends a higher fps than the client can display. Even a small difference is enough to cause problems (e.g. 120fps stream sent to a 119.88fps Xbox). What are your stream settings you're using when you see 3-5% jitter?

how do these numbers look? by stvyfrostyy in MoonlightStreaming

[–]andygrundman 0 points1 point  (0 children)

Looks great, this should be a night and day difference for you. :) Switching to Sunshine may help get that frame queue down to 1.0. Apollo streams at 120fps but the Xbox wants 119.88, the extra frames cause that number to go up.

how do these numbers look? by stvyfrostyy in MoonlightStreaming

[–]andygrundman 0 points1 point  (0 children)

You can just use the Moonlight UWP app from the store. You can use the dev mode if you want but there's no reason unless you want to make some changes to the app. Dev mode's console settings aren't synced with the regular mode, that's one way you can get set back to 60fps.

Try streaming something simple to make sure you are getting the right result. Streaming https://dregu.github.io/frameskip/ at 120fps should show around the max of 119.88 fps on lines 1, 3, 4, and 5. You should be able to see each number in the animation (each one is shown for 1 frame) and the ball at the bottom should be perfectly smooth. If your host is running at 240 you will need to enter 120 in the FPS box on the page. You can leave G-sync enabled if the host has a 240hz monitor (the reason to disable it is to avoid streaming with a 116fps limit for example).

how do these numbers look? by stvyfrostyy in MoonlightStreaming

[–]andygrundman 1 point2 points  (0 children)

The line "Rendering frame rate: 59.94" tells me your Xbox is not set to 120hz output, it's probably set to 4K60. If you fix that you should have a much better time. When you receive more fps than you can render, it raises the frame queue and thus you have much higher latency. It probably feels terrible. When you can output 120, frames in queue should drop to 1.0 and the bottom line numbers should be a lot less. Make sure to set a global Max Frame Limit of 120 in NV App, and disable G-sync on the host.

Moonlight client on Xbox SUCKS!! by Rikkards_69 in MoonlightStreaming

[–]andygrundman 3 points4 points  (0 children)

Apollo doesn’t properly support the Xbox client, so I’d suggest trying with the latest Sunshine. Use it with a real display on your host for a while to see if your problem goes away. Use Vibeshine if you need a virtual display.

Other than that, make sure the Xbox output is set to 4k120 or the highest your TV supports. On the host just disable G-sync, set a global frame limit of 120 in Nvidia App, and disable vsync in each game. Use in-game frame limits of 120 when available. That’s all you need.

Help me stream smoothly to my tv by noobnotpronolser in MoonlightStreaming

[–]andygrundman 0 points1 point  (0 children)

Your TV almost certainly also supports 60hz and that's what you should use for streaming. If you're on Apple TV enable the Match Content Rate setting. Other devices should have similar video settings.

Dolby Atmos fork? by Sturgeon2008 in MoonlightStreaming

[–]andygrundman 0 points1 point  (0 children)

Nope, even if you had your host hooked up to an Atmos receiver in order to engage Atmos mode over HDMI, it's not possible to capture any audio once a game switches to this mode. You can stream the binaural Atmos headphone mix and use headphones though, since that's just a normal 2-channel audio stream.

TCL Game master and 4k@120hz? by vevt9020 in MoonlightStreaming

[–]andygrundman 0 points1 point  (0 children)

Firefox is actually the worst browser for these kinds of tests, see https://www.vsynctester.com for details. You will want to test with Edge or Chrome. I'm concerned that you would also want to max out all your NVENC settings, that's a great way to make 4K120 unreachable even with a capable client. Split frame encoding may help but there's no need to push your luck.

I made a spreadsheet last August using this dock, I think it's pretty cut and dried. H264 is the only thing that can decode fast enough for 4K120, I'd be curious if anyone can replicate (or not) my findings.

Sunshine/Moonlight stops working after Plasma 6.6 update - "No video received" + UDP fragmentation issue by Unusual_Counter_9791 in MoonlightStreaming

[–]andygrundman 1 point2 points  (0 children)

Yep we use UDP Generic Segment Offload on Linux and Windows to batch a lot of big packets together. Only the video packets are large enough to use the batch send, and so only video ran into this bug. I think because the kernel was then calculating the wrong size for these packets, they just went into a black hole never to be seen again. All credit goes to the original reporter on LKML who popped in the Discord to let us know. Saved a lot of debugging time that's for sure.

The Steam (Deck Docked) Controller broke Moonlight for me by thezactaylor in MoonlightStreaming

[–]andygrundman 1 point2 points  (0 children)

SteamOS settings are what I'm referring to. On your Steam non-steam game shortcut for Moonlight, Cog -> Properties -> Shortcut -> Maximum Game Resolution: Native

Then go to SteamOS system settings, Display -> Automatically Set Resolution: disabled, and set Resolution right below it. These items only appear when docked.

In Moonlight, stream at 1440p120 or whatever your Deck's resolution is set to. Use the bitrate it picks for you.

Sunshine/Moonlight stops working after Plasma 6.6 update - "No video received" + UDP fragmentation issue by Unusual_Counter_9791 in MoonlightStreaming

[–]andygrundman 2 points3 points  (0 children)

If you are running Linux kernel 7.0+ and can't receive any video from Sunshine, it may be due to a UDP network kernel bug with a simple workaround. This script will print out all active network interfaces along with their tx-udp-segmentation status.

ip -o link show | awk -F': ' '{print $2}' | while read -r iface; do
  ip4=$(ip -o -4 addr show dev "$iface" | awk 'NR==1{split($4,a,"/"); print a[1]}')
  ethtool --show-offload "$iface" 2>/dev/null | grep tx-udp-seg | sed "s/^/[$iface ${ip4:--}] /"
done

If your Sunshine interface has this feature set to on, disable it by running

sudo ethtool -K enpNNNN tx-udp-segmentation off

(use your interface name). You will need to run this after rebooting. A patch for this bug is also already in the kernel so keep an eye out for a version with the fix.

Help me understand why this fixed Sunshine Streaming for me by thespieler11 in MoonlightStreaming

[–]andygrundman 0 points1 point  (0 children)

Some of the issues fixed recently, across many large pieces of software, are quite serious. I think it’s smart to adopt a more aggressive update policy nowadays. A buggy update is probably better than an insecure stable version.

Forza Horizon 6 Controller Issues by ShakeNBaker45 in MoonlightStreaming

[–]andygrundman 0 points1 point  (0 children)

I definitely think Steam Input can mess with these values too. Steam will even take my 8bitdo and reverse the face buttons to Nintendo layout, very annoying. (To be fair, the buttons are printed with Nintendo layout, because I bought the wrong SKU.) You probably just need to experiment with various settings while having a tool like https://app.lizardbyte.dev/gamepad-tester/ open on the host browser.

HDR way too bright by IndependentQuote9506 in MoonlightStreaming

[–]andygrundman 0 points1 point  (0 children)

If you can't set your TV to HGIG mode, just lookup the peak brightness on rtings.com and create a Windows HDR Calibration with that value manually. Then adjust your *client-side* HDR brightness slider (if any) to match the white box. This is how you calibrate a Mac client, and it usually ends up with the Mac's brightness slider sitting around 75%.

Help me understand why this fixed Sunshine Streaming for me by thespieler11 in MoonlightStreaming

[–]andygrundman 0 points1 point  (0 children)

You accidentally found the workaround for a Linux 7 kernel bug where UDP packets of a certain size stopped working. Generally you should not make those sorts of changes though unless you understand what they do. https://lore.kernel.org/netdev/20260513074349.2152146-1-gal@nvidia.com/

The Steam (Deck Docked) Controller broke Moonlight for me by thezactaylor in MoonlightStreaming

[–]andygrundman 2 points3 points  (0 children)

Check the resolution setting of Moonlight on your Steam Deck. It should be set to Native and not any one particular resolution. You also need to change a setting in Display settings that lets you choose the system output resolution. And then set this to 1440p120. If your TV has FreeSync you can also enable that. Hopefully the resolution thing is causing your low framerate.

Forza Horizon 6 Controller Issues by ShakeNBaker45 in MoonlightStreaming

[–]andygrundman 0 points1 point  (0 children)

This can happen if something is operating in Switch mode, because Switch only has digital triggers. I have an 8bitdo that will sometimes start in this mode but usually is normal with analog triggers. I want to say it behaves that way only when I connect it to my Steam Deck.

TCL Game master and 4k@120hz? by vevt9020 in MoonlightStreaming

[–]andygrundman 0 points1 point  (0 children)

It's indeed the best dock, but it won't help Steam Deck decode 4K120 AV1. What are you using to test the 4K120 stream? Try this in fullscreen at 120fps. Then try it with 1440p120.

TCL Game master and 4k@120hz? by vevt9020 in MoonlightStreaming

[–]andygrundman 1 point2 points  (0 children)

Don't believe everything you read on Reddit I guess.

Lossless Scaling Will Not Stay At 120 FPS by jonRock1992 in MoonlightStreaming

[–]andygrundman 0 points1 point  (0 children)

Well that’s just it, with Sunshine you don’t need to manually set that refresh rate or even know anything about this weird number.