[mythtv-users] linking mythtv with zoneminder live view

Paul Harrison mythtv at sky.com
Wed Mar 21 14:52:49 UTC 2018

On 21/03/18 02:19, Mark Perkins wrote:
> On 21/03/18 06:22, Paul Harrison wrote:
>> The MythZoneminder plugin doesn't require anything from PATH_ZMS so 
>> it's not that. The live view uses mythzmserver to read direct from 
>> the mmap or shared memory used by Zoneminder. One consequence of this 
>> is if the format of the data structures in the buffers changes then 
>> mythzmserver would need updating. I use Zoneminder 1.30.4 and it 
>> works fine so it's not that either. The only other thing I can think 
>> of is if you change anything in ZoneMinder like the capture 
>> resolution then you _must_ restart mythzmserver since there is no 
>> easy way for it to know the shared memory buffers have changed format 
>> and bad things can happen.
>> You also said your camera's are 16:9 but the plugin displays things 
>> as 4:3. Does ZoneMinder show the images in the correct aspect ratio? 
>> The plugin doesn't handle aspect ratio in any way just wondering if 
>> there is some way to get that info from ZoneMinder.�
>> Paul H.
> I did stop / start mythzmserver when changing camera settings (stopped 
> / started ZoneMinder as well just in case) but no change in symptoms. 
> Running with the smaller resolution gets a few sporadic frames into 
> mythtv but still generates the same types of errors and eventually 
> (within a few / several seconds) segfaults.

I wonder if mythzmserver can't keep up with the frame rate and large 
frame sizes you have set and is getting out of step with what ZoneMinder 
has in it's buffer? There is no compression used at all so each frame is 
passed as is which can lead to fairly large chunks of data being passed 
over to the FE.

I know ZoneMinder is working on a new API that would eventually remove 
the need for mythzmserver and the FE will be able to access ZoneMinder 
directly through this API which would be more efficient and less of an 
hack reading stuff directly from ZM's shared memory buffers.

I don't plan on updating the plugin to support this though, I will when 
I get time before 30.0 is released be removing the plugins I support 
from the FE, MythArchive, MythZoneminder, MythBrowser and MythMusic and 
possibly others that rely on those since they are all unsupported and EOL.

> Re aspect ratio (16:9), yes ZoneMinder seems to display the camera 
> perfectly, correct resolution and everything. Events replay in correct 
> ratio as well. As far as I can see ZoneMinder in a browser window is 
> working perfectly.

Wonder if it just uses the resolution to guess the AR. If all your 
camera's are the same AR you could modify the theme so the images either 
preserve the AR or change there size to a 16:9 one.

> I am running my ZoneMinder install in a docker container. Perhaps that 
> has something to do with it?

I've never run it in docker but I do know you can get unexpected 
problems sometimes when using docker for some things but I honestly 
don't know.

Paul H.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20180321/d0833c98/attachment.html>

More information about the mythtv-users mailing list