On Demand Streaming Of Files

This section describes how Flumotion may be used to provide on-demand streaming of archived audio or video files. Unlike live streaming, the user may fast-forward in an on-demand stream, or go directly to a certain point. Unlike a simple download, the user's client player can do this without downloading the content before that point. And unlike a simple download, playing can start before the entire file has downloaded, where the file format allows that.

[Note] Note

Not all file formats can be streamed on demand, because they require client players to download the entire file to obtain enough information for the client to start playing. For instance, files using the AVI container (usually with an .avi extension) cannot be streamed on demand.

End-User Experience

Your aim in this situation is to provide a web address for each file, usually by providing links on your organization's website. You can tell people to navigate to this address in their web browser to view the content in the appropriate player application.

Hardware

For on-demand streaming you need only one server, with the audio or video files on that same server.

Preparation

You may wish to provide your content in a variety of streaming formats and several quality levels suitable for different client bandwidths. However, Flumotion does not yet automatically encode and cache on-demand content so you will need to create the different versions of your files manually.

On Linux there are several utilities to help with this. The Flumotion Services company also offer a service to do this.

[Note] Note

For Flash Video files (.flv files), you must index the files in order to allow seeking, such as moving forward or backwards in a file. On Linux, the flvtool2 tool can index these files. See flvtool2

[Note] Note

On-demand streaming requires your system to have accurate MIME type information. In the event of problems you might look at the /etc/mime.types file to check that the file extension is properly mapped to a correct MIME type. See also the IANA official list of MIME types.

Example Configuration

This example creates a http-server component, streaming files from a directory specified by its path property. You can view these files in a client player, by opening the URL, which is the hostname plus the mount point, plus the file name. For instance, http://localhost/on-demand/test.ogv.

For instance:

Example Manager File

<planet name="admin">

  <manager name="planet-room1">
    <!-- no host means all interfaces <host></host -->
    <port>7530</port>

    <component name="manager-bouncer" type="htpasswdcrypt">
      <property name="data">flumotion:dF4wh3SMa4q/2</property>
    </component>
  </manager>

  <atmosphere>
    <component name="http-server-ondemand"
               type="http-server"
               label="http-server-ondemand"
               worker="localhost"
               project="flumotion"
               version="0.5.2.1">
      <property name="mount-point">/</property>
      <property name="port">8800</property>
      <property name="path">/var/www/</property>
      <plugs>
      </plugs>
    </component>
  </atmosphere>
</planet>

Suggestions

You may wish to limit the bandwidth used, as described in the Limiting Bandwidth section. You may also wish to create a log of all views of your on-demand content, for instance for billing purposes. See the Limiting Logging section.

To support a huge number of simultaneous viewers you will need to use multiple streaming servers, fed by a repeater component, with some load-balancing system to automatically direct users to an available streaming server. For ongoing systems, you will also need some way to automatically create the various versions of each file. The Flumotion Services company offers a solution for these issues and can help integrate Flumotion with existing systems.