Flussonic Media Server documentation

Contents

Quick Start

The primary goal of this quick start tutorial is to introduce you to Flussonic Media Server. By the end of this tutorial you will learn how to:

Note. In this documentation, we will use placeholder IP addresses (or URLs) of the Flussonic server (such as FLUSSONIC-IP). Please replace placeholder IP addresses with the actual IP addresses used on your server.

The main Flussonic solutions

Flussonic Media Server

Flussonic Media Server is software for video streaming server capable of a wide variety of tasks including mass storage, transcoding, live and on-demand video delivery and control over video consuming and video streams.

Flussonic Watcher

Flussonic Watcher is a separate product that is used together with Flussonic Media Server to organize video surveillance systems. It is a user interface to the Flussonic server intended for convenient work with cameras, subscribers, and events.

Flussonic Watcher work only with Flussonic Media Server. For instructions on how to install Flussonic Watcher, refer to Flussonic Watcher documentation.

Installing Flussonic Media Server

Installation

This section briefly describes how to install Flussonic Media Server so that you can install it quickly. The detailed instruction on how to install the software can be found in the Installation section.

To install and configure Flussonic Media Server, you will need a computer with Linux connected to the Internet, and a license or trial key. A trial key can be requested on this page.

We recommend using Debian or Ubuntu, but you can also use CentOS. The main requirement is that the system must be 64-bit. If you don't have an available Linux computer, you could rent a small cloud instance at Digital Ocean for the time needed to try out our software.

To install Flussonic Media Server you will need access to a Linux console as the 'root' user on your server.

Run thу following command in the Linux console (command line):

curl -sSf https://flussonic.com/public/install.sh | sh

Then start Flussonic Media Server:

/etc/init.d/flussonic start

Now you can open the Flussonic administrator's web interface in a web browser.

The first run of the Flussonic user interface (UI)

The Flussonic user interface is available at http://FLUSSONIC-IP:8080/ (replace FLUSSONIC-IP with the real IP address of your server).

The default login and password are: flussonic and letmein!

On the start page Flussonic asks you to enter the license key that you have received.

Also, on this page you should change the administrator's login and password.

Quickstart

Note. The license key is stored in the /etc/flussonic/license.txt file, and you can put the key there before you start Flussonic. In such a case, the UI will not ask you to enter the key.

Checking the installation

You can check whether your Flussonic installation is correct by visiting http://FLUSSONIC-IP:8080/, where FLUSSONIC-IP is the address of the server on which you installed the software. The Flussonic administrator's web interface opens if the installation was correct.

You can also run the following command:

/etc/init.d/flussonic status

The response should be like this:

# /etc/init.d/flussonic status
Flussonic 19.05 is running with streams:
...

File playback

In this section you will learn how to play a video file using Flussonic. To play a file, you will need to:

  • Set up file location
  • Upload a file
  • Open the file in a player

Setting up a file location

Flussonic doesn't have a predefined location for files. You can store video files in different paths on your disk. And you will need to explicitly specify where the system should find them.

For this, you need to make changes in Flussonic configuration and specify how the path in requests for the file playback should match the real file on disk or in an HTTP repository. Based on these settings, Flussonic defines the path to a file. This path will be used in requests for playing back the file via various protocols. For example, a URL for an HLS stream will look like http://FLUSSONIC-IP:80/vod/bunny.mp4/index.m3u8.

Flussonic shows all URLs for a file playback in the web interface. You can copy these URLs and use them.

To specify file paths, add the following lines to the configuration file /etc/flussonic/flussonic.conf:

file vod {
  path /storage;
}

Now Flussonic knows that when clients request vod/movies/bunny.mp4, it will need to access the file /storage/movies/bunny.mp4. In other words, everything after the prefix vod will be cut and added to the specified path on the disk (that starts with /storage in our example).

Apply the new settings by running this command:

/etc/init.d/flussonic reload

Alternatively, you can configure access to files by using the web interface:

Go to Media > Files (VOD) > click add > enter VOD name (vod) and File directory path (/storage) > click create.

Uploading a file

Now you can upload the file you have prepared to the directory /storage.

The Flussonic distributive includes a test file /opt/flussonic/priv/bunny.mp4.

If you do not have this video, you can download freely available Big Buck Bunny video clip:

mkdir -p /storage
cd /storage
curl -o bunny.mp4 http://download.blender.org/peach/bigbuckbunny_movies/big_buck_bunny_480p_h264.mov

Playing the file

Open this link: http://FLUSSONIC-IP:8080/vod/bunny.mp4/embed.html and watch the video.

Learn more about video files in VOD.

Live streaming

Flussonic can ingest streaming video in two main ways: acting as a client or a server.

When acting as a client, Flussonic connects to a video source to retrieve the data. When acting as a server, Flussonic waits for external systems to connect and then it receives video for publication.

A video source can be an IP camera, other video streaming server, a specialized program working with a DVB card, and almost any system that can stream video over the network. Flussonic supports all major video transfer protocols.

In addition, Flussonic can generate a sample video stream fake://fake. This stream can be used, for example, to test the system health.

Open the configuration file /etc/flussonic/flussonic.conf and add there the following description of a live stream:

stream demo {
  url fake://fake;
}

Here:

  • stream is a keyword, followed by the name of the stream: demo. Next, in braces, goes the description of the stream parameters.

  • url specifies the source of the video.

  • fake://fake is a special address where you can get a sample video stream with a digital clock on a gray background.

After you changed the configuration file, you need to apply the settings. Execute the following command:

/etc/init.d/flussonic reload

Now open in the browser the address http://IP:8080/demo/embed.html and see the result.

Learn more about live video in the Live streaming section.

Publishing video

Publication is a process where an external system connects to Flussonic Media Server and initiates the transmission of streaming video to Flussonic Media Server. To make this possible, you will need to configure a stream or a publishing location on the Flussonic server where you allow publication.

This can be done in two ways depending on whether you know the stream name in advance or not.

You know the stream name

In order to allow the publication into a certain separate stream, use the option url publish://:

stream publishdemo {
  url publish://;
}

The name of the stream (publishdemo) is known in advance by the Flussonic server because you have added a stream with this name to the configuration.

In this case you can publish the video stream to this URL:

rtmp://FLUSSONIC-IP:1935/static/publishdemo

And play it back at the URL:

http://FLUSSONIC-IP:8080/publishdemo/embed.html

You don't know the stream name

You will need to configure a publishing location (or prefix) on the Flussonic server where you allow publication. A single publishing location can be used to publish one or more streams.

The directive live specifies the prefix (here: mylive), allowing the publication into any stream that has this prefix in its address:

live mylive {
}

The 'mylive' prefix is included in the configuration file by default after installation. You can find this section in /etc/flussonic/flussonic.conf. If this directive is missing in your configuration file, add it and reload the configuration to apply the settings:

/etc/init.d/flussonic reload

We will publish video by using a special command-line utility for working with video streams. This tool is installed as the rtmp_push package and located in the /opt/flussonic/contrib directory.

To publish a file via RTMP in the mylive location, use the following syntax:

/opt/flussonic/contrib/rtmp_push FILE.mp4 rtmp://FLUSSONIC-IP:1935/mylive/STREAM_NAME

Example

Let's transmit video by using the RTMP protocol. The file bunny.mp4 (which was descibed earlier on this page, in Live streaming) will be the source of video:

/opt/flussonic/contrib/rtmp_push /opt/flussonic/priv/bunny.mp4 rtmp://127.0.0.1/mylive/bunny

To see the result, open this address in the browser:

http://FLUSSONIC-IP:8080/mylive/bunny/embed.html

Important. If you configured the prefix mylive, then you must specify the stream name that starts with mylive/ in the URL, for example, mylive/bunny. The stream name that goes after the prefix is defined by the client app that publishes video. The exact stream name is not reflected in the Flussonic configuration file.

Refer to the Publishing section to learn more about publishing video streams to Flussonic.