Dahua

From ZoneMinder Wiki
Jump to navigationJump to search

IPC-HDB4300C

This camera works perfectly as long as you have Zoneminder set up with FFMPEG.

Capabilities

Stream 0 is 1920 x 1080 @ 25fps and stream 1 is 708 x 576 @ 25fps. Both streams are compressed using H264 MPEG-4 AVC. The FFMPEG decoder is the way to go.

Initial Configuration

The camera defaults to an IP address of 192.168.1.108 with a username/password of admin/admin. It has a built-in web browser that lets you set a number of functions. The camera comes with a manual on a mini-CD. The manual is marginally useful. It is best just to get on the web interface and play.

Once you have played around a bit, it might be best if you reset the camera back to factory defaults. Under the dome cover there is a reset button. Hold it for at least five seconds. If you expect the red light to flash off and on or do something else interesting, you are going to be disappointed. The light stays on, but the unit does reset.

Help and Documentation

On the web interface, if you click on the upper right corner question mark icon, you will get help... in Chinese. This might work for you, but if English is better, then try this:

http://192.168.1.108/help/English/help.htm?device=1

One thing you will immediately notice is that you cannot simply edit the URL in the open help window that is showing Simple Chinese. Instead, you need to copy the URL in the open help window to a new window, substitute the word "English" for "SimpleChinese" and hit Enter.

Note that changing the device number at the end of the URL seems to change the functions listed in the help menu. I suspect that is because different Dahua devices have different capabilities, but they all use the same Web management interface.

Confirming Camera is On Your Network

Before I try to get a camera to work on Zoneminder, I try to look at it using the Swiss Army Knife of video tools, the VLC Player. Just download the player and put the following url into the File/Open Network dialog box:

rtsp://admin:admin@192.168.1.108

You should see pictures coming out of your camera. If you don't, then I am not going to be able to help you much. The camera does respond to pings, so you might try pinging it. If you can't ping it, you are not going to get very far.

You will find information on the Internet saying you need something like the following in order for it to work:

rtsp://admin:admin@192.168.1.108:554/live

This does work, but it does not seem to be necessary. Going to the IP address directly gets you to Stream 0 - the HD stream. You can see the properties of the stream using VLC by going to Window/Media Information/Codec Details. If you want to specifically point to the HD stream, use:

rtsp://admin:admin@192.168.1.108:554/cam/realmonitor?channel=1&subtype=0

To get to the SD or lower resolution feed, use: rtsp://admin:admin@192.168.1.108:554/cam/realmonitor?channel=1&subtype=1

Setting up Zoneminder with the HDB4300C

I tried to get this camera to work with an older version of Zoneminder and had a devil of a time. In fact, I downloaded and compiled a new version of Zoneminder from scratch, and somehow managed to get it compiled without FFMPEG. The drop-down box was there, but it did not work. Anyway, I finally went to http://github.com/zoneminder and followed the directions for making an installation using Ubuntu, my preferred Linux distro, and everything worked just fine. But I will warn you at the beginning of this that, if you are getting Zoneminder up and running for the first time, it is possible to build it in a way that it won't work with this camera, even thought it looks like everything is fine. But don't worry - you won't have these problems, I'm sure...

Here are the settings I used for my Zoneminder setup. If I don't say anything about a setting, leave it alone - I started with a clean install of Zoneminder and I only changed the following things to get it to work with the camera:

General Tab

  • Source type - FFMPEG

Source Tab

  • Source Path - rtsp://admin:admin@192.168.1.108

That's it.

Advanced settings

As I mentioned before, this camera has at least two outputs (I believe it also has a snapshot output, but I have not discovered the path for it yet). You can get to the full resolution output using the Source Path above. If you use the web interface for the camera, and you go to 'Video", you will see that the main stream is H.264 1080P at 1920 x 1080, 25 frames per second. You will also see on the Sub-Stream tab that the lower resolution stream is also H.264 encoded at 352 x 288, 6 frames per second. This information is important if you want to get the full resolution from the camera in Zoneminder.

I use both outputs. The sub-stream is used for motion detection. When motion is detected on this feed, I then record the full resolution feed. Here are my settings. Again, if I don't mention a setting, leave it at the default value.

Full Resolution Stream

When I went with the default values in the camera and in Zoneminder, I ended up with vertical striping in the high resolution video stream. This appears to be a processing problem - I am guessing that Zoneminder cannot keep up. The feed looks normal when I view it using the web interface provided by the camera manufacturer, so that leaves out the camera and the network.

To fix the vertical striping, I reduced the frame rate for the main stream from 25 frames per second to 10 frames per second. Once I did that, I created a new monitor with the following settings:

General Tab

Source Type - Ffmpeg

Source Tab

Source Path- rtsp://admin:admin@YOURIPADDRESSHERE

Target Colorspace - 32 bit colour

Capture Width (pixels) - 1920

Capture Height (pixels) - 1080

Sub-Stream (lower resolution stream)

As mentioned above, this is a lower resolution stream so it consumes less network bandwidth and processing resources. Here are my settings for this stream:

General Tab

Source Type - Ffmpeg

Source Tab

Source Path - rtsp://admin:admin@YOURIPADDRESSHERE:554/cam/realmonitor?channel=1&subtype=1

Target Colourspace - 32 bit colour

Capture Width (pixels) - 352

Capture Height (pixels) - 288

IPC-HDB3200C

  • Source Type: Remote
  • Remote Protocol: RTSP
  • Remote Method: RTP/RTSP
  • Remote Host Name: user:password@ip.address
  • Remote Host Port: 554
  • Remote Host Path: /cam/realmonitor?channel=1&subtype=0&tcp
  • Target Colorspace: 24 bit colour
  • Capture Width (pixels): 1920
  • Capture Height (pixels): 1080
  • Preserve Aspect Ratio: Unselected
  • Orientation: Normal
  • Deinterlacing: Disabled

Note that this camera can occasionally go into an 'indeterminate' state if power is interrupted or browned-out. When in this state, it will respond to pings and telnet, but will not stream an image. There is an app https://play.google.com/store/apps/details?id=nz.co.trillium.dahuareboot that will reboot it out of this state.