[mythtv-users] Can Myth stream another source + IR?

Brad DerManouelian myth at dermanouelian.com
Mon Feb 9 18:47:07 UTC 2009


On Feb 9, 2009, at 10:24 AM, Travis Tabbal wrote:

> I was thinking, we have a nice DVD changer in the main entertainment  
> room. Could I connect this up to my Mythbox and have it stream the  
> output to another Myth frontend along with relaying the IR commands?  
> Assume properly supported IR hardware for receive/send. I have an  
> older PCI capture card floating around, it does MJPEG from composite  
> and SVideo, which the DVD changer will output. It's a Zoran chipset  
> and I have used it in Linux before.
>
> I know about Slingboxes, but I already have very powerfull machines  
> sitting in the right places. It seems like it would be something  
> that Myth might be able to do, or is there a better option? All  
> machines are connected via gigabit ethernet.

I've recently connected my DVD changer to my MythTV system. Mine  
connects via firewire and I can issue it commands like load disc x,  
unload current disc which is basically all I need. Here's basically  
how I have it integrated with MythVideo:

1. Changer connects via firewire
2. I have a bash script that accepts a slot # as an argument that  
loads that particular disc.
3. I have a bash script that unloads the current disc (which may or  
may not be necessary if your load command first checks for a loaded  
disc and unloads if necessary).
4. I had a stub file for each loaded disc which is basically a bash  
script named MOVIENAME.stub
     4a. This script displays a "I'm loading the selected disc..."  
message on the screen using osd_cat
     4b. Then it issues a load disc x command which issues an unload  
command if needed and loads the disc number that corresponds to  
MOVIENAME
     4c. Then it issues an mplayer or xine command to play the disc
     NOTE: I wrote a perl script that loads each disc, makes a .stub  
file for it, then moves on to the next one so I didn't have to do it  
all by hand.
5. I set up mythvideo to recognize files ending in "stub" and issue  
the sh command to play one of these files.
6. I scanned the directory containing the .stub files to add them to  
the MythVideo database.
7. I used imdb/tmdb grabber scripts to get metadata about each movie.

Now I have a list of movies in MythVideo for each disc loaded in the  
changer. When someone selects the movie, they get a message that the  
disc is loading, the changer makes a bunch of noise, and their movie  
starts playing. It's pretty cool.

I haven't tried getting this to work on a remote frontend, but  
whatever procedure needs to be done to mount a disc on one machine and  
play it from a remote machine would work here. I'm guessing you could  
probably export the /media/dvd (or whatever your changer mounts DVDs  
as) device as an NFS mountpoint, then add that same mountpoint on your  
remote frontend. You'd also have to mount the directory containing the  
stub files so those scripts can be run locally and find the DVD  
mounted locally.

If you're restricted to using the composite or svideo outputs from the  
changer, you're going to have a lot more work to do. It means having a  
capture card (maybe dedicated to the dvd changer) so that whenever  
someone issues a "Watch this DVD" command, it issues a bash script  
triggering an ir blast to the changer to switch to the correct disc,  
start up the capture card capturing the video and then streaming it to  
the remote frontend.

Honestly, what I've done is quite a stretch in functionality and if it  
was any more difficult than it was I wouldn't have bothered. I don't  
get much benefit over ripping each DVD and storing them on a hard  
drive somewhere. This is already well supported in MythVideo and  
probably the route I would take if I couldn't use my DVD changer to  
mount discs. It just means finding and using better tool than are  
built into mythtv to rip the DVDs since mtd doesn't handle copy  
protection or damaged discs very well.

-Brad



More information about the mythtv-users mailing list