What does an RTSP URL look like?
Every RTSP URL has the same four parts: rtsp://USER:PASSWORD@HOST:554/PATH. USER and PASSWORD are the device's login, HOST is its IP address or domain name, 554 is the standard port, and PATH is the part that changes by brand. The glossary entry on RTSP explains the protocol itself.
If the password contains a character such as @, #, / or :, the address breaks, because those characters have a meaning inside a URL. Replace each with its percent code (@ becomes %40, # becomes %23) or change the password to letters and digits.
What is the RTSP URL format for each brand?
These are the formats for the first camera on each brand. Replace USER, PASSWORD and HOST with your own, and change the channel or stream number as each line explains. The RTSP URL generator fills them in for you.
Each brand also has its own guide listing every channel's address and its usual failures: Hikvision, Dahua, CP Plus, Uniview, Ezviz and Tapo.
- Hikvision and Prama: rtsp://USER:PASSWORD@HOST:554/Streaming/Channels/101. The last two digits are the stream and the digits before them the channel: 101 is camera 1 main stream, 102 its sub-stream, 201 camera 2 main stream and 1601 camera 16.
- Dahua, CP Plus and most Honeywell: rtsp://USER:PASSWORD@HOST:554/cam/realmonitor?channel=1&subtype=1. Change channel for the camera; subtype=0 is the main stream and subtype=1 the sub-stream.
- Uniview: rtsp://USER:PASSWORD@HOST:554/unicast/c1/s1/live. c1 is the channel; s0 is the main stream and s1 the sub-stream.
- Ezviz: rtsp://USER:PASSWORD@HOST:554/h264/ch1/sub/av_stream. Ezviz's support pages give the username as admin and the password as the verification code printed on the camera's label. Some models may need a setting switched on in the Ezviz app before RTSP works, so check Ezviz's support pages for yours. Use main in place of sub for full quality.
- TP-Link Tapo and VIGI: rtsp://USER:PASSWORD@HOST:554/stream2. On Tapo, create a camera account in the app's advanced settings first and use that login. stream1 is the full-quality stream.
- Axis: rtsp://USER:PASSWORD@HOST:554/axis-media/media.amp?camera=1.
Main stream or sub-stream: which RTSP address should you use?
Use the sub-stream unless you need full detail. The main stream is the full-resolution video the recorder saves to disk. The sub-stream is a smaller copy the device makes for phones and remote viewing. It uses a fraction of the upload, which matters when eight or sixteen cameras share one internet line.
Why does the RTSP URL work at the location but not from outside?
Because an address such as 192.168.1.64 only exists inside the building's network. To reach the stream from elsewhere, the location needs a public IP or DDNS name with the RTSP port forwarded on the router, or a connector on the local network that makes the outgoing connection for you. The guide to viewing CCTV remotely without a static IP compares those options and their risks.
Why does each part of the RTSP address have to be right?
Each part answers a different question, and the device checks them in order. The host says which device on the network you mean. The port says which service on that device, and 554 is the one registered for RTSP. The login proves you may watch. The path says which camera and which stream. A mistake in an early part hides the later ones: with the wrong host you never learn whether the password was right.
Testing in a media player before using the address anywhere else separates two problems. If it plays in the player on the same network, the address is correct, and any later failure is about reaching the device from outside.
How do you know the RTSP URL is right?
The player shows a live picture within a few seconds and keeps playing. Wave a hand in front of the camera you meant, to confirm the channel number. Open the player's media or codec information and read the resolution: a main stream shows the camera's full resolution, and a sub-stream a much smaller one. Let it run for a minute. A stream that plays for ten seconds and stops has a network problem, not an address problem.
Why won't the RTSP URL play, and which part is wrong?
The way it fails points to the part:
- The player asks for the login again. The username or password is wrong, the password holds a character that needs a percent code, or you used the phone app's account.
- Nothing happens, then a connection error. The host or port is wrong, RTSP is switched off, or the device is not on the network. Open the device's web page at the same IP address to check that it answers.
- It connects and then reports no stream. The path or channel is wrong. On a rebranded recorder, try the Hikvision format and then the Dahua one.
- A different camera appears. The channel number is off. Recorders count channels from 1.
- The picture breaks into blocks. The address is right and the network is struggling. Use the sub-stream.
What should you do once the address works?
Do these before you rely on the address:
- Give the device a fixed local address, or reserve one in the router, so HOST does not change. The guide to finding a DVR's IP address shows both ways.
- Where the brand allows it, create a separate user with view-only rights and use that login in the address.
- Write the address down without the password, and keep the password where the other passwords are kept.
- Note which stream you used, so the next person knows whether it was the main or the sub-stream.
When should you call the installer instead?
Call the installer when nobody knows the device's password. A reset follows the maker's own process and often needs someone at the recorder. Call them too when the recorder was never connected to the router, when the network menu is locked behind an installer account, or when the device has no RTSP setting at all.
How does GoKavach find the RTSP URL for you?
In GoKavach you choose the brand from a list, enter the recorder's address, port and login, and it builds the address, so you never type a path. A DVR can be added one camera at a time or all 4, 8 or 16 channels at once. The site connector, a small app for a computer at the location, finds recorders on the local network. For a brand that is not listed, paste the full address: see connecting any RTSP camera. GoKavach reads RTSP over TCP.
The Hikvision and Prama presets build the main stream, and the Dahua, CP Plus and Honeywell presets the sub-stream. The Uniview, Ezviz and TP-Link presets use the sub-stream paths listed above, and Axis its one media path. If the first format does not connect, the other of the Hikvision and Dahua formats is tried automatically. Camera addresses are stored encrypted.