Skip to content

VOD File Broadcasting

VOD (Video On Demand) service is an integral part of services based on video delivery. It is a media delivery system, allowing users to access the content at any time regardless of the usual TV broadcasting schedule. VOD has a wide application field, for instance, education.

Flussonic Media Server supports playing video files on client devices and apps. A virtual filepath, called a VOD location, must be set up to enable this feature. One VOD location can contain multiple directories. Multiple VOD locations can be used to arrange video files and apply different sets of settings to files for each VOD location.


Containers and codecs

The VOD broadcasting feature only supports playback of video files in MP4 containers (popular file extensions include .mp4, .f4v, .mov, .m4v, .mp4a, .3gp, and .3g2.) The H.264, HEVC and VP6 video codecs are supported. The AAC, MP3, AC3, PCMA, and PCMU audio codecs are supported.


We strongly recommend that you convert files from MKV into MP4 because the MP4 format is much better for playing files via HLS or DASH. You can use ffmpeg to convert video files from MKV to MP4.

Containers Video Codecs Audio Codecs
MP4 (.mp4, .f4v, .mov, .m4v, .mp4a, .3gp, .3g2) H.264, H.265 MP3, AAC (all profiles)

As you can see from the list, Flussonic does not support the MKV format, and there are reasons for this.

In an MP4 file, the header contains all data about tracks and segments in advance. It is enough to read the moov structure of an MP4 file for Flussonic to find out everything about all the frames (except their contents). And since moov takes up less than 1% of all data, Flussonic only needs to read a very small part of a multi-megabyte file. And this data is enough to create an HLS or DASH playlist.

The most important thing here is that moov contains bitrate data, so in the case of MP4, the player will immediately get a valid master playlist with track bitrate data, which will allow playing the file without errors. If there is no bitrate data, the player will not be able to select a track to be played. There may be other errors that are not easily fixed.

In the case of MKV files, the data about file structure might be missing. MKV packers sometimes specify NUMBER_OF_BYTES, but not always, and in this case Flussonic would have to read an entire file when opening it, in order to find out its contents and create a playlist.

Creating a VOD location

To enable the VOD broadcasting feature, you need to specify a virtual filepath, called a VOD location. One VOD location can contain multiple directories — multiple VOD locations can be used to organize video files and apply different sets of settings to files in each location.

For example, if we would like to broadcast files from the /movies directory, we would first add a vod directive to /etc/flussonic/flussonic.conf:

vod vod {
  storage /storage;

Here, vod is the unique name of our VOD location. VOD files in this location will be served with the vod prefix. The storage option specifies the directory that Flussonic scans for VOD files.

It is also possible to create VOD locations from the Web UI. Navigate to the media list in Media, and click the add button next to the Files (VOD) heading. Enter the location name and a filepath (or a URL path). Click Save to apply your changes.

Flussonic VOD

Under this configuration, files will be served with the prefix vod via the HLS, DASH, HDS, RTMP, and RTSP protocols.

You can specify multiple sources in one file prefix. Files can be broadcast from local and cloud storage. See Setting up multiple paths for one prefix

Managing files via the web interface

Flussonic Media Server's web interface includes a full-featured file manager. It is possible to load and view files on the local disk as well as those stored in the cloud.

After adding a vod prefix to a VOD location in the configuration file or in the web interface, go to the VOD tab:

Flussonic VOD

Now you can create subdirectories:

Managing files

Select a directory to upload one or more files to it (the Browse button):


The file name must not contain any cyrillic or special characters, such as less/greater than <>, quotation mark ", forward slash /, pipe or vertical bar |, question mark ? or an asterisk * as it may cause problems with the file playback from the web interface or with some players.

via the web interface

Click a file to play it.

Embedding the video player in a webpage

Flussonic's built-in HTTP server can serve a special embed.html page to client software. This page can be used to insert video into a website, or to view VOD content in a browser.

It is available using the following URL:


Learn more about this feature in this article: Adding video to websites (embed.html).

Playing files over different protocols

This section demonstrates how to play VOD files over several different protocols.

In our example, we will play a file at the path /movies/example/s01e02.mp4. We have configured a VOD location like so:

vod vod {
  storage /movies;

For the file on disk in /movies/example/s01e02.mp4, you should use the following URLs as sources for the player:

  • Playing a VOD file via HLS (iOS, Android, STB)


Playing a VOD file via RTMP (Jwplayer, Flowplayer, Uppod)

application: rtmp://FLUSSONIC-IP/vod, path: example/s01e02.mp4.

  • Playing a VOD file via MSS


  • Playing a VOD file via HDS (StrobeMediaPlayback and other OSMF-based players)


You can see the list of all supported protocols along with the URL for playing in the web interface: open the VOD location, click Browse opposite the path to the location, then click any file. The list of addresses to play the file will be displayed on the right (see the screenshot in Playing VOD files from the UI).

Playing VOD files from the UI

Video files can be played not only from a player or a browser, but also from the Flussonic's UI. Note that the UI can only play files that are in VOD locations.

Go to the VOD file browser page and select a file.

Flussonic VOD

Using multiple directories in one VOD location

When dealing with a high volume of streaming traffic, the best strategy may be to put your system's hard drives in a JBOD (non-RAID) configuration, where each hard drive mounts to a separate directory.

It is possible to configure a common file zone from multiple directories in Flussonic Media Server. Under this configuration, a file's URL will stay the same, even if it is moved between different devices (which are all mounted on different directories):

vod vod {
  storage /mount/disk1;
  storage /storage;

Multi-language broadcasting

The HLS and HDS protocols allow broadcasting video content with multiple audio and subtitle tracks, each in a different language. Flussonic Media Server automatically enables multi-language broadcasting if extra audio tracks or tx3g subtitle tracks are detected in a VOD file.

Exporting subtitle tracks as SRT

Flussonic Media Server can serve subtitle tracks in the SRT (SubRip Text) format. This is the only way to display subtitles on certain platforms (e.g. some Flash players). A VOD file's SRT subtitle track can be retrieved over HTTP:

Adaptive streaming (multi-bitrate)

Adaptive streaming can be used to make sure that clients with low-bandwidth connections have a good viewing experience. There are two ways to enable adaptive streaming in Flussonic Media Server:

  • Use several files with the same content but with different bitrates.

    Flussonic automatically creates a single multi-bitrate playlist to play back these files. Read more about how to configure this feature.

  • Use a single file that contains multi-bitrate content.

    To play back a multi-bitrate MP4 file, you will need to create a manifest file for it. The file encoding section of our documentation gives detailed instructions on creating multi-bitrate files.

Encoding multi-bitrate files

Below is a basic example of creating a multi-bitrate file using ffmpeg:

ffmpeg -i bunny.mp4 \
-map 0:0 -c:v copy \
-map 0:0 -c:v libx264 -b:v 150k  \
-map 0:0 -c:v libx264 -b:v 100k \
-map 0:1 -c:v libx264 -b:v 50k \
-map 0:1 -c:a copy \
-map 0:1 -c:a copy \
-y out.mp4

This process is discussed in more detail under the section "Preparation for broadcasting".

Restreaming VOD files

Copying a large VOD library between servers can be expensive. Flussonic is able to re-stream video files from one Flussonic server to another. This saves not only time but also storage space required to store VOD content. Saved resources can be used to enable caching of VOD content, which will increase the performance of a VOD re-streamer.

Example of VOD location configuration:

  • config file on the source VOD server:

vod vod {
  storage /storage;

  • config file on the restreamer VOD server:

vod vod {
  storage http://FLUSSONIC-IP:8081/vod;
  cache /mount/cache 500G misses=2;

VOD settings

Described below are the options that can be used in the vod directive. They specify various file broadcasting settings.


vod vod {
  storage /storage;
Specifies a path to a directory that contains VOD files. You may specify multiple paths.


cache /ssd misses=5 2d 40G; Configures content caching.
In this example, requests for files will be cached in the /ssd folder for no longer than 2 days (2d), with a total size limit of 40GB (40G). A file will be cached once it gets more than 5 requests (misses=5).


domain; Specifies the domains where the video can be played. This feature does not work for clients that do not pass the Referer header to Flussonic.


domains *; Specifies the domains where the video can be played. This feature does not work for clients that do not pass the Referer header to Flussonic.


storage /storage;

storage s3://;
Specifies a path to a directory (on disk or on another server) which contains VOD files. You may specify multiple paths.


read_queue 100; The number of simultaneous requests to disk for a given prefix.


download; Enables downloading the file and Range requests for it.


max_readers 10; Specifies the max number of simultaneous disk requests to the entire prefix.


thumbnails offset=10; Turns on thumbnail generation. Optionally, an offset time in seconds can be specified.


auto_mbr; Turns on automatic creation of a multi-bitrate HLS playlist from several files with different bitrates.