Sunday, December 20, 2009

Stream media using an app built with the Roku SDK

Roku is a media streamer that streams Netflix in HD, Revision3, Blip.tv, Twit, etc. And now with the public SDK you can stream your local media by simply setting up a server that your home-brew app can point for its content.

This is a simple (and currently non-elegant)

solution to playing your local media on the Roku via a web server running on an OSX machine (i.e. macbook). It's a proof of concept that can be automated, cleaned up, simplified, and made more robust ... in time.


Pick up a Roku HD Player, Roku HD-XR Player, or Roku N1050 SD Player and have some fun with the SDK!


1) Getting started:
  • Download the Roku SDK: http:/roku.com/developer
  • Enable the roku developer menu on your device using the remote:
    UP, UP, Down, Down, Left, Rigth, Left, Rigth, Select A, Select B, Start (just kidding)
    (For real) Home 3x, Up 2x, Right, Left, Right, Left, Right
  • Find your Roku IP address “Roku Player Settings”, “player info” to find the IP address
  • To access the installer homepage, use your roku address: http://192.168.1.104
2) Start the media server on OSX
  • Open the 'Settings' panel -> Sharing -> Web Sharing -> Server is running
  • Place a m4v movie into the 'Users/nickc/Sites' dir (out of the box it supports .mp4, .wmv, .mov, and .m4v)
  • Test out the path by copy/pasting it to your web browser:
    http://192.168.1.110/~nickc/OfficeSpace.m4v
3) Modify the sample app:
  • Goto the SDK dir:
    cd rokudev/examples/source/simplevideoplayer/source
  • Change the 'appMain.brs' file:
    rokudev/examples/source/simplevideoplayer/source/appMain.brs
    urls = ["http://192.168.1.110/~nickc/OfficeSpace.m4v"]
  • There are other settings worth looking into if you have an HD movie and want to update the sample text/images
  • Rebuild the app in the terminal:
    cd rokudev/examples/source/simplevideoplayer/source
    make
  • Goto the Roku installer: http://192.168.1.104
    Choose File -> rokudev/examples/zips/simplevideoplayer.zip
  • The Roku will make a sound when it is done loading
4) Enter the Roku Player main menu
  • The sample app will show in the menu as the last app
  • Select it (which will show the sample description and images)
Thats it. Press play and your local movie on your network will begin playing from Roku!

4 comments:

austin said...

Roku HD XR Player is really one of the best set up box and which provides good service to users and Author shared informative information with us.Nice setup box.

Cole said...

Stupid question, but would it be possible for you to put up a tutorial of the same stuff, just for PC instead of Mac? I'd love to get this thing working, but I don't know Mac well enough to translate these directions. Thanks.

nickc said...

@Cole - you can use XAMPP to run a local server for step #2 and check the roku developer guide for instructions on how to build your app on a PC. Enjoy!

SirOssis said...

The fact that the Roku player does not support AVI or Divx is just a shame. Support for the most popular encoding schemes would blast this device far ahead of all others...It's lack of it is enough to make it fall short enough of the mark that I am returning the one I just purchased. SHAME on you developers over at Roku for being lazy.... I mean my HTC phone plays AVI's.....