Chapter 6. Usage Scenarios

Table of Contents

This chapter describes some common uses of Flumotion, with suggested configurations and some advice about working with Flumotion in these situations.

Live Streaming of a Conference

This section describes how Flumotion may be used to provide live online video streaming of a conference, allowing talks to be seen even by people not physically attending the conference venue. In addition, this video content can be simultaneously recorded to disk for later viewing. The On Demand section describes how to stream previously-recorded content from disk.

End User Experience

Your aim in this situation is to provide a web address for each conference room, 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. You may also wish to provide alternative web addresses, for people who wish to view the content directly in a web page via the Cortado Java applet.

Hardware

For this example, we will assume that there are two conference rooms. Each conference room requires the following hardware:

  1. A computer to encode the video. This must be attached to the network, with a fixed IP address and dedicated bandwith. It should have a FireWire input.

  2. A video camera with a tripod. Ideally, the video camera will have a line-level audio input and FireWire output. Higher-quality cameras produce clearer images, with less noise, allowing the stream to be encoded more efficiently.

  3. A microphone or access to the mixing desk for the room's own audio recording system. If you are using a mixing desk then you will need a sound cable to take its audio signal.

Naturally, you will need power sockets for all your hardware. For instance, at least one for the camera and one for the computer. Make sure that the power to the room is not turned off at unexpected times by the building management.

The audio input should be connected to the video camera, simplifying the synchronization of audio and video. The camera should then be connected to the computer via their FireWire ports.

[Note] Note

A "line-level" audio input is a strong audio input, as opposed to a weaker microphone-level input. To know if your equipment provides a line-level or microphone-level input you will need to be familiar with your audio hardware, such as the microphone or mixing desk. You must also know whether your camera expects a line-level or microphone-level input. You may need to configure a mixing desk appropriately, or use a pre-amplifier or attenuator, being careful to maintain the quality of the audio. Ideally, you can use the room's mixing desk and you have a camera that can take its line-level input directly.

You should also have one central networked computer to aggregate the streams from the computers in each room. This computer will usually be the only one with access to the Internet, allowing it relay the streams to an external high bandwidth server which will actually serve the content to viewers. You may require two network cards in this computer, using one for the local network and one for the Internet

[Note] Note

You will need to talk to the venue's system administrator to arrange for a computer to bypass the firewall or connect through the firewall. The system administrator will usually also provide the static IP addresses for each computer.

Example Configuration

Remember that we have two conference rooms. We could create one Flumotion Planet configuration to handle both rooms, with workers for the computers in each room, and one manager on the central computer. But to simplify the configuration we will create two Flumotion Planets, meaning that we have two managers running on the central computer.

Workers

First we will configure the workers on the computers in each room. As explained in the Worker Configuration section, this doesn't require much XML , because we just tell the worker to log in to a manager which will tell it what components to start. Each conference room worker logs into a different manager, so it logs in to a separate port, and should have separate feederport ports. For instance:

Example Worker File

<worker name="room1-worker">
  <!-- We also have room2-worker and streamer-worker. -->

  <!-- Tell the worker to log in to a manager to get instructions: -->
  <manager>
    <host>10.0.0.120</host>

    <!-- We have 2 managers running on this central computer. 
         The one for room1 is on this port: -->
    <port>7530</port> 
  </manager>

  <authentication type="plaintext">
    <username>flumotion</username>
    <password>Pb75qla</password>
  </authentication> 

  <feederports>8650-8651</feederports> 

</worker>

For each conference room, we will also have one worker on the central computer, which will receive data from the worker in the conference room and stream it to the outside world. This can use much the same configuration file.

Managers

For each room we will create a manager on the central computer, in a separate XML configuration file. This manager will accept logins from its workers on the same port as specified in the worker's configuration.

Each manager will tell its workers to create components. It will tell the conference room worker to create audio and video producer components and encoder and muxer components, as well as a disk-consumer component to save the archives for later user. It will tell the local worker to create a streaming component, receiving encoded data from the conference room worker.

[Note] Note

Instead of archiving the content on each encoding computer, in each conference room, you could archive the content from all rooms centrally on one computer. However, there is always a risk of local network problems, so it is safer to archive the content where it is created.

For instance:

Example Manager File

<?xml version="1.0" ?>
<planet>

  <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>

  <flow name="default">

    <!-- Get the video from the firewire camera: -->
    <component name="video-producer" project="flumotion" 
      type="firewire-producer" version="0.2.1" worker="room1-worker">
      <!-- properties -->
      <property name="framerate">25/2</property>
      <property name="height">288</property>
      <property name="is_square">False</property>
      <property name="scaled_width">360</property>
      <property name="width">360</property>
    </component>

    <!-- Add some logos and text to the video (from the firewire producer 
         component) with an overlay: -->
    <component name="video-overlay" project="flumotion" type="overlay" 
      version="0.2.1" worker="room1-worker">
      <eater name="default">
        <feed alias="default">video-producer:video</feed>
      </eater>

      <!-- properties -->
      <property name="cc_logo">True</property>
      <property name="fluendo_logo">True</property>
      <property name="height">288</property>
      <property name="show_text">True</property>
      <property name="text">Some Conference</property>
      <property name="width">360</property>
      <property name="xiph_logo">True</property>
    </component>

    <!-- Encode the video (from the overlay component) as Ogg Theora: -->
    <component name="video-encoder" project="flumotion" type="theora-encoder" 
      version="0.2.1" worker="room1-worker">
      <eater name="default">
        <feed alias="default">video-overlay</feed>
      </eater>

      <!-- properties -->
      <property name="bitrate">360</property>
    </component>

    <!-- Encode the audio (from the firewire producer component) 
      as Ogg Theora: -->
    <component name="audio-encoder" project="flumotion" type="vorbis-encoder" 
      version="0.2.0" worker="room1-worker">
      <eater name="default">
        <feed alias="default">video-producer:audio</feed>
      </eater>

      <property name="bitrate">20480</property>
      <property name="channels">1</property>
    </component>

    <!-- Combine the encoded video and audio: --> 
    <component name="muxer-audio-video" project="flumotion" type="ogg-muxer" 
      version="0.2.0" worker="room1-worker">
      <eater name="default">
        <feed alias="default1">video-encoder</feed>
        <feed alias="default2">audio-encoder</feed>
      </eater>
    </component>

    <!-- Stream the content to the internet, from the central computer: -->
    <component name="http-audio-video" project="flumotion" type="http-streamer" 
      version="0.2.0" worker="streamer-worker">
      <eater name="default">
        <feed alias="default">muxer-audio-video</feed>
      </eater>

      <!-- properties -->
      <property name="bandwidth_limit">10</property>
      <property name="burst_on_connect">True</property>
      <property name="mount_point">/</property>
      <property name="port">8900</property>
      <property name="user_limit">1024</property>
      <property 
        name="logfile">/home/fluendo/conference/room1-worker.log</property>
    </component>

    <!-- Save the content to disk for later on-demand streaming: -->
    <component name="disk-audio-video" project="flumotion" type="disk-consumer" 
      version="0.2.0" worker="room1-worker">
      <eater name="default">
        <feed alias="default">muxer-audio-video</feed>
      </eater>

      <!-- properties -->
      <property 
  name="directory">/home/fluendo/conference/archive/room1-worker/</property>
      <property name="rotateType">none</property>
    </component>

  </flow>

</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 live 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. The Flumotion Services company offers a solution for this and can help integrate Flumotion with existing systems.