Server (mediaserver.ini)
Before launching the media server, it is necessary to edit the launch parameters in the mediaserver.ini file (by default located in the directory /opt/xxxx/media-server/).
Example configuration file (mediaserver.ini) | |||||||||
---|---|---|---|---|---|---|---|---|---|
YAML
|
CONFIGURATION PARAMETERS | |||||||||
server | |||||||||
---|---|---|---|---|---|---|---|---|---|
node-idrequired | int | Identifier of the current server node. | 0 | ||||||
node-host | string | Allows specifying the hostname that will be used by the server. If not specified, it will be taken from /etc/hostname. | |||||||
cluster-enablerequired | bool | Enables cluster support in the media server. | false | ||||||
cluster-idrequired | int | Numerical identifier of the cluster. | 0 | ||||||
cluster-controller | string | Sets the endpoint to which media server events will be sent. | |||||||
cluster-warming-uprequired | seconds | Time during which cluster nodes may not send ping after a restart. The more streams, the more time is needed to "warm up" the node. | 10s | ||||||
cluster-tolerancerequired | int | Time interval after the last health check. | 20 | ||||||
cluster-ping-intervalrequired | seconds | Interval between ping requests. | 10s | ||||||
sys-limitrequired | System setting for setting the limit. | ||||||||
sys-umaskrequired | System setting for creating a mask. | ||||||||
threads-mediarequired | int | Number of threads for streaming camera streams. | 10 | ||||||
threads-mediumrequired | int | Number of system threads that will be launched for capturing streams. | 10 | ||||||
threads-webrequired | int | Number of threads for API\WEB operation. | 5 | ||||||
server.stream | |||||||||
enablerequired | bool | Enables\Disables connection to the stream: true | false | rtsp, publish, web. | true | ||||||
rtsprequired | string | Network port on which clients will be expected to connect via the RTSP protocol. | *:5554:/ | ||||||
publishrequired | string | Network port on which connections will be expected for the media bridge. | *:7554:/ | ||||||
webrequired | string | Network port on which connections will be expected via Web protocols. (HLS, MSE) | *:8443/ | ||||||
whitelist-access | array | Defines a list of allowed IP addresses that can connect to the Mediaserver. Everyone is allowed if no specific IP addresses are specified. The following formats can be used: 192.168.1.100, 192.168.1.100/24, 192.168.1.100-192.168.1.105 | |||||||
whitelist-publishersrequired | array | Restriction on who can send streams. | |||||||
auth-modulerequired | path | Verifies token during authorization. | |||||||
auth-secretrequired | string | Sets the seed for creating access token. It is recommended to use a randomly generated sequence of more than 32 characters. | null | ||||||
ssl-enablerequired | bool | Enables or disables SSL/TLS connection support (for web, API, HLS, MSE, etc.). false - Disables SSL/TLS support. true - Enables secure connection support. | false | ||||||
ssl-certrequired | string | Contains the path to the SSL certificate file. | |||||||
ssl-keyrequired | string | Contains the path to the private key of the SSL certificate. | |||||||
reconnect-numbersrequired | int | Global parameter. Reconnection settings. Can be configured in the stream configuration file. | 500 | ||||||
reconnect-invalidrequired | int | Number of 'bad' packets before the camera goes into 'unavailable' state. | 10 | ||||||
reconnect-timeoutrequired | seconds | Reconnect once every specified number of seconds. | 10 | ||||||
reconnect-intervalrequired | seconds | Maximum interval for connection attempts to the stream. | 30m | ||||||
keep-aliverequired | bool | Enable/disable TCP activity support between the server and streams (global for all streams, enabled by default). | true | ||||||
server.module | |||||||||
listen | string | Specifies the interface and port on which client connections to Web API and CPanel modules will be available. | *:8081 | ||||||
cpanel-enable | bool | true - Connects CPanel web module support. | true | ||||||
cpanel-baseurl | string | Route to the Mediaserver control panel requests. | /cpanel | ||||||
cpanel-module | string | Path to the CPanel module LUA script. | module/cpanel.default.lua | ||||||
cpanel-whitelist | array | Defines a list of allowed IP addresses from which connections to CPanel can be made. | [] | ||||||
cpanel-auth | enum | Defines the type of user authorization in the CPаnel. none - CPanel authorization is disabled | none | ||||||
api-enable | bool | Enables API module support. | true | ||||||
api-module | string | Path to the Web API module LUA script. | modules/api/api.v2.lua | ||||||
api-baseurl | string | Route to Web API requests. | /api | ||||||
api-whitelist | array | Defines a list of allowed IP addresses from which connections to Web API can be made. | [] | ||||||
api-auth | enum | Defines the type of user authorization for Web API. none - Connection is possible without authorization | none | ||||||
ssl-enablerequired | bool | Enables or disables SSL/TLS connection support (for web, API, HLS, MSE, etc.). false - Disables SSL/TLS support. true - Enables secure connection support. | false | ||||||
ssl-certrequired | string | Contains the path to the SSL certificate file. | |||||||
ssl-keyrequired | string | Contains the path to the private key of the SSL certificate. | |||||||
usersrequired | object | Creating users. Input format role = [login]:[plain-password]. Role - root, admin, guest, user (if left empty, the possibility will be disabled). | |||||||
dvr | |||||||||
record-tmp-dir | string | Path for creating temporary files. | /storage/tmp | ||||||
streams | |||||||||
include | string | Location of stream configuration files. See Mediaserver/Configuration/Stream (stream.ini) | streams/*.ini | ||||||
nodes | |||||||||
includerequired | string | Node mapping and hostname. This section works if there are clusters. 101 = host1.[xxxx].video - The Mediaserver with node 101 has the specified hostname. 1088 = host2.[xxxx].video - The Mediaserver with node 1088 has the specified hostname. | media-server.nodes | ||||||
storages | |||||||||
default | string | Indicates the disks where DVR streams can be stored. This parameter is used for informational purposes when calling the method see Mediaserver/Web API/Server/GetServerStorageByPath. | /storage | ||||||
secondary | string | Backup storage location for DVR streams. This parameter is used for informational purposes when calling the method see Mediaserver/Web API/Server/GetServerStorageByPath. | /storage2 |