Today I learned: About Moonlight game streaming
Stream your PC games lag free directly to your TV in another room.
This is the first post in my new recurring series: Today I learned. In this series I’ll write about a random tech subject, that is new to me, or something that I already know about, but I recently learned something new about it. And most likely it is something that fascinates me, because why else would I write about it? Let’s start with Moonlight game streaming.
Moonlighting
I was recently listening to the Nextlander Podcast, and I heard Vinny, Alex and Brad talk about using an app called Sunshine for streaming your games inside your house from one room to another. Being the nerd I am, I immediately googled what Sunshine was.
I had previously used a Steam Link and NVidia Shield to stream games in my house, from my PC to a TV. Steam Link never had really good picture quality and latency, but NVidia Shield's GameStream was very good. NVidia has since discontinued GameStream on Shield hardware, so that is no longer an option.
But thanks for community efforts, the technology behind NVidia GameStream can still be used, with open source software. Moonlight game streaming is the open source implementation of NVidia’s GameStream protocol.
Setup on your PC
If you have an NVidia graphics card, you can stream your PC games using NVidia GeForce Experience software. See the picture below. Start GeForce Experience, go to settings, and then select SHIELD, from the left side. Then enable GAMESTREAM in the middle of the screen, as pictured below. Note that this option may be removed from GeForce Experience, since there are no more Shield devices that support it.
If you don’t have NVidia GPU, or simply don’t want to or can’t use GeForce Experience, you need some other software to create the actual stream. That software is another open source project, and that is the Sunshine app Nextlander was talking about on their podcast.
For Windows the installation is quite straightforward, if you use the sunshine-windows-installer.exe. It installs Sunshine as a Windows service, that you can start and stop manually, or let it start each time Windows starts. Sunshine has a simple web user interface, where you can edit its configuration, and allow your clients to connect.
Setup on your streaming client
On the device where you want to play the streamed game, you need to install Moonlight game streaming application. One of the best features of it is that it is available almost everywhere. It is available on Android, iOS, Windows, macOS, Raspberry Pi, Steam Deck, Steam Link, etc… To stream directly to your Android TV, just install the app from Google’s Play Store, plug your controller in to your TV’s USB connector, and start streaming!
You might first tweak the settings to your liking. For example, you can select the resolution and framerate. 4K at 120 Hz is supported, as long as your devices and network can handle that.
Network
Obviously this kind of streaming requires a pretty stable network. Wi-Fi works, but the experience might be lacking in a way that you might not want to use this kind of streaming at all. So a wired network is preferred.
I did stream a game to my Steam Deck wirelessly and it was flawless. Picture was clear, and I could not see or feel any lag. On the other hand I streamed wirelessly to our living room TV, and the picture was really blurry, or the latency bad (depending on the settings). Connecting with a wire, and setting 1080p, 60 FPS fixed all those.
Last words
There are alternatives to Moonlight and Sunshine, such as Parsec. I’ve used Parsec a bit too, and it is also quite good, and worth looking in to as well. So far I’ve been more satisfied with Moonlight.
You also don’t need to be streaming games. Moonlight (and Parsec too) can stream your desktop as is, and they are nice for using your PC remotely.
To stream with Moonlight to an outside network, when you are away from home, would require you to setup a VPN tunnel, but that’s a story for another day.
Have fun streaming!