Mobotix Cameras

Post here to indicate any hardware you have used and which is known to work with ZoneMinder. Not for questions.
mitch
Posts: 169
Joined: Thu Apr 30, 2009 4:18 am

Mobotix Cameras

Post by mitch » Fri May 22, 2009 5:14 am

Hello all, I have been able to confirm zoneminder will work with Mobotix cameras. These cameras are all pretty innovative and their nighttime and panoramic features are pretty amazing.

They put out two different types of streams:
MJPEG and MxPEG.
MJPEG is normally what works best with zoneminder, it provides a steady stream of pictures over TCP avoid corruption or other issues. Once you enable the MJPEG stream on the camera you can setup the camera in ZM as follows:

Source Type: FFMPEG
Source Path: http://123.123.123.123/control/faststre ... re&e=.mjpg


Now these cameras also support a special streaming format MxPEG the primary benifit is it reduces the amount of bandwidth the camera uses by a very large factor, in addition it allows for higher frame rates than the MJPEG stream. MxPEG allows for only sending the differences between frames, rather than the entire JPEG image for every frame.

The good news is if you do want to use MxPEG (which I would recommend if you don't mind a little extra setup work):
While I am working to add native support MxPEG to zoneminder for now it is still possible to use MxPEG with mobotix through a small utility program Mobotix provides. Grab http://developer.mobotix.com/paks/mobotix_sdk_1.0.1.zip (beware you oddly can't grab it through wget but it does work through curl) unzip it and in the /mobotix_sdk_1.0.1/paks/ folder you will find an executable called "mxgconv_linux" move this to somewhere on your zoneminder box (say /usr/local/bin) and make it executable (chmod +x mxgconv_linux)

Then create the following script on your box and call it mobotix_fifo_start.pl:

Code: Select all

#!/usr/bin/perl
use strict;
umask(0077);
my $BASE_PATH = "/var/spool/zm/";
my $MXG_PATH = "/usr/local/bin/mxgconv_linux";
my ($ip,$username,$pass) = ($ARGV[0],$ARGV[1],$ARGV[2]);
if ($#ARGV != 2 || $ip =~ /^([0-9]{1,3}\.){3}[0-9]{1,3}$/ == 0){
	die 'Usage: mobotix_fifo_start.pl IP USERNAME PASSWORD';
}

die 'Must pass the IP to stream' if ();
my $fifo_path_bare = $BASE_PATH  . $ip;
my $fifo_path = $fifo_path_bare . ".mjpg";
system("mkfifo \"" . $fifo_path . "\"") if (! -e $fifo_path);
die 'error fifo still not found' if (! -e $fifo_path);
while(1){
	my $cmd = "wget -nv -O - \"http://" . $ip . "/control/faststream.jpg?stream=MxPEG&fps=0&error=picture\" --http-user=\"" . $username  . "\" --http-passwd=\"" . $pass . "\" | " . $MXG_PATH . " \"of=" . $fifo_path_bare . "\"";
	print $cmd . "\n";
	system($cmd);
}
Also create the folder /var/spool/zm/ and make sure the zoneminder web user can write to it. Also if you put mxgconv_linux anywhere other than /usr/local/bin make sure to adjust MXG_PATH near the top. Make this script also executable (chmod +x mobotix_fifo_start.pl)

then run it with

Code: Select all

sudo -u ZM_WEB_USER /path/to/mobotix_fifo_start.pl 123.123.123.123 admin userpassword &
with the ip,username,and password set to the proper values and ZM_WEB_USER being the user that zoneminder runs as.


This should give you a file of /var/spool/zm/123.123.123.123.mjpg Now in zoneminder for configuration:
Source Type: FFMPEG
Source Path: /var/spool/zm/123.123.123.123.mjpg

Thats it. You will want to add the sudo command to your box startup to make sure it starts on a restart but you now have your mobotix camera running in ZM.


The MxPEG format will be natively supported(either by zm or an ffmpeg patch), probably within a month or so, there is some possibility it will not only allow for lower bandwidth on the network but may also offer some motion detection offloading.

ryderzm
Posts: 3
Joined: Fri Aug 07, 2009 9:02 pm

Mobotix D12

Post by ryderzm » Fri Aug 07, 2009 9:09 pm

I'm trying to follow your steps on debian 4.0 r0 running a fresh build of Zoneminder 1.24.1.
However I cannot make it work either in MJpeg or Mxpeg mode
For MJpeg I could not get it to work with ffmpeg since the path string gets truncated when trying to set from the zm console.
For Mxpeg, the wget generates a file of 0 length in /var/spool/zm so I've been unable to go any further.
Could you please suggest anything?
Thanks

mitch
Posts: 169
Joined: Thu Apr 30, 2009 4:18 am

Post by mitch » Fri Aug 07, 2009 9:17 pm

For MJPEG switch the path column in the monitors table to length 128 from 64 and that should fix the truncation problem.

For MxPEG the file should be 0 length, it is a pipe not a real file. To test the streaming, open two shells in the first run wget it should pause shortly have starting waiting for something to read, in the second shell run mplayer on the stream and it should start playing Assuming this works continue with the setup in ZM.

bertrand
Posts: 8
Joined: Thu Oct 29, 2009 5:09 pm
Contact:

Post by bertrand » Tue Nov 03, 2009 12:29 am

hello Mitch,

Could you send me a snapshot of your configuration of zm.
I don't have image with the ffmpeg confuguration that you had given.

Please help me

mitch
Posts: 169
Joined: Thu Apr 30, 2009 4:18 am

Post by mitch » Tue Nov 03, 2009 12:32 am

I am not using a pre-built image, I am using gentoo. You should be able to install FFMPEG on any server that does not have it. The camera may work with ZM's MJPEG parser (in which case just try remote as the type).

bertrand
Posts: 8
Joined: Thu Oct 29, 2009 5:09 pm
Contact:

Post by bertrand » Tue Nov 03, 2009 12:50 am

I don't understand, this link work in firefox but not in ZM
http://123.123.123.123/control/faststre ... re&e=.mjpg

help me

mitch
Posts: 169
Joined: Thu Apr 30, 2009 4:18 am

Post by mitch » Tue Nov 03, 2009 12:51 am

I assume you are using the "REMOTE" type, ZM's native mjpeg parser is fairly strict in what it allows, if you compile in FFMPEG support you can use the FFMPEG type instead of REMOTE and then it will work.

bertrand
Posts: 8
Joined: Thu Oct 29, 2009 5:09 pm
Contact:

Post by bertrand » Tue Nov 03, 2009 1:08 am

I had tried remote and ffmpeg type and it doesn't work.

If someone can help me

Sorry I am french and my english is not so good, so could you give me information simply.

bertrand
Posts: 8
Joined: Thu Oct 29, 2009 5:09 pm
Contact:

Post by bertrand » Tue Nov 03, 2009 11:58 pm

Help me

My mobotix q22m doesn't work, I had tested 2 types of configuration on ZM 1.24.1
First in ffmpeg:
SOURCE PATH : http://10.3.209.118/control/faststream. ... &fps=0&err
Source Colours 24 bit
Capture Width (pixels) 160
Capture Height (pixels) 120

Second in remote:
Remote Protocol HTTP
Remote Method simple
Remote Host Name 10.3.209.118
Remote Host Port 80
Remote Host Path /cgi-bin/guestimage.html
Remote Host SubPath
Remote Image Colours 24 bit
Capture Width (pixels) 160
Capture Height (pixels 120

I had also change the image setting of the camera (JPEG Settings) M-JPEG

I have to find a solution

thank in advance

mitch
Posts: 169
Joined: Thu Apr 30, 2009 4:18 am

Post by mitch » Wed Nov 04, 2009 12:01 am

Please stop posting in this thread, you can move to one of the troubleshooting forums but it does not belong here. Please see the wikipedia page on troubleshooting also for how to properly post the issues. Also make sure ffmpeg /mplayer work from the command line.

bertrand
Posts: 8
Joined: Thu Oct 29, 2009 5:09 pm
Contact:

Post by bertrand » Thu Nov 05, 2009 12:10 am

ffmpeg is install and need some parameters in the command line.

root@kermit:/home/bertrand# ffmpeg /mplayer
FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2007 Fabrice Bellard, et al.
configuration: --enable-gpl --enable-pp --enable-swscaler --enable-pthreads --enable-libvorbis --enable-libtheora --enable-libogg --enable-libgsm --enable-dc1394 --disable-debug --enable-shared --prefix=/usr
libavutil version: 1d.49.3.0
libavcodec version: 1d.51.38.0
libavformat version: 1d.51.10.0
built on Mar 16 2009 21:16:26, gcc: 4.2.4 (Ubuntu 4.2.4-1ubuntu3)
Unable for find a suitable output format for '/mplayer'

Could you give me the right command please

thanks a lot

mcm
Posts: 14
Joined: Thu Oct 21, 2010 12:55 pm

Post by mcm » Wed Nov 10, 2010 11:01 pm

Mobotix SDK link is broken.

Can now be found at http://developer.mobotix.com/mobotix_sd ... index.html

happydevas
Posts: 3
Joined: Sat Dec 18, 2010 1:06 pm

Post by happydevas » Sat Dec 18, 2010 1:13 pm

Be very careful with Mobotix used because it is the only device I've worked with, where you can not do anything without the admin password and can not be reset by pressing a button as other devices. I think you have to send the factory to be reset. Next, consider what can be problematic if the camera was stolen

akkaiberry
Posts: 2
Joined: Wed Jan 12, 2011 2:59 pm

Post by akkaiberry » Wed Jan 12, 2011 3:58 pm

I use a regular GVX3140 together with Q24 and it works fine. Like said before, enable "Mobotix Mode" and let the camera auto configurate GS. The Q24 works very similar to T24 .

jawesker
Posts: 6
Joined: Fri May 28, 2010 3:44 am

Re: Mobotix Cameras

Post by jawesker » Mon Feb 06, 2012 8:11 pm

well friends it won work if you don't add the user and password in the path /control/faststream.jpg?stream=full&fps=8.0
but the problem is the syntaxis i dont know,
i try
admin:password@<ip addres>
/control/faststream.jpg?stream=full&fps=8.0&user=<user>&pass=<pass>
/control/faststream.jpg?user=<user>&pass=<pass>&stream=full&fps=8.0
/control/faststream.jpg?username<user>&password<pass>&stream=full&fps=8.0
i dont know what else can i do.
helppp
Greetings from southamerica
I want make my tesis with zoneminder and foscam

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests