Summary
What SID (Session ID) is and how to use it in commands related to video streaming in SUNAPI
Diagnosis
Session ID is a basic concept familiar to network professionals, but unfamiliar to others. Therefore, a brief explanation of their meaning and usage is needed.
First of all, let's briefly understand what a session is.
The technology that maintains the client's HTTP state information on the server is called Session. In other words, it stores information about the user who accessed the NVR or camera. This is maintained until the browser is terminated.
So why do we need session?
- Connectionless
- Stateless
These are two well-known features of HTTP.
Connectionless means not maintaining a connection after communication. The server closes the connection when it's finished responding, which minimizes the use of server resources and increasing efficiency.
Statelessness means that the server does not maintain the information of the client, so it takes advantage of the idempotency of the response and scalability of the server scale out.
However, servers with stateless communication have no way to verify that the client's request is authenticated, so they must authenticate each time before responding. Sessions compensate for the cons of this statelessness. In other words, a session is when the server remembers the state of the client. We call this concept a session.
When we open the web viewer of a camera or NVR, we authenticate by entering an ID and password. Sessions eliminate the need to authenticate every time the webpage changes (such as Live -> Setup).
When the browser(client) makes the first request(Log in), the server will store the browser's state in a session and reply with the session ID. After that the browser sends a request with the same session ID, it will be considered the same user.
Therefore, if a user uses the same session ID when streaming video from the NVR on the WEB or VMS, they can display multichannel video as a single user.
Root Cause & Resolution
1. SUNAPI Documents Guide
- In the RTSP URL, channel information and session ID are important for NVR, while for camera channel information, the profile name or profile number is important.
- Generally for NVR, after creating a session ID for live and getting the stream URI, we can establish a LIVE RTSP session.
- In general, the following types of sessions are supported:
- Audio
- Video
- Metadata
- BackChannel
- In an NVR, all RTSP connections with the same session ID are considered to be a single session. (Eg: In 16-view mode, all of the 16 RTSP connections will have the same session ID).
- As all live channels with same session ID are considered as one live session
- If session ID is not changed, the streamed video has the same format (eg time, profile, etc.).
2. NVR Session Count Specification
- On the NVR, each channel is assigned a separate session. The maximum number of sessions that can be configured on each NVR is as follows
- Max Live Session Count
- NVRs with 32 channels or more
- Unitcast : (CHANNELS / 4) x Unicast User
- Multicast : (CHANNELS / 4) x Multicast User
- NVRs with 32 channels or more
- NVRs with 8 or 16 channels
- Unitcast : (DEF_CHANNELS / 2) x Unicast User
- Multicast : (DEF_CHANNELS / 2) x Multicast User
- NVRs with less than 8 channels
- Unitcast : (DEF_CHANNELS) x Unicast User
- Multicast : (DEF_CHANNELS) x Multicast User
- Max Search Session Count
- Simultaneous playback x Max Remote Users
- Example
- In case of Multichannel Live (8ch NVR, Max Unicast users 10)
- Max. session count = (8 / 2) x 10 = 40
- This means that the maximum number of live multi-streams possible with a single SID is up to 80.
- In case of Multichannel Live (8ch NVR, Max Unicast users 10)
- In case of Multichannel Playback (16 channels(Local, Max Remote Users 3)
- Max. session count = 16 x 3 = 48
- This means that the maximum number of playback multi-streams possible with a single SID is up to 48.
- Only videos of the same time can play simultaneously.
Comments
0 comments
Please sign in to leave a comment.