Direct answer
Use rtsp://USER:PASS@DEVICE_IP:RTSP_PORT/cam/realmonitor?channel=1&subtype=0. Channel numbering starts at 1. subtype=0 is the main stream and subtype=1 is the sub stream. For a recorder channel, use the NVR/XVR IP, recorder account, configured RTSP port, and logical channel shown by the recorder.
What each parameter controls
| Part | Meaning | Practical rule |
|---|---|---|
| DEVICE_IP | Camera or recorder serving the stream | Camera IP for direct access; NVR/XVR IP for a recorder channel |
| channel | Logical video channel, starting at 1 | Read the assigned channel from the recorder; do not assume PoE socket order |
| subtype=0 | Main stream | Highest configured quality and load |
| subtype=1 | Sub stream | Lower load; best first test for multi-view |
| subtype=2 | Extra stream 2 on some devices | Use only when the model exposes it |
| RTSP_PORT | RTSP service port | 554 is the default, but use the configured value |
Camera IP or NVR/XVR IP?
| Goal | Endpoint and account | channel value |
|---|---|---|
| One camera directly | Camera IP and camera account | Usually 1 on a single-sensor camera |
| A camera through NVR/XVR | Recorder IP and recorder account | Logical channel shown in Camera/Registration management |
| Multi-sensor camera | Camera or recorder endpoint | Sensor/channel mapping is model-dependent; verify in the device UI |
Copyable URL patterns
Use ONVIF or a manual RTSP URL?
ONVIF discovery can return the device's media profiles and avoids guessing a path. A manual realmonitor URL is useful when you need one exact recorder channel and stream. ONVIF availability, user permissions, and menu names vary by firmware; use the device's current local account and profile settings.
Add a Dahua recorder channel to SmartRTSP
- Open Camera, Registration, or Remote Device management on the recorder and note the logical channel.
- Keep the Apple device and recorder on the same LAN for the first test.
- Enter the NVR/XVR IP, recorder account, configured RTSP port, channel, and subtype.
- Test subtype=1 first; after it works, use subtype=0 where full quality is needed.
- For direct camera access, replace the recorder endpoint and account with the camera's own IP and account.
View this NVR in SmartRTSP
SmartRTSP is an RTSP and ONVIF camera viewer for iPhone, iPad, Mac, and Apple TV. Once this stream works, add it manually or use ONVIF discovery on your local network.
- Use the sub stream in a multi-camera grid and the main stream for detail.
- View up to eight cameras in supported multi-camera layouts; the Apple TV grid currently supports four.
- Connect locally without bridge hardware or a required cloud subscription.
Troubleshooting by symptom
| Symptom | Likely cause | Check or fix |
|---|---|---|
| channel=1 works; channel=2 fails | No camera is assigned to logical channel 2 | Read the recorder's channel list instead of the physical PoE label. |
| subtype=1 works; subtype=0 is black | Main-stream codec, resolution, bitrate, or decode load | Temporarily set the main stream to H.264 or reduce resolution/bitrate, then retest. |
| 401 Unauthorized | Endpoint and account do not match | Use recorder credentials against the recorder IP and camera credentials against the camera IP. |
| Connection refused or timeout | Wrong IP/RTSP port, service disabled, or network isolation | Confirm the configured RTSP port and test on the same subnet. |
| subtype=2 fails | Extra stream 2 is unavailable or disabled | Use subtype 0/1 or verify model stream capability. |
| The wrong camera appears | Logical channels were reordered | Use the current recorder channel assignment and update the URL. |
Check your model and firmware
Channel assignment, stream count, codec, RTSP port, authentication, and menu names can vary by model and firmware. Check the current device settings before setup. For remote access, use a VPN instead of exposing RTSP to the public internet.
FAQ
What does subtype=0 mean on Dahua?
It selects the main stream. subtype=1 selects the sub stream.
Is channel=2 the sub stream?
No. channel chooses the camera slot; subtype chooses main or sub stream.
Why does a direct camera work but the NVR URL fail?
The recorder has its own IP, account, RTSP port, and logical channel list. Use all four from the NVR/XVR.