RTSP
Use RTSP Streaming
To use RTSP streaming, add the following section to the appsettings.json file (C:\Program Files\Geutebrueck\GCore Web API\appsettings.json
).
You can use these parameters to configure RTSP streaming (see RTSP Server) and the streaming of recording gaps (see Streaming).
"Streaming": {
"DBPlaybackMaximumGapMs": 5000,
"DBPlaybackGapRecoverMs": 40
},
"RTSPServer": {
"EnableRTSP": true,
"ListenV6": "[::]",
"ListenV4": "0.0.0.0",
"ListenPort": 554
//,"LogStreamFilePath": "c:\\temp"
},
RTSP Server
To enable RTSP streaming, the EnableRTSP parameter must be set to true.
Encryption the RTSP Stream
You can encrypt the RTSP stream with a VPN connection between the client and the Web API.
If you are only using the RTSP stream, an SSL tunnel is also sufficient.
Authentication
The client sends the user name and password to the G-Core server from which the client expects to receive the stream. These credentials are then used to authenticate the user for the stream. If the authentication fails, an RTSP 401 response is sent.
Only basic authentication is supported.
IMPORTANT: This type of user authentication is not secure and is not recommended.
Recorded and Live Channel
The Web API distinguishes between the playback of recorded and live channels.
Recorded Channel:
When a specified time frame is called, the Web API checks whether the requested time frame exists and plays it at the normal 1.0x speed.
Example
rtsp://localhost?MediaChannelIdentifier=1&Start=2022-01-31T13:05:04.447&End=2022-01-31T14:05:04.447
Start=
Start time in the format year-month-day T hours : minutes : seconds
.End=
End time in the format year-month-day T hours : minutes : seconds
.
Live Channel:
If neither a start time nor an end time is requested, the Web API plays the requested media channel as fast as possible and equivalent to the live view.
Example
rtsp://localhost?MediaChannelIdentifier=1
Streaming
If there are gaps in the database, these are skipped during playback and the next available image is displayed. You can configure the playback of recording gaps in the Streaming
section.
Parameter |
Description |
---|---|
DBPlaybackMaximumGapMs |
Defines in milliseconds how large a gap is that is not considered a gap. |
DBPlaybackGapRecoverMs |
Defines in milliseconds after which the next available image is played. |
Performance
To test the limitations of the G-Core Web SDK and Web API as well as some functionalities, some performance measurements were perfomed.
Specifications
The following specifications we used for the performance measurement:
-
Operating system: Windows 10 x64
-
CPU: Intel i7-7700
-
RAM: 8 GB
Test Results
Scenario: Full HD 12,5 fps / outdoor quite
To make the test results comparable, the duration of each measurement was ~10 mins:
Viewer Count |
CPU Usage |
Memory Consumption |
Test Result |
---|---|---|---|
4 |
~20% |
~45% |
Passed(stable) |
8 |
~20% |
~60% |
Passed(stable) |
10 |
~20% |
~80% |
Passed(stable) |
14 |
~40% |
~70% |
Passed(stable) |
18 |
~50% |
~80% |
Failed(unstable) |
Framerate
We observed that some RTSP clients have problems with very low frame rates. We therefore recommend using a frame rate of at least 5 FPS.