[mythtv-users] video playback routing

Michael T. Dean mtdean at thirdcontact.com
Fri Mar 18 10:59:43 UTC 2016


(fixed top posting)


On 03/17/2016 04:38 PM, Dan Littlejohn wrote:
> On Thu, Mar 17, 2016 at 12:36 PM, Hika van den Hoven wrote:
>
>> Thursday, March 17, 2016, 6:09:37 PM, you wrote:
>>
>>> I have a two system setup with a master and a frontend.  The
>>> frontend also has a slave backend that does recording (as the
>>> satellite box is where the frontend is at).  Both boxes have access to a
>>> NAS nfs share.
>>> Recently, I noticed that even though I am playing a video on the
>>> master it appears to be routed from the frontend?
>>> myth://Videos@host2/video.iso
>>> Why is this and how can I have either everything streamed from the
>>> backend or played locally?  There is some shuddering and my guess is
>>> it is due to all the traffic back and forth (frontend is on a weak
>>> wireless connection).
>> I guess because the slave did the recording, so it is owned by the
>> slave.

Exactly.

>>   A recording record contains the hostname. Possibly if you
>> change this to the hostname of the master... Of cause the path on both
>> machines should be the same. Also then playing back on the slave would
>> then again create a similar situation.
>> Alternatively, you could try adding the path on both machines to the
>> storage group. These records also contain a hostname field. I hope
>> that it then first tries to find the file on the requesting machine.
>> As I understand older version would catch it automatically from the
>> nfs share, but no longer.
> Hi Hika:
>
> This is what puzzles me.  The master backend has the storage group
> definition and the frontend slave backend does not.

Storage Group definitions are global.  They are defined on the master 
backend and apply to all hosts.  However, if a host is missing a 
directory that's listed in the SG definition, it is ignored.  Therefore, 
the most straightforward approach to setting up SGs is to set the only 
on the master backend host and define the directory list as the union of 
all directories used on all hosts.

If you "define" a Storage Group on a remote backend, you are not 
actually defining it.  You are simply overriding the 
global/master-specified directory list associated with that Storage 
Group for this remote host only.  Doing so serves almost no purpose 
whatsoever--unless for some reason you /must/ have a directory on the 
remote host that has the exact same path as one that's defined in the 
global definition of the SG and need to exclude it from use on the 
remote host (though, really, simply changing the path/name of the 
directory on one host or the other such that only usable directories are 
listed in the SG definition is a much preferred approach).

>    I just checked with
> nload and it is clearly streaming from the frontend to the master backend
> (maybe both) and the frontend wireless connection cannot keep up with the
> network load.

Note that mythfrontend will /always/ check to see if it has local access 
to the file before playing the video.  So, all you need to do is make 
sure that the mythfrontend you're wanting to use has "local" access to 
the file.

Specifically, when you attempt to play a recording, mythfrontend asks 
the recording host (the host that originally recorded the show) where to 
find the file.  Then, once the recording host reports the location of 
the show, the frontend checks to see if that location is readable 
through the "local" file system--where "local" will include any 
NFS-/CIFS-mounted file systems.  If the specified location is not 
available to the frontend (i.e. the directory name doesn't exist on the 
frontend's file system or that directory name exists but corresponds to 
a different file system--you've mounted some other file system at the 
same-named location), then the frontend will request the file from the 
recording host.

So, as long as all your hosts use the exact same file system layout for 
the recording directories, you will be able to play the file on any 
frontend host "directly" from your NAS without any backend involvement.

If you'd like help figuring out exactly what's going on/how to make it 
work, please post information on your SG definitions (for all hosts) and 
information about all mount points on all hosts (using something like df 
and mount).  Or, if this provides enough informaiton for you to 
reconfigure things properly, then enjoy. :)

> Is this something that could be fixed?  I have been meaning for a while to
> contribute to mythtv and would not mind fixing this if someone can point me
> to where in the code it would need to be adjusted.
>

You really only need to fix your configuration.  There's no need for any 
changes to MythTV code.

Mike



More information about the mythtv-users mailing list