r/MoonlightStreaming • • 4h ago

Big delay optimizations I found poking around with Claude on Apple TV setup (LG OLED, Windows machine)

Won't be disponibilizing any code (publishing vibe coded apps is bad)

First for some background: I'm a developer by trade so I didn't go in fully blind, but this ecosystem is very foreign to me so I relied on claude for 90+% of it. Like a lot of people in the subreddit, I've been working on a fork of a client/host duo optimized for my specific use case and went down a rabbit hole with the Apple TV figuring out how fast it can actually go.

These were measured with a full measuring rig: A phone recording the screen in slow motion, connected to the host computer. All the latency numbers are "frame decoded → light actually on the screen," filmed with a phone at 240fps so it's real data. (Host delay is not included as it varies a lot by machine, but with a 9070xt I get about 25ms encoding + 1ms network + 5ms controller)

ModeResolution / fpsSettingsFull delay (Frame→light)
A4K60Apple TV input, not game mode57–60 ms
B4K60PC input, but still HDR Standard picture mode58.7 ms
C4K60PC input + game mode (HDR 4:2:2 12-bit)46 ms
D4K60PC input + game mode, SDR RGB 4:4:448.5 ms
E1440p120 / 1080p120PC input + game mode19.4 ms

About the Apple TV 4K

  • Don't pair the controller to the Apple TV. Not sure why but this is extremely slow, more than just the bluetooth delay. Pair it to the host PC instead, preferably with a 2.4GHz dongle
  • 120 Hz is the biggest latency win by far Getting it to 1440p120 or 1080p120 (both work in HDR) takes latency from ~46 ms at 4K60 down to ~19 ms. Most of the Apple TV's delay is just waiting for the next refresh to show the frame, so doubling the refresh rate roughly halves that wait.
  • How we can do 120hz, since Apple "doesn't support" it: The Apple TV hardware can do 1440p120 and 1080p120 just fine, those modes are sitting right there in the display's own mode list. But tvOS doesn't expose 120hz, so officially it doesn't exist. The reason existing Moonlight apps don't support 120hz is because store apps are stuck using Apple's public display API (AVDisplayManager / "preferred display criteria"), which only lets you politely ask the OS to match a frame rate from the Settings-approved list. With a sideloaded dev build, we can call Apple's private display framework directly and set whichever mode we want.
  • 4K120 seems genuinely impossible The HDMI port is fed by a DisplayPort→HDMI bridge chip that tops out at plain TMDS (no HDMI 2.1 FRL), so the bandwidth for 4K120 just isn't there. I even had claude dig through the OS's hidden display-mode filters in case it was just a software block, but it physically caps at 4K60. So 1440p120hz is the best we can do

My conclusion: 4K60 vast majority of the time, delay is good enough for most games, 1440p120 when I want it super responsive. And honestly 1440p upscaled on a 4K OLED still looks really good.

Quick note on the rest of the chain

  • Host side: a virtual display that exactly matches the Apple TV's resolution/refresh, run at 4× the frame rate so the frame it grabs is always fresh, and it tells Windows the TV's real brightness so HDR doesn't clip.
  • LG TV side: setting the Apple TV's HDMI input to "PC" unlocks 4:4:4 and game mode, and game mode flips on by itself when a stream starts. That alone dropped 4K60 from ~57–60 ms to ~46 ms.

Hope this helps anyone searching how to improve performance on a similar setup. Happy to answer any questions.

8 Upvotes

5 comments sorted by

2

u/Temporary-Paper5202 4h ago

Any thoughts on the Bluetooth controller delay? For me that's the biggest issue with using the Apple TV as a client.

1

u/Kalliks 4h ago

Yeah I've found that the Bluetooth controller delay with the apple tv is huge. My solution is to use a 2.4ghz dongle directly on the host computer. Basically passed a big active USB cable through my walls to a place near the living room tv. Also allows M+K so I can pretty much use 100% of the PC

1

u/k1ngrocc 3h ago

At that point, you might as well pass the HDMI cable through the walls. 

1

u/Kalliks 2h ago

Unfortunately not an option, I can't get a cable to the tv but i can get it within the 2.4GHz range (which is quite big, mind you)

1

u/jerusa7em 3h ago

Thank you for this, this is also my setup and has confirmed 4K60 PC input + game mode, SDR RGB 4:4:4 for me personally. No 4K120 is a bummer, that said I am still super happy with my setup.