MythTV Roku Overview

This is a project I’ve been tinkering on and tweaking since Roku released the SDK for their Netflix player / DVP. Much of this is shamelessly stolen from posts on MythTV Wiki.

Disclaimer: I haven’t documented how I installed everything, so I don’t remember which things I installed from source or which I installed through apt-get. It’s a kludge built on a kludge with no planning whatsoever. It hasn’t been cleaned up, but it has been working for me for over a year without any issues.

The overview…
A user job is run after each recording has completed. Many parts are common between the job that chops out commercials and the one that doesn’t. Videos are then transcoded to h.264 by ffmpeg, interleaved with MP4Box, put where they need to go and XML files are generated.

The part connected to the TV is just a Roku DVP with a BrightScript app I modified from the video player example.

This isn’t a powerful system. It does standard def video only recorded from analog cable.

HP D530 CMT with Mythbuntu 11.10
Intel(R) Pentium(R) 4 CPU 2.66GHz
1 GB Ram

Hauppauge PVR-500 –
Cox Communications – Omaha – us-cable-hrc – NTSC

Filesystem Size Mount
/dev/sda5 40G /
/dev/sdb1 40G /var/www/stream
/dev/sdc1 250G /var/lib/mythtv/recordings

I have 3 hard drives in this computer. 2 40 GB IDE drives and a 250GB SATA drive. This could also be done on a single drive.

UserJob1: /usr/local/bin/ %DIR% %FILE%
UserJob2: /usr/local/bin/ %DIR% %FILE%

UserJobDesc1: Stream Encode
UserJobDesc2: Stream Encode Comskip

/usr/local/bin/ – doesn’t chop out commercials
/usr/local/bin/ – chops out commercials

Creates the BIF file for Roku DVP
/usr/bin/perl /usr/local/bin/ ${directory} ${file}

Deletes transcoded recordings that have been deleted
/usr/bin/perl /usr/local/bin/

Generates XML feeds for the Roku
/usr/bin/perl /usr/local/bin/

Creates Symlinks for H.264 videos and MPEG2 videos
Generates RSS feed for iTunes / Miro
/usr/bin/perl /usr/local/bin/

Once the scripts and user jobs are in place, will need to put /var/www/stream/roku.xml and edit

I needed a few tweaks to my apache config for external access and bandwidth control

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: