[mythtv-users] video playback routing

Dan Littlejohn dan.littlejohn at gmail.com
Fri Mar 18 17:14:32 UTC 2016


On Fri, Mar 18, 2016 at 5:59 AM, Michael T. Dean <mtdean at thirdcontact.com>
wrote:

> (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
>



There is some confusion here so let me clear it up.

First, what I am trying to play back is a dvd iso.  It was not recorded by
any backend.

For the storage groups this is what I have in the databases.  All entries
are being saved to the master.

master
mysql> select * from storagegroup;
+----+-------------+----------+---------------------------------+
| id | groupname   | hostname | dirname                         |
+----+-------------+----------+---------------------------------+
|  3 | Default     | master   | /myth/tv/                       |
|  6 | Trailers    | master   | /myth/admin/video/trailers/     |
| 46 | Coverart    | master   | /myth/admin/video/coverart/     |
| 49 | Fanart      | master   | /myth/admin/video/fanart/       |
| 11 | Screenshots | master   | /myth/admin/video/screenshots/  |
| 12 | Banners     | master   | /myth/admin/video/banners/      |
| 16 | LiveTV      | master   | /myth/tv/                       |
| 17 | DB Backups  | master   | /myth/admin/backup/             |
| 18 | Videos      | master   | /myth/video/                    |
| 50 | Coverart    | slave    | /myth/admin/video/coverart/     |
| 51 | Fanart      | slave    | /myth/admin/video/fanart/       |
+----+-------------+----------+---------------------------------+

slave
mysql> select * from storagegroup;
Empty set (0.00 sec)

I deleted the entries for the slave in the master, but it still streams
from the slave when I play something on the master.

The nfs mounts on both boxes are identical

master mythuser # df -h
Filesystem                 Size  Used Avail Use% Mounted on
192.168.0.3:/volume1/data   17T  9.3T  7.1T  57% /myth

slave mythuser # df -h
Filesystem                 Size  Used Avail Use% Mounted on
192.168.0.3:/volume1/data   17T  9.3T  7.1T  57% /myth

when I play using a frontend on the master it is streaming from the slave
box.  Even with verbose this is the only clue of where it is looking for
the file, the actual path is not printed out.

2016-03-18 12:01:50.077491 I  DVDRB: Opened DVD device at
myth://Videos@slave/video.iso

So I am unsure what to change.  If it is suppose to be looking for the file
locally and then using that path it is not working for some reason.  What
suggestions next?

Dan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20160318/53f30231/attachment.html>


More information about the mythtv-users mailing list