My son and I are working on getting a mythtv channel working. We have finally started to make some progress. Currently we are able to extract information from the mysql database for each recorded show and have the roku list each show on the tv screen, along with a picture from each show.
Next we are going to work on the video playback of a show. Right now we are trying to figure out the ffmpeg/mencoder command line to transcode a mpeg2 file to h.264.
We still have a long way to go, but it was cool seeing part of it working last night.
There was alot of discussion of various encoding parameters in the “debugging playback” thread, and (IIRC) a link to an article on how netflix is doing the encoding.
Cool! That’s really exciting. I broke down and got a Roku because I was tired of waiting for Netflix support on my Linux-based MythTV/Boxee machine. Sadly, that means I have to go back to having multiple video sources. If I could use my Roku box as a Myth frontend, I’d be thrilled!
I’ll try to dig up an old script I used to use for encoding things for my iPod, which uses mencoder and something else for h.264. Perhaps it will be of some use to you.
I was actually starting to this same exact thing last night. I have lots of coding experience and love my MythTV setup. I would be willing to help you guys out getting this working. I think the Roku would be a great quiet myth frontend. Please let me know if there is anything that you need help with.
Here’s the script I’ve used. It encodes using mencoder, but since mencoder can’t (or at least couldn’t) create the correct container for the h.264 stream, MP4Box is used to finish the job.
I used this script successfully for a while, but eventually switched to Handbrake.
I am hoping to post the code after this weekend, once we get the video to play. There is some code cleanup and comments I need to add to it, plus I am trying to figure out to write a cgi script to interface with the mysql database.
I am a Oracle dba, not a programmer so my learning curve is steep. What I need right now is an easy way to get xml from mysql. Some googling will probably pop some ideas up. Then I need to learn where the necessary data values are in the mysql tables. Most of them appear to be in recorded_programs, but I have not found the last played position yet.
The way I am driving this project is all of the data needed by the Roku will be in an xml file served up by Apache. The only hardcoded values I have in the Brightscript file is the ip address of my Apache server.
Well, if you are a DBA, the database stuff should come easy, thats the part that most programmers have trouble with
You will have to transcode ahead of time, most likely, or else somehow tell the Myth box to record in the right mp4 format
I, too, recommend looking at “Hand Brake” (CLI) .. I was able to get a DVD to play pretty well using that. There may be problems at 1HR plus, but that shouldn’t affect MOST TV shows
I happen to write Perl CGI code to access databases on a daily basis for my day job, so let me know if you’d like any help. What language are you using for the CGI?
Could you please give an example of a cgi script running a query against a mysql database? Currently writing the query I need to extract the data from the database.
“jsj123” wrote:
Could you please give an example of a cgi script running a query against a mysql database? Currently writing the query I need to extract the data from the database.
–Stephen
Check out the DBI and DBD::mysql perl modules on cpan.org, they’re very well documented.
There is also PHP (which I feel is a bit more friendly), python, ruby? etc… google is you friend, there is a LOT of information. Take a tutorial for a few languages and pick the one you like the best.
I am currently running the encode script by hand, but I will soon get it integrated into mythtv job system. My encodes look terrible, I suspect ipod video formats are not HD :).
We have the following 3 scripts:
Myth.brs - Does all the roku magic.
recorded_shows.xml - accesses the mythtv database and presents a list of shows in xml to the brightscript code
transcode_mp4 - creates lousy h.264 encodes of mpeg2 files
All of this will be available by Monday, or when we get the code all pretty. I also need to write a list of instructions, which based upon my prior attempts at documentation, nobody will understand.
There is still a lot of things to be implemented,
store current position in show. Thought I might create a new database table for this kind of stuff. This one I will do.
Delete shows from mythtv. This might be a simple database update, but I am not sure. Oops, we
The stuff I am not going to do:
List a tv schedule and schedule a future recording. I can probably give the information in xml, but the navigation/selection logic is an SEP.