This tutorial is based on the Videoplayer Roku SDK sample.
Before you begin, here’s a list of the things you’ll need to install a private channel on the Roku Streaming Player:
1. Roku Streaming Player with Software Release 2.7 or later
2. Roku SDK (Development Kit Documentation and Sample Applications)
3. Text Editor and Terminal Application
4. Standard Web Browser (Firefox, Internet Explorer, Chrome, Safari)
5. FTP Program
6. Graphics Editing Program
7. Hosting Provider or CDN(Recommended)
8. File Compression Utility
Step 1: Account and Directory Setup
Create a Roku account if you have not done so.
Link your Roku device to your account. Go to https://support.roku.com/hc/en-us/articles/208754508-I-am-having-problems-linking-my-Roku-player-
Sign up for a developer account at https://developer.roku.com/home
Enable developer mode on Roku device. By default, the developer page is not enabled. You must enter the remote code using the Roku remote to enable it.
Home 3x, Up 2x, Right, Left, Right, Left, Right
To verify you have enabled developer mode, go to any web browser on your network and enter the IP address of your Roku device. To find the IP address of your roku device, go to home screen on Roku Player. Go to Settings –> Network. Once you enter the IP address in the web browser, you should see this window: see photos above.
Create a directory for testing SDK files. I created one called \rokudev.
Create another directory inside the one above for the SDK. I created one called \rokudev\rokusdk.
Download Roku SDK to your computer, then extract the compressed archive to the directory you created above.
Create two more directories inside the first directory for all the test files that will eventually be zipped and installed on your Roku device. I created one called \rokudev\roku3\, the name of my Roku device. My final directory tree looks like this: \rokudev\rokusdk and \rokudev\roku3.
Step 2: Development Keys and Password
Create developer RSA keys. The “genkey” utility will generate a set of Keys, Password and DevID necessary for encrypting your application. You will need a terminal emulator. I use Putty for Windows, but you can also use Command Prompt. Type: telnet 8080. When the connection has been made, at the prompt, type genkey. You may not get a response the first time. Try hitting return a couple of times, then type genkey again, it will start putting ….. ++++ type output on the screen. You will be presented with a Password and Dev ID like this: see photo above.
Save this info somewhere for later.
NOTE: In Mac OS X, you can use the Terminal app in the Utilities folder.
Step 3: Finding SDK Directories
Find the directory where you extracted your SDK. If you have been following my directory creating structure, it would be \rokudev\rokusdk. In that directory, there is an subdirectory called “examples”. In that directory there are two subdirectories “source” and “zips”. In the “zip” subdir, find and extract the directory “videoplayer.zip” into your testing directory. The testing directory I created was called \rokudev\roku3
Step 4: Hosting Provider Directories
Create directories on your hosting provider. This is where ftp comes in handy. Here is what I created, rokudev/examples/videoplayer. Inside videoplayer directory, I created xml and images.
Step 5: Content
Find or create content. You are going to need 2 images(SD and HD) and one video file. See Roku specs. I used jpg and .mp4 (H.264)
Supported Video Formats:.mp4 (MPEG-4 Pt 14), .mov .m4v, HLS: m3u8 & .ts
Supported Image Formats: JPG, JPEG, PNG, GIF
Use a graphics editing program to resize the images. The HD format image should be 290 pixels wide by 218 pixels high. The SD format image should be 214 pixels wide by 144 pixels high. Here are the files I created:
wordfloat2.mp4, sd_HCTV.jpg, hd_HCTV.jpg
Step 6: Editing SDK Files
Edit brightscript, xml and manifest files. The three files you will edit are:
This is the directory structure if you have used my method. The two .xml files will go to your hosting provider and the .brs file will be zipped and sent to your Roku device.
TIP:The Manifest file can change the description of your channel on the home screen. You can change the title and subtitle info to whatever you want. You can also add code to place a splash screen.
Here is my manifest file:
title=Samples For My Channel
subtitle=Video player example using category based XML feeds
Copy these two xml files to the testing files directory. For me that is \rokudev\roku3
Lets start with categories.xml in a text editor. In Windows I like to use Notepad++. In Mac OS I like to use Taco and Xcode (free, built in Mac OS)
In the categories.xml document, remove all but one category. Your document should look like this: See 1st photo above.
Open themind.xml in a text editor. In the document, remove all but one feed item. Point the streamURL to the mp4 you will copy to your hosting provider. See 2nd photo above.
Save the document
Next, lets edit the categoryFeed.brs file. If you have been following my directory creating structure, it would be:
At the top of the document, locate the line the reads:
conn.UrlPrefix = “http://rokudev.roku.com/rokudev/examples/videoplayer/xml”
and change it to represent the source for your xml file. Replace rokudev.roku.com with your domain name. Here is the one I created:
conn.UrlPrefix = "http://www.llmcd.com/rokudev/examples/videoplayer/xml"
Save the document.
Step 7: Hosting Provider Upload
Upload your files to your hosting provider. Your video file should go to the root level of the directory you created in step 4. Your two images should go in the images directory. The categories.xml and themind.xml files should go in the xml directory.
TIP: Some hosting providers will not play back certain media files. Check with your hosting provider about which mime types they support. See photo above.
Here is what my "web.config" file looks like, installed in the directory where my video file is. The information in this file was given to me by my hosting provider. If you are using a cloud service like Amazon Web Service, the web.config file is not necessary.
Step 8: Installing Channel on Roku
Navigate to the test files directory where you extracted the videoplayer.zip file from the SDK (where you edited the file “categoryFeed.brs”
On my workstation its : \rokudev\roku3\videoplayer
Select all the files here with a compression utility (7zip, WinZip and MacOS X built in compressor works well), and add them to an archive named by the directory they are in, this should result (in my case) in a file named videoplayer.zip
Open the Roku development application webpage by typing the IP address of your Roku. Browse to the zip file you just created, then click on Install. If successful, you should see the channel pop up on your Roku home screen. see photos above and video below.
Click on the Packager link at top left of the webpage. Create a name for this application and a version separated by a forward slash. Paste the password you got from the genkey command in step 2. Finally, click on the package button.
Click on the package link so you can download the package file to your testing directory. You will see a long random string of numbers and letters with a file extension of .pkg
TIP: Take your channel for a test drive. Check video playback, graphics and channel descriptions. If everything works, you can go back and customize the channel more by branding with your own graphics and logos.
Step 9: Channel Access
This step allows you to give anyone access to your private channel via a vanity access code.
Log into your account @ https://developer.roku.com/developer
Click on “Manage My Channels” under My Channels. Under Private Channels, click on the link “Add Private Channels”.
On the first page, accept all the default Channel Store information, and click “continue” see photo above.
Fill in the information on the Add Private Channel - Describe your channel page, and select “Create”
You can add screenshots if you like, otherwise, click “Go Back”
Then, browse to the package file you downloaded from your Roku development application page, and click “Save”.
Once you see the “Publish” button enabled, click on it.
Congratulations, you now have a new private channel! Give anyone your vanity access code to view your channel on there Roku device.
Note: If you would like more information about how to develop for Roku, visit my website at http://www.llmcd.com/llmcdcp.html