I.T Ramblings

I bought 4 zmodo zmd-isv-bfs23nm cameras from eBay and thought that they would be just like all other IP cameras to set up in zoneminder. Wrong!

The cameras could only be set up with Microsoft Internet Explorer and activeX. The only way I could set these for DHCP was to use Windows XP as Windows 7 wouldn’t let me load the activeX components.

Ok What I can do so far is:

1) Get the zmodo camera to work with zoneminder (good as I can use if for surveillance and weather)

2) I can grab a single jpg from the zoneminder stream which I can use for weather image upload. I used this command:

curl “http://192.168.0.164/cgi-bin/nph-zms?mode=jpeg&monitor=4&scale=100&mode=single” -o /tmp/test.jpg

Do you want to update your documentation of zmodopipe and include the dots being a good thing and when you see them it is working when in verbose mode and how to add the camera to zoneminder and even include the curl statement above in case someone else wants to do what I wanted to do? Also on the zonminder config you have to include the ability to use ffmpeg as I found it didn’t work at first.

Under options images in zoneminder you have to check the box
OPT_FFMPEG Is the ffmpeg video encoder/decoder installed (?)

and then put the path to ffmpeg/ avconv
PATH_FFMPEG Path to (optional) ffmpeg mpeg encoder (?)  /usr/bin/avconv

Further playing around with command: zmodopipe -n shed1 -v -s 192.168.0.240 -p 9000 -m 5 -c 1 -u admin -a xxxxxx and it just printed out dots across the screen

I kept the same settings and then changed the resolution in zoneminder to 640×480 and tried again. It did the dots again and then a picture showed up again……..promising.

So it sort of works.

zmodopie information:

http://www.zoneminder.com/forums/viewtopic.php?f=9&t=18137How to use:
Download the C file (unzip file first, forum limitation) and compile with: gcc zmodopipe.c -o zmodopipe
It accepts many command-line options, which are documented by running: ./zmodopipe -h
As an example, to watch the first two cameras run this:
./zmodopipe -s 192.168.1.100 -p 18600 -c 1 -c 2 -u mobileuser -a mobilepass &
For more info on the options, check the help.In Zoneminder do this:
1) Add a new monitor
2) Source type: ffmpeg
3) Source path: /tmp/zmodoX (or whatever the pipe name you used is, and where X is channel number – 1).
4) Capture size: 320×240 (704×480 for Media port)Save, then wait for 10-30 seconds for ZM to start pulling the stream… and poof!Now, this is a work in progress. So there are some issues.
1) Sometimes some streams cut out, even in Media mode. The stream occasionally has a bad frame ([h264 @ 0xaf5d60] no frame!), and when ZM decodes it, zmc keels over because there’s no frame data:
11/12/11 08:03:16.245611 zmc_m4[-1].FAT-zm_ffmpeg_camera.cpp/173 [Unable to decode frame at frame 3270]
2) On the mobile port, occasionally the image will go grey, it’ll fix itself in a few seconds after the next keyframe (don’t know why). You’ll have to take that into account for motion detection.
3) To change the directory the pipe is created in, change the source. I needed something quick that would work with all users, so I used /tmp. Pipes take no space, so there’s no issue of filling up the disk. If there’s enough demand, I’ll add an option to specify the path.
4) Main process doesn’t fork to the backgound (but children do). To close the app, press Ctrl-C or send a SIGTERM (if running in background with ‘&’). It will properly shut down and delete all children and their pipes.To get the above to work in Zoneminder you have to do this as well: Found this here: http://www.zoneminder.com/wiki/index.php/How_to_stream_h264_with_ffmpeg_from_an_Axis_P3343

Ubuntu 12.04 Configuration

The default Ubuntu 12.04 ffmpeg, or “avconv” as the new fork is known as, works fine for camera capture, h264 video construction, and EyeZM. It is automatically installed as a

dependency to the zoneminder package.

Set the following options for Zoneminder under the Images tab:OPT_FFMPEG: (Checked)
PATH_FFMPEG: /usr/bin/avconvAdd the Zoneminder cameras with the following settings:GeneralSource Type: Ffmpeg
Maximum FPS: Empty
Alarm Maximum FPS: EmptySource
/tmp/zmodo0

It worked once in zoneminder by using this:
zmodopipe -n shed1 -v -s 192.168.0.240 -p 9000 -m 5 -c 1 -u admin -a xxxxxx

I stopped it and tried again but then it didn’t work……

It just does this: it just sends dots across the screen.

zmodopipe -n shed1 -v -s 192.168.0.240 -p 9000 -m 5 -c 1 -u admin -a xxxxxx
Ch 0: Ch 1: Connect result: 0
Ch 0: Length: 116
0000007001000000 2800040003000700 4800240020202021 2020200000000000 000000004d4f4249 4c45000000000000 0000000000000000 2900380061646d69 6e00000000000000 0000000000000000 0000000000000000 0000006e75626561 7574313935380000 0000000001000000 00000000
Ch 0: Ch 1: Send result: 116
…………………………

………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………….. ……………………………………………………………………………………………………………………………..^C
Ch 0: Received signal: 2
Ch 0: Ch 1: Socket closed. Receive result: -1
Main: Received signal: 2
Ch 0: Exiting loop: 1

I bought a ONVIF camera and it took ages to get the thing to work in zoneminder.
You set it up as ffmpeg camera and MAKE sure the frame rate is blank. this is what got me and I was wondering why it just looked like it captured only one frame.

The path source looks like this: rtsp://admin:123456@192.168.0.1:554/mpeg4
Then it worked…yay!!!

Scroll to Top