VOD Locations
Content:
- Creating a VOD location
- Managing files via the web interface
- Using multiple directories in one VOD location
- VOD settings
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 myvod {
storage /movies;
}
Here, myvod
is the unique name of our VOD location. VOD files in this location will be served with the myvod
prefix. The movies
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.
Under this configuration, files will be served with the prefix vod
via the HLS, DASH, RTMP, and RTSP protocols.
You can specify multiple sources in one file prefix. Files can be broadcasted from local and cloud storage. See Setting up multiple paths for one prefix
You can find the whole list of VOD location settings here.
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:
Then click Browse. On the page that opens, you can add files to the VOD location, create nested directories to organize files, play files and get links for playing VOD files.
Warning
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.
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 myvod {
storage /mount/disk1;
storage /movies;
}
VOD settings
Described below are the options that can be used in the vod
directive. They specify various file broadcasting settings.
vod
vod vod { |
Specifies a path to a directory that contains VOD files. You may specify multiple paths. |
cache
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
domain host.com; |
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
domains host1.com *.host2.com; |
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; |
Specifies a path to a directory (on disk or on another server) which contains VOD files. You may specify multiple paths. |
read_queue
read_queue 100; |
The number of simultaneous requests to disk for a given prefix. |
download
download; |
Enables downloading the file and Range requests for it. |
max_readers
max_readers 10; |
Specifies the max number of simultaneous disk requests to the entire prefix. |
thumbnails
thumbnails offset=10; |
Turns on thumbnail generation. Optionally, an offset time in seconds can be specified. |
auto_mbr
auto_mbr; |
Turns on automatic creation of a multi-bitrate HLS playlist from several files with different bitrates. |