Mar 142012
 

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.
http://www.ragingcomputer.com/2012/03/mythtv-roku-brightscript-app

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 – http://www.mythtv.org/wiki/Hauppauge
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

Advertisement:

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/mythipod.sh %DIR% %FILE%
UserJob2: /usr/local/bin/mythipodcom.sh %DIR% %FILE%

UserJobDesc1: Stream Encode
UserJobDesc2: Stream Encode Comskip

/usr/local/bin/mythipod.sh – doesn’t chop out commercials
/usr/local/bin/mythipodcom.sh – chops out commercials

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

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

Generates XML feeds for the Roku
/usr/bin/perl /usr/local/bin/feed.pl

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

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)