Setting up Vstarcam surveillance cameras in Zoneminder.

I decided to do an introductory post to clarify the settings which I used for my Vstarcam cameras in Zoneminder.
I have two posts where I describe a watchdog for these cameras and the process of enabling PTZ controls for them in Zoneminder but there might be difficulties to simply connect these devices to Zoneminder.

This information is for Ubuntu 16.04 and Zoneminder v1.30.0

I’ve had some difficult time to install Zoneminder itself ( I stumbled over one common problem with paths which were unintuitive but I do not remember it precisely now and so can’t describe it 🙂 ), and then I had some problems with camera connection. I post here a few screenshots with Zoneminder settings that work for me.

I have two cameras – the old C7815WIP and the new C7823WIP.
Both of them have RTSP h264 video streaming and at least C7815WIP has three streams with their own resolutions and encoding options.
I have never tried to setup the second or third stream, but you certainly can adjust framerate, bitrate and some other parameters for the first stream.

Common access path for the first RTSP stream of C7815WIP looks like:

1
rtsp://CAMERA_IP:10554/udp/av0_0

You can open this path with VLC player and should be able to see a picture.
UDP protocol is used generally for the purposes of video streaming because of its lesser resources consumption, so you can see /udp/ in the stream path.
But Zoneminder doesn’t work with udp – at least in my configuration and at low framerates that I use. Surprisingly – these cameras have an option of tcp streaming. All you got to do is replace /udp/ to /tcp/ in the stream address.

UPDATE!
Things have changed.
In Zoneminder 1.30.4 combo-box “Remote Method” on the “Source” tab now contains such fields as “udp, tcp, udp mulicast”. If you select “udp” in “Remote method” and then use upd path in the Source Path as described above then everything works OK. So now udp is usable in Zoneminder/ffmpeg.

My old camera doesn’t require authentication to view RTSP streams.
New camera requires authentication information in the stream path.
So, eventually stream addresses look like:

1
2
rtsp://CAMERA_IP:10554/tcp/av0_0
rtsp://admin:888888@CAMERA_IP:10554/tcp/av0_0

I use default user and password because I am behind the router and I have blocked internet access for both cameras (at least I hope so).

I use ffmpeg as a “source type”, so, as I understand, camera’s streams is captured by ffmpeg lib which must be present in the system. This is the only way I could get the things working.
Ffmpeg works quite good, but sometimes fails to open camera stream after network failure or server’s reboot. In this case the most important thing is to have a frame rate limit in Zoneminder’s settings.
If ffmpeg lose the stream it will capture a fake picture (blue screen) at highest frame rate which will be limited only by your CPU.
Interestingly enough, that the native “IP camera super client” never loses stream or connection.
I have personally tuned my cameras to send 5fps stream so I have 10fps limit inside Zoneminder (+5 fps just in case).
I do not record video or detect events by Zoneminder, I use it only for viewing. In my configuration it uses up to 20% CPU (Celeron 2955U).

If ffmpeg have lost the stream after server’s reboot or similar event – there is no other cure then rebooting the camera. Therefore I recently added a reboot control button to the Zoneminder camera controls.

Settings for C7815WIP


Settings for C7823WIP

Leave a Reply

Your email address will not be published. Required fields are marked *

*

code