[SOLVED] Blue Mute detection

Forum for questions and support relating to the 1.25.x releases only.
Locked
Christo
Posts: 89
Joined: Wed Feb 01, 2012 9:48 pm

[SOLVED] Blue Mute detection

Post by Christo »

Hello all,

As i have read in some post, it seems that a "Blue Mute" is not recognised as an alert.

In case of signal loss (cable / connection broken), or defected camera, ZoneMinder generates a blue screen, thats a so called "Blue Mute"

It's an easy to setup a sequence to grab a camera image, but pulling hiar to get the analysis going!!

So to detect this "blue Muten", I am searching for a method to readback the color of that sequencely grabbed image.

I think that the zmu module of ZoneMinder is very suitable for analysing these changes..
see: http://www.zoneminder.com/wiki/index.php/Zmu

I hope that someone is familiar with these kind of analysis to give me some advice!!


Kind regards and thanks in advance!!
Christo
Last edited by Christo on Fri Sep 07, 2012 12:33 pm, edited 3 times in total.
Christo
Posts: 89
Joined: Wed Feb 01, 2012 9:48 pm

Re: Blue Mute detection

Post by Christo »

Hello All,

For those of you that has visited this post..

I found out that detecting 'Blue Mute" is possible with the use of an extra package called ImageMagick.

I don't know if this runs an most distro's, so youll have to find out.

It isn't implemented yet, but tried everything on commandline... and it works great.

Kind regards, Christo
darkfires
Posts: 12
Joined: Mon Sep 19, 2011 5:02 pm

Re: [SOLVED] Blue Mute detection

Post by darkfires »

Could you please paste a little more info about how you made this work with imagemagick more specifically?

I have 2 RTSP IP cameras and signal loss is not detected at all, image just freezes to last good one and then i get no sock files, so I want to add something that changes the live pic to something else while it can't continue the stream


Thanks
Christo
Posts: 89
Joined: Wed Feb 01, 2012 9:48 pm

Re: [SOLVED] Blue Mute detection

Post by Christo »

Hello Darkfires,

First of all, you have to grab a frame of each camera.

This frame must me analysed by Imagemagick with the command:
identify -format %k

depending on the calculated color quantity, you'll know if the camera is disconnected.. bluemuted or low on IR.

I have done this with a small bash program that first of all grabs a frame and runs the analysis by ImageMagick and than on to the next frame to grab.. Depending on the outcome, it generates an Email with a specific message including attached frame.

etc.

Success and regards,
Christo
darkfires
Posts: 12
Joined: Mon Sep 19, 2011 5:02 pm

Re: [SOLVED] Blue Mute detection

Post by darkfires »

Hi,

So I have figured out a way to detect signal loss via zmu, simply by :

root@xdev ~/zmt # zmu -m 4 -v -l -t
Monitor 4(Monitor-1)
Time of last image capture: 2012-12-28 13:57:10.57
root@xdev ~/zmt # zmu -m 4 -v -l -t
Monitor 4(Monitor-1)
Time of last image capture: None.00

However, it does not matter what option I send via zmu to trigger alarm or alert, the ZM monitor page still sits at last image. Even when camera comes back and streams again, only way to restore is to reload the page.

I think it is related to this:

12/28/12 13:58:20.506544 web_php[24023].ERR [socket_sendto( /tmp/zm/zms-318694s.sock ) failed: No such file or directory] at /usr/share/zoneminder/includes/functions.php line 2325
12/28/12 13:58:40.505958 web_php[13098].ERR [socket_sendto( /tmp/zm/zms-318694s.sock ) failed: No such file or directory] at /usr/share/zoneminder/includes/functions.php line 2325

As it is failing at that point, it doesn't matter what happens the browser will not reload or reconnect on its own.

Any ideas?

Thanks
theforce
Posts: 129
Joined: Tue May 11, 2010 5:22 am

Re: [SOLVED] Blue Mute detection

Post by theforce »

I would like to say I have seen this issue of the monitor or montage page not updating. I've never really looked into since it does not happen very often for me.

My zoneminder is just grabbing the jpg's from the cameras. Sometimes for some reason zoneminder wont be able to connect to the camera to grap the jpg. The monitor goes black. If its only for a second the picture will come back on. If its more than a second the monitor stays black and I cant get an image unless I refresh the page. While the monitor is black zoneminder is still working fine with the problem camera.

I figure its just a hiccup with zoneminder grabbing a single image or two and zoneminder ignors it. My guess is that the issue is wtih the streaming jpeg feature of the browser not properly establishing a connection after it looses one. I dont really know. Like I said I never really looked into it.

This happed to me on 1.24 and 1.25.

Looking at the error log you have

12/28/12 13:58:40.505958 web_php[13098].ERR [socket_sendto( /tmp/zm/zms-318694s.sock ) failed: No such file or directory] at /usr/share/zoneminder/includes/functions.php line 2325

Would it be that when you open the browser to a monitor it creates the file /tmp/zm/zms-318694s.sock for the streaming video to your broswer? Then when zoneminder cannot connect to the camera for some reasion after a second or two it will drop the connection to your browser. Doing so it deletes the /tmp/zm/zms-318694s.sock since it temporarly disabled the camera while it trys to reconnect. While on the browser end its still wanting the /tmp/zm/zms-318694s.sock for the stream which zoneminder does not have because you have not requested a new stream. Refreshing the browser askes for a new stream and a new file /tmp/zm/zms-987654132s.sock file is created. The reason I think this is because while messing with PTZ cameras I noticed that a .sock file is created when you request a PTZ command and I was doing some stuff with scripting and was messing up file permissions.

Dont know how to fix the issue but thats my theory I just came up with. I dont know how it really works. I'll quit rambling now.
Locked