[mythtv] [mythtv-users] video playback routing

Dan Littlejohn dan.littlejohn at gmail.com
Fri Apr 1 20:06:32 UTC 2016


On Tue, Mar 22, 2016 at 11:07 PM, Dan Littlejohn <dan.littlejohn at gmail.com>
wrote:

>
>
> On Mon, Mar 21, 2016 at 1:35 PM, Michael T. Dean <mtdean at thirdcontact.com>
> wrote:
>
>> On 03/19/2016 03:46 PM, Dan Littlejohn wrote:
>>
>>> On Sat, Mar 19, 2016 at 1:26 PM, Michael T. Dean wrote:
>>>
>>> On 03/18/2016 04:03 PM, Dan Littlejohn wrote:
>>>>
>>>> Let me make another attempt to explain, I think I have a pretty standard
>>>>> setup
>>>>>
>>>>> host1 - backend master and frontend
>>>>> host2 - backend slave and frontend
>>>>>
>>>>> playing dvd iso on host1 frontend and all boxes have the same nfs
>>>>> paths.
>>>>> All boxes use the same user.  Yes, the ISOs are stored in a local nfs
>>>>> directory /myth/video/.
>>>>>
>>>>> Looks like you are on to something with the file type, as ISOs look to
>>>>> be
>>>>> a key with the problem.  I checked the other video types and they play
>>>>> locally with no network traffic.  Only the ISOs do with the weird
>>>>> streaming
>>>>> from the slave.
>>>>>
>>>>> Is it an encrypted ISO?
>>>>
>>> Nope, they are not encrypted.
>>>
>>
>> I still wouldn't be surprised if it's the code that was added to allow
>> streaming of DVDs/ISOs for Video Library--meaning that it always streams.
>> If so, the code is broken in assuming that backend streaming is required
>> for all ISOs and not even allowing the frontend to check to see if it has
>> access before streaming. If that's the case, you are more than welcome to
>> fix it.  It should work like playback of recordings and other videos--that
>> the backend says where the file is located and the frontend checks in that
>> location to see if it has local access and, if so, plays the file directly.
>>
>> This specific code was committed under a bad commit message saying that
>> it allows playback of
>> encrypted DVDs and ISOs from Storage Groups, when it actually simply
>> allows streaming of DVDs and ISOs and has nothing to do with
>> encryption***.  However, you can find the commit at:
>>
>> https://github.com/MythTV/mythtv/commit/1ff446ad093064ff3
>>
>> See also:
>>
>> https://code.mythtv.org/trac/ticket/11602
>>
>> Mike
>>
>> *** MythTV cannot play back encrypted DVDs.  MythTV uses libdvdnav to
>> play back unencrypted DVDs.  However, libdvdnav happens to check to see if
>> the user has installed libdvdcss on his system and, if so, uses it to
>> decrypt encrypted DVDs before MythTV ever sees any of the DVD data, so a
>> user who installs libdvdcss on his system is setting up the system so that
>> MythTV never actually sees any encrypted DVD. And MythTV worked exactly the
>> same way before and after this commit--the only thing the commit allowed
>> was streaming DVDs/ISOs rather than requiring direct file system access to
>> play them.
>>
>>
>>
> Thanks Mike.  Starting to take a look at it now although I will have to
> learn my way around first.
>
> Dan
>


Hi Mike:

I spent some time one this and believe I have an initial assessment of the
issue.  It looks to be like there are two problems.

The first is the GetPlaybackURL is returning the original path without
checking if it is able to be accessed locally if it is bluray or a dvd.  I
would just delete the lines indicated with an arrows below so it would use
the local dir logic after.

ProgramInfo::GetPlaybackURL

->    // return the original path if BD or DVD URI
->    if (IsVideoBD() || IsVideoDVD())
->        return GetPathname();

The second issue has already been identified with a note in the code

VideoScannerThread::buildFileList

    // TODO: FileCheckList is a std::map, keyed off the filename. In the
event
    // multiple backends have access to shared storage, the potential exists
    // for files to be scanned onto the wrong host. Add in some logic to
prefer
    // the backend with the content stored in a storage group determined to
be
    // local.

What is happening with my setup is that the master backend scans first and
the the slave scans and overwrites all the entries for the master.  This
causes all videos to be owned by the underpowered slave.  Another issue is
that the fanart and other directories are not defined on the slave so the
meta lookup also fails unless I set them on the slave.  My fix would be to
check if the storage group video directory is defined for that host and
then not scan if it is not defined.  Been looking into how to code that,
but still coming up to speed on the how.  If you have a suggestion or if
there is something I am not considering let me know.

Dan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-dev/attachments/20160401/0c158902/attachment.html>


More information about the mythtv-dev mailing list