Flussonic Media Server documentation

Quickstart

It is easy to start and try Flussonic. You need a computer with linux at hand and license or trial key. Trial key can be requested from us.

In this article we will explain how to install Flussonic, upload a video file and see a stream from Flussonic.

We recommend Debian or Ubuntu, but it is possible and something like Centos, the main thing that would be 64 bits. If you don't have Linux or free server, does not matter, rent for a few days a small server at Digital Ocean.

If you want something unusual, you can even rent an ARM server (with processor similar to that one in the iPhone) at Scaleway.

As a result, you have to get access to a Linux console as root.

Next we will give addresses and URLs of your server. Please change IP in them on the real address of your server.

Installation Anchor Anchor x2

Installing Flussonic detailed in separate article so just copy what you need to run in the console, which would it work:
curl -sSf https://flussonic.com/raw/install.sh | sh

Now we have to run Flussonic:

/etc/init.d/flussonic start

Open in browser Flussonic admin web interface on the page http://flussonic-ip:8080/ and paste there license key that you have received (change "flussonic-ip" to the real address of the server). On this page you can change administrator login and password.

License key stored in /etc/flussonic/license.txt file, you can put the key there before start.

You can check whether your Flussonic installation is correct by visiting http://flussonic-ip:8080/ where flussonic-ip is the address of the hosting server to which you installed the software. You can also run the following command:

/etc/init.d/flussonic status

Should be like this:

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

Flussonic admin web interface http://flussonic-ip:8080/

Default login and password are: flussonic and letmein!

More info in installation manual

File playback Anchor Anchor x2

Now let's try to play a file via Flussonic.

To do this:

  • configure the ability to play files;
  • upload a file;
  • play it.

Flussonic doesn't dictate rigidly where on the disk to place your files. Moreover, files can be in different places on your disk, so you need to explicitly specify where to get the them. For this you need to configure Flussonic and specify how path in requests for various protocols will match file on disk or in an HTTP repository.

If to specify this in configuration file:

file vod {
  path /storage;
}

than Flussonic will know that on accessing vod/movies/bunny.mp4 it will need to take file /storage/movies/bunny.mp4, i.e. everything after the matched prefix vod will be cut and glued to the path on disk.

Similarly you can configure access to files through web interface.

Now you can upload the file you have prepared or downloaded prepared in the directory /storage. If you do not have a video, you can take freely available Big Bucks Bunny:

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

Now open this link: http://IP:8080/vod/bunny.mp4/embed.html and see the cartoon.

More info in VOD manual

Live streaming Anchor Anchor x2

Slightly simplifying, Flussonic can receive streaming video in two main ways: acting as a client or server.

In the first case Flussonic itself connecting to video source. In the second – waiting for connection to receive video for publication.

Video source can be a ip camera, other videostreaming server, a specialized program working with DVB card, and generally any program that can stream video over the network. Flussonic supports all major video transfer protocols.

Also Flussonic may itself generate a video stream that can be used to test the operation.

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

stream demo {
  url fake://fake;
}

Here stream – keyword, followed by the name of the stream: demo. Next in braces description of the stream parameters. Video source is given by the parameter url. fake://fake - a special address where you can get sample stream video. Currently it's just a clock on a gray background.

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

/etc/init.d/flussonic reload

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

More info in Live streaming manual

Publishing video Anchor Anchor x2

Publication is a situation in which another program connects to Flussonic to transmit a streaming a video. To make this possible, in Flussonic must be configured a place in which publication is allowed. This can be done in two ways. The keyword live specifies the prefix, allowing the publication in any stream with this prefix:

live mylive;

The prefix of 'mylive' is included in a config file by default after installation. Check its existence in '/etc/flussonic/flussonic.conf'. If necessary add a line live mylive; and apply settings.

We will publish video by means of the ffmpeg. It is very useful command line utility for work with video. It is installed with flussonic-ffmpeg package and located in /opt/flussonic/bin directory. For transfer we will use the RTMP protocol, the file from the previous example will be a source of video:

/opt/flussonic/bin/ffmpeg -re -i bunny.mp4 -c copy -f flv rtmp://IP:1935/mylive/bunny

Here the -c copy parameter forces ffmpeg to copy video and a audio tracs without transcoding, and the -f flv parameter sets the necessary type of the container for use with the RTMP protocol. The -re parameter says that it is necessary to read from file with a speed equal to its bitrate.

To see the result open in browser address: http://IP:8080/mylive/bunny/embed.html page.

Mention that when you add publish prefix mylive, you need to use stream name, starting from mylive/, for example mylive/bunny. You choose what to put after prefix and exact stream name is not reflected in Flussonic config.

In order to allow the publication in any single stream, use the option publish_enabled:

stream pubdemo {
  publish_enabled;
}

In this case you need to publish to rtmp://IP:1935/static/pubdemo and play on http://IP:8080/pubdemo/embed.html

Refer to this article to learn about publishing video in more detail.