This article shares some basic knowledge about RTSP and the format of RTSP URL.
Applies to: Which Reolink Products Support CGI_RTSP_ONVIF
Introduction
The Real Time Streaming Protocol (RTSP) is a network control protocol designed for use in entertainment and communications systems to control streaming media servers. The protocol is used for establishing and controlling media sessions between endpoints. Clients of media servers issue VHS-style commands, such as play, record, and pause, to facilitate real-time control of the media streaming from the server to a client (Video On Demand) or from a client to the server (Voice Recording).
Request for RTSP URL
RTSP URL is usually used on third-party video players, such as VLC player. It cannot be used directly on a web browser, since web browsers don't support RTSP protocol. (or you may install the RTSP plug-in on a web browser to view the RTSP stream.)
The RTSP URL can be used both in LAN and WAN.
If you want to view the RTSP stream in WAN, you will need to do port forwarding on the router.
Note: You may check whether the RTSP port is enabled on your camera and what's the RTSP port value referring to How to Configure Reolink Ports Settings
The format of the RTSP address is as below:
rtsp://<username>:<password>@<IP address>/Preview_<channel number>_<stream type>
The default RTSP port number is 554, which can be left blank by default. But if you have changed the port number, you must fill it in: rtsp://<username>:<password>@<IP address>:Port number/Preview_<channel number>_<stream type>
Examples
For example, if your Reolink camera or Reolink NVR or Reolink Home Hub has the following information,
IP address: 192.168.10.92
username: admin
password: 111111
-
For Reolink standalone cameras
Main Stream: rtsp://admin:111111@192.168.10.92/Preview_01_main
Sub Stream: rtsp://admin:111111@192.168.10.92/Preview_01_subAlternatively, you can also use this URL (Main Stream by default): rtsp://(user name):(password)@(ip address):554/
-
For Reolink NVRs
The username and password in the URL should be the ones for NVR. You may also change the channel number to view different channels.
For example, if you want to view channel 2 on NVR, then the RTSP URL will be:
Main Stream: rtsp://admin:111111@192.168.10.92/Preview_02_main
Sub Stream: rtsp://admin:111111@192.168.10.92/Preview_02_subNote: If a 4k camera is connected to an NVR with hardware H3MB16/H3MB02/H3MB17, it will only support RTSP stream in fluent mode instead of clear mode.
-
For Reolink Home Hubs
The username and password in the URL should be the ones for Home Hub. You may also change the channel number to view different channels.
For example, if you want to view channel 2 on Home Hub, then the RTSP URL will be:
Main Stream: rtsp://admin:111111@192.168.10.92/Preview_03_main
Sub Stream: rtsp://admin:111111@192.168.10.92/Preview_03_subFor checking the channel under Home Hub, there are 2 ways.
1. Use cgi command request (GetChannelstatus): http://192.168.10.92/api.cgi?cmd=GetChannelstatus&user=admin&password=111111
The request will return the channel list status of NVR/Home Hub, the channel value starting from 0 in the return request, and the channel value in the RTSP URL starts from 1, that is, the returned channel needs to be added by 1 to become the channel value in the RTSP URL.
For example, the RTSP URL corresponding to the "Reolink Doorbell Battery" device (channel is 2) returned by the above json is rtsp://admin:111111@192.168.10.92/Preview_ 03 _main[{
"cmd": "GetChannelstatus",
"code": 0,
"value": {
"count": 8,
"status": [{
"channel": 0,
"name": "",
"online": 0,
"sleep": 0,
"uid": ""
}, {
"channel": 1,
"name": "",
"online": 0,
"sleep": 0,
"uid": ""
}, {
"channel": 2,
"name": "Reolink Doorbell Battery",
"online": 1,
"sleep": 0,
"uid": "952700Y006WR1THE"
}]
}
}]
2. Login to Home Hub via web browser locally: How to Access Reolink Cameras/NVRs/Home Hub Locally via Web Browsers
Notes of Battery-powered WiFi cameras:
1. On Reolink NVR and Reolink Home Hub, each preview session of battery-powered WiFi cameras can only last up to 5 minutes. After 5 minutes, the battery-powered WiFi cameras enter sleep mode and the RTSP connection is disconnected. If you need to continue previewing, you need to request the stream again.
2. Since the battery-powered WiFi cameras have standby mode, they to be awakened during the RTSP request stream, which takes a long time. It is recommended to set the RTSP request timeout to at least 20s. For example, the VLC player can modify the TCP timeout: Tools > Preferences > All Parameters > Input/Codec > TCP connection timeout to 20000 ms.