How to Install Moonlight on a Raspberry Pi
by JacobS87 in Circuits > Raspberry Pi
20808 Views, 36 Favorites, 0 Comments
How to Install Moonlight on a Raspberry Pi
This tutorial will go through all of the necessary steps to install Moonlight onto your Raspberry Pi. Moonlight is used to stream games from a powerful PC to a Raspberry Pi for greater portability and ease of use. I use it to play games on a TV while my actual PC is in my office.This tutorial assumes you have STEAM installed.
EDIT: Raspbian Wheezy is the only one working right now. Jessie just screws it up. Hope that saves you headaches.
Is Your PC Compatiable?
To check and see if your PC is compatible, you need to download Geforce Experience. Once installed, check that under game stream it says Ready with a green check mark.
Adding Moonlight to the Pi's Repo List
Open up Terminal and type:
sudo nano /etc/apt/sources.list
and then hit enter. At the very bottom, copy and paste this:
deb http://archive.itimmer.nl/raspbian/moonlight wheezy main
After adding the line successfully, exit by holding (ctrl + x) and then hit (y) and finish with enter. Refer to the picture to get an idea of how it should look.
Installing Moonlight
Open a new terminal and run these commands:
sudo apt-get update
sudo apt-get install moonlight-embedded
Confirm any changes that are asked by just typing Y.
Depending on your network speed, this may take awhile. After everything finishes installing, close the terminal.
Firewall Issues
For a successful pair, make sure the PI and PC are on the same network. Also, depending on what firewall you use, it may have to be disabled temporarily to stream. At the time, I used Avast and it blocked streaming completely.
On your PC, go to command prompt and type ipconfig. Look at the IPv4 address and keep it in your memory.
Pair Your PI to a PC
On the PI, open up terminal and copy the code below:
moonlight pair X.X.X.X
Replaces the X.X.X.X with your IP address. So an example of this would be:
moonlight pair 192.168.1.101
After typing the code, the PI will generate a four digit code. On your PC, a box will pop up that says SHIELD IS REQUESTING TO CONNECT. Enter the four digit code that the Pi generated and your Pi will be successfully paired with the PC.
Stream Your Game!
After successfully pairing, its time to stream your game! Enter the code below and replace the X.X.X.X with your ip:
moonlight stream X.X.X.X
After this, it will open STEAM on both computers and begin streaming:)
A Few Options to Tweak
On a another how-to website, I found a list of options I will include here. These options help increase performance. To use these, just replace the options in the code with anything below:
moonlight stream options X.X.X.X
-720 Use 1280x720 resolution [default]
-1080 Use 1920x1080 resolution
-width Horizontal resolution (default 1280)
-height Vertical resolution (default 720)
-30fps Use 30fps
-60fps Use 60fps [default]
-bitrate Specify the bitrate in Kbps
-packetsize Specify the maximum packetsize in bytes
-app Name of app to stream
-nosops Don't allow GFE to modify game settings
-input Use as input. Can be used multiple times
-mapping Use as gamepad mapping configuration file (use before -input)
-audio Use as ALSA audio output device (default sysdefault)
-localaudio Play audio locally
Stream Games to Your Hearts Content!!
Many games support streaming, so give it a shot! Hope this Instructable helped:)