Stream (stream.ini)
To start capturing a stream by the media server, it is necessary to configure it correctly. Each configuration file should contain parameters for one stream.
The path to the stream configuration files is set in the parameter server.media.streams
in Mediaserver/Configuration/Server (mediaserver.ini).
The server loads all files with the .ini
extension from the directory and ignores other files.
Example configuration file (stream.ini) | |||||||||
---|---|---|---|---|---|---|---|---|---|
YAML
|
CONFIGURATION PARAMETERS | |||||||||
[sample-camera-uid]required | uid | A unique identifier for the stream within one installation. A string of maximum length 36 characters. | (a-z, A-Z, 0-9, -, ., _){1,48} | ||||||
stream-urlrequired | url | Connection URL for the stream:
| |||||||
stream-enablerequired | bool | Allows/Disallows connecting to the stream. true - Allows loading and connecting to the stream. | true | ||||||
camera-uidrequired | uid | A unique identifier for the camera within one installation. A string of maximum length 48 characters. If the parameter is not specified, the UID of the stream will be used. | (a-z, A-Z, 0-9, -, ., _){1,48} | ||||||
stream-namerequired | string | Camera name. Used for display as the name of the downloaded video and for better perception in the API. If the parameter is not specified, the UID of the camera will be used. | |||||||
stream-tracksrequired | array | RTSP stream channels that the server will capture. If the specified channel does not exist in the source stream, it will not be connected to. Possible values for channel types:
| [ video, audio ] | ||||||
stream-protorequired | array | Protocols by which the client is allowed to connect to the server to view the stream (specified individually for each stream). | [ rtsp, hls ] | ||||||
stream-accessrequired | string | Defines the type of client authentication when connecting to stream viewing. none - Connecting clients to the stream for viewing is impossible. At the same time, capture functions and API work are available. | public | ||||||
stream-whitelistrequired | array | List of allowed IP addresses from which connections to view the stream can be made. Whitelist is the priority parameter, if set, the inclusion of the client's connection IP address is always checked, and then authentication. The following formats can be used: 192.168.1.100, 192.168.1.100/24, 192.168.1.100-192.168.1.105 | [] | ||||||
stream-limitrequired | int | Limits the maximum number of simultaneous client connections for viewing streams across all protocols. | 0 | ||||||
dvr-enablerequired | bool | Allows/Disallows the server to record and store a copy of the stream. | false | ||||||
dvr-archiverequired | path | Sets the root storage directory for DVR. | |||||||
dvr-durationrequired | seconds | Sets the duration of recording storage. | |||||||
dvr-capacityrequired | bytes | Limits the size of disk space for recordings. This parameter is informational. It does not impose physical restrictions. | |||||||
dvr-chunkrequired | seconds | Sets the duration of the recording segment. | |||||||
reconnect-numbersrequired | int | Sets the number of attempts to reconnect to the stream in case of connection failure before disconnecting the stream. | 500 | ||||||
reconnect-invalidrequired | int | The number of 'bad' packets before the camera enters the 'unavailable' state. | 10 | ||||||
reconnect-timeoutrequired | seconds | Timeout between connection attempts to the stream. | 10 | ||||||
reconnect-intervalrequired | seconds | Maximum connection interval to the stream. | 30m | ||||||
primary-noderequired | string | If the cluster function is enabled, see Mediaserver/Configuration/Server (mediaserver.ini), the parameter sets the host name that is the primary for capturing the stream. | |||||||
secondary-noderequired | string | Sets the host name that is the backup for capturing the stream in case the primary host is unavailable. | |||||||
access.auth | |||||||||
typerequired | enum | Defines the type of web authentication. basic - Basic authentication using a username and password. | digest | ||||||
userrequired | string | Username for Basic or Digest authentication. | |||||||
passwordrequired | string | User password for Basic or Digest authentication. |