Guides · Camera setup

Hikvision RTSP and ONVIF setup

Updated 29 September 2026

Hikvision cameras stream over RTSP out of the box, but ONVIF needs switching on and its own user. Motion events also need one extra checkbox before a third-party recorder sees them.

At a glance

Main streamrtsp://USERNAME:PASSWORD@CAMERA-IP:554/Streaming/Channels/101
Sub streamrtsp://USERNAME:PASSWORD@CAMERA-IP:554/Streaming/Channels/102
RTSP port554
ONVIF port80 (the camera’s HTTP port)
Accountadmin for RTSP. ONVIF uses a separate user you add

Replace USERNAME, PASSWORD, and CAMERA-IP with your own. The main stream is the full-resolution one to record; the sub stream is a lighter copy for small previews. On a Hikvision NVR the first digits are the channel: 201 is camera 2’s main stream and 202 its sub stream.

Before you start

  • Give the camera a fixed IP address with a DHCP reservation on your router, so its stream address never changes.
  • Use a strong password, but avoid @, :, /, and #. They have special meanings in stream addresses, and some cameras mishandle them.
  • Update the camera’s firmware. Menu names differ between firmware versions and models, so treat the ones below as a guide to where to look.

Turn on RTSP and ONVIF

  1. Open the camera’s web interface at its IP address and sign in as admin.
  2. RTSP is on by default. Its port is listed under Configuration › Network › Basic Settings › Port.
  3. Go to Configuration › Network › Advanced Settings › Integration Protocol and tick Enable Open Network Video Interface.
  4. On the same page, add an ONVIF user with the Administrator or Operator level. Hikvision keeps ONVIF users separate from web users, but they can share a name and password.
  5. Save.

Turn on motion events

  1. Go to Configuration › Event › Basic Event › Motion Detection, tick Enable Motion Detection, and draw the detection area.
  2. On the Linkage Method tab, tick Notify Surveillance Center. Without it, many Hikvision cameras do not send motion events over ONVIF at all.
  3. Smart events such as line crossing and intrusion detection have their own pages under Smart Event, each with the same Notify Surveillance Center option.

Add the camera to Loki Eye

  1. Add the camera in Loki Eye with its main stream address from the table above. Loki Eye probes the stream to check that it plays.
  2. Enter the ONVIF port so motion events can reach the recorder. Loki Eye tests the port as you add the camera.
  3. Choose continuous recording, or recording on motion with pre-roll and post-roll.

Things to know about Hikvision cameras

  • H.264+ and H.265+ lower the bitrate by stretching the gap between keyframes. If playback stutters or seeking is slow, switch the main stream to plain H.264 or H.265 under Configuration › Video/Audio › Video.
  • RTSP authentication is set under Configuration › System › Security › Authentication. Digest, the default on current firmware, is the safer choice.
  • Many cameras sold under other names run Hikvision firmware, including most Annke IP cameras. See the Annke guide.

If it does not work

  • The stream will not open. Try the same address in VLC, under Media › Open Network Stream. If VLC cannot play it either, the problem is on the camera: RTSP switched off, the wrong port, or the wrong password.
  • You are not sure of the stream address. ONVIF Device Manager, a free Windows tool, finds cameras on your network and shows their stream addresses.
  • The stream drops when another app is watching. Cameras accept only a few stream connections at once. Close other viewers, or point them at the sub stream.
  • No motion events arrive. Check that motion detection is on in the camera, that the ONVIF port is right, and that the camera clock is correct. ONVIF requests carry a timestamp, and a camera whose clock is minutes off can refuse them. Setting the camera to sync with an NTP time server fixes this for good.

Questions

What is the Hikvision RTSP URL?

rtsp://USERNAME:PASSWORD@CAMERA-IP:554/Streaming/Channels/101 for the main stream and /Streaming/Channels/102 for the sub stream.

Why does my Hikvision camera not send ONVIF motion events?

Usually because Notify Surveillance Center is not ticked in the motion detection linkage, or because no ONVIF user has been added. Check the camera clock as well: ONVIF requests carry a timestamp, and a clock that is minutes off can make the camera refuse them.

What is the Hikvision ONVIF port?

The camera’s HTTP port, 80 by default.

Loki Eye records your cameras to your own disk on Windows, macOS, and Linux. Free for two cameras, with no account.

Download free