Configuration settings for camera stream
Here is an example of a camera stream configuration setting.
A configuration file is a file that contains information required for the successful operation of the program.
[sample-camera-uid] # stream uid max 36 char length <uid notation is perfect>
primary-node = <xxxx>ms101 # stream primary node for dvr and live restreaming
secondary-node = <xxxx>ms103, nsms102 # stream secondary nodes for dvr and live restreaming
camera-uid = # optional stream camera id
stream-name = # optional stream name
stream-enable = true # true\false\on-demand stream
stream-url = "rtsp://<usr>:<pwd>@<host:port>/path/stream"
#stream-url = "publish://<usr>:<pwd>@<node-host>/sample-camera-uid/"
stream-proto = rtsp # enabled restreaming protocols [ rtsp, hls, mse, webrtc ]
stream-tracks = video # enabled stream tracks [ video, audio, data ]
stream-limit = 0 # number of clients. 0 - unlimit
stream-access = public # stream access method
# private - need <auth-token>
# public - access without authorization
# protected - stream-white-list ip restriction
stream-whitelist = # 192.168.1.1/32
reconnect-numbers = 500 # number of reconnects, before turn off stream
reconnect-timeout = 10s # timeout before reconnect attempt
reconnect-interval = 30m # maximum timeout interval
reconnect-invalid = 10 # number of bad packets before camera go in state invalid
dvr-enable = true # enable or disable dvr archive
dvr-archive = /opt/dvr # root archive directory
dvr-duration = 10d # stored archive duration
dvr-capacity = 10G # stored archive disk capacity: N[G|M|%]
dvr-chunk = 2m # archive chunk duration
dvr-ondemand = false # enable\disable dvr ondemand mode ( default is false )
Configuration parameters | |||
---|---|---|---|
uid | stream | Unique stream identifier within one installation. A string of up to 36 allowable characters. | (a-z, A-Z, 0-9, -, ., _) {1,36} |
enum | stream-enable | Enables/disables connection to the stream. | true |
uid | camera-uid | Unique camera identifier within one installation. | (a-z, A-Z, 0-9, -, ., _) |
string | stream-name | Camera name. Used for display, as the name of downloaded video and in the API for improved perception. | |
array | stream-tracks | RTSP stream channels that the server will capture. If the specified channel does not exist in the source stream, no connection is made to it. | [ video, audio, data ] |
array | stream-proto | Protocols that are allowed for clients to connect to the server to view the stream. (Individually specified for each stream) | [ rtsp, hls, mse, webrtc ] |
string | stream-access | Determines the type of authorization for clients when connecting to view the stream. | # private - need <auth-token> # public - access without authorization # protected - stream-white-list ip restriction |
array | stream-whitelist | List of allowed IP addresses from which connections can be made to view the stream. Whitelist is the priority parameter; if it is specified, the client's connection IP address is always checked for inclusion, and then authorization. # 192.168.1.1/32 | |
int | stream-limit | Limits the maximum number of simultaneous client connections to view streams across all protocols. 0 = no restrictions | |
enum | dvr-enable | Enables/disables the server to record and store a copy of the stream. | true |
path | dvr-archive | Sets the root directory for DVR storage. | /opt/dvr |
seconds | dvr-duration | Sets the duration of the recording storage. | 10d |
bytes | dvr-capacity | Limits the amount of disk space for recordings. The parameter is informational. It does not impose physical restrictions. | 10G |
seconds | dvr-chunk | Sets the recording segment duration. | 2m |
bool | dvr-ondemand | Enables/disables the DVR mode on demand. | default is false |
int | reconnect-numbers | Sets the number of attempts to reconnect to the stream in case of connection loss before disconnecting the stream. | 500 |
seconds | reconnect-timeout | Timeout between attempts to connect to the stream. | 10 |
seconds | reconnect-interval | Maximum interval for connecting to the stream. | 30m |
int | reconnect-invalid | The number of "bad" packets before the camera goes into an "unavailable" state, if the cluster function is enabled. | 10 |
string | primary-node | If the cluster function is enabled, the parameter sets the name of the host that is the primary for capturing the stream. | |
string | secondary-node | Sets the name of the host that is the backup for capturing the stream, in case the primary host is unavailable. |