This is Possibly Unsafe
And today we're streaming games on Pi.
The cheapest Steam Box Ever.
Yum.
Mmmm. Pi(e)

I'm Patrick Norton
I'm Michael HandAnd this ladies and gentlemen
is a Raspberry Pi Model 2
And this is a Model 1
Which looks exactly the same, except this
one has a quad core processor and more memory
which is super awesome.
But either way, we can do our really cool
project today which is streaming PC games
to your Raspberry Pi.
Make a really cheap Steam Box.
Well ok, we're using NVIDIA's GameStream.
And a lot of you may be going "Well, you know,
there's a $200 GameStream box coming from
the NVIDIA people. Which is great if you've
got $200 for a shield, go buy one.
Steam has the $50 one coming out.
Which is really awesome. But this is $35 and
a few spare parts we had stuffed the house.
Which makes it, in our eyes, the cheapest
and certainly most DIY option.
It's kind of crazy. Like a $25/30 board will
turn into a game streaming machine in your
house.
What can't you do with this thing?
Cut cheese.
...Yeah you could.
So, out of the box, the Raspberry Pi is kind
of a paperweight. There are a few things you
need to add to it to turn it into a functioning
super-computery cooly thing.
That is a micro SD card, which you need to
store your OS and applications.
Unless you're using an older RPi, in which
case you need a standard SD card, which you
can probably figure out yourself.
You'll need a power supply. I'm just using
a phone charger here.
Micro USB
Micro USB will work. This is 2 amps but I
think one amp will work completely fine for
the raspberry pi.
We're big on overkill with power.
Ethernet is what we prefer. It's actually
built in to the RPi motherboard. If you want
to do WiFi you'll need a USB dongle for that.
But we tend to use ethernet pretty much everywhere
whenever we can because it's just better than
wireless.
And you'll need monitor, keyboard, mouse...probably
not mouse....
You'll need all that for the initial setup.
But after that just enable SSH and you'll
be a 1337 hacker.
And don't even start this project if you don't
have an NVIDIA 600 series or higher GPU in
your gaming PC.
And what's the other thing we'll need?
Games.
Games.
You might want them.
Yeah. Bejeweled?
I mean, technically.
Technically a game.
So what do we need on the PC side of things?
OK, so like we mentioned you'll need a 600
series NVIDIA card or up. So this is for your
full-on gaming rig.
And the NVIDIA GeForce Experience software
will keep all your drivers up to date. And
it has a little tab in here that says "Shield".
Did you have to do anything for it to say
"Your PC is ready to stream to Shield devices"?
No, it just works.
It just works. It's like apple

So that's it?
Yeah, PC is done. That was easy.
OK
No RPi is a little more setup, but also not
hard.
To the raspberry pi.
Before you power up your raspberry pi we'll
need a OS installed on that SD card.
If you're new to the Raspberry Pi I recommend
going to RaspberryPi.org.
Download the latest copy of NOOBS and get
your Raspbian on.
That's the OS that we'll use as the core of
our build. It's the Debian/Wheezy that has
been setup for the Pi.
Raspbian is nice because it has all of the
prerequisites that you'll need anyway.
And if you don't know what a prerequisite
is, don't worry. Just download and install
it. The directions are all there.
Once your Pi is up and running you'll see
that raspi-config screen. It's the blue one.
Couple of things here. Enable SSH.
Do not have it boot into the desktop. That
will just slow things down.
And then configure your audio if you have
anything special going on. We're going to
just use HDMI in this case.
That's pretty simple if you are running this
in a home theater/HDTV environment.
So what's up next?
Now we're going to SSH into the Raspberry
Pi.
That's essentially a secure tunnel to our
Linux installation on your RPi over the interwebs?
Exactly. SSH on Windows you can use PuTTY.
You basically just need the IP address or
Hostname of your Pi. And then if you changed
the password put that in. but it defaults
to Pi and raspberry.
By the way, giving yourself a static IP address
for your PI might be incredibly convenient
when you're setting up your machine.
Also for your gaming machine for sure.
Once you've got puTTY setup and tunneled into
your pi, you're going to go to GitHub.com
and get your Limelight on.
Now there's a RPi version of Limelight, but
that's not the version you want to install.
No, that's an old version. So if you go into
releases, you'll see if you keep going....you'll
really have to try to get the Pi version.
But just the embedded version works completely
fine.
So two things you'll want here: you'll want
LibOpus.so and Limelight.jar.
The easiest way to get it onto your pi is
to copy the link address, go back into here,
and then you type wget and paste that link.
Hit enter and a bunch of stuff will happen.
So basically Putty is grabbing the stuff off
the internet and scooting through the SSH
connection to the raspberry pi.
...No
Oh
The raspberry pi is downloading it itself.
That's kind of like what I said.

The files are downloaded so you want to type
java -jar limelight.jar
and to find things in case you don't have
static ip's you can type list.
List is cool because it will show you the
compatible PCs on your network and it will
also show the compatible apps
oooh
Cool. Alright we know what our IP address
of our machine is. We're going to type
java -jar limelight pair and then our PC name.
Alright it's pairing now. You'll get a number
that you need to enter into your gaming PC.
I can do that.
Alright so now we're all paired. Now the fun
begins.
Do that same java -jar limelight.jar. In this
case we're going to do stream and then you
can point to the IP address of your machine.
So we'll do our same one again.
So a lot of people at home right now are thinking:
"You know, $50. No typing in IP addresses.
Maybe Valve's box is worth the money."
Whatever.

You can set flags for the resolution. I'll
do 720p for these testing and you can also
do the frames per second. And then you need
to add "app" and then whatever you want to
stream. We want to do Steam.
It has to show up in that list that we saw
earlier.
Start.
Let's see what happens.
Can't look up. Oh sh....stuff.
But you're doing a great job.

Check this out. GameStream is running on the
RPi. I can click...I can...I can....I can....
I can need to map the controller properly because
I can't click on what I want to click on.
Ok, we're tunneled back into the Raspberry
Pi. Michael what do we want to type in next?
So now you're going to do 'cat /proc/bus/input/devices'
This command will search for all of the connected
input devices on your computer, or in this
case on the Raspberry Pi and give you a cool
looking readout.
That's a lot of stuff.
So here's the trick. In our case we've got
this USB controller. We're looking for event0.
If you only have one thing plugged in, it's
probably going to be event0

But so you know.
So we have our event0 thing. Now we're going
to type our java -jar limelight you know the
drill.
And then "map -input /dev/input/event0". Whatever
event you found in there. And then whatever
you want to call your mapping file that you're
generating.
In this case I'm calling it RS4 for no reason
.map
And then it will give you instructions on
what do do.
Alright, so now that we have our mapped controller,
we can set all of our different things and
it will just work.
So now that we've configured everything I'm
going to do 1080P.
I know that 30fps works and 60 does now.
We'll set app as steam.
And we'll add "-mapping RS4.map" that we just
created.
So do I have to type this in every time I
reboot the raspberry pi or log in?
You can set this as a startup script. You
can type it in every single time.
So probably unless you have a RPi that never
gets uplugged, you probably want to set this
as a startup script.
Or you can setup an SSH app on your phone.
There's one on Android called Script Kitty
that lets you set a custom script.
So that's exactly what we were typing in Putty
before.
And then you can even make a little shortcut
here to run it in one tap.
Look kids, we're streaming Borderlands.
It looks good. We're doing 1080P 30fps second
on this because 60fps is really laggy.
But this is totally acceptable. The compression
looks pretty decent.
It's not pristine like you would see on your
computer.
It's pretty fricken good for like 30 minutes
and like 20 minutes of typing.
I'm into it.
I'm into it.
&lt;Montage with music&gt;
Pretty much the cheapest way we know of to
stream your Steam games or your other video
games to any HDMI monitor in your house.
There's a little bit of lag but it's workable.
And I don't know. It's pretty cool.
Would a faster Raspberry Pi make the lag less?
I think it's a streaming thing. Limitation.
Would a faster GPU make it lag less?
I think it's just a streaming thing.
Streaming people. It's a problem.
When they actually ship those more expensive
boxes later this year we might actually get
a hands on to do a test to see if they stream
any better than our $35 Raspberry Pi box.
But you can do this right now!
You can. You know what else you can do? Go
to PossiblyUnsafe.com to watch all of our
videos or youtube.com/c/possiblyunsafe to
watch all of our videos. And subscribe in
either place. We'd appreciate that.
And hey, Patreon. That's a thing.
Patreon.com/PossiblyUnsafe
It's a thing because it's a place where you
can donate to support us for us to keep making
cools stuff for you. Plus we get to eat, you
get to see more stuff. It's a thing.
I'm not saying we'll like you more if you
donate but...
We're much more likely to be able to keep
making these shows if you do. It's a thing.
I'm Patrick Norton
I'm Michael Hand
We'll see you next week.
