ROKU HD Frontend

From MythTV Official Wiki
Revision as of 17:24, 12 November 2010 by Mikeh (talk | contribs) (Server Side PHP Script)

Jump to: navigation, search


I have figured out how to use the ROKU HD box as a Myth Frontend player.

The ROKU box supports a language called BrightScript. It allows you to write custom applications that can run on the ROKU box, just like Netflix, etc.

I wrote a BrightScript application that can get XML data from the MythTV database via a php script. The php script I wrote auto creates show and episode images along with the approriate meta-data to display in the UI.

What you need

1) A server running apache and php that has the ability to communicate with your mysql server used for the mythbackend.
2) My BrightScript package
3) My server side script
4) Enable development mode on your ROKU box
5) Transcode your recordings to H.264 format
6) ffmpeg to create show and episode images

Development Mode

With the ROKU remote enter Home 3 times, Up 2 times, Right, Left, Right, Left, Right to enable it on your ROKU box.

Server Side PHP Script

This script should be placed a public directory on your apache server. The script needs access to the location of your mythtv recordings. There are several variables at the beginning of the script that need to be edited for your setup.

In the roku.php script, the XML generated is hardcoded to say,'quality="HD"', on line 185. If you need SD output from the Roku, it must be changed to 'quality="SD"'.

The script uses ffmpeg to generate the appropriate file images for the ROKU box.

Transcode to H.264

I don't know why, but unfortunately, the ROKU Box only supports H.264 formatted videos. I found a script that does the conversion using mencoder

http://eternalvoid.net/tutorials/mythtv-autotranscode/mythtv-transcode-h264.sh

All of your transcoded files should have an mp4 extension.

BrightScript Application

BrightScript applications are distributed as zip files. You will need to edit the config.brs file in the zip file and change the URL for the roku.php file that you installed on your server. Do not delete or add anything else to the zip file.

Next point your web browser at your ROKU box's IP address. You will get a screen that allows you to upload the zip file.

You can telnet to your ROKU box on port 8085 and watch the debug console if you want.

The main ROKU menu will now have a MythTV icon. Click on that. It will list your shows. It may take a few seconds to build the initial list, as the php server side script needs to generate the appropriate image files. If an image file already exists, then it is not recreated. Likewise, as you drill down into your episodes, image files are created on the fly. They only need to be created once. So future listings will be fast.

Download Files

Good Luck!