<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="font-family: Arial, Myriad, 'Liberation Sans', sans-serif; font-size: 12pt;">
<div dir="auto"><br>
</div>
<div dir="auto"><br>
</div>
<div id="aqm-original" style="font-family: sans-serif; font-size: 12pt; color: black;">
<!-- body start -->
<div style="font-family: arial, myriad, 'liberation sans', sans-serif; font-size: 12pt;" class="aqm-original-body">
<div style="color: black;">
<p style="color: black; font-size: 10pt; font-family: Arial, sans-serif; margin: 8pt 0;">
On 20 March 2018 4:10:20 pm Mark Perkins <perkins1724@hotmail.com> wrote:</p>
<blockquote type="cite" class="gmail_quote" style="margin: 0 0 0 0.75ex; border-left: 1px solid #808080; padding-left: 0.75ex;">
<div dir="auto"><br>
</div>
<div dir="auto"><br>
</div>
<div style="font-family: sans-serif; font-size: 12pt; color: black;">
<div class="aqm-original-body">
<div style="color: black;">
<p style="color: black; font-size: 10pt; font-family: Arial, sans-serif; margin: 8pt 0;">
On 20 March 2018 9:20:11 am Anthony Giggins <seven@seven.dorksville.net> wrote:</p>
<blockquote type="cite" class="gmail_quote" style="margin: 0 0 0 0.75ex; border-left: 1px solid #808080; padding-left: 0.75ex;">
<div dir="ltr"><br>
<div class="gmail_extra"><br>
<div class="gmail_quote">On 20 March 2018 at 06:37, Mark Perkins <span dir="ltr">
<<a href="mailto:perkins1724@hotmail.com" target="_blank">perkins1724@hotmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Hoping someone may be able to offer some insight into linking mythtv<br>
with zoneminder live view.<br>
<br>
Running mythtv fixes/29 updated in the last week or two and zoneminder<br>
1.30.4. They are on completely separate systems. Have installed the<br>
mythzoneminder plugin and added the mythzmserver to zoneminder server.<br>
<br>
The connection mostly works. Information Center - Zoneminder - Show<br>
Connections looks correct and I can control the camera (change mode).<br>
And Show Events works and I can select and playback events (except they<br>
are in 4:3 mode instead of 16:9 mode but I can work on that later).<br>
Those two parts seem to work / integrate perfectly.<br>
<br>
However Show Live View doesn't work. In mythfrontend I get the following<br>
set of messages repeated 4-10 times followed usually by a mythfrontend<br>
segfault or a hang. Note that the contents of the protocol error seems<br>
to change every time and often includes bizarre non standard characters<br>
(black question marks, boxes with numbers and dots, etc). The number of<br>
"bytes pending" changes too:<br>
<br>
2018-03-20 06:42:06.350644 I  Using protocol version 11<br>
2018-03-20 06:42:06.393538 N  Monitor: Front Garage (1) is using 3 bytes<br>
per pixel<br>
2018-03-20 06:42:07.565156 E  MythSocket(7f3368003530:31): Protocol<br>
error: '******++' is not a valid size prefix. 8680 bytes pending.<br>
2018-03-20 06:42:08.467368 E  MythSocket(7f3368003530:31): No response.<br>
2018-03-20 06:42:08.467414 N  Connection to mythzmserver lost<br>
2018-03-20 06:42:08.467470 I  Connecting to zm server:<br>
<a href="http://192.168.251.131:6548" rel="noreferrer" target="_blank">192.168.251.131:6548</a> (try 1 of 2)<br>
2018-03-20 06:42:08.569109 E  readData: Error, readBlock<br>
2018-03-20 06:42:08.569903 E  ZMClient::getLiveFrame(): Failed to get<br>
image data<br>
<br>
In mythzmserver I get this set of messages repeated the same number of<br>
times:<br>
<br>
Using server protocol version '11'<br>
getZMSetting: ZM_SHM_KEY Result: 0x7a6d0000<br>
Shared memory key is: 0x7a6d0000<br>
getZMSetting: ZM_PATH_MAP Result: /dev/shm<br>
Memory path directory is: /dev/shm<br>
getZMSetting: ZM_EVENT_IMAGE_DIGITS Result: 5<br>
Event file format is: %05d-capture.jpg<br>
Analysis file format is: %05d-analyse.jpg<br>
getZMSetting: ZM_USE_DEEP_STORAGE Result: 1<br>
using deep storage directory structure<br>
getZMSetting: ZM_CREATE_ANALYSIS_IMAGES Result: 1<br>
using analysis images<br>
Got 1 monitors<br>
Opened mmap file: /dev/shm/zm.mmap.1<br>
new connection from XXX.XXX.XXX.XXX on socket 5<br>
Processing: 'HELLO'<br>
Processing: 'GET_MONITOR_LIST'<br>
We have 1 monitors<br>
id:             1<br>
name:           Front Garage<br>
width:          1920<br>
height:         1080<br>
palette:        0<br>
byte per pixel: 3<br>
sub pixel order:6<br>
-------------------<br>
Processing: 'GET_ALARM_STATES'<br>
Processing: 'GET_LIVE_FRAME'<br>
Getting live frame from monitor: 1<br>
Frame size: 6220800<br>
Processing: 'GET_ALARM_STATES'<br>
socket 5 hung up<br>
Closed mapFile for monitor: Front Garage<br>
ZMServer destroyed<br>
<br>
Both the mythtv system and zoneminder system otherwise seem to be<br>
running very well. The only tweak I have had to apply is that it appears<br>
that zm.conf no longer contains the version number and mythzmserver<br>
checks for that before starting. Appending "ZM_VERSION=1.30.4" fixed<br>
that ok.<br>
<br>
Any advice greatly appreciated.<br>
<br>
</blockquote>
<div><br>
</div>
<div>let me recheck mine tonight, I haven't checked it since I originally set it up.</div>
<div><br>
</div>
<div>but just check that your PATH_ZMS is set correctly, which is usually the cause for liveview related issues.</div>
<div><br>
</div>
<div>what I'd really like to do however is have it pop up on mythtv PIP when alerts come in, perhaps it can do this with the zmeventserver?</div>
<div><br>
</div>
<div>Cheers,</div>
<div><br>
</div>
<div>Anthony</div>
</div>
<br>
</div>
</div>
</blockquote>
</div>
</div>
</div>
<div dir="auto">Thanks for the tip. I had a quick check and the path looks ok and matches with the cgi settings in zoneminder.conf but I'm not much of an Apache expert. I did notice that my path was set to /cgi-bin-zm/nph-zms rather than /cgi-bin-zm/zms which
 the help text implies is the default but changing it made no difference. Live viewing via browser works fine either way just not via mythzmserver.</div>
<div dir="auto"><br>
</div>
<div dir="auto">I will double check it tonight. </div>
</blockquote>
</div>
</div>
</div>
<div dir="auto"><br>
</div>
<div dir="auto">After a lot of stuffing around I think (I think) I can say it is not the PATH_ZMS. After trying lots of tweaks without any real success I wound the camera resolution back to 1280 x 720 greyscale. At that I get the exact same types of error messages
 but I also get a few seconds of live video before the segfault. I think if the path was wrong then it should be impossible to get any video.</div>
<div dir="auto"><br>
</div>
<div dir="auto">Other than that I have not discovered anything useful or got any closer to understanding the problem. Perhaps a zoneminder protocol change? </div>
</body>
</html>