[mythtv-users] linking mythtv with zoneminder live view

Mark Perkins perkins1724 at hotmail.com
Tue Mar 20 11:58:43 UTC 2018



On 20 March 2018 4:10:20 pm Mark Perkins <perkins1724 at hotmail.com> wrote:



On 20 March 2018 9:20:11 am Anthony Giggins <seven at seven.dorksville.net> wrote:


On 20 March 2018 at 06:37, Mark Perkins <perkins1724 at hotmail.com<mailto:perkins1724 at hotmail.com>> wrote:
Hoping someone may be able to offer some insight into linking mythtv
with zoneminder live view.

Running mythtv fixes/29 updated in the last week or two and zoneminder
1.30.4. They are on completely separate systems. Have installed the
mythzoneminder plugin and added the mythzmserver to zoneminder server.

The connection mostly works. Information Center - Zoneminder - Show
Connections looks correct and I can control the camera (change mode).
And Show Events works and I can select and playback events (except they
are in 4:3 mode instead of 16:9 mode but I can work on that later).
Those two parts seem to work / integrate perfectly.

However Show Live View doesn't work. In mythfrontend I get the following
set of messages repeated 4-10 times followed usually by a mythfrontend
segfault or a hang. Note that the contents of the protocol error seems
to change every time and often includes bizarre non standard characters
(black question marks, boxes with numbers and dots, etc). The number of
"bytes pending" changes too:

2018-03-20 06:42:06.350644 I  Using protocol version 11
2018-03-20 06:42:06.393538 N  Monitor: Front Garage (1) is using 3 bytes
per pixel
2018-03-20 06:42:07.565156 E  MythSocket(7f3368003530:31): Protocol
error: '******++' is not a valid size prefix. 8680 bytes pending.
2018-03-20 06:42:08.467368 E  MythSocket(7f3368003530:31): No response.
2018-03-20 06:42:08.467414 N  Connection to mythzmserver lost
2018-03-20 06:42:08.467470 I  Connecting to zm server:
192.168.251.131:6548<http://192.168.251.131:6548> (try 1 of 2)
2018-03-20 06:42:08.569109 E  readData: Error, readBlock
2018-03-20 06:42:08.569903 E  ZMClient::getLiveFrame(): Failed to get
image data

In mythzmserver I get this set of messages repeated the same number of
times:

Using server protocol version '11'
getZMSetting: ZM_SHM_KEY Result: 0x7a6d0000
Shared memory key is: 0x7a6d0000
getZMSetting: ZM_PATH_MAP Result: /dev/shm
Memory path directory is: /dev/shm
getZMSetting: ZM_EVENT_IMAGE_DIGITS Result: 5
Event file format is: %05d-capture.jpg
Analysis file format is: %05d-analyse.jpg
getZMSetting: ZM_USE_DEEP_STORAGE Result: 1
using deep storage directory structure
getZMSetting: ZM_CREATE_ANALYSIS_IMAGES Result: 1
using analysis images
Got 1 monitors
Opened mmap file: /dev/shm/zm.mmap.1
new connection from XXX.XXX.XXX.XXX on socket 5
Processing: 'HELLO'
Processing: 'GET_MONITOR_LIST'
We have 1 monitors
id:             1
name:           Front Garage
width:          1920
height:         1080
palette:        0
byte per pixel: 3
sub pixel order:6
-------------------
Processing: 'GET_ALARM_STATES'
Processing: 'GET_LIVE_FRAME'
Getting live frame from monitor: 1
Frame size: 6220800
Processing: 'GET_ALARM_STATES'
socket 5 hung up
Closed mapFile for monitor: Front Garage
ZMServer destroyed

Both the mythtv system and zoneminder system otherwise seem to be
running very well. The only tweak I have had to apply is that it appears
that zm.conf no longer contains the version number and mythzmserver
checks for that before starting. Appending "ZM_VERSION=1.30.4" fixed
that ok.

Any advice greatly appreciated.


let me recheck mine tonight, I haven't checked it since I originally set it up.

but just check that your PATH_ZMS is set correctly, which is usually the cause for liveview related issues.

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?

Cheers,

Anthony

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.

I will double check it tonight.

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.

Other than that I have not discovered anything useful or got any closer to understanding the problem. Perhaps a zoneminder protocol change?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20180320/14282a62/attachment.html>


More information about the mythtv-users mailing list