Vigiora

Tento článek zatím není k dispozici v jazyce Čeština. Zde je v angličtině.

Set up a Dahua camera with a self-hosted NVR

How to record a Dahua camera on your own Vigiora Server. Initialise the camera, know the realmonitor stream addresses and ports, understand Dahua's separate ONVIF users, and see what Vigiora finds by itself.

· 4 min čtení · Zobrazit jako Markdown

Sdílet
A text card that reads Dahua, works with Vigiora, and the stream address pattern rtsp://user:password@camera:554/cam/realmonitor?channel=1&subtype=0

Dahua cameras speak RTSP and ONVIF out of the box, so they work well with a self-hosted recorder such as Vigiora Server. Two things are worth knowing first: a new Dahua camera has no password until it is initialised, and ONVIF can have its own list of users, separate from the camera's login. The same applies to cameras sold under other names that run Dahua firmware, such as many Imou and Lorex models.

Before you start: initialise the camera#

A new Dahua camera has no factory password. Until you set one, it won't stream.

  1. Open the camera

    Open its address in a browser, or find it with ConfigTool, which lists the Dahua devices on your network. A camera plugged into a Dahua recorder can be initialised by the recorder.

  2. Set the admin password

    Choose a strong password of 8 to 32 characters for the user admin, and save.

  3. Check RTSP and ONVIF

    RTSP is under Network → Port (port 554). ONVIF is usually on by default; on some firmware it is under Network → ONVIF or Platform Access.

Dahua keeps a separate ONVIF user list (System → Account → ONVIF User). If ONVIF refuses your admin login, add the same user there, or let Vigiora fall back to RTSP as described below.

The stream addresses#

Replace the user, password and address with your own.

StreamAddress
Mainrtsp://user:password@192.0.2.21:554/cam/realmonitor?channel=1&subtype=0
Subrtsp://user:password@192.0.2.21:554/cam/realmonitor?channel=1&subtype=1
Third stream, where the model has one…/cam/realmonitor?channel=1&subtype=2

subtype picks the stream: 0 is the main stream, 1 the first sub-stream. channel starts at 1. On a Dahua recorder (NVR), the channel picks the camera: the second camera is channel=2.

The ports that matter:

  • 554 for RTSP.
  • 80 for the web page and ONVIF.
  • 37777 (TCP) and 37778 (UDP), Dahua's own protocol, used by its apps and recorders.
A text card summarising the Dahua stream addresses and ports from this page
The Dahua stream addresses and ports on one card. A text summary of this page, not a screenshot.

What Vigiora finds for you#

In the setup wizard, or with Monitors → Add Monitor → On this network, you type only the login:

  1. The scan finds the camera with its maker, model and serial. Besides the usual ports, Vigiora asks Dahua devices to identify themselves the way Dahua's own tools do, and port 37777 marks a Dahua device.
  2. It asks for the streams over ONVIF on port 80, main and sub.
  3. If ONVIF refuses the login, Vigiora knows that Dahua keeps ONVIF users apart, so it tries the Dahua main stream once with the same login before it gives up. A refused ONVIF user then doesn't stop you.
  4. If ONVIF doesn't answer, it tries the realmonitor paths above, and the sub-stream comes with the main one.
  5. It learns the features: pan, tilt and zoom on PTZ models, the microphone (models ending in -A or -AS have one) and the speaker.

If you paste a main address with I have the RTSP URL, Vigiora also tries the matching subtype=1 sub-stream by itself. See What Vigiora sets up for you.

If a camera sits on a factory address that clashes with another device, an admin can click Move camera to DHCP: it works with Dahua, Amcrest, Imou and Lorex cameras. See Move a camera to DHCP.

Vigiora stops at the first refused password and doesn't send the same wrong password to that camera again for 30 minutes. Dahua cameras lock their login after several wrong tries, so this matters.

Recording: main stream or sub-stream#

  • Record the main stream at entrances, tills and car parks, where you may need to zoom into faces or plates.
  • Record the sub-stream with Record low quality (sub-stream) elsewhere. It saves about 60–80% of disk. See Main stream or sub-stream?.
  • In the camera's web page, set the sub-stream to H.264, about 640×360, 10–15 fps. It is light for live view and good enough for motion detection.
  • The free plan has no camera limit and includes AI on 2 cameras.

Troubleshooting#

  • ONVIF login refused. Add the user under System → Account → ONVIF User, or rely on the RTSP fallback.
  • Wrong channel on a recorder. Check channel=: it is the camera's number on the NVR.
  • No sub-stream. Check that the extra stream is enabled in the camera's video settings, then save the camera again. See No sub-stream.
  • The camera vanished after a power cut. Vigiora follows a camera to a new address by its hardware ID. See Fixed IPs and rediscovery.
  1. Add a camera

    All the ways to connect a camera: Add a camera.

  2. PTZ

    Pan, tilt, zoom, presets and patrols: PTZ cameras.

  3. Troubleshooting

    Missing stream, wrong path or freezes: Troubleshooting cameras.

Sdílet

Vyzkoušejte to na vlastních kamerách

Vigiora Server je zdarma s neomezeným počtem kamer. AI na 2 kamerách je v rámci akce zdarma. Na počítač s Linuxem ho nainstalujete jedním příkazem.