Skip to content

Configuring Flussonic Media Server

Content:

Restarting Flussonic Media Server

To restart the server with Flussonic, run this command:

service flussonic restart

The server's global options

Global options include ports for protocols and general settings.

Ports and protocols

Options (Ports and Protocols) Description
https 443; Turns on accepting HTTPS requests via the specified port. Multiple ports can be specified with multiple lines.

 

http 80; Turns on accepting HTTP requests via the specified port. Multiple ports can be specified with multiple lines.

 

http 127.0.0.1:80; Turns on accepting HTTP requests via the specified port and IP address. Multiple ports can be specified with multiple lines.

 

rtmp 80; Turns on accepting RTMP requests via the specified port.

 

rtmps 1443; Turns on accepting RTMPS requests via the specified port.

 

rtsp 554; Turns on accepting RTSP requests via the specified port.

 

rtsps 1554; Turns on accepting RTSPS requests via the specified port.

 

mysql 3306; Turns on accepting MySQL queries via the specified port.

 

Notes

When configuring the protocols HTTPS, RTMPS, and RTSPS, Flussonic Media Server expects that there are certificates in the directory /etc/flussonic.

The RTMPS protocol works only if you have a valid certificate that works without any warnings or errors.

Flussonic Media Server expects the private key of the server in the file /etc/flussonic/streamer.key with the password flussonic. The server's certificate is in the file /etc/flussonic/streamer.crt. The intermediate certificate and CA certificate are in /etc/flussonic/streamer-ca.crt.

For example, when you receive the purchased set of keys and certificates, you must do the following:

cat intermediate.crt ca.crt > /etc/flussonic/streamer-ca.crt
cp server.crt /etc/flussonic/streamer.crt
openssl rsa -des3 -in server.key -out /etc/flussonic/streamer.key

Other server options

Server Options Description
loglevel debug; Manages the level of detail in the data being logged. Variable values: debug, notice, error.

 

logrequests true; Turns on logging all HTTP requests to /var/log/flussonic/access.log.

 

auth_token TOKEN; Specifies the name of the query string parameter to be interpreted as the authorization token.

 

auth false; Turns off authorization at the global scope.

 

auth http://backend/auth.php; Turns on the authorization backend at the global scope.

 

max_sessions 1000; Sets global limit on the quantity of concurrent sessions.

 

no_auto_token;
auto_token false;
If this option is specified, any incoming request without the token variable in the query string will be refused immediately.

 

auto_token UUID; If this option is specified, the authorization token will be generated automatically, provided that it is not found within the query string.

 

auto_token blank; If this option is specified, a blank authorization token will be accepted, provided that no token is found within the query string. This is the default behavior.

 

cluster_key SECRETKEY; This line of code is used for authorizing other Flussonic servers comprising a cluster.

 

view_auth USER PASSWORD; Turns on authorization for read-only access to API.

 

edit_auth USER PASSWORD; Login and password for administrator access to the server.

 

api_allowed_from 10/8 192.168/16; Specifies IP addresses or networks from which accessing API is allowed.

 

notify HANDLER_NAME {
  sink http://backend/event.php;
}


notify HANDLER_NAME {
  sink /etc/flussonic/events.lua;
}

 

Flussonic events will be sent to the specified URL or script. Learn more in [Events API](../api/events-api.md#api-events-page)

 

pulsedb /var/lib/flussonic; Specifies the path to which streams statistical data will be recorded.

 

session_log /var/lib/flussonic; Specifies the path to which session history will be recorded.

 

url_prefix PREFIX
url_prefix http://my.domain.address.com:80;
This option applies to the HLS protocol, for all streams on the server. The addresses of individual segments within a segment-based playlist will start with the specified prefix. This option no longer works for variant playlists. Use it for segment-based playlists, such as tracks-v1a1/mono.m3u8 (but not for variant ones such as index.m3u8)
This setting is available in the global part of the config file as well as locally for any individual stream. Naturally, when specified at the stream level, it is only valid for this particular stream.

 

source SOURCE/PREFIX;
source SOURCE/PREFIX { }

source origin1.tv {
}

 

This directive turns on [automated stream repeating](../cluster.md#cluster-page) to the local server from a remote one.

 

stream ntv {
  url tshttp://source/ntv.ts;
}
The stream directive turns on a permanent stream that will be kept alive for the entire lifetime of the server, even if no data sources are available. Please see below for the stream directive's [options](../live-streaming.md#live-stream_settings).

 

ondemand ntv {
  url tshttp://source/ntv.ts;
}
The ondemand directive specifies the stream to be started on demand. If the stream has been unavailable for a certain amount of time, it will be turned off automatically. Please see below for the ondemand directive's [options](../live-streaming.md#live-stream_settings).

 

rewrite client16/* {
  url rtmp://origin/%s;
}
The rewrite directive turns on dynamic stream start on demand, for all streams with the names satisfying the client16/* mask. Please see below for the rewrite directive's [options](../live-streaming.md#live-stream_settings).

 

live published { } The live directive makes it possible to publish to the server all streams with the names starting with published/. Please see below for the live directive's [options](../live-streaming.md#live-stream_settings).

 

file vod {
  path /storage;
}
The file directive turns on broadcasting for all files in the /storage directory with the names starting with vod/. Please see below for the file directive's [options](../vod-file-broadcasting.md#vod-file_settings).

 

cache globalcache /var/www misses=4 2d 40G; Сonfigures a global cache named globalcache in the /var/www directory, with the limits of 40 Gigabytes and 2 days. Flussonic begins to cache files only after the 4th request for the files (cache miss).

 

nvidia_monitor true; Сonfigures Flussonic to save statistics on Nvidia performance (true) or to stop saving it (false). You can retrieve the statistics figures in the Pulse section in the UI. Run a custom query like this one `sum:1m-avg:gpu_dec{from=-2h,gpu=nv0}`. [Learn more](../transcoder/hardware-transcoding-with-nvidia-nvenc.md#transcoder-hardware-transcoder-nvidia_stats)

 

geoip PATH_TO_DATABASE; Сonfigures Flussonic to use the specified GeoLite2 database for geolocation instead of the built-in GeoLite2 database. [Learn more](../authorization/geoip.md#auth-geoip-page)