Architecture and functionality of Mediaserver
Main components
Linux system service
A multithreaded service implemented in C/C++
Configuration
media-server.ini
A configuration file for mediaserver where the following can be configured:
Cluster
Number of system threads
Network ports and available services
SSL and secret keys for authorization tokens
Plug-in modules
Archival storage paths
streams/<uid>.ini
A configuration file for each processed stream where the following can be configured:
Unique stream identifier (UID)
Which channels to capture (video, audio, application)
DVR recording (storage duration, where to record)
Reconnection intervals
RTSP source URL (which camera to capture)
RTSP stream capture
The function performs the following actions:
Connection
Reconnection in case of connection loss
RTP defragmentation
Archive (DVR)
The component has the following functions:
Indexing media data
Content storage
Creating ranges (indexing)
Removing outdated records
Event-based recording
Playback
The function performs the following actions:
Client authorization for playback:
Public, unlimited stream access
Protected, access to the stream requires a list of allowed IP addresses (whitelist)
Private, access to the stream is based on a temporary token
Conversion to HLS, MP4, RTSP formats
Media content delivery
Preview and Videoshot
WEB interface(cpanel)
LUA interface (for modification)
Stream status
Stream information
System and server resource information
API module
LUA interface (for modification)
Server, cluster, stream information
Stream management
Access token generation
Cluster (reservation)
The component has the following functions:
Primary, backup server for the stream
Checking server status
Recovery of streams in case the primary server fails
Stream transfer