Blog/Insights

How to Find Your Camera's RTSP URL (Hikvision, Dahua, Uniview, Axis and More)

Find your IP camera's RTSP URL with verified formats for Hikvision, Dahua, Uniview, Axis, Bosch and Hanwha, plus ONVIF discovery, VLC tests and security tips.

CCTV recorder

An RTSP URL is the network address a video client uses to pull a live stream from an IP camera, NVR or encoder. To find it, look up your manufacturer's path format, ask the camera over ONVIF, or read it from your NVR or VMS, then test the address in VLC or ffprobe. Most devices listen on TCP port 554 and require a username and password.

Key takeaways

  • An RTSP URL has five parts: scheme, credentials, IP address, port and a vendor-specific path. Mostly the path differs by brand.
  • Manufacturer documentation is the most reliable source. Hikvision, Uniview, Axis, Bosch and Hanwha Vision publish their formats; for others, check the manual or use ONVIF.
  • ONVIF Profile S cameras must report their stream address on request, so an ONVIF tool can find the URL.
  • Use the sub-stream for analytics where possible. It cuts bandwidth and decode load.
  • Test with VLC or ffprobe before handing a URL to any platform.
  • Never expose RTSP to the public internet. Use a dedicated, view-only account and keep credentials out of shared documents.

What is an RTSP URL?

RTSP (Real-Time Streaming Protocol) is an application-layer protocol for setting up and controlling media streams, such as play and pause, between a server and a client. RTSP 1.0 was defined in RFC 2326; RFC 7826 (2016) defines RTSP 2.0, obsoletes RFC 2326 and sets TCP 554 as the default port for rtsp:// addresses (322 for rtsps://).

An RTSP URL tells a client which device, port and stream to request, using the general URI syntax in RFC 3986.

ONVIF Profile S is the ONVIF conformance profile for video streaming devices. Under the Profile S specification, a conformant device must offer at least one ready-to-use media profile, support the GetProfiles and GetStreamUri calls, and stream over RTSP. In plain terms, a Profile S camera will tell you its own RTSP URL if you ask correctly.

What are the parts of an RTSP stream URL?

The generic RTSP stream URL format is rtsp://username:password@IP_address:port/path?parameters:

  • Scheme: rtsp:// for standard streams, or rtsps:// where the device supports encrypted RTSP.
  • Credentials: username:password@. Optional; many clients prompt instead.
  • Host: the camera, NVR or encoder IP address, for example 192.0.2.10.
  • Port: 554 by default. You can omit it if the device uses the default.
  • Path and parameters: vendor-specific, such as /Streaming/Channels/101 (Hikvision) or /axis-media/media.amp?camera=1 (Axis).

How do you find the RTSP URL of an IP camera?

Work through these steps in order and stop at the first URL that plays.

  1. Check the manufacturer's documentation. Use the brand table below or your model's manual, and note how streams, sensors and NVR channels are numbered.
  2. Confirm settings in the device's web interface. Check the RTSP port (some sites change 554) and confirm RTSP is enabled and requires authentication.
  3. Use ONVIF device discovery when the docs fail, for example with unfamiliar or rebadged OEM cameras.
  4. Read it from your NVR or VMS. If cameras sit behind an NVR, it has its own RTSP path per channel.
  5. Test the URL in VLC or ffprobe before you rely on it (steps below).

How does ONVIF device discovery reveal the stream URI?

ONVIF clients use WS-Discovery to find devices on the local subnet, then call the device's media service. Following the Profile S flow, the client lists profiles with GetProfiles and calls GetStreamUri for the profile you select; the answer is the RTSP URL.

ONVIF Device Manager (ODM) is a free Windows client many integrators use for this. Milestone's ONVIF Bridge documentation describes installing ODM from SourceForge, letting it discover devices automatically, or adding one by its http://IP:port/onvif/device_service address. The page notes ODM does not support H.265, so an H.265-only profile may not play in ODM even when the URL is correct.

WS-Discovery works on the local segment, so run the tool from a laptop on the camera VLAN. Some cameras need ONVIF enabled and an ONVIF user created first.

What is the RTSP URL format for each camera brand?

Formats come from each manufacturer's documentation where we could open it. Replace IP with the device address and add user:pass@ before it, or enter credentials when prompted.

  • Hikvision. Main stream: rtsp://IP:554/Streaming/Channels/101; Sub-stream: .../Streaming/Channels/102; Source: Hikvision technical bulletin.
  • Dahua. Main stream: rtsp://IP:554/cam/realmonitor?channel=1&subtype=0; Sub-stream: ...&subtype=1; Source: OpenEye list (older IPC); confirm in manual.
  • Uniview (camera). Main stream: rtsp://IP:554/media/video1; Sub-stream: rtsp://IP:554/media/video2; Source: Uniview guide.
  • Uniview (NVR). Main stream: rtsp://IP:554/unicast/c1/s0/live; Sub-stream: .../unicast/c1/s1/live; Source: Uniview guide.
  • Axis. Main stream: rtsp://IP/axis-media/media.amp?camera=1; Sub-stream: Add &streamprofile= or &resolution=; Source: Axis developer docs.
  • Bosch. Main stream: rtsp://IP/?inst=1; Sub-stream: rtsp://IP/?inst=2; Source: Bosch technical note.
  • Hanwha Vision. Main stream: rtsp://IP:554/profile1/media.smp; Sub-stream: .../profile2/media.smp (varies); Source: Hanwha Vision support.
  • Avigilon, Sony. Main stream: Check your model's manual; Sub-stream: Check your model's manual; Source: Not verified from vendor.

Hikvision RTSP URL

Hikvision's RTSP and HTTP URL technical bulletin gives the format rtsp://user:password@IP:port/Streaming/channels/<channel><stream>. The stream suffix 01 is the main stream and 02 is the sub-stream, so channel 1 is 101 (main) and 102 (sub).

On a Hikvision NVR or DVR, the channel and stream numbers are joined the same way. The bulletin's examples use 1701 for channel 17 main and 1902 for channel 19 sub, so channel 2 follows as 201 and 202.

Dahua RTSP URL

The widely used Dahua RTSP URL is rtsp://IP:554/cam/realmonitor?channel=1&subtype=0, where subtype=0 is the main stream and subtype=1 is the sub (extra) stream. OpenEye's RTSP URL list gives this pattern for older Dahua IP cameras. We could not verify it against Dahua's own documentation, so confirm the format, and how NVR channels map to channel=, in your model's manual.

Uniview RTSP URL

Uniview's guide to IPC and NVR URLs lists media/video1 (main), media/video2 (sub) and media/video3 (third stream) for cameras, and media2/video1 for the second lens of dual-lens models.

For Uniview NVRs, the live path is /unicast/c<channel>/s<stream>/live, where c1 is channel 1, s0 is main and s1 is sub.

Axis RTSP URL

Axis cameras use one RTSP endpoint, /axis-media/media.amp, and do not use fixed main and sub paths. Instead, you pass parameters. The Axis stream profiles guide shows rtsp://IP/axis-media/media.amp?camera=1&streamprofile=Example, and notes that adding a parameter such as &resolution=1920x1080 overrides the profile's setting. In practice, create a low-resolution stream profile for analytics and reference it by name. On multi-sensor models, check the camera's documentation for how camera= numbers each sensor.

Bosch RTSP URL

Bosch's RTSP usage technical note uses query parameters on the device root. ?inst=1 selects stream 1 (used when inst is omitted), ?inst=2 selects stream 2, and ?line=2 picks a video input on multi-input encoders. Parameters combine, as in rtsp://IP/?line=3&inst=2. The note predates H.265, so check your firmware documentation for newer codec options.

Hanwha Vision RTSP URL

Hanwha Vision's RTSP URL article gives rtsp://IP:554/profile<no>/media.smp for cameras, where the number is the camera's media profile. Check in the web interface which profile is lighter. Multi-sensor cameras and encoders add a sensor number starting at 0, as in /0/profile2/media.smp, and NVR/DVR live channels use /LiveChannel/0/media.smp with channels starting at 0.

Avigilon and Sony: check your model's manual

We could not open official Avigilon or Sony documentation for camera RTSP paths. OpenEye's list reports rtsp://IP/defaultPrimary-0?streamType=u and defaultSecondary-0 for some Avigilon models; treat that as a starting point only. For Sony, use the model manual or ONVIF discovery.

Main stream or sub-stream: which should you use?

A main stream is the camera's highest-quality encoding, usually full resolution and frame rate, used for recording and evidence. A sub-stream is a lower-resolution, lower-bitrate encoding of the same view, used for multi-camera live view, mobile access and other bandwidth-sensitive uses.

For analytics, the sub-stream is often the right default. It uses far less bandwidth and decode work, which matters when you pull dozens of cameras over a site uplink. Check that an extra stream does not exceed the camera's concurrent-stream limit.

Use the main stream where detail at distance matters, such as a long perimeter fence, and upgrade specific cameras only after reviewing results with operators.

Should you pull streams from the NVR or directly from the camera?

Both work, and many estates mix them. The tradeoffs are about network design and load.

  • Direct from camera. When it fits: Cameras routable from the analytics server; per-camera settings needed; Watch for: More connections per camera; camera stream limits.
  • From the NVR. When it fits: Cameras on an isolated PoE network behind the NVR; Watch for: NVR outbound bandwidth and stream limits; NVR channel numbering.
  • From the VMS server. When it fits: Large estates with a central VMS; Watch for: VMS licensing; check the vendor supports RTSP out.

For a fuller checklist of NVR capabilities, read our NVR and AI compatibility checklist.

How do you test an RTSP stream in VLC and ffprobe?

Test every URL before entering it into a VMS or analytics platform.

  1. Open VLC. Go to Media > Open Network Stream (Ctrl+N on Windows), paste the RTSP URL and click Play. Milestone's VLC testing guide describes this test.
  2. Enter credentials if prompted. If you left them out of the URL, VLC asks for them.
  3. Check the codec. Open Tools > Codec Information (Ctrl+J) to confirm the codec, resolution and frame rate you expect.
  4. Force TCP if video stalls. In VLC's advanced preferences, enable "Use RTP over RTSP (TCP)". This often fixes freezes when UDP is blocked.
  5. Run ffprobe for a scriptable check. A typical command is ffprobe -v error -rtsp_transport tcp -show_streams "rtsp://user:pass@192.0.2.10:554/Streaming/Channels/102". The FFmpeg protocols documentation lists tcp, udp, udp_multicast, http and https as rtsp_transport options, plus a timeout option in microseconds for scripted checks.

Quote the URL in the shell so characters such as & in a Dahua or Axis URL are not treated as commands.

Why won't my RTSP stream connect?

Most failures are one of these.

  • 401 Unauthorized. Likely cause: Wrong credentials, wrong account type, or unencoded special characters; What to try: Test the account in the web UI; percent-encode the password.
  • Timeout, no response. Likely cause: Wrong IP or port, firewall, routing between VLANs; What to try: Confirm the RTSP port; check firewall rules for TCP 554.
  • 404 or "not found". Likely cause: Wrong path or channel number; What to try: Recheck the brand format and NVR channel list.
  • Connects, no video. Likely cause: UDP blocked, or RTSP disabled on the device; What to try: Force TCP; enable RTSP in device settings.
  • Plays in VLC, not in another tool. Likely cause: H.265 stream where the tool expects H.264; What to try: Set the sub-stream to H.264 or confirm H.265 support.

ONVIF Profile S makes MJPEG mandatory and H.264 conditional and does not cover H.265, so H.265 support varies by tool. Switching a sub-stream to H.264 is usually the quickest fix.

How do you secure RTSP camera streams?

An RTSP URL can carry a live view of your site and a password. Treat it like any other credential.

  • Never expose RTSP to the public internet. The Axis OS hardening guide advises against internet exposure and recommends segregated networks using VLANs, access control lists and firewalls. Do not port-forward 554, and disable UPnP.
  • Treat this as a live threat. In July 2026, Dutch intelligence services AIVD and MIVD published an advisory warning that Russian state actors were systematically using IP cameras for espionage in EU and NATO countries and Ukraine.
  • Change default passwords and use a unique password per device. Axis recommends unique per-device passwords and warns that passwords under eight characters are weak.
  • Use a dedicated, least-privilege account for streaming. Axis advises reserving the administrator account for admin tasks and using a limited-privilege account for daily operation. Give each integration its own view-only account so you can revoke it cleanly.
  • Require authentication on RTSP. Disable anonymous viewing and prefer Digest over Basic authentication where encrypted transport isn't available. Use RTSPS/SRTP where both the camera and client support it.
  • URL-encode special characters. Under RFC 3986, characters such as @, :, / and # act as delimiters, so a password containing them must be percent-encoded; for example, @ becomes %40.
  • Keep credentials out of shared documents. RFC 3986 deprecates the user:password form in URIs. Share URL templates without passwords and keep secrets in a vault.

Why does the RTSP URL matter for adding AI analytics to existing cameras?

The RTSP URL is the handoff point between your existing CCTV estate and any analytics layer. A stream that plays reliably in VLC with a dedicated account removes much of the integration risk.

Kote by Kotelab connects to existing IP cameras and RTSP-capable DVR/NVR streams, including Hikvision, Dahua, Uniview, Axis, Bosch, Hanwha Vision, Sony and Avigilon cameras. It monitors connected feeds and surfaces configured events, such as restricted-zone entry, perimeter breach or after-hours activity, with site, zone, camera, time and clip context for human review. Your team verifies and responds.

Before any pilot, build a camera inventory: site, camera name, brand and model, NVR channel, stream URLs (without passwords), codec, resolution and test result. Pair it with our NVR and AI compatibility checklist and our guide to real-time threat detection. For background, read how AI video analytics works and our guide to AI video analytics software for existing cameras. IT reviewers can check data handling on our security page.

Frequently asked questions

What is the default RTSP port?

The default RTSP port is TCP 554, as set out in RFC 7826 for rtsp:// URLs; encrypted rtsps:// defaults to 322. Installers sometimes change it, so confirm it in the device settings.

How do I find the RTSP URL if I don't know the camera brand?

Use an ONVIF client such as ONVIF Device Manager from a laptop on the camera's network. ONVIF Profile S devices must answer a GetStreamUri request with their RTSP URL. You may need to enable ONVIF and create an ONVIF user on the camera first.

What is the Hikvision RTSP URL for a sub-stream?

For channel 1, use rtsp://IP:554/Streaming/Channels/102, where 01 means main stream and 02 means sub-stream. On an NVR, put the channel number in front, so channel 17 sub-stream is 1702, per Hikvision's RTSP technical bulletin.

Why does my RTSP stream work in VLC but not in my VMS?

The usual causes are codec support, transport and authentication. Check whether the stream is H.265 and the VMS supports it, try forcing TCP, and confirm the account has viewing rights.

Is it safe to put the username and password in the RTSP URL?

It works, but it is a risk if the URL ends up in documents, screenshots or logs, which is why RFC 3986 deprecates passwords in URIs. Prefer clients that prompt for credentials, use a dedicated view-only account, and never share the full URL in tickets or chats.

Should AI analytics use the main stream or the sub-stream?

Start with the sub-stream for most cameras because it reduces bandwidth and processing load. Move to the main stream only where detail at distance matters.

Ready to put your existing cameras to work?

Once your streams test cleanly, you are ready for an analytics pilot. Talk to the Kotelab team to review your camera estate, define the zones and events that matter, and plan an evaluation with your operators.

Put your cameras to work

Intelligence for the moments that matter.