sr_roku

Sample Roku Feed

Introduction

Roku allows you to connect to videos and images on a remote server by serving a custom Roku channel. Only the branding images are on the Roku server. All other images and video files are connected to the Roku server via a file called a feed. The feed is in a format called Javascript Object Notation (JSON). In order to add a video to the Roku channel, you need to do four things:

Branding and other design items are changed on the Roku website.

In order for the feed to work, it must be valid JSON. You can check your json at a linter, such as jsonlint.com. This will catch any syntax errors, such as an extra bracket or missing comma. It’s also helpful to use an editor that can interpret JSON and catch mistakes.

JSON is pretty straight forward. It is basically a text-based database, a list of nested objects with key:value pairs. Here is an example of valid JSON, which consists of an opening curly brace, a field name in quotes, a semicolon separating the key from the value, the value, and a closing curly brace.

{“sampleMovieName”: “Night of the Living Dead”}

JSON key:value pairs inside curly brackets are call objects (i.e., javascript OBJECT notation). Objects are used by javascript functions on Roku’s programs, which is why the syntax needs to be correct.

There are other rules to get to know when adding additional key:value pairs and nested objects and arrays, understanding when to use a comma, semicolon, bracket, etc.

JSON Tutorial

Roku Feed Schema

Additionally, in order to be rendered by Roku, keys and values need to fit the Roku feed schema, available at:

Roku Direct Publisher Feed Specification

The feed specification also includes examples of valid syntax for each object. I would recommend building new objects while referencing the schema. Roku will take your feed file and validate it against the Roke Feed Schema. Even if your feed is valid JSON, it will not automatically work. Roku will give an error message in the Feed Status link if it doesn’t. If it is not valid JSON, Roku will give a parse error message. Otherwise it will give specific errors on what part of the file does not work.

Please note. Currently the feed only supports putting movie, short form video and series objects in a custom playlist. E.g., you cannot put a single episode of a series in a Featured playlist. You must give each video a different id.

Naming Convention for IDs

I’m using underscore_case throughout.

Updating Step by Step Process

Upload Videos and Thumbnails

Videos should be uploaded to Vimeo. The link required by Roku is the Http Live Stream (HLS) link available to Vimeo Pro users. To access this link, click on the video name link while logged into Vimeo. Go to Settings, Video File. The HLS link will be at the bottom of the page when “Get direct links to use your own player” is selected.

Add objects to the feed

You will most likely need to update:

Once you have added your objects, check the file in a linter (https://jsonlint.com/) and save.

Updating the Live Feed

The live feed file can be changed in Roku. Change the Feed Url in Roku by:

Change the name of the Feed to the new one and save. It will start processing the feed file. You can check the status at the Feed Status link. The link will show a red X if there is an issue.

If you are publishing the channel publicly, you may do so by clicking the Publish link. Otherwise it will be a private channel. Changes to branding, etc. will propagate within 24 hours, as Roku devices check for daily updates. Changes to the Feed file should occur when a user opens the channel, as the feed file is pulled as the channel loads. If there is an error in the feed, Roku will load the oldest error free version.