≡ Menu

MythTV and Roku

In order for MythTV recordings to be played on the Roku, they must be transcoded to a playable x264 format.  Roku is particularly fussy about this format.  ear9mrn’s rokuencode.sh script will output a file with the typically ugly MythTV filenames that are (almost) playable on the Roku:MythTV, Open Source DVR

/usr/bin/HandBrakeCLI -i $1/$2 -o $newname -e x264 -b 1500 -E faac -B 256 -R 48 -w 720

The problem with ear9mrn’s HandBrakeCLI script is that the video framerate is missing, which is problematic on my 1st generation Roku.  In order to get a stream without the audio being off by about a sec, I had to set the framerate to 29.97 and web-optimized the transcoded file:

/usr/bin/HandBrakeCLI -i $1/$2 -o $newname -e x264 -b 1500 -E faac -r 29.97 -B 160 -R 48 -w 720 -O

So while this drops in perfectly viewable recordings for the Roku on channels like RoksBox, it still leaves the problems of the unfriendly filenames.   To get friendly filenames for the Roku, I’ve pieced together rokuencode.php.  Some of the MythTV contributed scripts (like mythlink.pl) were not as direct a solution as creating a script for the Roku.