Features Verticals Cameras Conferences Pricing Contact Log In Get Started
📹

Dahua Integration Guide

Connect your Dahua IP cameras and NVRs to AgenticEye using RTSP, ONVIF, or FTP snapshot upload. Full support for IPC-HDW and IPC-HFW series, including dual-stream configuration for NVR channels.

RTSP ONVIF FTP Upload HTTP CGI

Connection Options

Dahua cameras provide flexible connectivity through industry-standard protocols. RTSP is the preferred method for real-time AI analysis, while ONVIF enables zero-configuration discovery across your network.

RTSP Streaming

Real-time H.264/H.265 video via RTSP. Supports main stream and sub stream selection per channel.

🔍

ONVIF Profile S

Automatic discovery and PTZ control via ONVIF on port 80. Compatible with Profile S and Profile T.

📤

FTP Snapshot & Events

Event-triggered or scheduled JPEG snapshots uploaded directly to AgenticEye's ingest endpoint.

🌐

HTTP / CGI API

Dahua's CGI-based API for snapshots, PTZ control, and event management.


Before You Begin

Network Access

The Dahua camera must be on the same network or reachable from the AgenticEye agent via VPN or port forwarding.

Web Interface Access

Admin credentials for the camera's web interface (default: admin). You will need to create a dedicated user.

Updated Firmware

We recommend firmware version 2.800 or newer for stable RTSP and full ONVIF Profile S compliance.

AgenticEye Account

An active AgenticEye account with available camera slots. You will need FTP credentials if using snapshot upload.


Dahua RTSP URL Pattern

Main Stream (Full Resolution) rtsp://[username]:[password]@[ip]:554/cam/realmonitor?channel=[ch]&subtype=0
Sub Stream (Lower Resolution) rtsp://[username]:[password]@[ip]:554/cam/realmonitor?channel=[ch]&subtype=1
Stream types: subtype=0 is the main stream (highest resolution), subtype=1 is the sub stream (lower resolution, less bandwidth). For standalone cameras, channel=1. For NVRs, the channel number corresponds to the connected camera port.
Examples # Standalone camera — main stream rtsp://admin:[email protected]:554/cam/realmonitor?channel=1&subtype=0 # Standalone camera — sub stream rtsp://admin:[email protected]:554/cam/realmonitor?channel=1&subtype=1 # NVR channel 3 — main stream rtsp://admin:[email protected]:554/cam/realmonitor?channel=3&subtype=0 # NVR channel 5 — sub stream rtsp://admin:[email protected]:554/cam/realmonitor?channel=5&subtype=1

Step-by-Step Setup

01

Enable RTSP Service

Access the Dahua camera's web interface at http://[camera-ip]. Navigate to the network service settings to verify RTSP is active.

  1. Go to Setup → Network → Connection → RTSP (or Setup → Network → Port on some models)
  2. Ensure Enable RTSP is checked
  3. Verify the RTSP port is 554
  4. Set authentication to Digest or Basic
Test RTSP connectivity # Verify the stream is reachable ffprobe -rtsp_transport tcp \ "rtsp://admin:[email protected]:554/cam/realmonitor?channel=1&subtype=0"
02

Create a Dedicated User Account

Create a separate user for AgenticEye to follow security best practices.

  1. Navigate to Setup → System → Account → User
  2. Click Add User
  3. Set username: agenticeye
  4. Set a strong password with at least 12 characters
  5. Assign the User group with Live and Playback permissions
Important: Dahua passwords support a maximum of 32 characters. Avoid special characters that may cause URL encoding issues in RTSP URLs (specifically @, :, /, and ?).
03

Configure Main and Sub Streams

Dahua cameras support dual-stream output. Configure both streams to give AgenticEye flexibility in balancing quality vs. bandwidth.

  1. Go to Setup → Camera → Video → Video
  2. Select Main Stream and configure:
Main Stream — Recommended Settings Encode Mode: H.264 (H.264H for high-profile) Resolution: 1920x1080 (1080p) Frame Rate: 15-25 fps Bit Rate Type: VBR (Variable Bit Rate) Bit Rate: 4096 Kbps I Frame Interval: 2 seconds
Sub Stream — Low Bandwidth Option Encode Mode: H.264 Resolution: 704x480 (D1) Frame Rate: 10-15 fps Bit Rate Type: VBR Bit Rate: 1536 Kbps I Frame Interval: 2 seconds
Dual-stream tip: AgenticEye can use the sub stream for continuous monitoring and switch to the main stream when an event is detected. Configure this in the camera settings within AgenticEye under Stream Strategy → Adaptive.
04

Add Camera to AgenticEye

Connect the Dahua camera to your AgenticEye dashboard.

  1. Go to Cameras → Add Camera in AgenticEye
  2. Select RTSP Stream as the connection method
  3. Fill in the camera details:
AgenticEye Camera Configuration Name: Parking-Lot-Dahua01 Brand: Dahua Connection Type: RTSP RTSP URL: rtsp://agenticeye:[email protected]:554/cam/realmonitor?channel=1&subtype=0 Transport: TCP Frame Interval: 1 (every frame) or 5 (every 5th frame) Stream Strategy: Main Stream Only (or Adaptive)

Click Test Connection to verify live video, then Save.

05

ONVIF Auto-Discovery Setup

Dahua cameras support ONVIF for automatic discovery and configuration.

  1. Go to Setup → Network → ONVIF (or Setup → Network → Connection → ONVIF)
  2. Check Enable
  3. The default ONVIF port is 80
  4. Add an ONVIF user account (Dahua manages ONVIF users separately from system users on some firmware versions)
ONVIF Service URL http://192.168.1.108:80/onvif/device_service

In AgenticEye, go to Cameras → Auto-Discover → Scan Network. Dahua cameras will appear with their model and IP. Select them and enter ONVIF credentials to complete setup.

06

FTP Snapshot and Event Upload

Configure FTP to send snapshots to AgenticEye, either on a schedule or triggered by camera events (motion, intrusion, etc.).

  1. Go to Setup → Network → FTP
  2. Enter the AgenticEye FTP server details:
FTP Server Configuration Server Address: ingest.agenticeye.com Port: 21 Username: [your-agenticeye-ftp-user] Password: [your-agenticeye-ftp-password] Remote Directory: /cameras/dahua-parking-01/ Mode: Passive (PASV)
  1. Click Test to verify the connection
  2. Go to Setup → Event → Video Detect → Motion Detect
  3. Enable motion detection and under Event Handler, check FTP Upload
  4. Set the snapshot interval (e.g., 1 snapshot per second during events)
Event-based upload: For optimal results, configure both motion detection and scheduled uploads. AgenticEye receives event snapshots for immediate AI processing and scheduled snapshots to maintain a baseline monitoring cadence.
07

NVR Multi-Channel Integration

When connecting through a Dahua NVR (e.g., NVR4216, NVR5432 series), add each camera channel individually.

NVR Channel URLs # Channel 1 — main stream rtsp://admin:[email protected]:554/cam/realmonitor?channel=1&subtype=0 # Channel 2 — main stream rtsp://admin:[email protected]:554/cam/realmonitor?channel=2&subtype=0 # Channel 3 — sub stream (lower bandwidth) rtsp://admin:[email protected]:554/cam/realmonitor?channel=3&subtype=1 # Channel 8 — main stream rtsp://admin:[email protected]:554/cam/realmonitor?channel=8&subtype=0

Each NVR channel becomes a separate camera in AgenticEye. The channel number matches the camera's port on the NVR (check Setup → Camera → Remote Device for the channel map).


Common Issues & Fixes

Stream Format Mismatch

AgenticEye shows "Unsupported codec" or video appears garbled with green artifacts.

Fix: This typically occurs when the camera is set to H.265/HEVC but the AgenticEye agent only supports H.264. Go to Setup → Camera → Video → Video and change the encode mode from H.265 to H.264 or H.264H. Also verify the sub stream isn't set to MJPEG, which has different bandwidth characteristics.

Dual-Stream Configuration Issues

The sub stream URL returns an error or shows a different resolution than expected.

Fix: Some Dahua models require the sub stream to be explicitly enabled. Go to Setup → Camera → Video → Video, select Sub Stream from the dropdown, and ensure Enable is checked with a valid resolution configured. On older firmware, both streams must use the same codec (e.g., both H.264).

RTSP URL Not Working

Connection refused or timeout when using the Dahua RTSP URL format.

Fix: Some Dahua models use an alternate RTSP path. Try: rtsp://user:pass@ip:554/live or rtsp://user:pass@ip:554/cam/realmonitor?channel=1&subtype=0&unicast=true&proto=Onvif. Also verify port 554 is not changed under Setup → Network → Port.

ONVIF Users Not Syncing

ONVIF discovery works but authentication fails with the camera's admin credentials.

Fix: Dahua separates ONVIF users from system users on certain firmware versions. Go to Setup → Network → ONVIF → Users and create a dedicated ONVIF user. This user may need to be re-created after firmware updates.

FTP Upload Failing

The camera shows "FTP test failed" or snapshots are not appearing in AgenticEye.

Fix: Ensure the FTP mode is set to Passive (PASV). Active FTP often fails due to NAT. Verify the remote directory path exists on the AgenticEye server. Check that the camera's DNS is configured correctly if using a hostname instead of an IP address for the FTP server.

Need Help With Your Integration?

Our team has deep experience with Dahua deployments from single cameras to enterprise NVR arrays. We are here to help with your setup.

Contact Integration Team →