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);
}
then run it with
Code: Select all
sudo -u ZM_WEB_USER /path/to/mobotix_fifo_start.pl 123.123.123.123 admin userpassword &
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.