Skip to content

Streaming files from cloud

When deploying a Video on Demand (VoD) service with the file library size and the number of viewers unknown in advance it is advisable that you store your files in a cloud like Amazon S3/AWS, OpenStack Swift, Ceph, etc. Cold storage in the cloud can be cheaper than uniform disk storage, and cloud storage scales better as the service grows.

With Flussonic Media Server, you can broadcast video files kept on a cloud storage, as well as on HTTP servers.

Setting procedure in the UI

To setup safe and solid streaming from a cloud, you should:

  1. Install Flussonic Media Server on a server with enough disk space for caching hot content. You can start with 256GB SSD, for example.
  2. Make sure you have all the credentials required for accessing the storage. For example, you need to know ACCESS_KEY and SECRET_KEY for Amazon S3.
  3. Create a VOD location in Flussonic Media Server at Media -> VODs with the storage address specified, for example:

    • For public Amazon S3 bucket: http://s3.amazonaws.com/publicbucket
    • For private Amazon S3 bucket: use your ACCESS_KEY and SECRET_KEY obtained from your Amazon AWS profile in the private storage URL like this: http://ACCESS_KEY:SECRET_KEY@s3.amazonaws.com/privatebucket
    • For Swift storage: swift://user=USER&password=PASSWORD@swift-proxy/bucket
    • For generic HTTP server: http://example.com/prefix?key=12345. You can use any parameters in the query string. When accessing a file, for example, http://FLUSSONIC-IP/vod/bunny.mp4, the query to the storage will be http://storage/prefix/bunny.mp4?key=12345. VOD from cloud
  4. Configure a local file cache on the Input tab.

    Note

    Cache is recommended to smooth out the requests to remote storage. Without a cache, reading each frame will generate several network requests, while with cache enabled requests will be aggregated.

    VOD cache

  5. Then click Browse next to the path on the Overview tab and test the files playback.

VOD settings in the config file

The same settings may ba done via /etc/flussonic/flussonic.conf config file or via Config editor in the UI. An example of VOD configuration is given below.

Note that cache is configured to avoid frequent requests to the cloud.

vod public {
  storage http://s3.amazonaws.com/publicbucket;
  cache /cache 100G;
}
vod private {
  storage s3://ACCESS_KEY:SECRET_KEY@s3.amazonaws.com/privatebucket;
  cache /cache 100G;
}