How to broadcast PC games at Raspberry Pi with Sunshine & Moonlight

Summary
-
Use Sunshine & Moonlight to broadcast PC games on various devices, including Raspberry Pi, via a self-heberged server.
-
The sun’s configuration and connection to your PC and your Moon Clair on your Raspberry Pi is simple and free.
-
Adjust the quality settings according to the force of the Wi-Fi network and other factors to optimize the gameplay experience.
My game pc is strong. A few minutes after starting a game, it’s a jet engine that pushes pixels – not the kind of thing I want to sit in my living room to drown my TV while I play games on the big screen. Here’s how I resolve it by diffusing from my PC to a smaller and less bewitched Raspberry Pi.
Sunshine and Moonlight allow you to broadcast PC games on almost any device
Sunshine is a self-hosted game streaming server for Windows and Linux that works with a wide range of equipment (NVIDIA, AMD and Intel are supported), and broadcasts games from your own PC, rather than a cloud service.
Once the sun is installed, you connect from Moonlight, a game streaming client that works on almost all devices from which you can potentially play games, including PCs, macOS devices, Android phones and tablets, smart and of course, humble raspberry pi.
So, my plan: leave my noisy giant of a PC in my sounshine flow office, and connect to him using a Raspberry Pi, who is silent and can be moved to the house on the screen on which I want to play. But will the Pi have power?
Sun configuration for game streaming on windows
The definition process of all this is almost too easy for something that is 100% free and open-source. To install Sunshine, simply download the installer from the developer website (you may need to scroll a little to see the link to the Github download page), then run the installer. Here’s how I configured everything on Windows 11.
I will not take you by clicking on the entire installation process; Everything is very standard. Just leave the settings as they are and click on “Next” until you are asked to choose the components you want to install, then click “Install”.
You can then launch Sunshine from the Start menu. When launched, he runs in the background, leaving an icon in the system tank on which you can right-click to open the configuration interface.
When you open the sun, the configuration interface of the web user interface will appear, or you can open it from the icon in the system tray. From there, you can define a password (which I recommend), make changes to the configuration (not really recommended unless you need it, everything worked for me ready to use) and connect customer devices.
Once you have defined a solid password, click on the menu menu element in the menu bar to access the Pin Torque screen, which you will soon use to connect your Raspberry Pi using Moonlight.
Configuration of the moonlight to connect to the sun and play games
The installation of the moonlight on a Raspberry Pi is also a simple process. I use a Raspberry Pi 4 of 4 GB of 44 bits Runching Raspberry Pi OS. Make sure you run the latest version of Raspberry Pi OS, as the old versions need an additional configuration to allow HEVC support, which is an additional problem.
You can install Raspberry Pi OS on an SD card using the Raspberry Pi imaging of the official website. Simply choose your device, the 64-bit version of Raspberry Pi OS and your SD card in the imagery interface, and let it do its thing.
Download and install Moonlight QT on your Raspberry Pi by following the instructions on the Github Release page. Be sure to download Moonlight QT and not the integrated version that also works on Raspberry Pi, which is the best for Raspberry Pi 3 and more devices.
Once the installation script of Moonlight is completed, it is ready to use.
You must always check the reputation and content of the scripts before executing them!
After having opened it, all the PCs running the sun on the same local network will appear in the Moonlight interface. Click on one will give you a pin to enter the sun to associate them.
Back to Sunshine, enter this spindle and give a reasonable name to your customer device.
And we have finished, you can now open a gaming streaming session from the moon to the sun.
Your whole Windows desk will be displayed, you can launch games and everything will work locally. You can also associate a game controller and the entry will be transmitted to the host PC as if the controller was connected. If, at any time, you must leave your session, Ctrl + Alt + Shift + Q is the combination of a magic key to do it, which I continued to forget.
Above, you can see my test configuration with an Xbox controller paired with the PI using Bluetooth. With everything that works, it’s time to move it to the TV and see how things work!
Quality tests, adjustments and settings
Not bad! However, the default parameters (720p at 60fps) led to a little stuttering, so I lowered it to 30 IPS. This is done on the side of the moonlight by clicking on the parameter equipment icon. However, your results will vary due to the differences in the resistance of the Wi-Fi signal, the interference, the distance to your router and the overall speed of the network.
The image quality is acceptable for a little occasional use, but if I want to make high games, I will probably use Moonlight to broadcast on my Xbox One, which is on a wired network and seems to manage complete streaming without sweat. I can even broadcast on my old iPad.
You can also try to take this configuration on the move and connect your Sunshine server and a Moonlight customer device to a VPN like Tailscale, and broadcast games from your home to your mobile device (doom on the bus!). However, this will be usable, it will probably depend on the quality of mobile service in your region.
This is worth a quick note on the operation exactly of the Sunshine, and why it is so much better than the desktop software at regular distance: it directly captures the output of your graphics card (GPU), so that the actual resolution it uses is the same as on your play PC; It is just demoted for streaming. You could therefore operate at 4K and 60 images per second on your game PC, but a demoted resolution and a category on your client in the moonlight if you need a lower binary flow for a slower network.
It also means that you must have a monitor connected to your game PC during streaming, or there is nothing to return for your GPU, and nothing for Sunshine to disseminate.
Other ways to broadcast games on any device
Not having a robust game PC no longer prevents you from playing many high rehabilitation PC games, because there are many commercial streaming services that house all the equipment for you and simply allow you to bring your mobile device.
Xbox Cloud Gaming, Nvidia GeForce Now and Amazon Luna all allow you to broadcast cloud games to your mobile devices, allowing you to follow the latest game versions, without having to make a big material investment.



