Guides · Camera setup

Dahua RTSP and ONVIF setup

Updated 29 September 2026

Dahua cameras stream over RTSP and speak ONVIF with little setup. The main things to check are that ONVIF is enabled and that motion detection is switched on in the camera.

At a glance

Main streamrtsp://USERNAME:PASSWORD@CAMERA-IP:554/cam/realmonitor?channel=1&subtype=0
Sub streamrtsp://USERNAME:PASSWORD@CAMERA-IP:554/cam/realmonitor?channel=1&subtype=1
RTSP port554
ONVIF port80 (the camera’s HTTP port)
Accountadmin, or any user you create on the camera

Replace USERNAME, PASSWORD, and CAMERA-IP with your own. The main stream is the full-resolution one to record; the sub stream is a lighter copy for small previews. On a Dahua NVR, set channel= to the camera’s channel number.

Before you start

  • Give the camera a fixed IP address with a DHCP reservation on your router, so its stream address never changes.
  • Use a strong password, but avoid @, :, /, and #. They have special meanings in stream addresses, and some cameras mishandle them.
  • Update the camera’s firmware. Menu names differ between firmware versions and models, so treat the ones below as a guide to where to look.

Turn on RTSP and ONVIF

  1. Open the camera’s web interface at its IP address and sign in as admin.
  2. RTSP is on by default. Its port is listed under Setting › Network › Port.
  3. ONVIF is on by default on most models. On current firmware its switch is under Setting › Network › Access Platform (Integration Protocol on some models). Make sure ONVIF is enabled and leave its authentication on.

Turn on motion events

  1. Go to Setting › Event › Video Detection › Motion Detection, enable it, and set the area and sensitivity.
  2. Newer models add Smart Motion Detection, which filters motion down to people and vehicles. Whether the filtered events reach a third-party recorder over ONVIF depends on the model and firmware.

Add the camera to Loki Eye

  1. Add the camera in Loki Eye with its main stream address from the table above. Loki Eye probes the stream to check that it plays.
  2. Enter the ONVIF port so motion events can reach the recorder. Loki Eye tests the port as you add the camera.
  3. Choose continuous recording, or recording on motion with pre-roll and post-roll.

Things to know about Dahua cameras

  • After several wrong passwords, Dahua cameras lock the account for a few minutes. If a correct password suddenly fails, wait and try again.
  • Amcrest and many installer and store brands run Dahua firmware, so the same stream address works on them. See the Amcrest guide.

If it does not work

  • The stream will not open. Try the same address in VLC, under Media › Open Network Stream. If VLC cannot play it either, the problem is on the camera: RTSP switched off, the wrong port, or the wrong password.
  • You are not sure of the stream address. ONVIF Device Manager, a free Windows tool, finds cameras on your network and shows their stream addresses.
  • The stream drops when another app is watching. Cameras accept only a few stream connections at once. Close other viewers, or point them at the sub stream.
  • No motion events arrive. Check that motion detection is on in the camera, that the ONVIF port is right, and that the camera clock is correct. ONVIF requests carry a timestamp, and a camera whose clock is minutes off can refuse them. Setting the camera to sync with an NTP time server fixes this for good.

Questions

What is the Dahua RTSP URL?

rtsp://USERNAME:PASSWORD@CAMERA-IP:554/cam/realmonitor?channel=1&subtype=0 for the main stream and subtype=1 for the sub stream.

What is the Dahua ONVIF port?

The camera’s HTTP port, 80 by default.

Does this work with a Dahua NVR?

Yes. Point the address at the NVR and set channel= to the camera’s channel number.

Loki Eye records your cameras to your own disk on Windows, macOS, and Linux. Free for two cameras, with no account.

Download free