Hikvision RTSP URL format, with a VLC test on macOS

Hikvision RTSP URL format, with a VLC test on macOS

The Hikvision RTSP URL is rtsp://user:pass@IP:554/Streaming/Channels/101. The number at the end is the channel number followed by the stream: 01 for the main stream, 02 for the sub-stream. On a camera the channel is always 1; on an NVR it is the camera's channel number, so channel 17's main stream is 1701. Below is the full code table and a VLC test for macOS.

Updated October 2026.

What is the Hikvision RTSP URL format?

Hikvision documents the format in its RTSP and HTTP URLs bulletin (v1.1, December 2015). The path is /Streaming/Channels/ followed by a code that combines the channel and the stream type. The default RTSP port is 554. HiLook devices use the same format; see HiLook vs Hikvision software.

Pulling an RTSP stream is one of the few ways to see Hikvision video on a Mac that does not depend on a plugin, a Rosetta app or a cloud account, which is why it features in our hub on Hikvision on a Mac. It gives you live video only. Recorded playback is a separate problem, covered in Hikvision playback on a Mac.

Code Channel Stream Example URL
101 1 Main rtsp://admin:pass@192.168.1.64:554/Streaming/Channels/101
102 1 Sub rtsp://admin:pass@192.168.1.64:554/Streaming/Channels/102
201 2 Main rtsp://admin:pass@192.168.1.200:554/Streaming/Channels/201
202 2 Sub rtsp://admin:pass@192.168.1.200:554/Streaming/Channels/202
1701 17 Main rtsp://admin:pass@192.168.1.200:554/Streaming/Channels/1701
1902 19 Sub rtsp://admin:pass@192.168.1.200:554/Streaming/Channels/1902

The rule: multiply the channel number by 100, then add 1 for the main stream or 2 for the sub-stream. Channel 32 main is 3201. Channel 5 sub is 502.

Camera URL vs NVR URL

Pointing at a camera directly and pointing at the NVR give you different things. A camera only has channel 1, so you will only ever use 101 and 102 against a camera's own IP address. An NVR exposes every connected camera on its own IP, with the channel number set by the slot the camera occupies in the recorder.

Two practical consequences follow. First, a camera plugged into an NVR's PoE ports usually sits on a private network behind the recorder, so the NVR URL is the one you can reach from your Mac. Second, if you move cameras between slots, your channel codes change, so keep a list.

Older firmware used different paths. Hikvision's bulletin covers the current scheme; the iSpy Connect model database lists variants reported for specific models if the standard path returns nothing.

Test the URL in VLC on macOS

VLC is free, runs natively on Apple Silicon and Intel Macs, and is the quickest way to prove a URL works before you type it into anything else.

  1. Install VLC from videolan.org and open it.
  2. Choose File, then Open Network (Command-N).
  3. Paste the URL, for example rtsp://admin:pass@192.168.1.64:554/Streaming/Channels/101, and click Open.
  4. If video appears within a few seconds, the URL, credentials and port are all correct.
  5. If VLC sits on "connecting", open Preferences, Input / Codecs, and tick RTP over RTSP (TCP), then try again.

You can force TCP from Terminal instead, which is handy for scripting:

/Applications/VLC.app/Contents/MacOS/VLC --rtsp-tcp "rtsp://admin:pass@192.168.1.64:554/Streaming/Channels/101"

The ffplay alternative

If you have ffmpeg installed (brew install ffmpeg), ffplay opens the stream with less overhead than VLC and prints useful errors:

ffplay -rtsp_transport tcp "rtsp://admin:pass@192.168.1.64:554/Streaming/Channels/101"

A 401 in the output means the credentials or authentication mode are wrong. A 404 means the path is wrong for your firmware. A timeout means the port is blocked or RTSP is off.

The snapshot URL

The same bulletin gives an HTTP snapshot URL: http://IP/Streaming/channels/1/picture. It returns a single JPEG from channel 1. Test it from Terminal with digest authentication, which Hikvision devices expect by default:

curl --digest -u admin:pass -o snapshot.jpg "http://192.168.1.64/Streaming/channels/1/picture"

Open snapshot.jpg in Preview. If the file is a few bytes long, open it in a text editor; it will contain the error the device returned.

Five reasons a Hikvision RTSP URL is not working

Symptom Likely cause Fix
Connection refused or timeout on port 554 RTSP disabled or port changed Enable RTSP in the device web UI and check the RTSP port under network settings
401 Unauthorized with correct password Authentication mode Set RTSP authentication to digest (or digest/basic) in the security settings, then retry
VLC rejects the URL or 401 appears Special characters in the password URL-encode them: @ becomes %40, # becomes %23, / becomes %2F
Camera works on the LAN but not remotely Custom or unforwarded port Use the external port in the URL, or better, use a VPN rather than exposing RTSP to the internet
Connects but shows no picture Hik-Connect stream encryption enabled Disable stream encryption in platform access settings for local use, or enter the verification code in a client that supports it

A worked example of the encoding fix: the password P@ss#1 becomes P%40ss%231, so the URL is rtsp://admin:P%40ss%231@192.168.1.64:554/Streaming/Channels/101. If you are setting up a new camera, choose a long password made of letters and numbers only and you avoid the problem entirely.

Build your own URL

Fill in the right-hand column and read across to assemble the URL. The result always has the form rtsp://USER:PASS@IP:PORT/Streaming/Channels/CODE.

Part Where to find it Default Yours
USER Device login admin
PASS Device login, URL-encoded if it has symbols none
IP Recorder or camera address (SADP, router, or recorder menu) 192.168.1.64
PORT RTSP port in network settings 554
CODE Channel x 100, plus 01 (main) or 02 (sub) 101

Use the sub-stream (02) for anything you will leave running all day on a Mac, such as a desktop widget or a multi-camera grid; the main stream is for recording and full-resolution checks. Viewers that keep several streams open at once are compared in our best IP camera viewers for Mac round-up, and if you want the Mac to record these streams rather than just show them, see SecuritySpy with Hikvision.

Main stream or sub-stream?

Every Hikvision camera encodes two streams at once. The main stream (01) is the full-resolution feed the recorder stores; the sub-stream (02) is a smaller, lower-bitrate copy intended for mobile apps and multi-camera grids. Both are available at the same time over RTSP and both are configured in the camera's video settings.

Use case Stream Why
Checking focus or reading a number plate Main (01) Full resolution and bitrate
Four or more cameras on one Mac screen Sub (02) Each tile is small, so the extra pixels are wasted and the CPU load is lower
Streaming over Wi-Fi or a VPN Sub (02) Lower bandwidth, fewer dropped frames
Feeding a recorder or analytics on the Mac Main (01) Record the best copy you have

If the sub-stream looks blocky, raise its resolution or bitrate in the camera's video settings rather than switching your viewer to the main stream. Most sub-streams ship at a very conservative default.

A note on exposing RTSP

RTSP sends credentials in a form that is easy to capture on an untrusted network, and port 554 open to the internet is a standing invitation to scanners. Keep RTSP on your LAN. If you need to watch from elsewhere, connect to your home network over a VPN first and then use the same local URL, which also avoids any port-forwarding changes on the router.

What RTSP will not give you

RTSP is a live stream. It does not browse the recorder's hard drive, so there is no timeline, no event search and no export of past footage. Audio depends on the camera's codec and the player. PTZ control is not part of RTSP either. For those you need the recorder's web UI (with its Mac limits), the official clients or a viewer that speaks the recorder's own protocol.

View your Hikvision or HiLook cameras natively on your Mac. HikGrid (our app) gives you live view, playback, recording search and footage download in one native macOS window: no iVMS-4200, no Windows virtual machine and no browser plugin. It runs natively on Apple Silicon and Intel Macs (macOS 13 Ventura or later), connects to several Hikvision and HiLook systems at once, and costs £39.95 one-time per Mac with monthly feature upgrades included and no subscription.

Download the free trial Buy a lifetime licence (£39.95)

FAQ

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

Replace the final 01 with 02: rtsp://user:pass@IP:554/Streaming/Channels/102 for channel 1, or 202, 302 and so on for NVR channels.

What is the RTSP URL for a Hikvision NVR?

Use the NVR's IP address and the channel code for the camera: channel 1 main is 101, channel 2 main is 201, channel 17 main is 1701. The recorder serves every camera on its own address.

Is there a Hikvision RTSP URL generator?

You do not need one. The table above is the whole formula: channel times 100, plus 01 or 02, after /Streaming/Channels/. The iSpy Connect database covers model-specific exceptions.

Why does the RTSP URL work in VLC but not in another app?

Usually the other app is using UDP where VLC was forced to TCP, or it does not support digest authentication. Check both settings in the app before changing the camera.

Can I use RTSP instead of the web plugin on a Mac?

For live view, yes. Hikvision's browser limits on macOS do not apply to RTSP, so a camera whose web page is blank in Safari will still stream to VLC. Playback and export are not available this way.

Sources

More Hikvision on Mac guides