Code Monkey home page Code Monkey logo

pi-stream's Introduction

pi-stream

Streaming Applications to the Raspberry Pi using Amazon Web Services, NVIDIA GameStream and Moonlight Embedded.

A final project by Graham Mosley and David Cao for CIS 191

Getting started

Start by downloading the repo or cloning it on your pi. git clone https://github.com/dcao96/pi-stream

Open up your terminal and cd to the directory you just cloned/downloaded. Run the setup script with sudo ./setup-pi.script, and wait for it to finish. This is downloads moonlight-embedded, which is used for streaming to your pi, and sets up xboxdrv, which enables controller support. The script also downloads aws-cli, which is necessary to run start_instance.sh or stop_instance.sh scripts.

If you want to have xbox controllers supported on startup, after the setup script finishes you'll have to edit your /etc/rc.local file and add the line xboxdrv --silent somewhere before the exit 0.

Once you've done all that, restart your pi.

Streaming to your pi

Once you've setup your pi, you can start streaming to it. We first need to fire up an instance to stream from. This can be done by simply running our start script:

Make sure your AWS credentials are filled in the scripts. If you already have your AWS credentials exported, don't worry about this.

. start_instance.sh

Next, you have to pair your pi to the instance you've just created. We've saved the IP for you, so simply run moonlight pair $IP. Next, remote desktop into your instance with VNC with the password cis191test (this will change in the future). Login to the instance using the password AWSpi-streamCIS191project!, and you should be prompted by Nvidia Gamestream for a pin. Enter the pin your pi displays and you should be good to go. Test the pairing by running moonlight list $IP, which should list Steam and Blender.

You can now stream to your pi by simply running moonlight stream -app AppName $IP. Or, you can use our aliases, which should have been set by the setup script. moonlight-stream-720 runs the stream in 720p, and moonlight-stream-1080 does the same in 1080p. Both are in 30fps. You can read more about moonlight-embedded here.

To shut down your instance, you can just run the shut down script we've provided. ./stop_instance.sh

PLEASE SHUT DOWN YOUR INSTANCES ONCE YOU ARE DONE, SINCE THEY COST AROUND 10 CENTS AN HOUR IDLE

Mapping a controller

If you want to use a controller, you'll have to map one. Connect your controller to the pi, and run sudo moonlight map /usr/local/bin/xbox.map. Once you've mapped your controller, you can stream with this mapping, for example using moonlight stream -720 -30fps -mapping /usr/local/bin/xbox.map -app Steam $IP. The two aliases we created for you include this mapping already, so you could also simply run moonlight-stream-720 Steam $IP.

If you want to use multiple controllers, you'll need to run multiple jobs for xboxdrv. Take a look at moonlight-embedded's controller guide to get started with this.

Additional Info

Below is information about the pre-configured instance:

AMI id: ami-22b7ff48

AMI Password: AWSpi-streamCIS191project!

NVIDIA Driver Version: WHQL 359.00 - Windows 8.1 64-bit

GeForce Experience Version: v2.5.14.5

VNC Password: cis191test

Using your own AMI

If you're feeling adventurous, take a look at the AWS instance setup instructions.

pi-stream's People

Contributors

david-cao avatar gmosley avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.