Page 1 of 2

Mobotix M12 Nonfunctional

Posted: Fri Mar 25, 2011 3:43 pm
by Quantum
I am starting to lose hope for this project. I've spent weeks trying to make this M12 work well with MxEasy and Firefox, but the framerate never gets above 5 fps at 1024x768.

So I'm trying Zoneminder. Unfortunately it doesn't work at all. I am using the settings here:
http:||www.zoneminder.com/forums/viewtopic.php?t=13726
... IOW ffmpeg and
http:||bill:asteroid@10.6.44.40/control/faststream.jpg?stream=full&fps=0&error=picture&e=.mjpg

Dead.

Of course I have ffmpeg installed and the camera set to mjpeg mode. Trying to run it in mplayer rewards me with:
$ mplayer http:||bill:asteroid@10.6.44.40/control/faststream.jpg?stream=full&fps=0&error=picture&e=.mjpg
[2] 5782
[3] 5783
[4] 5784
[3] Done fps=0
bill@hex:~$ MPlayer 1.0rc4-4.4.5 (C) 2000-2010 MPlayer Team
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

[2]+ Stopped mplayer http:||bill:asteroid@10.6.44.40/control/faststream.jpg?stream=full
[4] Done error=picture

Re: Mobotix M12 Nonfunctional

Posted: Fri Mar 25, 2011 9:04 pm
by Quantum
OK, I see now that ZoneMinder cannot possibly work with a Mobotix camera because of the long URL required. In this post Mitch says the HTML code must be changed to allow a longer url, and although he says from 64 to 128, the only thing close I can find is in /usr/share/zoneminder/skins/classic/views/monitor.php which has 32 bytes. Changing that does not help, the URL is truncated anyway. Mitch does not say in which file the change needs to be made, unfortunately. Surprisingly he made the post two years ago, and this ridiculous problem is still there.

So unless someone knows, ZoneMinder cannot be used with Mobotix cameras. Is ZoneMinder still being maintained?

Re: Mobotix M12 Nonfunctional

Posted: Sun Mar 27, 2011 1:02 pm
by Quantum
Really? No one's home?

Re: Mobotix M12 Nonfunctional

Posted: Sun Mar 27, 2011 2:09 pm
by robert999
Did you try lengthening the "Path" field (mine is set as varchar(64)) in the Monitors table of the MySQL database (zm)?

Example, to lengthen it to 128 bytes, use the following command after logging in to mysql and connecting to the zm database:

Code: Select all

mysql> ALTER TABLE Monitors MODIFY Path VARCHAR(128) DEFAULT '/' NOT NULL;
The HTML size parameter for the input field in monitor.php is only for display purposes AFAIK. I don't think it truncates anything.

This is just an idea - I don't know if it's going to help your situation or not. Good luck.

Re: Mobotix M12 Nonfunctional

Posted: Sun Mar 27, 2011 11:30 pm
by Quantum
Thank you. Yes that did fix the URL truncation problem, but still no image in ZM. As per the instructions specific to Mobotix I'm using IP
http|//bill:godzilla7@10.6.46.50/control/faststream.jpg?stream=full&fps=0&error=picture&e=.mjpg

I can paste this URL into a browser I do get the real-time camera stream.

When I hit the camera's name in ZM I get the viewing screen with buttons, but it's blank white where the image should be. The capture width and height match the camera's, but I don't know what color depth it's putting out.

Re: Mobotix M12 Nonfunctional

Posted: Mon Mar 28, 2011 1:58 am
by bb99
If you can change the camera output to greyscale and zoneminder the same, that eliminates palette. Double check your port, could be the missing link.

Re: Mobotix M12 Nonfunctional

Posted: Mon Mar 28, 2011 4:02 am
by Quantum
It's nighttime so the camera has switched to the night B&W side, which I hope is 8bit grayscale. Still no picture though.

The camera serves ports 80 and 443 (SSL), and I can put the link in a browser and get the stream whether http or https, so I know the link is good. For some reason ZM is not translating it through.

There are no files in /var/log/zm for some reason.

I am losing confidence in Mobotix products because in MxEasy (Linux), and any browser, I never get more than 1 frame per second, even in bright daylight. Intolerable. Trying to get ZM working to see if it gives the same result.

Re: Mobotix M12 Nonfunctional

Posted: Mon Mar 28, 2011 4:05 pm
by robert999
My /var/log/zm directory is also empty, but there are a number of log files located in /tmp.

Re: Mobotix M12 Nonfunctional

Posted: Tue Mar 29, 2011 12:21 pm
by Quantum
Thanks. The only sign of trouble is in /tmp/zmdc.log:

Code: Select all

03/27/11 16:34:16.834214 zmdc[1736].INF ['zmc -m 3' starting at 11/03/27 16:34:16, pid = 2845]
03/27/11 16:34:17.475087 zmdc[1736].WAR [Can't find process with command of 'zma -m 3']
03/27/11 20:54:46.877687 zmdc[1736].INF ['zmc -m 3' stopping at 11/03/27 20:54:46]
03/27/11 20:54:52.913705 zmdc[1736].INF ['zmc -m 3' crashed, signal 8]
03/27/11 20:54:53.361629 zmdc[1736].INF ['zmc -m 3' starting at 11/03/27 20:54:53, pid = 3735]
03/27/11 20:54:53.816371 zmdc[1736].WAR [Can't find process with command of 'zma -m 3']
# zma -h
zma -m <monitor_id>
Options:
-m, --monitor <monitor_id> : Specify which monitor to use
-h, --help : This screen

Why 'monitor 3'?

Re: Mobotix M12 Nonfunctional

Posted: Tue Mar 29, 2011 3:57 pm
by robert999
That's probably the ID of the entry in the Monitors table of the database. You likely made a few monitors before and deleted them. Just for curiosity's sake, you can check with

Code: Select all

mysql> select Id, Name from Monitors;
I found a related post on signal 8 that suggests a problem with the zone definition.
http://www.zoneminder.com/forums/viewtopic.php?p=53729

Did you customize the zone yet? Try moving all the points "in" towards the center of the image. If you're setting up a 320x240 feed, make sure all the x,y's are within those bounds, and make sure the "lines don't cross". The zone should be a polygon where a-b, b-c, c-d, d-e, etc. never cross paths.

I had a similar problem that went away when I made sure my zone did not go outside the image frame...I just can't remember the details at this point.

Update: I was not able to replicate the problem by changing the zone parameters. I did notice that crossing lines caused the text color on the console page for the source to go to orange, so the detect function was disabled, and it could only monitor. However, it still had the image feed visible.

Re: Mobotix M12 Nonfunctional

Posted: Tue Mar 29, 2011 4:44 pm
by Quantum

Code: Select all

mysql> select Id, Name from Monitors;
+----+----------+
| Id | Name     |
+----+----------+
|  3 | Driveway |
+----+----------+
1 row in set (0.00 sec)

mysql>
You lost me. On the ZM console it shows one monitor.
When I click Driveway I think it's supposed to give live video. Oddly when I tried it just now I get a terrible quality night still. It seems to be stretched out and only of the top-right. Assuming it's an event I hit Play, but it doesn't move.

The idiot forum software thinks my image link is "too spamy", so modify the bit after http:

http:||img197.imageshack.us/img197/9413/snap2rc.jpg

Re: Mobotix M12 Nonfunctional

Posted: Tue Mar 29, 2011 5:05 pm
by robert999
My next question was if you had tried other browsers, like Firefox, but it looks like you have been trying that already.

I don't know if shared memory becomes an issue with a large frame size like what you're using. And the bandwidth for a 1680x985 stream has to be big. Are you running this on a gigabit network?

What's your kernel.shmmax and kernel.shmall setting in /etc/sysctl.conf, and also your image buffer size (frames) settings in the monitor | buffers tab for the camera?

Re: Mobotix M12 Nonfunctional

Posted: Wed Mar 30, 2011 12:25 pm
by Quantum
Ya, been using Firefox, but also tried it with Konqueror with the same result.

Throughout this process I've had the camera set to 1024x768. Checking camera status the buffer shows at 0%, even at 2048x1024, which is max width. This means buffer is not needed which confirms network bandwidth and CPU capacity are fine.

It is a Gb network PoE switch for the camera, and interface on the computer. At some point I'd added these lines in /etc/sysctl.conf for some reason:
kernel.shmall = 134217728
kernel.shmmax = 134217728

These are the only instances of these in the file. The system has 2Gb of RAM and a 2TB disk. Can't fins a Monitor/Buffers tab in the web interface for the camera; can't find a Buffers item anywhere there or in ZM.

BTW the camera has very slow framerates in Mobotix's own software MxEasy (1.8F/s) and in any browser. Mobotix says mine is too small an install for them to be concerned with. This is one reason I'm trying ZM.

Re: Mobotix M12 Nonfunctional

Posted: Wed Mar 30, 2011 11:32 pm
by bb99
Your underlying problem is definitly with your shmmax setting. The value you've set it to is good for 320*240 but will not work at 640*480 with 24 bit color (it will work in greyscale). Crunching the numbers I'm suggesting changeing that value to 402653184 (for 1024*768) and start troubleshooting again from the beginning.

Re: Mobotix M12 Nonfunctional

Posted: Thu Mar 31, 2011 2:30 pm
by Quantum
Please understand that offline, Robert had me set kernel.shmmax = 1073741824 and kernel.shmall = 262144. Little discernible improvement. We've tried many more things until he's out of ideas.

This slow framerate is consistent with the camera's browser performance, and its behavior in MxEasy/Linux. I've given up on Mobotix and am now requesting an RMA.