Está en la página 1de 208

Flumotion manual

Murray Cumming, Flumotion Documentation Team <murrayc@openismus.com> Thomas Vander Stichele, Flumotion Documentation Team <thomas at fluendo dot com> Christian Fredrik Kalager Schaller, Flumotion Documentation Team <christian at fluendo dot com>

Flumotion manual
by Murray Cumming, Thomas Vander Stichele, and Christian Fredrik Kalager Schaller Copyright 2004,2005,2006,2007,2008 Fluendo

Abstract
User manual for Flumotion.
Flumotion is a trademark of Fluendo.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License (GFDL), Version 1.1 or any later version published by the Free Software Foundation with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. You can find a copy of the GFDL at this link [ghelp:fdl] or in the file COPYING-DOCS distributed with this manual. Many of the names used by companies to distinguish their products and services are claimed as trademarks. Where those names appear in any documentation, and the authors are made aware of those trademarks, then the names are in capital letters or initial capital letters. Some versions of this document appear with navigation icons from the Tango project. These are licensed under the Creative Commons Attribution Share-Alike license. DOCUMENT AND MODIFIED VERSIONS OF THE DOCUMENT ARE PROVIDED UNDER THE TERMS OF THE GNU FREE DOCUMENTATION LICENSE WITH THE FURTHER UNDERSTANDING THAT: 1. DOCUMENT IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE DOCUMENT OR MODIFIED VERSION OF THE DOCUMENT IS FREE OF DEFECTS MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY, ACCURACY, AND PERFORMANCE OF THE DOCUMENT OR MODIFIED VERSION OF THE DOCUMENT IS WITH YOU. SHOULD ANY DOCUMENT OR MODIFIED VERSION PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL WRITER, AUTHOR OR ANY CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY DOCUMENT OR MODIFIED VERSION OF THE DOCUMENT IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER; AND UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER IN TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL THE AUTHOR, INITIAL WRITER, ANY CONTRIBUTOR, OR ANY DISTRIBUTOR OF THE DOCUMENT OR MODIFIED VERSION OF THE DOCUMENT, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER DAMAGES OR LOSSES ARISING OUT OF OR RELATING TO USE OF THE DOCUMENT AND MODIFIED VERSIONS OF THE DOCUMENT, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES.

Table of Contents
I. Using Flumotion ............................................................................................................. 1 1. Introduction ........................................................................................................... 4 Introduction To Streaming ................................................................................... 4 Introduction To Flumotion ................................................................................... 4 2. Quick Start ............................................................................................................ 5 Installation ........................................................................................................ 5 Starting Flumotion .............................................................................................. 6 3. Using The Assistant ............................................................................................... 16 Detailed Example .............................................................................................. 16 Summary ......................................................................................................... 28 4. Architecture ......................................................................................................... 30 Introduction ..................................................................................................... 30 Components ..................................................................................................... 30 Managers And Workers ..................................................................................... 32 5. Deployment .......................................................................................................... 33 Service scripts For Startup .................................................................................. 33 Configuration Files ........................................................................................... 34 System Users ................................................................................................... 44 Multiple Servers ............................................................................................... 45 6. Usage Scenarios .................................................................................................... 46 Live Streaming of a Conference .......................................................................... 46 On Demand Streaming Of Files ........................................................................... 50 7. Security ............................................................................................................... 53 Authentication of Connections ............................................................................ 53 Transport Protocol Between Processes .................................................................. 53 Firewall Issues ................................................................................................. 54 8. Optimization and Performance ................................................................................. 56 Component Locations ........................................................................................ 56 Limiting Bandwidth .......................................................................................... 56 System Configuration ........................................................................................ 57 9. Debugging and Troubleshooting ............................................................................... 60 Debugging Flumotion ........................................................................................ 60 Troubleshooting Flumotion ................................................................................. 65 A. Flumotion Services S.A. ........................................................................................ 67 B. Installing Extra Dependencies ................................................................................. 68 Installing Python Modules .................................................................................. 68 Testing Python Modules ..................................................................................... 69 Installing GStreamer plug-ins .............................................................................. 70 C. Under the hood .................................................................................................... 73 GStreamer ....................................................................................................... 73 Twisted ........................................................................................................... 73 D. Command-line Options .......................................................................................... 74 Starting the manager ......................................................................................... 74 Starting the worker ........................................................................................... 74 E. The Configuration Assistant .................................................................................... 75 Flumotion Connections ...................................................................................... 75 The Welcome Page ........................................................................................... 81 The Scenario Page ............................................................................................ 82 The Production Page ......................................................................................... 83 The Test Video Producer Page ............................................................................ 84 The Webcam Page ............................................................................................ 85

iii

Flumotion manual

The TV Card Page ............................................................................................ 86 The Firewire Video Page ................................................................................... 87 The Overlay Page ............................................................................................. 88 The Test Audio Producer Page ............................................................................ 89 The Sound Card Page ........................................................................................ 90 The Firewire Audio Page ................................................................................... 91 The Encoding Page ........................................................................................... 92 The Theora Encoder Page .................................................................................. 93 The Dirac Encoder Page .................................................................................... 94 The Smoke Encoder Page ................................................................................... 95 The JPEG Encoder Page .................................................................................... 96 The Vorbis Encoder Page ................................................................................... 97 The Speex Encoder Page .................................................................................... 98 The Mulaw Encoder Page .................................................................................. 99 The Consumption Page .................................................................................... 100 The HTTP Streaming Page ............................................................................... 101 The HTTP Streamer (Audio and Video) Page ....................................................... 102 The HTTP Streamer (Audio Only) Page .............................................................. 103 The HTTP Streamer (Video Only) Page .............................................................. 104 The Disk (Audio and Video) Page ..................................................................... 105 The Disk (Audio Only) Page ............................................................................. 106 The Disk (Audio Only) Page ............................................................................. 107 The Icecast Streamer (Audio and Video) Page ...................................................... 108 The Icecast Streamer (Audio Only) Page ............................................................. 109 The Icecast Streamer (Video Only) Page ............................................................. 110 The Content License Page ................................................................................ 111 The On Demand Page ...................................................................................... 112 The Summary Page ......................................................................................... 113 The Administration Window ............................................................................. 114 Glossary ................................................................................................................ 116 II. Flumotion Components Reference .................................................................................. 118 I. Producer Components ........................................................................................... 120 audiotest-producer ........................................................................................... 121 firewire-producer ............................................................................................. 122 icecast-producer .............................................................................................. 124 loop-producer ................................................................................................. 125 soundcard-producer .......................................................................................... 126 tvcard-producer ............................................................................................... 128 videotest-producer ........................................................................................... 130 webcam-producer ............................................................................................ 132 II. Converter Components ......................................................................................... 134 repeater ......................................................................................................... 135 overlay-converter ............................................................................................ 136 III. Combiner Components ........................................................................................ 138 av-basic-watchdog-combiner ............................................................................. 139 av-switch-combiner .......................................................................................... 141 single-switch-combiner ..................................................................................... 143 IV. Encoder Components .......................................................................................... 144 dirac-encoder .................................................................................................. 145 jpeg-encoder ................................................................................................... 146 mulaw-encoder ............................................................................................... 147 smoke-encoder ................................................................................................ 148 speex-encoder ................................................................................................. 149 theora-encoder ................................................................................................ 150

iv

Flumotion manual

vorbis-encoder ................................................................................................ V. Muxer Components ............................................................................................. multipart-muxer .............................................................................................. ogg-muxer ..................................................................................................... VI. Consumer Components ....................................................................................... disk-consumer ................................................................................................. http-streamer .................................................................................................. http-server ...................................................................................................... shout2-consumer ............................................................................................. VII. Bouncer Components ........................................................................................ htpasswdcrypt-bouncer ..................................................................................... ical-bouncer ................................................................................................... ip-bouncer ...................................................................................................... VIII. Miscellaneous Components ............................................................................... porter ............................................................................................................ III. Flumotion Plugs Reference .......................................................................................... IX. AdminAction Plugs ............................................................................................ adminaction-loggerfile ...................................................................................... X. Bouncer Plugs .................................................................................................... bouncer-testtoken ............................................................................................ bouncer-trivial ................................................................................................ XI. Component Plugs ............................................................................................... component-cortado .......................................................................................... component-example ......................................................................................... XII. IdentityProvider Plugs ....................................................................................... identityprovider-example .................................................................................. XIII. Component Plugs ............................................................................................ manager-example ............................................................................................ manager-manhole ............................................................................................ XIV. RateController Plugs ........................................................................................ ratecontroller-fixed .......................................................................................... XV. RequestLogger Plugs ......................................................................................... requestlogger-file ............................................................................................ XVI. StreamData Plugs ............................................................................................ streamdataprovider-example .............................................................................. Bibliography ................................................................................................................... Index ............................................................................................................................

152 153 154 155 156 157 159 163 166 168 169 170 171 172 173 175 177 178 179 180 181 182 183 185 186 187 188 189 190 191 192 193 194 195 196 197 198

List of Figures
2.1. Starting the Configuration Assistant ................................................................................. 7 2.2. Starting a new Manager and Worker ............................................................................ 8 2.3. Connecting to the new Manager ...................................................................................... 9 2.4. The Configuration Assistant's Welcome Page ................................................................... 10 2.5. The Configuration Assistant's Scenario Page .................................................................... 11 2.6. The Configuration Assistant's Production Page, Showing Test Inputs .................................... 12 2.7. The Configuration Assistant's Summary Page .................................................................. 13 2.8. The Administration Window ......................................................................................... 14 2.9. Viewing the Streamed Content, Showing Test Inputs ......................................................... 15 3.1. Starting a new Manager and Worker .......................................................................... 17 3.2. Connecting to the new Manager .................................................................................. 18 3.3. The Configuration Assistant's Welcome Page ................................................................... 19 3.4. The Configuration Assistant's Scenario Page .................................................................... 20 3.5. The Configuration Assistant's Production Page ................................................................. 21 3.6. The Configuration Assistant's Webcam Page .................................................................... 22 3.7. The Configuration Assistant's Overlay Page ..................................................................... 23 3.8. The Configuration Assistant's Sound Card Page ............................................................... 24 3.9. Choosing Encoders ..................................................................................................... 25 3.10. The Configuration Assistant's Summary Page ................................................................. 26 3.11. The Administration Window ....................................................................................... 27 3.12. Viewing the Streamed Content .................................................................................... 28 4.1. The Flumotion Architecture .......................................................................................... 30 4.2. The Flumotion Architecture, with the Manager and Workers ............................................... 32 5.1. Service Configuration in Fedora Linux or Red hat Linux .................................................... 33 E.1. The Connection Window ............................................................................................. 76 E.2. Connecting to a recently opened Manager ..................................................................... 77 E.3. Starting a new Manager and Worker .......................................................................... 78 E.4. Starting a new Manager and Worker .......................................................................... 79 E.5. Connecting to the new Manager .................................................................................. 80 E.6. Authentication for a running Manager .......................................................................... 81 E.7. The Configuration Assistant's Welcome Page .................................................................. 82 E.8. The Configuration Assistant's Scenario Page ................................................................... 83 E.9. The Configuration Assistant's Production Page ................................................................ 84 E.10. The Configuration Assistant's Test Video Producer Page .................................................. 85 E.11. The Configuration Assistant's Webcam Page .................................................................. 86 E.12. The Configuration Assistant's TV Card Page ................................................................. 87 E.13. The Configuration Assistant's Firewire Video Page ......................................................... 88 E.14. The Configuration Assistant's Overlay Page ................................................................... 89 E.15. The Configuration Assistant's Test Audio Producer Page .................................................. 90 E.16. The Configuration Assistant's Sound Card Page ............................................................. 91 E.17. The Configuration Assistant's Firewire Audio Page ......................................................... 92 E.18. The Configuration Assistant's Encoding Page ................................................................. 93 E.19. The Configuration Assistant's Theora Encoder Page ........................................................ 94 E.20. The Configuration Assistant's Dirac Encoder Page .......................................................... 95 E.21. The Configuration Assistant's Smoke Encoder Page ........................................................ 96 E.22. The Configuration Assistant's JPEG Encoder Page .......................................................... 97 E.23. The Configuration Assistant's Vorbis Encoder Page ........................................................ 98 E.24. The Configuration Assistant's Speex Encoder Page ......................................................... 99 E.25. The Configuration Assistant's Mulaw Encoder Page ...................................................... 100 E.26. The Configuration Assistant's Consumption Page .......................................................... 101 E.27. The Configuration Assistant's HTTP Streaming Page ..................................................... 102

vi

Flumotion manual

E.28. The Configuration Assistant's HTTP Streamer (Audio and Video) Page ............................. E.29. The Configuration Assistant's HTTP Streamer (Audio Only) Page .................................... E.30. The Configuration Assistant's HTTP Streamer (Video Only) Page .................................... E.31. The Configuration Assistant's Disk (Audio and Video) Page ............................................ E.32. The Configuration Assistant's Disk (Audio Only) Page ................................................... E.33. The Configuration Assistant's Disk (Video Only) Page ................................................... E.34. The Configuration Assistant's Icecast Streamer (Audio and Video) Page ............................ E.35. The Configuration Assistant's Icecast Streamer (Audio Only) Page ................................... E.36. The Configuration Assistant's Icecast Streamer (Video Only) Page ................................... E.37. The Configuration Assistant's Content License Page ...................................................... E.38. The Configuration On Demand Page .......................................................................... E.39. The Configuration Assistant's Summary Page ............................................................... E.40. The Administration Window .....................................................................................

103 104 105 106 107 108 109 110 111 112 113 114 115

vii

Part I. Using Flumotion

Table of Contents
1. Introduction ................................................................................................................... 4 Introduction To Streaming ........................................................................................... 4 Introduction To Flumotion ........................................................................................... 4 2. Quick Start .................................................................................................................... 5 Installation ................................................................................................................ 5 Starting Flumotion ...................................................................................................... 6 3. Using The Assistant ....................................................................................................... 16 Detailed Example ...................................................................................................... 16 Summary ................................................................................................................. 28 4. Architecture ................................................................................................................. 30 Introduction ............................................................................................................. 30 Components ............................................................................................................. 30 Managers And Workers ............................................................................................. 32 5. Deployment .................................................................................................................. 33 Service scripts For Startup .......................................................................................... 33 Configuration Files ................................................................................................... 34 System Users ........................................................................................................... 44 Multiple Servers ....................................................................................................... 45 6. Usage Scenarios ............................................................................................................ 46 Live Streaming of a Conference .................................................................................. 46 On Demand Streaming Of Files .................................................................................. 50 7. Security ....................................................................................................................... 53 Authentication of Connections .................................................................................... 53 Transport Protocol Between Processes .......................................................................... 53 Firewall Issues ......................................................................................................... 54 8. Optimization and Performance ......................................................................................... 56 Component Locations ................................................................................................ 56 Limiting Bandwidth .................................................................................................. 56 System Configuration ................................................................................................ 57 9. Debugging and Troubleshooting ...................................................................................... 60 Debugging Flumotion ................................................................................................ 60 Troubleshooting Flumotion ......................................................................................... 65 A. Flumotion Services S.A. ................................................................................................ 67 B. Installing Extra Dependencies ......................................................................................... 68 Installing Python Modules .......................................................................................... 68 Testing Python Modules ............................................................................................ 69 Installing GStreamer plug-ins ...................................................................................... 70 C. Under the hood ............................................................................................................ 73 GStreamer ............................................................................................................... 73 Twisted ................................................................................................................... 73 D. Command-line Options .................................................................................................. 74 Starting the manager ................................................................................................. 74 Starting the worker ................................................................................................... 74 E. The Configuration Assistant ............................................................................................ 75 Flumotion Connections .............................................................................................. 75 The Welcome Page ................................................................................................... 81 The Scenario Page .................................................................................................... 82 The Production Page ................................................................................................. 83 The Test Video Producer Page .................................................................................... 84 The Webcam Page .................................................................................................... 85 The TV Card Page .................................................................................................... 86

Using Flumotion

The Firewire Video Page ........................................................................................... 87 The Overlay Page ..................................................................................................... 88 The Test Audio Producer Page .................................................................................... 89 The Sound Card Page ................................................................................................ 90 The Firewire Audio Page ........................................................................................... 91 The Encoding Page ................................................................................................... 92 The Theora Encoder Page .......................................................................................... 93 The Dirac Encoder Page ............................................................................................ 94 The Smoke Encoder Page .......................................................................................... 95 The JPEG Encoder Page ............................................................................................ 96 The Vorbis Encoder Page ........................................................................................... 97 The Speex Encoder Page ............................................................................................ 98 The Mulaw Encoder Page .......................................................................................... 99 The Consumption Page ............................................................................................ 100 The HTTP Streaming Page ....................................................................................... 101 The HTTP Streamer (Audio and Video) Page ............................................................... 102 The HTTP Streamer (Audio Only) Page ...................................................................... 103 The HTTP Streamer (Video Only) Page ...................................................................... 104 The Disk (Audio and Video) Page ............................................................................. 105 The Disk (Audio Only) Page ..................................................................................... 106 The Disk (Audio Only) Page ..................................................................................... 107 The Icecast Streamer (Audio and Video) Page .............................................................. 108 The Icecast Streamer (Audio Only) Page ..................................................................... 109 The Icecast Streamer (Video Only) Page ..................................................................... 110 The Content License Page ........................................................................................ 111 The On Demand Page .............................................................................................. 112 The Summary Page ................................................................................................. 113 The Administration Window ..................................................................................... 114 Glossary ........................................................................................................................ 116

Chapter 1. Introduction
Introduction To Streaming
Streaming allows people to watch video or listen to audio without waiting for an entire file to download. For instance, the later parts of a video will download while you are watching the first moments, so your media player always has enough data to continue playing the video without interruption. This is a better experience for viewers and a better use of broadcasters' bandwidth and processing power. Broadcasters typically wish to provide two forms of streaming content: Live streaming and on-demand streaming. For instance, a radio station might want to broadcast their audio live over the Internet, simultaneously as it is broadcast via FM radio. However, that same radio station might like to provide ondemand access to the archive of their recorded content.

Introduction To Flumotion
Flumotion can broadcast your content live or on-demand in a range of popular audio and video formats. It supports a wide range of input hardware thanks to its use of Linux, GStreamer and other open source software. You can get started quickly with Flumotion's simple user interface then just place a link to the streamed content on your website. Flumotion allows processing to be spread across multiple machines, so your platform can scale to handle more viewers of more streams in more formats. Its open source architecture makes it more efficient and more flexible than competing systems, making better use of your hardware. Flumotion can even stream Flash Video and Windows Media formats, which usually require their own specific server software. Capture from DVB-S or DVB-T inputs is also possible. Optional components allow you to require authentication or payment before viewing, or add advertisements or logos into the streamed content.

Chapter 2. Quick Start


This chapter will introduce you to Flumotion by showing how you might set up a simple streaming system on your local machine. In later chapters we will explain how you can customize the configuration.

Installation
Each Linux distribution has a slightly different method for installing software. Here are the installation instructions for some common Linux distributions. After installation, Flumotion should be available from the Application Sound & Video sub-menu on your panel. In addition, three binaries (flumotion-manager, flumotion-worker and flumotion-admin) should be available in your path.

Installation on Ubuntu Linux


To install Flumotion, open the Synaptic Package Manager from the System Administration sub-menu on the panel. First make sure that the Universe repository is enabled, by selecting the Settings Repositories menu item. Then find Flumotion in the package list, click the check box in the first column and select Mark for installation from the drop-down menu, and click Apply on the toolbar.

Note
Alternatively, just do sudo apt-get install flumotion from the command line Terminal.

Note
If you need a newer version of Flumotion that is not yet packaged officially by Ubuntu Linux, you might try using the Flumotion Ubuntu Linux repository, by adding this line to your /etc/apt/sources.list file, changing hardy appropriately if you are using a different version of Ubuntu Linux. deb http://www.flumotion.net/pkg/ubuntu hardy main You can add this line in the Synaptic Package Manager by selecting the Settings Repositories menu item, selecting the Third-Party Software tab, and clicking the Add button.

Installation on Fedora Linux or Red Hat Linux


To install Flumotion, open Add/Remove Software from the System Administration sub-menu on the panel. Then find Flumotion in the package list, in the Servers category, and click the Install button.

Note
Alternatively, as the root user, just do yum install flumotion from the command line Terminal.

Quick Start

Note
If you need a newer version of Flumotion that is not yet packaged officially by Fedora Linux, you might try using the Flumotion Fedora Linux repository, by following the Fedora download instructions at the gstreamer web site [http://gstreamer.freedesktop.org/download/ fedora5.html], which explain how to install new .repo files and import the GPG key.

Starting Flumotion
To start Flumotion, choose the Application Sound & Video Flumotion Streaming Server Administration menu item on your panel. This starts the Flumotion Connections Assistant.

A Simple Example
This example will show how to start a Flumotion streaming system with the simplest possible defaults, just to demonstrate the basics. You won't even need a camera or microphone because we will use some test inputs that provide computer-generated video and audio. When the Flumotion Configuration Assistant first starts, you will see this dialog.

Quick Start

Figure 2.1. Starting the Configuration Assistant

If you already had a Flumotion system running, then you could use this dialog to connect to it and administer it. But we will create a new Flumotion system by choosing the Start a new manager and connect to it option. On the next page, click Forward to start and connect. We will learn more about Managers and Workers in the Architecture chapter.

Quick Start

Figure 2.2. Starting a new Manager and Worker

After these processes have started, you will see a confirmation page before actually connecting to the manager.

Quick Start

Figure 2.3. Connecting to the new Manager

You will now see the detailed Configuration Assistant.

Quick Start

Figure 2.4. The Configuration Assistant's Welcome Page

Click the Forward button to see the first real page of the assistant, which allows you to choose a common scenario, such as Stream Live or Stream Files On Demand. We will choose the defaults Stream Live scenario so just click Forward to accept these defaults.

10

Quick Start

Figure 2.5. The Configuration Assistant's Scenario Page

The next page allows you to choose Production inputs. We will use the defaults - Test Video Producer and Test Audio Producer so just click Forward to accept these defaults.

11

Quick Start

Figure 2.6. The Configuration Assistant's Production Page, Showing Test Inputs

We don't need to change anything on the remaining pages, so you can now continue to click Forward until you reach the last page. You will pass pages for Test Video Producer settings, Overlay settings, Test Audio Producer settings, Encoding settings, Theora Encoder settings, Vorbis Encoder settings, Consumption settings (streaming or saving to disk), HTTP Streaming settings, HTTP Streaming (Audio & Video) settings, Content License settings, and then the Summary page.

12

Quick Start

Figure 2.7. The Configuration Assistant's Summary Page

After you click Apply, the Flumotion Administration window will open, showing all the components in your chosen Flumotion system. The icon for each component will gradually change as each component is started. If any component has a problem then the icon will indicate this and you can click on the component to see details.

13

Quick Start

Figure 2.8. The Administration Window

If you select the http-audio-video component you will see a clickable URL button on the righthand side, in the Statistics tab. Clicking this button should cause the appropriate client application to open and play the streaming video. For instance, the Totem Movie Player will open on most Linux systems. If you have no suitable player application, you can instead click on the http-server-audio-video server component to see an alternative URL. This plays the streamed content via a client-side Cortado Java applet embedded in an otherwise static web page.

14

Quick Start

Figure 2.9. Viewing the Streamed Content, Showing Test Inputs

When you have finished, stop all the components by selecting Manage Stop All from the menu, then close the window. See the Using The Assistant chapter for more details about the Configuration Assistant. See also the Administration Window section.

15

Chapter 3. Using The Assistant


The Simple Example section briefly showed the Configuration Assistant. In this chapter we will look again in more detail, changing some settings to stream our own video and audio instead of the test inputs. This assumes that you have a working camera and a microphone attached to your computer or built in to your computer. Flumotion uses XML configuration files that tell it what to do. This assistant helps to create a Flumotion configuration for simple scenarios such as live streaming of a single camera or on-demand streaming of preexisting video files. The assistant is not sophisticated enough to create more complex configurations that are often needed in the real world. For instance, you might need to stream the same video in multiple codecs and at multiple resolutions. However, the assistant should help you to become familiar with Flumotion and can be useful later to generate a fragment of a configuration file.

Detailed Example
As in the Simple Example section, choose the Application Sound & Video Flumotion Streaming Server Administration menu item on your panel then choose the Start a new manager and connect to it option. As the next page of the assistant explains, this starts a Flumotion Manager, and a Flumotion Worker which it manages. Clicking Forward will start these and connect to the Manager so we can specify what the worker should do. You will learn more about Flumotion Managers and Workers in the Architecture chapter.

16

Using The Assistant

Figure 3.1. Starting a new Manager and Worker

After these processes have started, you will see a confirmation page before actually connecting to the Manager.

17

Using The Assistant

Figure 3.2. Connecting to the new Manager

You will now see the detailed Configuration Assistant.

18

Using The Assistant

Figure 3.3. The Configuration Assistant's Welcome Page

Click the Forward button to see the first real page of the assistant, which allows you to choose a common scenario, such as Stream Live or Stream Files On Demand. We will choose the defaults Stream Live scenario so just click Forward to accept these defaults.

19

Using The Assistant

Figure 3.4. The Configuration Assistant's Scenario Page

The next page allows you to choose Production inputs. Choose Web Camera for Video and Sound Card for Audio. If you don't have a web camera or a sound card then you can choose the test producer for either of these. Flumotion supports a wide range of audio and video production devices.

20

Using The Assistant

Figure 3.5. The Configuration Assistant's Production Page

Click the Forward button to see the Webcam page, on which you can specify which webcam should be used, with what resolution and frame rate. The Size and Frame Rate drop-down controls will be filled with the choices supported by your camera. For this example, choose a size of 320 x 240 and a frame rate of 15fps or similar because the default settings would require too much processing power for the average desktop PC.

21

Using The Assistant

Figure 3.6. The Configuration Assistant's Webcam Page

In this screenshot you can also see the worker drop-down choice. This allows you to choose what computer this component should run on, for instance if the camera is attached to a different computer that is available via the network. This allows you to distribute tasks across several server computers. In this case we have just started a single local worker, so localhost is the only available choice. This assumes that the camera is attached to your current computer. See the Deployment chapter to learn how to create extra workers. The Configuration Assistant would then offer these workers in the drop-down choice after connecting to their manager. Click the Forward button to see the Overlay page and just click Forward again to accept its default values. The overlay converter allows you to overlay some text on top of the video, such as a broadcaster's name. You may also display some images at the bottom of the video, such as a Creative Commons logo.

22

Using The Assistant

Figure 3.7. The Configuration Assistant's Overlay Page

On the following Sound Card page, you can configure the sound inputs. Choose Microphone from the Input drop-down control. In most cases the other settings will already be correct.

23

Using The Assistant

Figure 3.8. The Configuration Assistant's Sound Card Page

Click the Forward button to see the Encoding page. Encoding compresses your stream to make better use of bandwidth than a raw stream and provides the content in a format expected by client players. In the Basic version of the Flumotion Streaming Server, we offer a choice of high-quality free codecs. Most are part of the Ogg family of codecs provided by xiph. The full version also supports a wide range of licensed proprietary codecs such as Windows Media, MP3 or Adobe Flash, to support common media player software.

24

Using The Assistant

Figure 3.9. Choosing Encoders

On this page, choose the default settings of Ogg, Theora and Vorbis. We'll use the default Ogg Theora format for Video and Ogg Vorbis for audio, so just click Forward to accept them. We don't need to change anything on the remaining pages, so you can now continue to click Forward until you reach the last page. You will pass pages for Theora Encoder settings, Vorbis Encoder settings, Consumption settings (streaming or saving to disk), HTTP Streaming settings, HTTP Streaming (Audio & Video) settings, Content License settings, and then the Summary page.

25

Using The Assistant

Figure 3.10. The Configuration Assistant's Summary Page

After you click Apply, the Flumotion Administration window will open, showing all the components in your chosen Flumotion system. The icon for each component will gradually change as each component is started. If any component has a problem then the icon will indicate this and you can click on the component to see details. You will see producer components to take audio and video input from your microphone and camera; encoder components to create Ogg Vorbis and Ogg Theora data from these inputs; a muxer component to combine the encoded audio and video data into one synchronized stream; and a httpaudio-video streamer component (a http-streamer) to stream that content to viewers via HTTP on port 8880. There is also a non-flow component, porter which simply listens on the port on behalf of the httpaudio-video streamer component, allowing multiple streamer components to provide content to the same port, but via different URLs, perceived by viewers as different pages on the same server.

26

Using The Assistant

Figure 3.11. The Administration Window

As described in the Simple Example section, you can select the http-audio-video component to see a clickable URL button on the right-hand side, suitable for a streaming client application, or you can instead click on the http-server-audio-video server component to see an alternative URL with a Java applet.

27

Using The Assistant

Figure 3.12. Viewing the Streamed Content

When you have finished, stop all the components by selecting Manage Stop All from the menu, then close the window. Alternatively you could just close the window to leave the streaming server running and later start Flumotion Streaming Server Administration again to reconnect to the manager, providing the default user/test username and password login.

Summary
The Flumotion Configuration Assistant is useful for a simple examples such as this, or to generate fragments of configuration files with the Export Configuration menu item. A real streaming system would often be more complicated and must be defined via XML configuration files. For instance, you may need to supply content for multiple client players (multiple codecs) and different bandwidths (different quality levels). You will also need to set up the Flumotion system as a service to run at start up. You can read more about these issues in the Deployment chapter.

28

Using The Assistant

The Flumotion Administration window also has an Import Configuration menu item. This is only useful for viewing the results of your edits to the XML files while creating a full Flumotion configuration. To administer a real running system you should instead just connect to a running Manager.

29

Chapter 4. Architecture
Introduction
A Flumotion system consists of several parts. This section introduces the relevant terminology and explains how the parts work together. This will help you to Deploy your Flumotion system.

Components
A single Flumotion system is called a Planet. It contains several components working together. Some of these are Feed components, for instance to receive data, encode it, and stream it. This group of Feed components is called a Flow. You could imagine it as a flowing river on the surface of the Planet. Each Flow component outputs data that is taken as an input by the next component in the Flow, transforming the data step by step. Other components may perform extra tasks, such as restricting access to certain users, or allowing users to pay for access to certain content (Bouncer components). This group of components is called an Atmosphere. Again, it is part of the Planet.

Note
Flumotion's planet metaphor does not go further than this. It only involves the flow and an atmosphere. This diagram shows a Planet with Components in both the Atmosphere and Flow.

Figure 4.1. The Flumotion Architecture

Feed Components
Feed components are arranged in a flow, connecting to each other in sequence. Each component may be in only one flow and must be connected to another component in the same flow. There are three types of feed components:

30

Architecture

Producer

A producer only produces stream data, usually in a raw format, though sometimes it is already encoded. The stream data can be produced from an actual hardware device (webcam, FireWire camera, sound card, etc), by reading it from a file, by generating it in software (test signals), or by importing external streams from Flumotion servers or other servers. A feed can be simple or aggregated. For example an aggregated feed might produce both audio and video. For example, an audio producer component (such as soundcard-producer) provides raw sound data from a microphone or other simple audio input. Likewise, a video producer (such as firewire-producer) provides raw video data from a camera.

Converter

A converter converts stream data. It can encode or decode a feed. It can combine feeds or feed components to make a new feed. It can change the feed by changing the content, overlaying images over video streams, compressing the sound, etc. For example, an audio encoder component (such as the vorbis-encoder) can take raw sound data from an audio producer component (such as the soundcard-producer) and encode it, for instance as Ogg Vorbis or MP3. The video encoder component (such as the theora-encoder) can encode data from a video producer component (such as the firewire-producer), for instance as Ogg Theora or MPEG. Note that combiner converters can take more than one feed. For instance, the single-switch-combiner component can take a master feed and a backup feed. If the master feed stops supplying data then it will output the backup feed instead. This could show a standard "Transmission Interrupted" page. Muxers are a special type of combiner component. For instance, the oggmuxer component combines audio and video (for instance, from vorbisencoder and theora-encoder) to provide one stream of audiovisual data, with the sound synchronized correctly to the video.

Consumer

A consumer only consumes stream data. It might stream a feed to the network, making it available to the outside world, or it could capture a feed to disk. For example, the http-streamer component can take encoded data (for instance, from a ogg-muxer component) and serve it via HTTP for viewers on the Internet. Other consumers, such as the shout2-consumer component can even make Flumotion streams available to other streaming platforms, such as IceCast.

Other Components
The other components are part of the Atmosphere. They provide additional functionality to flows and the manager and are not directly involved in creation or processing of the data stream. Here are some examples of other components: Bouncer A bouncer implements an authentication mechanism. It receives authentication requests from a component or manager and verifies that the requested action is allowed. A bouncer could be implemented using a standard htpasswd file, an LDAP username/password backend, or any other mechanism.

31

Architecture

For instance, the htpasswdcrypt-bouncer), controlled by an Apache-style htpasswd format uese crypted passwords.

Managers And Workers


A Flumotion system consists of a few server processes (daemons) working together. A Worker process creates processes for the Components, and a Manager process tells the Worker what to do. The Flumotion administration user interface connects to the Manager, which in turn controls the Workers, telling it to start and stop components. The components may be split across multiple machines, so there may be multiple Workers - usually one per machine. The entire system usually has only one Manager, on one of the machines. However, different arrangements, such as multiple workers and managers on one machine, are possible and may be useful in some circumstances in order to clearly separate different parts of your Flumotion system. This diagram shows the Planet again, with specific components grouped into Workers on separate computers, and a Manager to manage the workers.

Figure 4.2. The Flumotion Architecture, with the Manager and Workers

After the manager process starts, it starts an internal Bouncer component used to authenticate workers and components later on. Then it waits for incoming connections from workers. Then it can tell the workers to start their components. Those new components will also log in to the manager. Note that the Streamer Worker in this example would typically be outside of a corporate firewall, because client users on the Internet must connect to it directly to receive content. See the Firewall section for more details.

32

Chapter 5. Deployment
This section describes how to setup and configure Flumotion for a real-world streaming media environment. See also the Security and Usage Scenario chapters.

Service scripts For Startup


You can start and stop Flumotion using the service script at /etc/init.d/flumotion. For instance, use /etc/init.d/flumotion start to start Flumotion and /etc/init.d/flumotion stop to stop it. This script tells Flumotion to use the configuration files found in /etc/flumotion/ (see the Configuration Files section) and to write logs to /var/log/flumotion/. Your Linux distro probably starts Flumotion using this script at startup time. If it does not then you may use your Linux distro's graphical control panel to specify that this should happen, as described here.

The Services control panel in Fedora Linux


On Fedora Linux or Red Hat Linux you may use the Service Configuration control panel to start and stop the Flumotion service. Choose System+Administration Services from your panel. If you start Flumotion in this control panel then it will be started automatically at each system start.

Figure 5.1. Service Configuration in Fedora Linux or Red hat Linux

Specifying Service Startup Using the Command Line


Fedora Linux
Fedora Linux provides the chkconfig command, which helps with the administration of the /etc/ rc*.d/ directories, which specify the services that should start at boot time.

33

Deployment

For instance, you can specify that Flumotion should start at boot time with this command, as root: /sbin/ chkconfig flumotion on you can discover whether Flumotion is already specified to start at boot time with this command, as root: /sbin/chkconfig --list flumotion You can also use the service to start and stop Flumotion manually. For instance: /sbin/service flumotion start and /sbin/service flumotion stop

Generic Linux
On other Linux systems, such as Ubuntu Linux, you may edit the system's startup files directly. Assuming that you have a Flumotion service script at /etc/init.d/flumotion, you can cause this to be started when the system reaches a certain run level, by adding a symlink in the appropriate rc*.d/ directory. For instance,

cd /etc/rc2.d ln -s /etc/init.d/flumotion S20flumotion

Configuration Files
The /etc/flumotion directory contains a managers directory and a workers directory, which should both contain XML files. These files may be in sub-directories and may be split up into separate XML files. See the Managers and Workers section of the Architecture chapter.

The Manager's Configuration


The managers directory typically contains a sub-directory for each manager (usually only one), containing a planet.xml file. This file contains an XML node for the planet. This in turn contains nodes for the Planet's manager, atmosphere and flow, which themselves contain component nodes.

Note
Alternatively, the manager, flow and atmosphere nodes may be in separate XML files, also with parent planet nodes. These files will then be merged at runtime by Flumotion, without changing the files. This can make the configuration clearer. In the manager node, you can specify the manager's hostname and the port number and transport protocol that it should use, but you can usually just use the defaults. You should always use the default ssl transport protocol, for secure connections, unless you are running Flumotion on an embedded device with very restricted resources. By specifying localhost for the manager's hostname, you can also restrict access to workers that are running on the same computer, though this would rarely be appropriate for a real Flumotion system.

Components
Each component XML node specifies the component name and type, which worker process it should belong to, and what feeding component it should receive data from, along with the specific properties for the component type.

34

Deployment

See also the Components section of the Architecture chapter and the Components Reference section.

Eaters and Feeds


Each flow component, apart from producers (and apart from non-flow components such as bouncers), receives data from one or more other components. This data stream is called a Feed. The eater node specifies the name of the upstream component that feeds data to the component, in the child feed node. When the feeding component has more than one output (also known as a Feeder), the specific output must be named by placing it after the component name, separated by a colon. For instance, <eater><feed>firewire-producer:audio</feed></eater>.

Version
The component node's version attribute is optional. You might use this to specify the exact version of Flumotion that you are using, if you are using a component whose available properties are likely to change in a future version of Flumotion If you try to use the XML configuration file with another version of Flumotion then you will see a warning in the log files and in the administration UI. Flumotion also uses this version number to help it adapt when using a newer version of Flumotion, choosing to interpret the configuration as it would have been interpreted by the earlier version of Flumotion. However, you should eventually update the configuration for the new properties supported by the component.

Project
The component node's project attribute is optional, defaulting to "flumotion". This specifies the set of components from which the component is available, with "flumotion" being the core set. To use a component from an additional set, you should specify the name of that set for the project attribute. Additional components are available from the following sets: flumotion-bouncer flumotion-flash flumotionwindowsmedia Additional Bouncer components. Components for Flash video streaming. Components for WindowsMedia streaming.

Plugs
Plugs allow extra features to be added to components. Each component may have certain sockets which allow the component to use appropriate plugs. Likewise, each plug is compatible with a particular socket. For instance, see the Logging section, or the Limiting Bandwidth section.

Logging
Many components can output log files to disk. This is useful for troubleshooting, monitoring, or billing. For instance, this example specifies an apachelogger plug for the Logger socket of a http-server component, and specifies the logfile property for that plug.

35

Deployment

<component name="http-server-one" type="http-server" ... <plugs> <plug socket="flumotion.component.plugs.loggers.Logger" type="requestlogger-file"> <property name="logfile">/tmp/flumotion-one.log</property> </plug> </plugs> ... </component>

Inspecting Components and Plugs


You can discover information about a component type, including the list of Feeders that it provides, and the properties that you can set, and the sockets that it has, by using the flumotion-inspect command. This command can also provide information about a plug. For instance, flumotion-inspect firewire-producer.For instance:

$ flumotion-inspect firewire-producer Component: firewire-producer Produce feeds from a Firewire/DV device. Source: flumotion.component.producers.firewire.firewire in flumotion/component/producers/firewire Eaters: (None) Feeders: audio video dv Features: admin/gtk: admin_gtk.py:GUIClass component: firewire.py:Firewire wizard: wizard_gtk.py:FireWireWizardPlugin Properties: framerate: type fraction, optional The framerate (in fps) guid: type string, optional The GUID of the device (a hexadecimal like 0xhhhhhhhhhhhhhhhh) height: type int, optional The height to scale to is-square: type bool, optional Whether to scale to a 1:1 pixel aspect ratio

36

Deployment

scaled-width: type int, The width width: type int, The final

optional to scale to before correcting optional width, including correction

Clocking: Needs synchronisation: True Clock priority: 160 Sockets:

Repeaters
A repeater component can avoid excessive use of network bandwidth. For instance, if both a httpstreamer and disk-consumer component on a remote computer should use the same ogg-muxer component as their feeding component, an intermediate repeater component on the remote machine can be used as the feeding component instead. This means that the data is sent over the network only once, to the repeater component.

The Manager Bouncer


The manager node contains just one special component, for the manager-bouncer, which controls access to the manager from the worker processes. Because there is currently only one supported type of Manager Bouncer, the type attribute must be htpasswdcrypt-bouncer. For the htpasswdcrypt-bouncer, the user name and crypted password can be provided via a property node, setting the data property. For instance, this example shows the default username of "user" with the default password of "test"

<component name="manager-bouncer" type="htpasswdcrypt-bouncer"> <property name="data">user:PSfNpHTkpTx1M</property> </component> Alternatively, you may use an external file, by providing the file path as the value of a file property node. For instance,

<component name="manager-bouncer" type="htpasswdcrypt-bouncer"> <property name="file">/etc/flumotion/managers/default/htpasswd</property> </component> See the htpasswdcrypt-bouncer reference section. The workers must specify one of these user name and password combination when logging into the manager. See the Remote Workers Configuration section.

Note
You can create the credentials, including the crypted password, using the htpasswd command, as provided by the Apache web server package.

37

Deployment

For example, to create a file containing credentials for username someone and password s3kr3t, type this command in a terminal: htpasswd -d -c passwords someone The program will ask you to type the password twice: New password: Re-type new password: Adding password for user someone Check the generated file by typing cat passwords which will show: 1 someone:5jKUrPB0Xbzos Note that, while it is possible to specify passwords on the command line when creating this file, by using the -p option, this is bad for security reasons. The command line is visible to anyone logged in to the machine, as well as recorded in the shell's history.

Other Bouncers
All Flumotion systems should have a Manager Bouncer, as described in the Manager Bouncer section. Some systems may require additional bouncers, for instance to restrict access to the streamer component to certain users or IP addresses. These bouncer components should be declared in the atmosphere node rather than the flow node. For instance, you might add a htpasswdcrypt-bouncer component to the atmosphere like so: <planet> <atmosphere> <component name="streamer-bouncer" project="flumotion" type="htpasswdcrypt-bouncer" version="0.5.2.1" worker="localhost"> <property name="data"><testuser:Z5WEs3ezyz0E2> </property> </component> </atmosphere> You could then simply specify this bouncer as a property for the streamer components's node, causing the user's web browser or player to prompt the user for a username and password. For instance: <component name="http-audio" project="flumotion" type="http-streamer" version="0.5.2.1" worker="localhost"> ... <property name="bouncer">streamer-bouncer</property"> See the Manager Bouncer section for instructions to create the htpasswd string. You may instead specify a filename as a property, allowing you to update the list of allowed users and passwords from a different system. There is also an ip-bouncer Bouncer that can allow or deny ranges of IP addresses instead of demanding a password.

38

Deployment

Example
This example was exported from Flumotion's Configuration Assistant after choosing the test audio and video inputs. A node for the manager was then added. Example File [./examples/example_conf_planet_testinputs.xml]

<planet name="example-planet"> <manager name="example-planet-manager"> <!-- <host>something.somedomain</host> --> <!-- Uses the current hostname if not specified. --> <!-- <port>7531</port> --> <!-- Uses 7531 for SSL or 8642 for TCP if not specified. --> <!-- <transport>ssl</transport> --> <!-- Uses ssl if not specified. Otherewise tcp. --> <!-- <certificate>default.pem</certificate> --> <!-- Uses /etc/flumotion/default.pem if not specified. --> <component name="manager-bouncer" type="htpasswdcrypt-bouncer"> <property name="data">user:PSfNpHTkpTx1M</property> </component> </manager> <atmosphere> <component name="http-server-audio-video" type="http-server" label="http-server-audio-video" worker="localhost" project="flumotion" version="0.5.2.1"> <property name="porter-username">pycBUhaLQlwt</property> <property name="mount-point">/ogg-audio-video/cortado/</property> <property name="porter-password">nWbDPQzKKrMa</property> <property name="type">slave</property> <property name="porter-socket-path">flu-KbVvOp.socket</property> <property name="port">8800</property> <plugs> <plug socket="flumotion.component.plugs.base.ComponentPlug" type="component-cortado"> <property name="has-audio">True</property> <property name="buffer-size">40</property> <property name="stream-url">http://localhost:8800/ogg-audio-video/</property> <property name="framerate">5.0</property> <property name="height">240</property> <property name="codebase">http://localhost:8800/ogg-audio-video/cortado/</property> <property name="width">320</property> <property name="has-video">True</property>

39

Deployment

</plug> </plugs> </component> <component name="porter-http" type="porter" label="porter-http" worker="localhost" project="flumotion" version="0.5.2.1"> <property name="username">pycBUhaLQlwt</property> <property name="socket-path">flu-KbVvOp.socket</property> <property name="password">nWbDPQzKKrMa</property> <property name="port">8800</property> </component> </atmosphere> <flow name="default"> <component name="producer-audio" type="audiotest-producer" label="producer-audio" worker="localhost" project="flumotion" version="0.5.2.1"> <property name="volume">1.0</property> <property name="rate">44100</property> <property name="frequency">440</property> <clock-master>true</clock-master> </component> <component name="producer-video" type="videotest-producer" label="producer-video" worker="localhost" project="flumotion" version="0.5.2.1"> <property name="pattern">0</property> <property name="framerate">50/10</property> <property name="width">320</property> <property name="height">240</property> <clock-master>false</clock-master> </component> <component name="overlay-video" type="overlay-converter" label="overlay-video" worker="localhost" project="flumotion" version="0.5.2.1"> <eater name="default"> <feed alias="default">producer-video:default</feed> </eater> <property name="show-text">True</property>

40

Deployment

<property name="xiph-logo">True</property> <property name="text">Flumotion</property> <property name="cc-logo">True</property> <property name="height">240</property> <property name="width">320</property> <property name="fluendo-logo">True</property> <clock-master>false</clock-master> </component> <component name="encoder-video" type="theora-encoder" label="encoder-video" worker="localhost" project="flumotion" version="0.5.2.1"> <eater name="default"> <feed alias="default">overlay-video:default</feed> </eater> <property name="keyframe-maxdistance">10</property> <property name="sharpness">0</property> <property name="quality">16</property> <property name="noise-sensitivity">1</property> <clock-master>false</clock-master> </component> <component name="encoder-audio" type="vorbis-encoder" label="encoder-audio" worker="localhost" project="flumotion" version="0.5.2.1"> <eater name="default"> <feed alias="default">producer-audio:default</feed> </eater> <property name="bitrate">64000</property> <clock-master>false</clock-master> </component> <component name="muxer-audio-video" type="ogg-muxer" label="muxer-audio-video" worker="localhost" project="flumotion" version="0.5.2.1"> <eater name="default"> <feed alias="default">encoder-audio:default</feed> <feed alias="default-bis">encoder-video:default</feed> </eater> <clock-master>false</clock-master> </component> <component name="http-audio-video" type="http-streamer" label="http-audio-video"

41

Deployment

worker="localhost" project="flumotion" version="0.5.2.1"> <eater name="default"> <feed alias="default">muxer-audio-video:default</feed> </eater> <property name="porter-username">pycBUhaLQlwt</property> <property name="mount-point">/ogg-audio-video/</property> <property name="porter-password">nWbDPQzKKrMa</property> <property name="type">slave</property> <property name="porter-socket-path">flu-KbVvOp.socket</property> <property name="burst-on-connect">False</property> <clock-master>false</clock-master> <plugs> </plugs> </component> </flow> </planet>

The Workers' Configuration


The workers directory typically contains an XML file for the worker that runs on the computer, containing an XML node for the worker. This in turn contains nodes for the manager which the worker should login to, and an authentication node which specifies how this login should be done. You can specify the manager's port and transport protocol, but you can usually just use the defaults.

Note
The password is written as plaintext in the worker's configuration file but, as long as your worker is using the SSL transport protocol it is not actually passed over the network as cleartext. The actual list of components for the worker, and the properties for those components, is in the manager's configuration. The manager will tell the worker what components to start, with what properties, after the worker logs in to the manager. This keeps the majority of the configuration on one computer, where the manager runs. The feederport node specifies an additional range of ports that the worker may use for unencrypted TCP connections, after a challenge/response authentication. For instance a component in the worker may need to communicate with components in other workers, to receive feed data from other components. In some cases the worker may open up UDP ports in this range as well, for instance if a component is a clock master, used for synchronization. Two ports are usually enough.

Example
This is an example of the configuration file for a worker. Example File [./examples/example_conf_worker.xml]

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

42

Deployment

<!-You can override the name of the worker, which will typically be hostname:(xmlfilename) <worker name="default"> --> <manager> <!-This specifies what manager to log in to. Compare with command-line options. --> <host>somehost.somedomain</host> <!-- <port>7531</port> --> <!-- Defaults to 7531 for SSL or 8642 for TCP if not specified. --> <!-- <transport>ssl</transport> --> <!-- Defaults to ssl if not specified. --> </manager> <authentication type="plaintext"> <!-This specifies what authentication to use to log in. Compare with command-line options. --> <username>user</username> <password>test</password> </authentication> <feederports>8650-8651</feederports> <!-- A small port range for the worker to use as it wants. --> <debug>*:4</debug> </worker>

Setting Up Remote Flumotion Workers


One of the most powerful features of Flumotion is its ability to distribute work over many separate computers. In this section, we cover basic configuration instructions for Flumotion when used in this way. By default, the installation of Flumotion only allows connections to the manager from the local host, for security reasons. If you want to allow workers or administration clients to log in from other hosts then you should change the authentication settings and remove the host node from the manager's configuration file, usually at /etc/flumotion/managers/default/planet.xml. You should then tell the Flumotion workers to log into the remote manager by adding the needed configuration in the workers's configuration file, usually at /etc/flumotion/workers/ default.xml. When configured for remote connections this file will look something like this:

<worker> <manager> <host>stream.test.com</host>

43

Deployment

<port>7531</port> </manager> <authentication type="plaintext"> <username>user</username> <password>test</password> </authentication> </worker> In this example we have used stream.test.com as the example remote server where the manager is running and we are using the default Flumotion SSL port 7531.

Note
You could also connect the worker directly from the command line by using this syntax: flumotion-worker -H stream.test.com -P 7531 -u user -p test. You can get more information on these and other command line parameters by reading the flumotion-worker man page (type man flumotion-worker) or by running flumotionworker -h on the command line.

System Users
You should have a dedicated linux user for the Flumotion services, usually called Flumotion. This user should be specified when you setup the startup scripts. Make sure that the user has access to the audio and video devices for sound and video capture, for instance by making the special Flumotion user a member of the appropriate groups. Standard distribution packages, for instance with Ubuntu Linux or Fedora Linux, create this user with appropriate access to system devices.

Note
Some distributions, such as Ubuntu Linux and Debian Linux, make administration easier by having special audio, video, and plugdev groups with ownership of hardware devices. Any user which is a member of these groups may access these devices. However, some distributions, such as Fedora Linux and Red Hat Linux, do not have a sound, video or media group policy. For these Linux distributions, you'll need to do some extra configuration. You need to adjust permissions for these devices: /dev/snd* and /dev/mixer* for OSS (sound), /dev/video* for video devices and /dev/snd/* for ALSA (sound). Because Fedora Linux uses udev these changes will normally only last until you log out or shutdown, because Fedora only the current user has access to these devices by default. To make these modified permissions permanent, you may create your own media group and change the security setup for your distribution to use that group. There are several places you need to change for this to work. You could modify /etc/udev/permissions.d/50-udev.permissions and put your changes in /etc/udev/permissions.d/10-flumotion.permissions, which will then override the 50-udev.permissions.

44

Deployment

You should also look in /etc/security/console.perms to see what pam_console changes on login/logout.

Multiple Servers
Flumotion can distribute its work over several computers, making the best use of your hardware and network resources, and making it easier, for instance, to use multiple content inputs from different locations. See the Remote Workers Configuration section to learn how to configure a distributed Flumotion system, and see the Security chapter to be aware of other issues when deploying a distributed Flumotion system. The Flumotion Services company offers a remote management and support solution for these issues and can help integrate Flumotion with your existing systems.

45

Chapter 6. Usage Scenarios


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
A "line-level" [http://en.wikipedia.org/wiki/Line_level] audio input is a strong audio input, as opposed to a weaker microphone-level input. To know if your equipment provides a linelevel 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 linelevel 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.

46

Usage Scenarios

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
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 [./examples/example_conf_usage_conference_worker.xml]

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

47

Usage Scenarios

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 diskconsumer 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
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 [./examples/example_conf_usage_conference_manager.xml]

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

48

Usage Scenarios

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

49

Usage Scenarios

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

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

50

Usage Scenarios

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 ondemand 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
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
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 [http://www.iana.org/assignments/media-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 [./examples/example_conf_usage_ondemand_manager.xml]

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

51

Usage Scenarios

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

52

Chapter 7. Security
This chapter explains some of the security concepts used by Flumotion and mentions details that a network administrator would want to know or specify, such as port numbers used by Flumotion and the types of encryption used by network connections. Flumotion uses a secure setup by default but its users should be conscious of the basics of security, and should read this chapter to know how to configure Flumotion for maximum security. Remember, while it is possible to use Flumotion in a completely insecure mode, this would require you to actively set the configuration parameters to do so. For example, by default, Flumotion will use an SSL protocol so no communication is done in cleartext.

Authentication of Connections
In Flumotion, authentication is handled by bouncers components. For instance, the manager bouncer allows workers to log in to their managers and another type of bouncer allows viewers to see protected content via HTTP if a certain token parameter is set. See also the Remote Workers Configuration section.

The Manager Bouncer


The bouncer that handles authentication to the manager is always started as part of the manager configuration. It is unlike any other component in the planet, since it's not started by a worker process, but integrated into the manager daemon itself. Currently, Flumotion ships with only one supported manager bouncer type (htpasswdcryptbouncer), controlled by an Apache-style htpasswd format using crypted passwords. More types will be added in the future. See the Manager Bouncer Configuration section to learn how to specify allowed hosts, users and passwords.

Transport Protocol Between Processes


Managers, Workers and clients
Managers, workers and administration clients may communicate via one of two supported transport protocols: either TCP or SSL. By default Flumotion uses SSL, which encrypts the data so it is not easily readable by looking at the network traffic. You should use this default wherever possible. The transport protocol can be specified in the manager's XML configuration file and must then be specified in each worker's XML configuration file. See the Deployment chapter for more details about this part of the configuration files.

Note
Technically speaking, TCP is the transport protocol in both cases. SSL is a way of encrypting the actual TCP packets. In the context of Flumotion, however, we refer to both as protocols, where TCP is the standard TCP protocol (with plaintext communication), and SSL uses Secure Socket Layer on top of TCP.

53

Security

TCP is the least secure because any communication using this transport protocol is readable as plaintext on the network. This means that anyone with access to the traffic on your network can see authentication information, remote method calls, and other information exchanged between the various processes.

Warning
Because the TCP communication is visible as plaintext to anyone on the network, you should not use this transport except for testing, or in cases where you secure the communication through some other means (for example, through an SSH channel).

Generating The Certificate


For SSL communication to work, the manager needs a PEM certificate file. On startup, the manager looks for flumotion/default.pem under the system configuration sysconfdir directory. You can specify a different file using the --certificate parameter when starting the manager. When Flumotion is installed from a standard Linux distribution package, a default certificate file is generated for you, but at some point you may wish to regenerate this file. For instance, the Fedora Linux package currently just creates a dummy default.pem file using fake data, via openssl's make-dummy-cert program. You may generate a real RSA private key and certificate using openssl. For instance:

openssl req -newkey rsa:1024 -keyout private-key.txt -nodes -x509 -days 365 -out certificate.txt You will be asked to provide some details about yourself and your organization when running this command. Then combine the private key and the certificate into one default.pem file. For instance,

cat private-key.txt &gt; ${target} echo "" &gt;&gt; default.pem cat certificate.txt &gt;&gt; default.pem rm -f private-key certificate.txt

Components
Components communicate with each other via unencrypted TCP connections because encryption of audio and video data would have a large processor performance cost. You should consider this when designing your network. See the Firewall Issues section for more information. Of course, when the components are on the same machine, a localhost network socket is used. See the Optimizing component locations chapter for more information about which components should not communicate across the network because they would require too much network bandwidth.

Firewall Issues

54

Security

Your network probably uses firewalls to protect computers on your local network from unauthorized access from outside your network. Network administrators should read this section to learn how to configure Flumotion to run on their network, or how to adapt their network for Flumotion

Port Numbers
As described in the See the Manager Bouncer Configuration section, the workers communicate with their manager on a certain port. By default this port is 7531 for SSL, though this can be changed in the configuration if necessary for your network, or if you are running multiple managers on one machine. See also the Transport Protocols section. Each worker may also use some (usually a maximum of two) extra feederport ports to exchange actual unencrypted content data between components (after authentication). This range must be specified in the worker's configuration and each worker on the same machine must use a different range of feederport ports. Clients (viewers or listeners of your content) will also connect to your streaming component (such as a http-streamer component) via a port such as 80, just as they would connect to a traditional HTTP web server such as Apache. Therefore, that worker (containing the streaming component) would typically be outside of your firewall, with the minimum necessary services running. However, the streamer component must connect to an "upstream" feeding component (such as an encoder or muxer) on another machine. Note that, like all downstream components, the streamer connects to its feeding component, rather than the feeding component connecting to the streaming component. Therefore, the feeding component's port must be open on the firewall. Future versions of Flumotion might simplify firewall administration by allowing the feeding component to connect to the streaming component instead, avoiding the need to open the port in the firewall.

Note
You will probably want to stream some content on port 80, because that is the default HTTP port used by web browsers, making the URL simpler. But, as with a traditional web server, port numbers under 1024 may only be used by a root process, and you should not run any part of Flumotion as root. But you may stream on another port, such as 8800 (via the porter component, and then redirect to port 80, for instance with iptables. The porter component thus allows multiple streamer components to serve content on the same port, such as port 80, via different URLs. For instance, here is an example entry for iptables:

# Add nat section for redirecting port 80 to 8800: *nat -I PREROUTING -p tcp --dport 80 -j REDIRECT --to 8800 COMMIT

55

Chapter 8. Optimization and Performance


Component Locations
Feeding components provide data to other components. Some components, such as video producers, provide large amounts of raw data. You should avoid sending this raw data over the network where possible. For instance, try to place the encoder component on the same computer as the producer, so that only the smaller encoded data stream travels over the network. Of course, this is not always possible if you are encoding in multiple formats. The components' properties can affect how much bandwidth they would need to send data across the network. A high bit rate, resolution, and frame rate will generally produce large amounts of data. For instance, a firewire-producer component will produce 245 MBit/sec if set to 720x568 pixels, 24 bits per pixel, and 25 frames per second (PAL). On the other hand, a firewire-producer component set to 384x288 resolution (Quarter PAL) will produce only 61 MBit/sec of data. Higher resolutions and frame rates will also cause a higher processor load so you will need a fast machine to encode high quality streams. However, each component runs in parallel in a separate process, so Flumotion will make use of multiple CPUs and multiple CPU cores. However, the actual CPU load is dependent on the input signal, because more complicated content will require more processor time to encode. You should monitor the load on the CPUs, avoiding a CPU load of over 70%.

Limiting Bandwidth
The amount of data served by a streaming component can vary over time depending on the content, because more complicated content can not be compressed as much as simple content. It is therefore difficult to predict how much bandwith will be needed even when limiting the number of client users. However, Flumotion can limit the total bandwidth of a component to prevent it from becoming excessive. This is a helpful guarantee in case your estimates for maximum bandwidth could be incorrect or if you wish to optimize for a more common case. For instance, this example shows the use of the ratecontroller-fixed plug with a http-server component, to restrict its bandwidth to 200,000 bits per second.

<component name="http-server-one" type="http-server" ... <plugs> <plug socket="flumotion.component.misc.httpserver.ratecontroller.RateController" type="ratecontroller-fixed"> <property name="rate">200000</property> </plug> </plugs> ... </component>

56

Optimization and Performance

System Configuration
This section explains how to fine tune some Linux system configuration parameters for improved performance.

File Descriptors
The streaming components use one file descriptor for each active client connection, such as an individual viewing your video. Hence, the limit on the number of file descriptors per process also limits the number of client connections per process. A Linux system has a global limit on the number of open file descriptors which is defined in the kernel and global system configuration. Linux systems also typically have per-process limits which can be different for particular users or groups of users. There is both a soft and hard limit. The hard limit specifies the upper limit to which a process can raise its soft limit. The current limit for your process can be discovered using the ulimit -n command in a terminal. Typically, systems are limited to 1024 open file descriptors for each non-root process. Depending on the system you run on, this limit can be changed in various ways. On most distributions of Linux, such as Fedora Linux, Red Hat Linux, and Ubuntu Linux, , this limit can be changed like so: 1. Edit /etc/security/limits.conf as root. At the end of the file, add a line that reads flumotion nofile 8192

Replace flumotion with the username (or group name, prefixed with @) that the server will run under. Replace 8192 with the maximum number of open file descriptors you want to allow. 2. Verify that this works by doing the following: On Fedora Linux or Red Hat Linux, as root: su -s /bin/bash -c "ulimit -n" flumotion On Ubuntu Linux: sudo su -s /bin/bash -c "ulimit -n" flumotion This will show the allowed number of open file descriptors: 8192

Note
Due to the way PAM 1 and sshd are set up by default on Fedora Linux and Red Hat Linux, you might not be able to log in to this account any more using ssh. So let's correct that: 1. Edit /etc/pam.d/sshd as root. Make sure this file contains a line that reads

57

Optimization and Performance

session 2.

required

pam_limits.so

Edit /etc/ssh/sshd_config as root. Turn off privilege separation by adding the following line

UsePrivilegeSeparation no 3. Restart the ssh daemon:

[root@server root]# service sshd restart Stopping sshd: Starting sshd: [root@server root]# 4. Verify that it works by trying to log in through ssh as the user:

[ [

OK OK

] ]

[flumotion@server flumotion]$ ssh localhost flumotion@localhost's password: [flumotion@server flumotion]$ ulimit -n 8192

Memory limits
Like all software, Flumotion and its dependencies can never be completely free of all bugs. In extreme cases, GStreamer might cause Flumotion to fail by trying to allocate too much memory, for instance due to a demuxing error or a programming error. If you are lucky, the number is sufficiently small and the buffer can be allocated from actual RAM. If you're slightly less lucky, the number is so big that the machine just doesn't have enough RAM and swap to allocate, and the program terminates. (6 hours of CD quality audio is more than 4 GB). If you're really unlucky, the number is huge, but in between your available RAM and your available RAM + swap. In that case, the allocation will succeed, and this will drive your machine into a huge swap storm as soon as the buffer gets written to. The same file that controls limits on the number of file descriptors can also control the amount of memory a process of a user is allowed to take. The current virtual memory limit for your process can be inspected using ulimit -v in bash(1). Most Linux distributions have this set to unlimited by default.

Linux systems using PAM


On systems that use PAM, this limit can be changed: 1. Edit /etc/security/limits.conf as root. At the end of the file, add a line that reads

flumotion

as

512000

Replace flumotion with the username (or group name, prefixed with @) that the server will run under. Replace 512000 with the maximum number of KB that you want to allow.

58

Optimization and Performance

2.

Verify that this works by doing the following as root: On Fedora Linux or Red Hat Linux, as root: su -s /bin/bash -c "ulimit -v" flumotion On Ubuntu Linux: sudo su -s /bin/bash -c "ulimit -v" flumotion Which will show the number of KB that a process is allowed to allocate:

512000

59

Chapter 9. Debugging and Troubleshooting


This chapter explains various methods for debugging problems with Flumotion. Though we are always working to make the server more robust and improve the quality of the feedback through our setup and configuration tools, you might sometimes need to do some investigation to diagnose your problem.

Debugging Flumotion
Many things can go wrong when streaming. Flumotion depends on a large stack of underlying technologies to function perfectly for your configuration. There is a huge array of hardware devices, drivers and libraries out there. So when something goes wrong it can be caused by anything from unsupported hardware, broken hardware, incomplete drivers to untested library versions. Fluendo and the Flumotion community are only able to test a small subset of the options available out there, so if you are not running a tested configuration you might run into problems. This chapter should help you debug such problems, and help you resolve them.

Debug levels
Flumotion and GStreamer log events at five different levels of increasing verbosity. 0: No debug output at all. 1: Only errors (default) 2: Errors and warnings 3: Errors, warnings and info messages 4: Errors, warnings, info, and debugging messages 5: Everything Logging of events is also done in different categories. This allows you to log only certain events at a higher debug level than others. The debug variable can be set to a comma-separated list of category:level pairs. For example, to set the logging to level 3 for all categories, but to 4 for the admin category, component, you could run a workerwith

FLU_DEBUG=*:3,admin:4 flumotion-worker -u user -p test > worker.log 2>&1

Debugging on the Flumotion level


When Flumotion fails to run correctly the first place to start looking is, of course, at Flumotion itself. Even if the failure is caused by something further down the stack, Flumotion's internal error messages might be able to tell you what the problem is. The Flumotion log files are by default placed under the /var/log/flumotion directory. The manager log is by default called 'manager.default.log' and the workerlog is called 'worker.default.log'.

60

Debugging and Troubleshooting

Inside these log files you will see information on the workings of the Flumotion server, with the level of detail depending on the log level used. By default relatively little information is stored in these files so in many cases you will need to increase the logging level in order to get enough information to solve the problem. There are two ways of increasing the amount of debug information in the log files. The simplest is adding <debug>5</debug> to the top of your default.xml file under /etc/flumotion/workers, just underneath the <worker> tag. The other way is to set an environment variable, FLU_DEBUG, for your process. This is the equivalent of setting <debug>5</debug> in the worker default.xml file.

Debugging GStreamer problems


Sometimes Flumotion problems are caused by issues originating from the GStreamer multimedia framework that Flumotion is built upon. And while these issues might not be in GStreamer, but even further down the stack, like the DV camera interfacing library or the video4linux driver for your specific camera, debugging at the GStreamer level will often help you identify your problem. Applications like Flumotion can make use of the extensive GStreamer debugging system to debug pipeline problems. Elements will write output to this system to log what they're doing. It's not used for error reporting, but it is very useful for tracking exactly what an element is doing, which can come in handy when debugging Flumotion issues. The GST_DEBUG environment variable is used to turn on GStreamer debugging.

GST_DEBUG=*:5 flumotion-worker -u user -p test > worker.log 2>&1

Also here the * can be replaced by a component name to get only debugging information related to that component written. For example, oggmux:5 would turn on debugging for the Ogg muxer element. If as a result of reading the generated log files, you think that the cause of your problems are GStreamer plugins or elements not working as expected, there is a nice command line tool in GStreamer called gstlaunch which you can use to do some manual tests. For instance if you are unsure if the v4l plugin is providing Flumotion with the needed data flow from your TV card you can test it by running a command like this:

gst-launch v4lsrc device=/dev/video0 ! ffmpegcolordec ! ximagesink

This pipeline tries to access the video0 Linux device and run the output through a color space converter then output it to the x window terminal. If this fails you know that either the GStreamer plugin or the v4l driver in question is broken somehow; the reported error might even tell you which.

Debugging other parts of the system


Sometimes neither Flumotion or GStreamer level debug output lets you understand why things are not working, although they should at least give you a better understanding of where in the stack the problem is to be found. We can not give you lot of general debugging advice for these underlying libraries except to suggest you look at their documentation and mailing lists for information. Sometimes even just searching for Google for information about your hardware device and Linux will turn up information about driver problems etc., with your specific hardware.

61

Debugging and Troubleshooting

Reading log files


Here are some tips to read Flumotion log files. First of all, make sure you are looking at a relevant part of the log file. The log files contain all the accumulated logging from multiple runs. Typically you are just interested in the current run you are analyzing. The manager, worker and job processes log four specific points in their lifetime at level 3 (INFO) that you can search for in the logs: The process is starting. This gets logged as early as possible. If you want to check the logs for the last run, you go to the end of the log file and search backwards for this marker. Example:

INFO

[17204] manager Mar 01 15:37:52 Starting manager 'planet' (flumotion/manager/main.py:253)

The process has started. From this point on, the process should keep running on its own; any case where it stops without being told to stop is a bug in the software and should be filed and fixed. Example:

INFO

[17226] worker Mar 01 15:41:07 Started worker 'localhost' (flumotion/worker/main.py:315)

The process has been told to stop, and will now begin cleanup. For example, the workerwill wait for its child jobs to terminate.

INFO

[17226] worker Mar 01 15:43:40 Stopping worker 'localhost' (flumotion/worker/main.py:329)

The process is ready to terminate. This is the last point it logs before exiting. INFO [13329] job Mar 01 14:42:26 Stopped job '/default/producer-audio' (flumotion/job/main.py:96)

Look for important errors first. Start by searching for ERROR and WARN. Start with the first ones you see after the starting point.

Analyzing core dumps


Sometimes Flumotion will encounter a bug and core dump. This happens because of a bug in the lower layers - GStreamer, the Python interpreter, a support library, ... It is important for the Flumotion developers to get a good stack trace from this core dump to be able to locate and fix the bug. To do this, you need to generate a stack trace from the core dump. When this happens in a component, the UI will show a message like this one:

The component crashed. The core dump is '/var/cache/flumotion/core.21328' on the host running 'localhost'.

62

Debugging and Troubleshooting

Posted on Mon 24 Mar 2008 05:58:15 PM CET.

To produce a backtrace, you need to launch gdb on python with the given core file, like this:

# gdb python /var/cache/flumotion/core.21328 GNU gdb Red Hat Linux (6.3.0.0-1.122rh) Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-redhat-linux-gnu"...Using host libthread_db library "/lib/libthread_db.so.1".

Core was generated by `/usr/bin/python /usr/bin/flumotion-job /default/video-encoder-ogg /tmp/flumotion'. Program terminated with signal 11, Segmentation fault. #0 0x4f40388a in _int_free (av=0xb3f00010, mem=0xb3f82230) at malloc.c:4410 4410 unlink(nextchunk, bck, fwd); (gdb) thread apply all backtrace Thread 5 (process 28840): #0 0x008b2410 in ?? () #1 0xbfea3a38 in ?? () #2 0x00000008 in ?? () #3 0x00000004 in ?? () #4 0x4f45ecac in *__GI___poll (fds=0x4f4ceff4, nfds=4, timeout=8) at ../sysdeps/unix/sysv/linux/poll.c:87 #5 0x4f736363 in g_main_context_iterate (context=0xa0935d8, block=1, dispatch=1, self=0x9fc7120) at gmain.c:2849 #6 0x4f7366d9 in IA__g_main_loop_run (loop=0xa127bd0) at gmain.c:2751 #7 0x006138ec in _wrap_g_main_loop_run (self=0xb7fd4a50) at pygmainloop.c:257 #8 0x4f587b72 in PyEval_EvalFrame (f=0xa0ea86c) at Python/ceval.c:3547 #9 0x4f588748 in PyEval_EvalCodeEx (co=0xb7d54760, globals=0xb7d4b3e4, locals=0x0, args=0xa1d588c, argcount=1, kws=0xa1d5890, kwcount=0, defs=0xb7c56c18, defcount=1, closure=0x0) at Python/ceval.c:2736 #10 0x4f586afb in PyEval_EvalFrame (f=0xa1d5714) at Python/ceval.c:3656 #11 0x4f588748 in PyEval_EvalCodeEx (co=0xb7b7f9a0, globals=0xb7b5af0c, locals=0x0, args=0xb7cd0638, argcount=1, kws=0xa1cb6a8, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2736 #12 0x4f53a5ae in function_call (func=0xb7affe64, arg=0xb7cd062c, kw=0xb7cfd13c) at Objects/funcobject.c:548 #13 0x4f522587 in PyObject_Call (func=0xb7affe64, arg=0xb7cd062c, kw=0xb7cfd13c) at Objects/abstract.c:1795 #14 0x4f585c38 in PyEval_EvalFrame (f=0x9f845e4) at Python/ceval.c:3840 #15 0x4f588748 in PyEval_EvalCodeEx (co=0xb7f5cda0, globals=0xb7f5b13c, locals=0x0, args=0x9fa08f0, argcount=2, kws=0x9fa08f8, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2736 #16 0x4f586afb in PyEval_EvalFrame (f=0x9fa074c) at Python/ceval.c:3656 #17 0x4f588748 in PyEval_EvalCodeEx (co=0xb7f5cde0, globals=0xb7f5b13c,

63

Debugging and Troubleshooting

locals=0x0, args=0x9f9d8ec, argcount=1, kws=0x9f9d8f0, kwcount=0, defs=0xb7f64718, defcount=3, closure=0x0) at Python/ceval.c:2736 #18 0x4f586afb in PyEval_EvalFrame (f=0x9f9d79c) at Python/ceval.c:3656 #19 0x4f588748 in PyEval_EvalCodeEx (co=0xb7f5ca20, globals=0xb7fb0824, locals=0xb7fb0824, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2736 #20 0x4f5887d3 in PyEval_EvalCode (co=0xb7f5ca20, globals=0xb7fb0824, locals=0xb7fb0824) at Python/ceval.c:484 #21 0x4f5a5538 in run_node (n=Variable "n" is not available. ) at Python/pythonrun.c:1265 #22 0x4f5a6c48 in PyRun_SimpleFileExFlags (fp=0x9f68008, filename=0xbfea5c4c "/usr/bin/flumotion-job", closeit=1, flags=0xbfea4914) at Python/pythonrun.c:860 #23 0x4f5a732a in PyRun_AnyFileExFlags (fp=0x9f68008, filename=0xbfea5c4c "/usr/bin/flumotion-job", closeit=1, flags=0xbfea4914) at Python/pythonrun.c:664 #24 0x4f5add55 in Py_Main (argc=3, argv=0xbfea49e4) at Modules/main.c:493 #25 0x080485b2 in main (argc=0, argv=0x0) at Modules/python.c:23 Thread 4 (process #0 0x008b2410 in #1 0xb7a1f4e8 in #2 0x00000000 in 28842): ?? () ?? () ?? ()

Thread 3 (process 28843): #0 0x008b2410 in ?? () #1 0xb6d11148 in ?? () #2 0xffffffff in ?? () #3 0x00000003 in ?? () #4 0x4f45ecac in *__GI___poll (fds=0x4f4ceff4, nfds=3, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:87 #5 0x0030e4ef in gst_fdset_wait (set=0xa47bc00, timeout=-1) at gstfdset.c:523 #6 0x00312b29 in gst_multi_fd_sink_thread (sink=0xa4a8210) at gstmultifdsink.c:2269 #7 0x4f7508ef in g_thread_create_proxy (data=0xa470998) at gthread.c:582 #8 0x4f6e23b6 in start_thread (arg=0xb6d11ba0) at pthread_create.c:261 #9 0x4f46833e in ?? () from /lib/libc.so.6 Thread 2 (process #0 0x008b2410 in #1 0xb4a4e438 in #2 0x00000003 in #3 0x00000000 in 28846): ?? () ?? () ?? () ?? ()

Thread 1 (process 14372): #0 0x4f40388a in _int_free (av=0xb3f00010, mem=0xb3f82230) at malloc.c:4410 #1 0x4f40741d in *__GI___libc_free (mem=0xb3f82230) at malloc.c:3447 #2 0x00817126 in theora_comment_query () from /usr/lib/libtheora.so.0 #3 0x00835910 in theora_decode_header () from /usr/lib/libtheora.so.0 #4 0x0082a724 in theora_clear () from /usr/lib/libtheora.so.0 #5 0x002f61aa in theora_enc_reset (enc=0xa4a6078) at theoraenc.c:314 #6 0x002f838b in theora_enc_chain (pad=0xa1f30e0, buffer=0xa41b510) at theoraenc.c:871 #7 0x41044ab9 in gst_pad_chain_unchecked (pad=0xa1f30e0, buffer=0xa41b510)

64

Debugging and Troubleshooting

at gstpad.c:3459 0x410451ab in gst_pad_push (pad=0xa1f3020, buffer=0xa41b510) at gstpad.c:3625 #9 0x004f73c5 in gst_base_transform_chain (pad=0xa1f3560, buffer=0xa41b510) at gstbasetransform.c:1606 #10 0x41044ab9 in gst_pad_chain_unchecked (pad=0xa1f3560, buffer=0xa41b510) at gstpad.c:3459 #11 0x410451ab in gst_pad_push (pad=0xa1f34a0, buffer=0xa41b510) at gstpad.c:3625 #12 0x004f73c5 in gst_base_transform_chain (pad=0xa1f33e0, buffer=0xa41b510) at gstbasetransform.c:1606 #13 0x41044ab9 in gst_pad_chain_unchecked (pad=0xa1f33e0, buffer=0xa41b510) at gstpad.c:3459 #14 0x410451ab in gst_pad_push (pad=0xa1f3320, buffer=0xa41b510) at gstpad.c:3625 #15 0x00152c3a in gst_gdp_depay_chain (pad=0xa1f3260, buffer=0xa46f868) at gstgdpdepay.c:315 #16 0x41044ab9 in gst_pad_chain_unchecked (pad=0xa1f3260, buffer=0xa46f868) at gstpad.c:3459 #17 0x410451ab in gst_pad_push (pad=0xa1f31a0, buffer=0xa46f868) at gstpad.c:3625 #18 0x004f2996 in gst_base_src_loop (pad=0xa1f31a0) at gstbasesrc.c:1601 #19 0x4105dd66 in gst_task_func (task=0xb55d4598, tclass=0xa470698) at gsttask.c:192 #20 0x4f75236c in g_thread_pool_thread_proxy (data=0xa219c78) at gthreadpool.c:158 #21 0x4f7508ef in g_thread_create_proxy (data=0xa343328) at gthread.c:582 #22 0x4f6e23b6 in start_thread (arg=0xb544fba0) at pthread_create.c:261 #23 0x4f46833e in ?? () from /lib/libc.so.6 (gdb) #8

Create a bug report about the issue, including the output of gdb.

Troubleshooting Flumotion
This chapter will try to list some common issues you might encounter when trying to run Flumotion and provide solutions and workarounds for them.

Firewire Cameras
One common problem many people encounter is when trying to access their FireWire cameras. The problem is that Flumotion is not able to detect your FireWire device because the device creation for FireWire does not work on many current distributions. Check if you have a /dev/raw1394 device. If not create, it by using this command:

[root@server root]# mknod -m 666 /dev/raw1394 c 171 0

Flumotion worker refuse to start


A problem you might encounter after Flumotion has been stopped in an uncontrolled way, for instance due to a software crash, server failure, or you killing the Flumotion processes, is that the Flumotion

65

Debugging and Troubleshooting

workerrefuses to start. A common reason for this is that the pid file of the old process is still present. You need to manually remove it before you are allowed to restart the Flumotion worker. You can find the pid files in /var/run/flumotion. Make sure all Flumotion processes are stopped/removed before deleting the pid files manually.

device node /dev/raw1394 does not exist


Some udev based distributions like Fedora Core do not properly detect and create the needed device for Firewire cameras to work. This issue have been reported upstream and is being fixed. While waiting for the fix to be introduced you can solve it by running this command as root.

mknod -m 666 /dev/raw1394 c 171 0

GStreamer error: Could not open device xy for reading and writing
Some distributions, like Fedora Core, do not have permissions set up to allow Flumotion, when run under a separate user, to have read and write access to the needed devices like /dev/dsp*, /dev/mixer*, /dev/ video* and so on. You can change this by running chmod commands as root. For example:

chmod +rw /dev/dsp*

66

Appendix A. Flumotion Services S.A.


Flumotion Services S.A. is the company that develops and maintains the Flumotion software. They can help you deploy and administer Flumotion systems, providing additional Flumotion components and utilities where necessary, and integrating with your existing systems. For large customers, their Flumotion Streaming Platform deals with issues encountered when streaming a large amount of content to a large number of users, controlling access to content and dealing with billing for the users. For instance, when streaming a popular sporting event. The Flumotion Streaming Platform use clustering and load balancing software to distribute the load over several worker computers, allowing more simultaneous viewers than would be possible with a single streaming server. The Flumotion Streaming Platform can also transcode content automatically, simplifying on-demand streaming when you wish to provide the content in many formats and many quality levels. Transcoding is also available as a separate service via FTP. See flumotion-services

67

Appendix B. Installing Extra Dependencies


Installing Python Modules
Installing Python modules on Fedora Linux
On Fedora Linux, most Python modules are available in packages whose names start with python-. You can use yum to search for matching packages available to install. For example, if you want to install the dateutil module: # yum search dateutil Loaded plugins: refresh-packagekit ============================== Matched: dateutil =============================== python-dateutil.noarch : Powerful extensions to the standard datetime module

If it is available, you can install it (as root): # yum install -y python-dateutil Loaded plugins: refresh-packagekit fedora | 2.4 kB updates | 2.3 kB Setting up Install Process Parsing package install arguments Resolving Dependencies --> Running transaction check ---> Package python-dateutil.noarch 0:1.2-2.fc9 set to be updated --> Finished Dependency Resolution Dependencies Resolved ============================================================================= Package Arch Version Repository Size ============================================================================= Installing: python-dateutil noarch 1.2-2.fc9 fedora 165 k Transaction Summary ============================================================================= Install 1 Package(s) Update 0 Package(s) Remove 0 Package(s) Total download size: 165 k Downloading Packages:

00:00 00:00

68

Installing Extra Dependencies

(1/1): python-dateutil-1.2-2.fc9.noarch.rpm Running rpm_check_debug Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Installing : python-dateutil Installed: python-dateutil.noarch 0:1.2-2.fc9 Complete!

| 165 kB

00:00

[1/1]

Installing Python modules on Ubuntu Linux


On Ubuntu Linux, most Python modules are available in packages whose names start with python-. You can use the Synaptic Package Manager to search for matching packages available to install. On the command-line you may also use apt and apt-search. For example, if you want to install the dateutil module:

$ apt-cache search dateutil python-dateutil - powerful extensions to the standard datetime module

If it is available, you can install it:

$ sudo apt-get install python-dateutil Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: python-dateutil 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 0B/211kB of archives. After this operation, 422kB of additional disk space will be used. Selecting previously deselected package python-dateutil. (Reading database ... 366470 files and directories currently installed.) Unpacking python-dateutil (from .../python-dateutil_1.3-1_all.deb) ... Setting up python-dateutil (1.3-1) ...

Testing Python Modules


Once you have installed the package that provides the python module, you can test the installation by starting a Python interpreter and trying to import the module by hand. If the module is properly installed then you will be able to import it without any errors:

69

Installing Extra Dependencies

$ python Python 2.5.1 (r251:54863, Jun 15 2008, 18:24:56) [GCC 4.3.0 20080428 (Red Hat 4.3.0-8)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import dateutil >>>

If the module is not properly installed, then you will see an error when trying to import it:

$ python Python 2.5.1 (r251:54863, Jun 15 2008, 18:24:56) [GCC 4.3.0 20080428 (Red Hat 4.3.0-8)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import dateutil Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named dateutil >>>

Installing GStreamer plug-ins


Installing GStreamer plugins on Fedora Linux
On Fedora Linux, most gstreamer plugins are available in packages whose names start with gstreamerplugins-. You can use yum to search for matching packages available to install. For example, if you want to install the schroedinger plugin:

# yum search schroedinger Loaded plugins: refresh-packagekit ============================ Matched: schroedinger ============================= gstreamer-plugins-schroedinger.i386 : GStreamer Plugins that implement Dirac : video encoding and decoding schroedinger.i386 : Portable libraries for the high quality Dirac video codec schroedinger-devel.i386 : Development files for schrodinger

If it is available, you can install it (as root):

# yum install -y gstreamer-plugins-schroedinger Loaded plugins: refresh-packagekit Setting up Install Process Parsing package install arguments Resolving Dependencies --> Running transaction check ---> Package gstreamer-plugins-schroedinger.i386 0:1.0.3-2.fc9 set to be updated --> Processing Dependency: libschroedinger-1.0.so.0 for package: gstreamer-plugins-schroedinger

70

Installing Extra Dependencies

--> Running transaction check ---> Package schroedinger.i386 0:1.0.3-2.fc9 set to be updated --> Finished Dependency Resolution Dependencies Resolved ============================================================================= Package Arch Version Repository Size ============================================================================= Installing: gstreamer-plugins-schroedinger i386 1.0.3-2.fc9 updates 40 k Installing for dependencies: schroedinger i386 1.0.3-2.fc9 updates 211 k Transaction Summary ============================================================================= Install 2 Package(s) Update 0 Package(s) Remove 0 Package(s) Total download size: 250 k Downloading Packages: (1/2): gstreamer-plugins-schroedinger-1.0.3-2.fc9.i386.r | 40 kB (2/2): schroedinger-1.0.3-2.fc9.i386.rpm | 211 kB Running rpm_check_debug Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Installing : schroedinger Installing : gstreamer-plugins-schroedinger Installed: gstreamer-plugins-schroedinger.i386 0:1.0.3-2.fc9 Dependency Installed: schroedinger.i386 0:1.0.3-2.fc9 Complete!

00:00 00:00

[1/2] [2/2]

Installing GStreamer plugins on Ubuntu Linux


On Ubuntu Linux, most GStreamer plugins are available in packages whose names start with gstreamer0.10-plugins-. You can use the Synaptic Package Manager to search for matching packages available to install. On the command-line you may also use apt and apt-search. For example, if you want to install the schroedinger plugin:

$ apt-cache search schroedinger gstreamer0.10-schroedinger - GStreamer plugin for encoding/decoding of Dirac video streams libschroedinger-1.0-0 - library for encoding/decoding of Dirac video streams libschroedinger-dev - library for encoding/decoding of Dirac video streams (development files)

71

Installing Extra Dependencies

libschroedinger-doc - library for encoding/decoding of Dirac video streams (documentation) oggconvert - Convert media files to free formats

If it is available, you can install it:

$ sudo apt-get install gstreamer0.10-schroedinger Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: python-kiwi librrd2 python-rrd flumotion-flashplayer cortado Use 'apt-get autoremove' to remove them. The following NEW packages will be installed: gstreamer0.10-schroedinger 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 0B/35.4kB of archives. After this operation, 160kB of additional disk space will be used. Selecting previously deselected package gstreamer0.10-schroedinger. (Reading database ... 367640 files and directories currently installed.) Unpacking gstreamer0.10-schroedinger (from .../gstreamer0.10-schroedinger_1.0.1-2_i386.deb) ... Setting up gstreamer0.10-schroedinger (1.0.1-2) ...

72

Appendix C. Under the hood


Flumotion uses two technologies to pull everything together. The distributed nature and network abstraction is provided by Twisted. 1 The streaming and data handling is handled by GStreamer. 2

GStreamer
The processing and streaming of large amounts of data is what takes up the most processing power. Hence it needs to be very optimized. GStreamer is written in C and has been tested extensively in a number of projects. GStreamer has a pipeline-based architecture, where elements are linked to handle a media flow through the pipeline. The parts used by Flumotion are suitably optimized to run as efficiently as possible, so that Flumotion can handle large volumes of data and clients.

Twisted
All functionality not directly used to stream, but related to the streams, is written in Python using Twisted. Since processes like session setup, client connection, or authentication are not continuous and relatively light-weight, Python is ideally suited as a language to implement them in. Furthermore, Twisted, which is a Python framework, provides a very good network abstraction layer as well as a lot of additional functionality. Twisted makes the distribution of components over multiple workers easy. Every component gets executed as a Twisted process, running from a main loop in an actual process. Currently each component gets its own main loop. Twisted is event-based, and the various components are all written to integrate with the main loop.

1 2

Twisted is a framework, written in Python, for writing networked applications. See twisted-home. GStreamer is a multimedia framework written in C. See gstreamer-home.

73

Appendix D. Command-line Options


Starting the manager
You may start a flumotion Manager with the flumotion-manager command, and then use ps to check that it is up and running. For instance:

[root@server root]# flumotion-manager -d 3 path/to/planet.xml 2> manager.log & [root@server root]# ps -ef|grep flumotion-manager root 7188 7148 1 18:24 pts/2 00:00:01 /usr/bin/python /usr/bin/flumotion-manager /etc/flumotion/managers/default/planet.xml This command does four things: It starts the manager with logging output. All informational, warning and error messages will be output. It starts the manager with the configuration as specified in planet.xml. An example configuration file is included with the source distribution. This file describes the configuration of the planet to be managed. Among other things, this specifies the authentication information for components logging in to the manager. 1 All output is redirected to a manager.log log file. This allows you to see all the log messages the manager generates using a standard text viewer. The manager process is started in the background using &.

Starting the worker


The next step is starting a worker. For instance: [root@server root]# flumotion-worker -d 3 -u user -p test > worker.log & [root@server root]# ps -ef|grep flumotion-worker root 8316 8072 19 18:36 pts/2 00:00:01 /usr/bin/python /usr/bin/flumotion-worker -u user -p test In this example, you provide authentication information in the form of a username and a password on the command line. This information must match the corresponding authentication information with which the manager was started. This information can also be specified in a configuration file for the worker.

74

Appendix E. The Configuration Assistant


Flumotion uses XML configuration files that tell it what to do. The configuration assistant helps to create a Flumotion configuration for simple scenarios such as live streaming of a single camera or free on-demand streaming of pre-existing video files. The assistant is not sophisticated enough to create more complex configurations that are often needed in the real world. For instance, you might need to stream the same video in multiple codecs and at multiple resolutions. However, the assistant should help you to become familiar with Flumotion and can be useful later to generate a fragment of a configuration file. This section describes each stage of the configuration assistant. The assistant pages are not described in any particular order because not all assistant pages will appear, depending on the choices made in previous page. See also the See the Simple Example and Detailed Example sections.

Flumotion Connections
This window allows you to connect to a running Flumotion manager to administer that Flumotion system, or to start a new manager and worker and then configure them via the configuration assistant. Choose an option and then click Forward.

75

The Configuration Assistant

Figure E.1. The Connection Window

The Open recent connection option allows you to specify a running Manager and connect to it by selecting the manager from a list of previously opened Managers. After you click Forward, the Flumotion Administration window will open, showing the chosen components int the running Flumotion system.

76

The Configuration Assistant

Figure E.2. Connecting to a recently opened Manager

The Connect to a running manager option allows you to specify a running Manager and connect to it by entering a hostname and port for the Manager. After you click Connect, the Flumotion Administration window will open, showing the chosen components int the running Flumotion system.

77

The Configuration Assistant

Figure E.3. Starting a new Manager and Worker

The Start a new manager and connect to it option starts a Flumotion Manager, and a Flumotion Worker which it manages. Clicking Forward will start these and connect to the Manager so you can specify what the worker should do via the Configuration Assistant. You can learn more about Flumotion Managers and Workers in the Architecture chapter.

78

The Configuration Assistant

Figure E.4. Starting a new Manager and Worker

Starting New Processes


If you chose to start new processes then you will see a confirmation page before actually connecting to the Manager. After clicking Forward you will see the detailed Configuration Assistant.

79

The Configuration Assistant

Figure E.5. Connecting to the new Manager

Authentication
If you chose to connect to a recent or running processes then you will see an authentication page before actually connecting to the Manager. After entering the Username and Password correctly, click Forward to see the detailed Configuration Assistant.

80

The Configuration Assistant

Figure E.6. Authentication for a running Manager

The Welcome Page


This is the first page of the Configuration Assistant. The configuration assistant helps to create a Flumotion configuration for simple scenarios such as live streaming of a single camera or free on-demand streaming of pre-existing video files. Click the Forward button to see the first real page of the assistant.

81

The Configuration Assistant

Figure E.7. The Configuration Assistant's Welcome Page

The Scenario Page


This page allows you to choose a common scenario, such as Stream Live or Stream Files On Demand. After choosing an option, click Forward to see the next page. After this point you will see different pages depending on which option you chose, starting with either the On Demand page, or the Production page.

82

The Configuration Assistant

Figure E.8. The Configuration Assistant's Scenario Page

The Production Page


This page allows you to choose Production inputs for audio and video, such as Web Camera for Video and Sound Card for Audio. This is the raw data that will be combined, encoded, and then streamed by subsequent components. Flumotion supports a wide range of audio and video production devices. If you wish to stream only audio or video then you may deselect the Audio or Video option. When you click Forward, the following pages will be different, depending on your choices for the the inputs here. Those following pages will allow you to provide more specific details.

83

The Configuration Assistant

Figure E.9. The Configuration Assistant's Production Page

The Test Video Producer Page


This page allows you to specify details for the test video signal. Use the Width and Height to specify the video dimensions, in pixels. The Frame Rate fields specifies how many frames per second should be provided by the video signal. The Pattern drop-down choice lets you choose the content of the test signal. For instance, you may choose the familiar SMTPE color bars, a Random simulation of TV "snow", or a simple black screen. The worker drop-down choice allows you to choose what computer this component should run on, for instance if the camera is attached to a different computer that is available via the network. This allows you to distribute tasks across several server computers. See the Deployment chapter to learn how to create extra workers. The Configuration Assistant would then offer these workers in the dropdown choice after connecting to their manager. See also the videotest-producer component reference documentation.

84

The Configuration Assistant

Figure E.10. The Configuration Assistant's Test Video Producer Page

The Webcam Page


On this page you can specify which webcam should be used to provide the raw video data, with what resolution and frame rate. Remember that a higher resolution and higher frame rate will produce more data, requiring more processing power and more network bandwidth. After a short delay, while Flumotion checks what webcams are connected to the worker computer, the Size and Frame Rate drop-down controls will be filled with the choices supported by your camera. The Device drop-down choice lets you choose a different webcam. If no such webcam exists then you will see a warning on this page. If a valid webcam device is chosen then a description of that camera will be shown on this page. The Size drop-down choice lets you choose a resolution supported by the selected webcam. Flumotion will then take raw video data from the webcam at that resolution. The Frame Rate drop-down choice lets you choose the number of frames per second supported by the selected webcam at the selected resolution. The worker drop-down choice allows you to choose what computer this component should run on, for instance if the camera is attached to a different computer that is available via the network. This allows you to distribute tasks across several server computers. See the Deployment chapter to learn how to create extra workers. The Configuration Assistant would then offer these workers in the dropdown choice after connecting to their manager. See also the webcam-producer component reference documentation.

85

The Configuration Assistant

Figure E.11. The Configuration Assistant's Webcam Page

The TV Card Page


On this page you can specify which TV card should be used to provide the raw video data, with what resolution and frame rate. Remember that a higher resolution and higher frame rate will produce more data, requiring more processing power and more network bandwidth. The TV Norm field allows you to choose to receive either PAL or NTSC data from the TV card. The Video Source field allows you to choose between multiple inputs, if the TV card supports more than one. For instance, you may see choices for Television, Composite or S-Video. The Device drop-down choice lets you choose a different TV card. If no such TV card exists then you will see a warning on this page. If a valid TV card device is chosen then a description of that TV card will be shown on this page. The Size drop-down choice lets you choose a resolution supported by the selected TV card. Flumotion will then take raw video data from the TV card at that resolution. The Frame Rate drop-down choice lets you choose the number of frames per second supported by the selected TV card at the selected resolution. The worker drop-down choice allows you to choose what computer this component should run on, for instance if the camera is attached to a different computer that is available via the network. This allows you to distribute tasks across several server computers. See the Deployment chapter to learn how to create extra workers. The Configuration Assistant would then offer these workers in the dropdown choice after connecting to their manager.

86

The Configuration Assistant

See also the tvcard-producer component reference documentation.

Figure E.12. The Configuration Assistant's TV Card Page

The Firewire Video Page


On this page you can specify which Firewire/DV device should be used to provide the raw video data, with what resolution and frame rate. Remember that a higher resolution and higher frame rate will produce more data, requiring more processing power and more network bandwidth. The Scaled Height field allows you to scale the video resolution down in case the default Firewire resolution would require more bandwidth or processing than you wish to use. The Convert To Square Pixels option allows you to optimize the output for your intended client players. or data does not use perfectly square pixels, but square-pixel content is clearer on monitors that display square pixels, such as most non-widescreen monitors. The Width Correction options allow you to optimize the raw data for your intended encoder, which may require the video's width and height to be a multiple of 8. If you need width correction then Pad is usually the best choice because it just adds additional black space at the edge of the video, instead of distorting the main content by stretching. The Frame Rate fields lets you choose the number of frames per second for the raw video data produced by the Firewire device.

87

The Configuration Assistant

The worker drop-down choice allows you to choose what computer this component should run on, for instance if the camera is attached to a different computer that is available via the network. This allows you to distribute tasks across several server computers. See the Deployment chapter to learn how to create extra workers. The Configuration Assistant would then offer these workers in the dropdown choice after connecting to their manager. See also the firewire-producer component reference documentation.

Figure E.13. The Configuration Assistant's Firewire Video Page

The Overlay Page


This page allows you to overlay some text on top of the video, such as a broadcaster's name. You may also display some images at the bottom of the video, such as a Creative Commons logo. To overlay text over the video, select the Show text in the upper left corner option and enter your text in the field. Select the Show logos in the bottom right corner option to overlay Creative Commons and Flumotion logos over the video.

88

The Configuration Assistant

The worker drop-down choice allows you to choose what computer this component should run on, for instance if the camera is attached to a different computer that is available via the network. This allows you to distribute tasks across several server computers. See the Deployment chapter to learn how to create extra workers. The Configuration Assistant would then offer these workers in the dropdown choice after connecting to their manager. See also the overlay-converter component reference documentation.

Figure E.14. The Configuration Assistant's Overlay Page

The Test Audio Producer Page


This page allows you to specify details for the test audio signal, which is a simple constant audio tone. You may specify the Frequency (in Hertz) and Volume of the tone, as well as its Sample Rate in Herz. Remember that a higher sample rate will produce more data, requiring more processing power and more network bandwidth. The worker drop-down choice allows you to choose what computer this component should run on, for instance if the camera is attached to a different computer that is available via the network. This allows you to distribute tasks across several server computers. See the Deployment chapter to learn how to create extra workers. The Configuration Assistant would then offer these workers in the dropdown choice after connecting to their manager. See also the audiodtest-producer component reference documentation.

89

The Configuration Assistant

Figure E.15. The Configuration Assistant's Test Audio Producer Page

The Sound Card Page


On this page you can configure the sound inputs. For instance, you might choose the Microphone from the Input drop-down control. This page is rather technical, and may depend on the correct configuration of your computer's sound system. The Sound System drop-down choice lets you choose between the ALSA and OSS sound systems. Unless you have a good reason not to, you should use the default ALSA sound system. In case you have multiple sound cards, you may choose the appropriate card from the Device drop-down choice. If no such device exists then you will see a warning on this page. The Input drop-down choice lets you choose which of the inputs to use from your sound card. For instance, your sound card may have inputs for a microphone or CD. The Channels drop-down choice lets you choose either a Mono or Stereo sound input. The Sample Rate and Bit-depth drop-down choices let you specify the quality of the raw sound input. Remember that a higher sample rate and bit-depth will produce more data, requiring more processing power and more network bandwidth. The worker drop-down choice allows you to choose what computer this component should run on, for instance if the camera is attached to a different computer that is available via the network. This allows you to distribute tasks across several server computers. See the Deployment chapter to learn how to create extra workers. The Configuration Assistant would then offer these workers in the dropdown choice after connecting to their manager.

90

The Configuration Assistant

See also the soundcard-producer component reference documentation.

Figure E.16. The Configuration Assistant's Sound Card Page

The Firewire Audio Page


This page has no configuration parameters, so you can simply click Forward to move to the next page. The worker drop-down choice allows you to choose what computer this component should run on, for instance if the camera is attached to a different computer that is available via the network. This allows you to distribute tasks across several server computers. See the Deployment chapter to learn how to create extra workers. The Configuration Assistant would then offer these workers in the dropdown choice after connecting to their manager. See also the firewire-producer component reference documentation.

91

The Configuration Assistant

Figure E.17. The Configuration Assistant's Firewire Audio Page

The Encoding Page


On this page you can specify how your stream should be encoded, making best use of bandwidth and providing the content in a format expected by client players. In the Basic version of the Flumotion Streaming Server, we offer a choice of high-quality free codecs. Most are part of the Ogg family of codecs provided by xiph. The full version also supports a wide range of licensed proprietary codecs such as Windows Media, MP3 or Adobe Flash, to support common media player software. The Format drop-down choice lets you choose a container format for the stream. When you select a Format, the Video and Audio drop-down choices will be filled with the encodings supported by the chosen Format. The Video drop-down lets you specify a video encoding for your stream. The Audio drop-down lets you specify an audio encoding for your stream.

92

The Configuration Assistant

Figure E.18. The Configuration Assistant's Encoding Page

The Theora Encoder Page


On this page you can specify how your raw video data should be encoded with the Theora codec, choosing either a target Bit Rate or a target Quality. Most people prefer to target a bit rate because it makes bandwith consumption more predictable. However, targeting quality instead allows the encoder to choose a relatively constant quality level for the video stream, irrespective of the bit rate or other properties of the stream. For example, increasing the width and height in the producer while keeping the bit rate constant will decrease the end quality of the stream. But keeping the quality constant, while changing width and height, will increase the bitrate of the stream, but keep the same quality. The Bit Rate field may take a number of Kilobits per second. It is very hard to recommend a suitable bitrate because it depends on a number of factors, including the width and height of the video, and the amount of movement in the content, as well as your total available bandwidth and the bandwidth of your viewers. The Quality field may take a value between 0 and 63, with higher values meaning higher quality with less loss of detail. The worker drop-down choice allows you to choose what computer this component should run on, for instance if the camera is attached to a different computer that is available via the network. This allows you to distribute tasks across several server computers. See the Deployment chapter to learn how to create extra workers. The Configuration Assistant would then offer these workers in the dropdown choice after connecting to their manager.

93

The Configuration Assistant

See also the theora-encoder component reference documentation.

Figure E.19. The Configuration Assistant's Theora Encoder Page

Advanced Settings
Click the Advanced expander to see additional settings. You might edit these fields to adjust the stream for particular content or clients, if you are very familiar with the behavior of the Theora codec. The Time Between Key Frames field allows you to reduce playback latency by specifying a shorter time between key frames, at the cost of a higher bit rate or lower quality. The Noise Sensitivity field allows more precise control of this aspect of the quality. Smaller values cause increased quality, at the cost of a higher bit rate. The Sharpness field allows you to request sharper images, at the cost of a higher bit rate. See also the Quality field.

The Dirac Encoder Page


On this page you can specify how your raw video data should be encoded with the Dirac codec. The Bit Rate field may take a number of Kilobits per second. It is very hard to recommend a suitable bitrate because it depends on a number of factors, including the width and height of the video, and the amount of movement in the content, as well as your total available bandwidth and the bandwidth of your viewers. The worker drop-down choice allows you to choose what computer this component should run on, for instance if the camera is attached to a different computer that is available via the network. This allows

94

The Configuration Assistant

you to distribute tasks across several server computers. See the Deployment chapter to learn how to create extra workers. The Configuration Assistant would then offer these workers in the dropdown choice after connecting to their manager. See also the dirac-encoder component reference documentation.

Figure E.20. The Configuration Assistant's Dirac Encoder Page

The Smoke Encoder Page


On this page you can specify how your raw video data should be encoded with the Smoke encoder, which generates JPEG frames and delta frames. You may enter percentage values in the Minimum Quality and Maximum Quality fields. Higher quality levels will require more network bandwidth. The Threshold fields specifies how much each 16x16 block of pixels may differ before a new block is generated. A higher value will cause more blocks to stay the same for more frames, decreasing bandwidth usage, but producing less accurate output. The Time Between Key Frames field allows you to reduce playback latency by specifying a shorter time between key frames, at the cost of a higher bit rate or lower quality. The worker drop-down choice allows you to choose what computer this component should run on, for instance if the camera is attached to a different computer that is available via the network. This allows you to distribute tasks across several server computers. See the Deployment chapter to learn how to create extra workers. The Configuration Assistant would then offer these workers in the dropdown choice after connecting to their manager.

95

The Configuration Assistant

See also the smoke-encoder component reference documentation.

Figure E.21. The Configuration Assistant's Smoke Encoder Page

The JPEG Encoder Page


On this page you can specify how your raw video data should be encoded with the JPEG encoder. The Quality field takes a percentage value. A higher quality levels will require more network bandwidth. The Frame Rate field takes a number of frames per second. A higher frame rate will require more network bandwidth. The worker drop-down choice allows you to choose what computer this component should run on, for instance if the camera is attached to a different computer that is available via the network. This allows you to distribute tasks across several server computers. See the Deployment chapter to learn how to create extra workers. The Configuration Assistant would then offer these workers in the dropdown choice after connecting to their manager. See also the jpeg-encoder component reference documentation.

96

The Configuration Assistant

Figure E.22. The Configuration Assistant's JPEG Encoder Page

The Vorbis Encoder Page


On this page you can specify how your raw audio data should be encoded with the Vorbis codec, choosing either a target Bit Rate or a target Quality. Most people prefer to target a bit rate because it makes bandwith consumption more predictable. However, targeting quality instead allows the encoder to choose a relatively constant quality level for the audio stream, regardless of the bit rate or other properties of the stream. The Bit Rate field may take a number of Kilobits per second. It is very hard to recommend a suitable bitrate because it depends on a number of factors, including the sounds in the content, as well as your total available bandwidth and the bandwidth of your viewers. The Quality field may take a value between 0 and 1.0, with higher values meaning higher quality with less loss of detail. The worker drop-down choice allows you to choose what computer this component should run on, for instance if the camera is attached to a different computer that is available via the network. This allows you to distribute tasks across several server computers. See the Deployment chapter to learn how to create extra workers. The Configuration Assistant would then offer these workers in the dropdown choice after connecting to their manager. See also the vorbis-encoder component reference documentation.

97

The Configuration Assistant

Figure E.23. The Configuration Assistant's Vorbis Encoder Page

The Speex Encoder Page


On this page you can specify how your raw audio data should be encoded with the Speex codec, choosing a target Bit Rate. The Bit Rate field may take a number of Kilobits per second. It is very hard to recommend a suitable bitrate because it depends on a number of factors, including the sounds in the content, as well as your total available bandwidth and the bandwidth of your viewers. The worker drop-down choice allows you to choose what computer this component should run on, for instance if the camera is attached to a different computer that is available via the network. This allows you to distribute tasks across several server computers. See the Deployment chapter to learn how to create extra workers. The Configuration Assistant would then offer these workers in the dropdown choice after connecting to their manager. See also the speex-encoder component reference documentation.

98

The Configuration Assistant

Figure E.24. The Configuration Assistant's Speex Encoder Page

The Mulaw Encoder Page


The Mulaw encoder has no configuration parameters, so you can simply click Forward to move to the next page. The worker drop-down choice allows you to choose what computer this component should run on, for instance if the camera is attached to a different computer that is available via the network. This allows you to distribute tasks across several server computers. See the Deployment chapter to learn how to create extra workers. The Configuration Assistant would then offer these workers in the dropdown choice after connecting to their manager. See also the mulaw-encoder component reference documentation.

99

The Configuration Assistant

Figure E.25. The Configuration Assistant's Mulaw Encoder Page

The Consumption Page


On this page you can specify how the encoded (and combined) audio and video should be consumed, for instance by viewers as a HTTP stream. You may choose the Stream Over HTTP, Save To Disk, or Stream to Icecast2 options, choosing more than one option if necessary. If you chose both audio and video on the Production page, then you may now select an option here to provide either Audio & Video, Audio only or Video only. Again, you may choose more than one option, to provide multiple streams or files. The worker drop-down choice allows you to choose what computer this component should run on, for instance if the camera is attached to a different computer that is available via the network. This allows you to distribute tasks across several server computers. See the Deployment chapter to learn how to create extra workers. The Configuration Assistant would then offer these workers in the dropdown choice after connecting to their manager.

100

The Configuration Assistant

Figure E.26. The Configuration Assistant's Consumption Page

The HTTP Streaming Page


On this page you can specify how the audio and video should be streamed via HTTP, for instance by setting upper limits for simultaneous users and bandwith use. The Port field specifies the network port on which the content will be served. Select the User Limit option to specify the maximum number of clients that may simultaneously view the stream. Select the Bandwidth Limit option to specify the maximum Megabits per second that may be streamed by all clients in total. Select the Burst on Connect option send buffered data to new clients. This reduces the delay before playback starts but increases the latency. The worker drop-down choice allows you to choose what computer this component should run on, for instance if the camera is attached to a different computer that is available via the network. This allows you to distribute tasks across several server computers. See the Deployment chapter to learn how to create extra workers. The Configuration Assistant would then offer these workers in the dropdown choice after connecting to their manager. See also the http-streamer component reference documentation.

101

The Configuration Assistant

Figure E.27. The Configuration Assistant's HTTP Streaming Page

The HTTP Streamer (Audio and Video) Page


On this page you can specify extra details for the HTTP Stream. You will see this page if you selected Audio and Video HTTP Streaming on the Consumption Page. The Mount Point field specifies the second part of the URL from which the files will be available. >For instance, on the www.example.com server, with an /ogg-audio-video/ mount point, on port 8880, the stream would then be available from the http://www.example.com:8800/oggaudio-video/ URL. Select the Publish embedded java player page option to serve an additional HTTP page containing a Cortado java player applet, avoiding the need for your users to install a suitable client player. This will be available at a /cortado/ URL at your mount point. The worker drop-down choice allows you to choose what computer this component should run on, for instance if the camera is attached to a different computer that is available via the network. This allows you to distribute tasks across several server computers. See the Deployment chapter to learn how to create extra workers. The Configuration Assistant would then offer these workers in the dropdown choice after connecting to their manager. See also the http-streamer component reference documentation.

102

The Configuration Assistant

Figure E.28. The Configuration Assistant's HTTP Streamer (Audio and Video) Page

The HTTP Streamer (Audio Only) Page


On this page you can specify extra details for the HTTP Stream. You will see this page if you selected Audio Only HTTP Streaming on the Consumption Page. The Mount Point field specifies the second part of the URL from which the files will be available. >For instance, on the www.example.com server, with an /ogg-audio/ mount point, on port 8880, the stream would then be available from the http://www.example.com:8800/ogg-audio/ URL. Select the Publish embedded java player page option to serve an additional HTTP page containing a Cortado java player applet, avoiding the need for your users to install a suitable client player. This will be available at a /cortado/ URL at your mount point. The worker drop-down choice allows you to choose what computer this component should run on, for instance if the camera is attached to a different computer that is available via the network. This allows you to distribute tasks across several server computers. See the Deployment chapter to learn how to create extra workers. The Configuration Assistant would then offer these workers in the dropdown choice after connecting to their manager. See also the http-streamer component reference documentation.

103

The Configuration Assistant

Figure E.29. The Configuration Assistant's HTTP Streamer (Audio Only) Page

The HTTP Streamer (Video Only) Page


On this page you can specify extra details for the HTTP Stream. You will see this page if you selected Video Only HTTP Streaming on the Consumption Page. The Mount Point field specifies the second part of the URL from which the files will be available. >For instance, on the www.example.com server, with an /ogg-video/ mount point, on port 8880, the stream would then be available from the http://www.example.com:8800/ogg-video/ URL. Select the Publish embedded java player page option to serve an additional HTTP page containing a Cortado java player applet, avoiding the need for your users to install a suitable client player. This will be available at a /cortado/ URL at your mount point. The worker drop-down choice allows you to choose what computer this component should run on, for instance if the camera is attached to a different computer that is available via the network. This allows you to distribute tasks across several server computers. See the Deployment chapter to learn how to create extra workers. The Configuration Assistant would then offer these workers in the dropdown choice after connecting to their manager. See also the http-streamer component reference documentation.

104

The Configuration Assistant

Figure E.30. The Configuration Assistant's HTTP Streamer (Video Only) Page

The Disk (Audio and Video) Page


On this page you can specify details of how the stream will be archived to disk. You will see this page if you selected Save To Disk and Audio & Video on the Consumption Page. The Choose Location field should contain the path to the directory to which the files should be saved. Note that this is the directory path on the specified worker's computer, which is not necessarily the same computer on which this configuration assistant is running. Select the Rotate Entry option to specify when a new file should be started, entering either a maximum number of hours or a maximum file size. Select the Record at Startup option to start recording as soon as Flumotion starts, when you have finished with this assistant. You can then stop recording by clicking the Stop button in the Filename tab after clicking on the component named disker-audio-video. If you leave Record at Startup unselected then you can click the Start New File button there to start recording. The worker drop-down choice allows you to choose what computer this component should run on, for instance if the camera is attached to a different computer that is available via the network. This allows you to distribute tasks across several server computers. See the Deployment chapter to learn how to create extra workers. The Configuration Assistant would then offer these workers in the dropdown choice after connecting to their manager. See also the disk-consumer component reference documentation.

105

The Configuration Assistant

Figure E.31. The Configuration Assistant's Disk (Audio and Video) Page

The Disk (Audio Only) Page


On this page you can specify details of how the stream will be archived to disk. You will see this page if you selected Save To Disk and Audio Only on the Consumption Page. The Choose Location field should contain the path to the directory to which the files should be saved. Note that this is the directory path on the specified worker's computer, which is not necessarily the same computer on which this configuration assistant is running. Select the Rotate Entry option to specify when a new file should be started, entering either a maximum number of hours or a maximum file size. Select the Record at Startup option to start recording as soon as Flumotion starts, when you have finished with this assistant. You can then stop recording by clicking the Stop button in the Filename tab after clicking on the component named disker-audio-video. If you leave Record at Startup unselected then you can click the Start New File button there to start recording. The worker drop-down choice allows you to choose what computer this component should run on, for instance if the camera is attached to a different computer that is available via the network. This allows you to distribute tasks across several server computers. See the Deployment chapter to learn how to create extra workers. The Configuration Assistant would then offer these workers in the dropdown choice after connecting to their manager. See also the disk-consumer component reference documentation.

106

The Configuration Assistant

Figure E.32. The Configuration Assistant's Disk (Audio Only) Page

The Disk (Audio Only) Page


On this page you can specify details of how the stream will be archived to disk. You will see this page if you selected Save To Disk and Video Only on the Consumption Page. The Choose Location field should contain the path to the directory to which the files should be saved. Note that this is the directory path on the specified worker's computer, which is not necessarily the same computer on which this configuration assistant is running. Select the Rotate Entry option to specify when a new file should be started, entering either a maximum number of hours or a maximum file size. Select the Record at Startup option to start recording as soon as Flumotion starts, when you have finished with this assistant. You can then stop recording by clicking the Stop button in the Filename tab after clicking on the component named disker-audio-video. If you leave Record at Startup unselected then you can click the Start New File button there to start recording. The worker drop-down choice allows you to choose what computer this component should run on, for instance if the camera is attached to a different computer that is available via the network. This allows you to distribute tasks across several server computers. See the Deployment chapter to learn how to create extra workers. The Configuration Assistant would then offer these workers in the dropdown choice after connecting to their manager. See also the disk-consumer component reference documentation.

107

The Configuration Assistant

Figure E.33. The Configuration Assistant's Disk (Video Only) Page

The Icecast Streamer (Audio and Video) Page


On this page you can specify details of how the stream will be streamed to an Icecast server using shout2. You will see this page if you selected Stream to Icecast2 and Audio & Video on the Consumption Page. You should specify the Server Hostname and Server Port of an existing Icecast server. That Icecast server will then stream the content further to client players. The Mount Point field specifies the second part of the URL from which the files will be available. For instance, a Flumotion www.example.com server, with an /icecast/ mount point, on port 8000 would serve its stream (to the Icecast server) from the http://www.example.com:8000/ icecast/ URL. You may password-protect your stream by entering something in the Password field. Users must then enter this password in their shoutcast client players in order to receive your content. You may specify a Name and Description for your stream, as well as an Associated URL where people can find more information. These will then appear in the shoutcast client player. The worker drop-down choice allows you to choose what computer this component should run on, for instance if the camera is attached to a different computer that is available via the network. This allows you to distribute tasks across several server computers. See the Deployment chapter to learn how to create extra workers. The Configuration Assistant would then offer these workers in the dropdown choice after connecting to their manager.

108

The Configuration Assistant

See also the shout2-consumer component reference documentation.

Figure E.34. The Configuration Assistant's Icecast Streamer (Audio and Video) Page

The Icecast Streamer (Audio Only) Page


On this page you can specify details of how the stream will be streamed to an Icecast server using shout2. You will see this page if you selected Stream to Icecast2 and Audio Only on the Consumption Page. You should specify the Server Hostname and Server Port of an existing Icecast server. That Icecast server will then stream the content further to client players. The Mount Point field specifies the second part of the URL from which the files will be available. For instance, a Flumotion www.example.com server, with an /icecast/ mount point, on port 8000 would serve its stream (to the Icecast server) from the http://www.example.com:8000/ icecast/ URL. You may password-protect your stream by entering something in the Password field. Users must then enter this password in their shoutcast client players in order to receive your content. You may specify a Name and Description for your stream, as well as an Associated URL where people can find more information. These will then appear in the shoutcast client player. The worker drop-down choice allows you to choose what computer this component should run on, for instance if the camera is attached to a different computer that is available via the network. This allows

109

The Configuration Assistant

you to distribute tasks across several server computers. See the Deployment chapter to learn how to create extra workers. The Configuration Assistant would then offer these workers in the dropdown choice after connecting to their manager. See also the shout2-consumer component reference documentation.

Figure E.35. The Configuration Assistant's Icecast Streamer (Audio Only) Page

The Icecast Streamer (Video Only) Page


On this page you can specify details of how the stream will be streamed to an Icecast server using shout2. You will see this page if you selected Stream to Icecast2 and Video Only on the Consumption Page. You should specify the Server Hostname and Server Port of an existing Icecast server. That Icecast server will then stream the content further to client players. The Mount Point field specifies the second part of the URL from which the files will be available. For instance, a Flumotion www.example.com server, with an /icecast/ mount point, on port 8000 would serve its stream (to the Icecast server) from the http://www.example.com:8000/ icecast/ URL. You may password-protect your stream by entering something in the Password field. Users must then enter this password in their shoutcast client players in order to receive your content. You may specify a Name and Description for your stream, as well as an Associated URL where people can find more information. These will then appear in the shoutcast client player.

110

The Configuration Assistant

The worker drop-down choice allows you to choose what computer this component should run on, for instance if the camera is attached to a different computer that is available via the network. This allows you to distribute tasks across several server computers. See the Deployment chapter to learn how to create extra workers. The Configuration Assistant would then offer these workers in the dropdown choice after connecting to their manager. See also the shout2-consumer component reference documentation.

Figure E.36. The Configuration Assistant's Icecast Streamer (Video Only) Page

The Content License Page


On this page you can specify the license of your content, choosing between Creative Commons or Commercial licenses. The worker drop-down choice allows you to choose what computer this component should run on, for instance if the camera is attached to a different computer that is available via the network. This allows you to distribute tasks across several server computers. See the Deployment chapter to learn how to create extra workers. The Configuration Assistant would then offer these workers in the dropdown choice after connecting to their manager.

111

The Configuration Assistant

Figure E.37. The Configuration Assistant's Content License Page

The On Demand Page


This page allows you to configure your on-demand video server. The Directory field should contain the path to the directory that will contain your video files. Note that this is the directory path on the specified worker's computer, which is not necessarily the same computer on which this configuration assistant is running. The Port field specifies the network port on which the files will be served. The Mount Point field specifies the second part of the URL from which the files will be available. For instance, a test.ogv file may be in the /home/someone/ondemand_files/ directory, on the www.example.com server, with an /ondemand/ mount point, on port 8080. The file would then be available from the http://www.example.com:8080/ondemand/test.ogv URL. The worker drop-down choice allows you to choose what computer this component should run on, for instance if the camera is attached to a different computer that is available via the network. This allows you to distribute tasks across several server computers. See the Deployment chapter to learn how to create extra workers. The Configuration Assistant would then offer these workers in the dropdown choice after connecting to their manager.

112

The Configuration Assistant

Figure E.38. The Configuration On Demand Page

The Summary Page


This page summarizes your previous choses. It is an opportunity to review the configuration before starting the components when clicking the Forward button. After you click Apply, the Flumotion Administration window will open, showing the chosen components int the running Flumotion system.

113

The Configuration Assistant

Figure E.39. The Configuration Assistant's Summary Page

The Administration Window


The Flumotion Administration window lists all the components in your chosen Flumotion system, showing whether their status and allowing you to examine their configuration details. If you have just started a Flumotion system then the icon for each component will gradually change as each component is started. If any component has a problem then the icon will indicate this and you can click on the component to see details.

114

The Configuration Assistant

Figure E.40. The Administration Window

For instance, if you select an http-streamer component you will see a clickable URL button on the righthand side, in the Statistics tab. Clicking this button should cause the appropriate client application to open and play the streaming video. For instance, the Totem Movie Player will open on most Linux systems. You can stop all the components by selecting Manage Stop All from the menu, then close the window.

115

Glossary
Glossary
aggregated An aggregated feed is a feed that represents a signal with more than one component. For example, a signal from a DV camera with both audio and video represents an aggregated feed. See Also simple. A consumer that stores a stream to disk. See Also consumer. An atmosphere is part of a planet It contains components providing services to the manager or to other components in flows or the atmosphere. These services include authentication, through bouncers. See Also planet. A component that implements authentication on behalf of other components or the manager. Used for example by a streamer to determine if a client is allowed access to a stream. See the Bouncer Components Reference section. See Also component, streamer. A producer that captures a physical signal using external devices. Devices used could be webcams, cameras, sound cards, ... See Also producer. A basic grouping block for the Flumotion system. Components are combined to form a complete flow that tells the Flumotion system what to do. See Also producer, converter, consumer, bouncer. A component that only consumes feeds. It exports streams out of the Flumotion system, for example by serving them to clients or storing them to disks. See the Consumer Components Reference section. See Also archiver, streamer. A component that both consumes one or more feeds and produces one or more feeds. For example, an encoder or a video mixer. See Also component. A type of feed in an encoded data representation. For example, Theora video or Vorbis audio. See Also raw. The digitized representation of a signal, as produced by a producer. A feed can be raw or cooked, depending on whether the data is in a raw data format or an encoded format. A feed can be simple or aggregated. See Also signal, raw, cooked, simple, aggregated. A producer that generates a stream. This is typically used for testing. See Also producer. A complete topology of connected feed components. A flow contains a network of components completely separated from components of other flows. A flow can use multiple producers, converters and streamers.

archiver atmosphere

bouncer

capturer

component

consumer

converter

cooked

feed

generator flow

116

Glossary

See Also component. importer A producer that imports a stream from outside of Flumotion. This stream is produced by another server. See Also producer. A server-side process that manages all Flumotion objects. It manages one or more Flumotion flows, the components that are part of the flow, and the workers that create these components. See Also worker. A planet is the combination of a manager, an atmosphere and a set of flows. The flows contain the feed components. The manager manages the atmospherecomponents, flow components, and workers. The atmospherecontains components providing services to flow components and manager. See Also atmosphere, flow, manager. A component that only produces feeds. It imports streams into the Flumotion system, for example by capturing them, generating them, or importing them from other systems. See the Producer Components Reference section. See Also component, capturer, importer, generator. A type of feed in a raw data representation. For example, raw RGB frames or raw integer audio. See Also cooked. The conceptual entity represented by a feed. A simple feed is a feed that represents a signal with only one component. For example, a signal with only audio results in a simple feed. See Also aggregated. A stream is a feed as sent to a consumer. It is a processed data stream ready for consumption. See Also consumer. A consumer that streams to the outside world. See Also consumer. The directory where your system configuration files are stored. When you are compiling from source, this is decided by the --sysconfdir argument to configure, or inherited from --prefix by appending etc. The argument thus defaults to /usr/local/etc. When installed from packages, this directory is found as /etc. worker A daemon process on a machine that connects to the manager and waits for requests to start components. See Also manager.

manager

planet

producer

raw

signal simple

stream

streamer sysconfdir

117

Part II. Flumotion Components Reference

Table of Contents
I. Producer Components ................................................................................................... audiotest-producer ................................................................................................... firewire-producer ..................................................................................................... icecast-producer ...................................................................................................... loop-producer ......................................................................................................... soundcard-producer .................................................................................................. tvcard-producer ....................................................................................................... videotest-producer ................................................................................................... webcam-producer .................................................................................................... II. Converter Components ................................................................................................. repeater ................................................................................................................. overlay-converter .................................................................................................... III. Combiner Components ................................................................................................ av-basic-watchdog-combiner ..................................................................................... av-switch-combiner .................................................................................................. single-switch-combiner ............................................................................................. IV. Encoder Components .................................................................................................. dirac-encoder .......................................................................................................... jpeg-encoder ........................................................................................................... mulaw-encoder ....................................................................................................... smoke-encoder ........................................................................................................ speex-encoder ......................................................................................................... theora-encoder ........................................................................................................ vorbis-encoder ........................................................................................................ V. Muxer Components ..................................................................................................... multipart-muxer ...................................................................................................... ogg-muxer ............................................................................................................. VI. Consumer Components ............................................................................................... disk-consumer ......................................................................................................... http-streamer .......................................................................................................... http-server .............................................................................................................. shout2-consumer ..................................................................................................... VII. Bouncer Components ................................................................................................ htpasswdcrypt-bouncer ............................................................................................. ical-bouncer ........................................................................................................... ip-bouncer .............................................................................................................. VIII. Miscellaneous Components ....................................................................................... porter .................................................................................................................... 120 121 122 124 125 126 128 130 132 134 135 136 138 139 141 143 144 145 146 147 148 149 150 152 153 154 155 156 157 159 163 166 168 169 170 171 172 173

119

Producer Components

120

audiotest-producer
audiotest-producer Produces an example audio signal without using a device.

Properties
volume
The volume of the test signal (0.0 - 1.0). Type: float Optional property. Single values only.

rate
The Sample rate (in Hz). Type: int Optional property. Single values only.

frequency
The frequency of the test signal (in Hz). Type: int Optional property. Single values only.

drop-probability
The fraction of buffers to drop (0.0 - 1.0). Only useful for debugging. Type: float Optional property. Single values only.

121

firewire-producer
firewire-producer Produces feeds from a Firewire/DV device.

Properties
is-square
Whether to scale to a 1:1 pixel aspect ratio. Type: bool Optional property. Single values only.

scaled-width
The width to scale to before correcting. Type: int Optional property. Single values only.

guid
The GUID of the device (a hexadecimal such as 0xhhhhhhhhhhhhhhhh). Type: string Optional property. Single values only.

framerate
The framerate (in fps). Type: fraction Optional property. Single values only.

width
The final width, including correction. Type: int Optional property. Single values only.

height

122

firewire-producer

The height to scale to. Type: int Optional property. Single values only.

123

icecast-producer
icecast-producer A producer that produces a stream from an Icecast server.

Properties
url
The URL of the Icecast stream from which to produce. Type: string Required property. Single values only.

124

loop-producer
loop-producer Produces a raw audio/video feed from an Ogg file, looping continuously.

Properties
width
The width to scale the video to. Type: int Optional property. Single values only.

framerate
Framerate to output Type: fraction Optional property. Single values only.

location
The location of the source file to loop. Type: string Required property. Single values only.

height
The height to scale the video to. Type: int Optional property. Single values only.

125

soundcard-producer
soundcard-producer Captures a raw audio feed from a soundcard.

Properties
channels
The Number of channels to capture (default 2). Type: int Optional property. Single values only.

rate
The Sample rate to capture at (in Hz. default: 44100). Type: int Optional property. Single values only.

input-track
The label of the input track to be used for recording (the default is to use whatever is currently set). Type: string Optional property. Single values only.

device
The device property to use for the the source element. Type: string Optional property. Single values only.

depth
The bit depth to use (default 16). Type: int Optional property. Single values only.

source-element

126

soundcard-producer

The GStreamer element factory to use as the source. Type: string Optional property. Single values only.

127

tvcard-producer
tvcard-producer A producer that captures a raw video feed from a TV card.

Properties
hue
The hue of the video (0-65535). Type: int Optional property. Single values only.

saturation
The saturation of the video (0-65535). Type: int Optional property. Single values only.

brightness
The brightness of the video (0-65535). Type: int Optional property. Single values only.

signal
The signal type (PAL/SECAM/NTSC/...). Type: string Optional property. Single values only.

framerate
The frame rate of the produced video. Type: fraction Optional property. Single values only.

height

128

tvcard-producer

The height of the produced video. Type: int Optional property. Single values only.

width
The width of the produced video. Type: int Optional property. Single values only.

channel
The input channel (TV/Composite1/S-Video/...). Type: string Optional property. Single values only.

device
The path to the device node. Type: string Required property. Single values only.

contrast
The contrast of the video (0-65535). Type: int Optional property. Single values only.

129

videotest-producer
videotest-producer Produces an example video signal without using a device.

Properties
format
Video format Type: string Optional property. Single values only.

pixel-aspect-ratio
The video pixel aspect ratio as numerator/denominator. Type: fraction Optional property. Single values only.

framerate
The video frame rate as numerator/denominator. Type: fraction Optional property. Single values only.

height
The height in pixels. Type: int Optional property. Single values only.

width
The width in pixels. Type: int Optional property. Single values only.

overlay-timestamps

130

videotest-producer

Whether to overlay buffer timestamps. Type: bool Optional property. Single values only.

pattern
Thhe test pattern to show (smpte/snow/black/...). Type: int Optional property. Single values only.

drop-probability
The fraction of buffers to drop (0.0 - 1.0). Only useful for debugging. Type: float Optional property. Single values only.

131

webcam-producer
webcam-producer Produces a raw video feed from a webcam.

Properties
hue
The hue of the video (0-65535) Type: int Optional property. Single values only.

saturation
The saturation of the video (0-65535) Type: int Optional property. Single values only.

format
The Colorspace fourcc to capture in. Type: string Optional property. Single values only.

brightness
The brightness of the video (0-65535). Type: int Optional property. Single values only.

framerate
The frame rate of the video to capture. Type: fraction Optional property. Single values only.

height

132

webcam-producer

The height of the video to capture. Type: int Optional property. Single values only.

width
The width of the video to capture. Type: int Optional property. Single values only.

mime
The Mime type of video to produce (e.g. video/x-raw-yuv). Type: string Optional property. Single values only.

element-factory
The element factory from which to instantiate the capture element. Defaults to 'v4lsrc' Type: string Optional property. Single values only.

device
The path to the device node from which to capture. Type: string Required property. Single values only.

contrast
The contrast of the video (0-65535). Type: int Optional property. Single values only.

133

Converter Components

134

repeater
repeater A component that simply repeats the feed without any processing. This is useful to transport a feed to a different worker before feeding it to many other eaters.

Properties
drop-probability
The fraction of buffers to drop (0.0 - 1.0). Type: float Optional property. Single values only.

135

overlay-converter
overlay-converter Overlays text and images onto a raw video feed.

Properties
show-text
Whether to show text. Type: bool Optional property. Single values only.

width
The width of the overlaid image. Type: int Required property. Single values only.

xiph-logo
Whether to show a Xiph logo. Type: bool Optional property. Single values only.

fluendo-logo
Whether to show a Fluendo logo. Type: bool Optional property. Single values only.

text
Text to show Type: string Optional property. Single values only.

cc-logo

136

overlay-converter

Whether to show a Creative Commons logo. Type: bool Optional property. Single values only.

height
The height of the overlaid image. Type: int Required property. Single values only.

137

Combiner Components

138

av-basic-watchdog-combiner
av-basic-watchdog-combiner A basic audio/video watchdog component.

Properties
video-pixel-aspect-ratio
If set, the pixel aspect ratio of the outgoing video. Type: fraction Optional property. Single values only.

video-framerate
If set, the framerate of the outgoing video. Type: fraction Optional property. Single values only.

video-width
If set, the width of the outgoing video. Type: int Optional property. Single values only.

audio-channels
If set, the number of channels of the outgoing audio. Type: int Optional property. Single values only.

ical-schedule
If set, an iCalendar that decides when to switch. The switcher will switch to the backup stream during any event scheduled in the iCalendar file. Type: string Optional property. Single values only.

audio-samplerate

139

av-basic-watchdog-combiner

If set, the samplerate of the outgoing audio. Type: int Optional property. Single values only.

video-height
If set, the height of the outgoing video. Type: int Optional property. Single values only.

140

av-switch-combiner
av-switch-combiner An audio/video switching component.

Properties
video-pixel-aspect-ratio
If set, the pixel aspect ratio of the outgoing video. Type: fraction Optional property. Single values only.

video-framerate
If set, the framerate of the outgoing video. Type: fraction Optional property. Single values only.

video-width
If set, the width of the outgoing video. Type: int Optional property. Single values only.

audio-channels
If set, the number of channels of the outgoing audio. Type: int Optional property. Single values only.

ical-schedule
If set, an iCalendar that decides when to switch. The switcher will switch to the backup stream during any event scheduled in the iCalendar file. Type: string Optional property. Single values only.

audio-samplerate

141

av-switch-combiner

If set, the samplerate of the outgoing audio. Type: int Optional property. Single values only.

video-height
If set, the height of the outgoing video. Type: int Optional property. Single values only.

142

single-switch-combiner
single-switch-combiner A switcher switching between two input feeds of the same stream type.

Properties
ical-schedule
If set, an iCalendar that decides when to switch. The switcher will switch to the backup stream during any event scheduled in the iCalendar file. Type: string Optional property. Single values only.

143

Encoder Components

144

dirac-encoder
dirac-encoder Encodes a raw video feed using BBC's Dirac codec.

Properties
bitrate
The bit rate to encode at (in bps). Type: int Optional property. Single values only.

145

jpeg-encoder
jpeg-encoder Encodes raw video feed to JPEG frames.

Properties
quality
The quality of the JPEG encoding (from 0 to 100 %). Type: int Optional property. Single values only.

framerate
The Frame rate at which to encode. Type: fraction Optional property. Single values only.

146

mulaw-encoder
mulaw-encoder Encodes raw audio to mu-law.

Properties

147

smoke-encoder
smoke-encoder An encoder using JPEG frames and delta frames.

Properties
threshold
The motion estimation threshold (0 - 10000000. default: 3000). Type: int Optional property. Single values only.

qmin
The minimum JPEG quality (0-100 %. default: 10 %). Type: int Optional property. Single values only.

keyframe
How often a key frame should appear (in frames. default: 20) Type: int Optional property. Single values only.

qmax
The maximum JPEG quality (0-100 %. default: 85 %). Type: int Optional property. Single values only.

148

speex-encoder
speex-encoder Encodes a raw audio feed using the Speex speech codec.

Properties
bitrate
The bit rate to encode at (in bps). Type: int Optional property. Single values only.

149

theora-encoder
theora-encoder Encodes a raw video feed using Xiph's Theora codec.

Properties
keyframe-maxdistance
The maximum distance between key frames (in frames). Type: int Optional property. Single values only.

quality
The encoding quality (0-63, if not using bitrate). Type: int Optional property. Single values only.

quick-compress
Whether to use quick, lower-quality compression. Type: bool Optional property. Single values only.

bitrate
The bit rate to encode at (in bps). Type: int Optional property. Single values only.

keyframe-mindistance
The minimum distance between key frames (in frames). Type: int Optional property. Single values only.

sharpness

150

theora-encoder

The sharpness encoder parameter: 0, 1, or 2. Type: int Optional property. Single values only.

noise-sensitivity
The noise sensitivity (defaults to 1) Type: int Optional property. Single values only.

151

vorbis-encoder
vorbis-encoder An audio encoder that encodes to Vorbis.

Properties
channels
The number of audio channels to encode. Type: int Optional property. Single values only.

bitrate
The bit rate to encode at (in bps). Type: int Optional property. Single values only.

quality
The quality to encode at (from -0.1 to 1.0). This is only used if bitrate is not set. Type: float Optional property. Single values only.

152

Muxer Components

153

multipart-muxer
multipart-muxer Muxes encode feeds into a Multipart feed.

Properties

154

ogg-muxer
ogg-muxer Muxes encode feeds into an Ogg feed.

Properties

155

Consumer Components

156

disk-consumer
disk-consumer A consumer that archives a stream to disk.

Properties
symlink-to-last-recording
If set, this symlink will be created and will point to the latest finished recording. Type: string Optional property. Single values only.

start-recording
Whether to start recording when the component starts (defaults to True). Type: bool Optional property. Single values only.

stream-marker-filename-prefix
The formatting template for the program id (default '%03d.'). Type: string Optional property. Single values only.

filename
If set, the given template will be used to decide filenames for recordings. The template will be expanded according to strftime(3). Type: string Optional property. Single values only.

react-to-stream-markers
Whether to start/stop the disker when stream marker events are received. Type: bool Optional property. Single values only.

time

157

disk-consumer

The maximum duration of each file (in seconds). Type: long Optional property. Single values only.

directory
The directory to which to save the archives. Type: string Required property. Single values only.

rotate-type
'size', 'time', or 'none' (default 'none'). Type: string Optional property. Single values only.

ical-schedule
If set, the given iCalendar schedule will be used to decide when to record. Every event defined indicates a recording, and the event description will be used as the filename template. Type: string Optional property. Single values only.

symlink-to-current-recording
If set, this symlink will be created and will point to the latest started recording. Type: string Optional property. Single values only.

size
The maximum size of each file (in bytes). Type: long Optional property. Single values only.

158

http-streamer
http-streamer A consumer that streams over HTTP.

Properties
burst-time
How much data to burst (in seconds). Type: float Optional property. Single values only.

description
A description of the stream. Type: string Optional property. Single values only.

domain
The domain of the server for authentication. Type: string Optional property. Single values only.

duration
How long to keep clients connected (in seconds). Type: float Optional property. Single values only.

ip-filter
The IP network-address/prefix-length to filter out of logs. Type: string Optional property. Multiple values allowed.

porter-socket-path

159

http-streamer

The path to the socket to communicate with the porter. Type: string Optional property. Single values only.

burst-on-connect
Whether to burst old data on client connection (reduces buffering time). Type: bool Optional property. Single values only.

porter-username
The username to authenticate to the porter. Type: string Optional property. Single values only.

mount-point
The mount point on which the stream can be accessed. Type: string Optional property. Single values only.

issuer-class
The Python class of the Keycard issuer to use. Type: string Optional property. Single values only.

hostname
The server's host name to display. Type: string Optional property. Single values only.

bouncer
The name of a bouncer in the atmosphere to authenticate against.

160

http-streamer

Type: string Optional property. Single values only.

porter-password
The password to authenticate to the porter. Type: string Optional property. Single values only.

port
The port to listen on (if type is 'master'). Type: int Optional property. Single values only.

bandwidth-limit
The maximum bandwidth usage allowed in bits per second. Type: int Optional property. Single values only.

burst-size
How much data to burst (in KB). Type: int Optional property. Single values only.

client-limit
The maximum number of clients allowed. Type: int Optional property. Single values only.

type
'master' to listen on a port, or 'slave' to slave to a porter (default master). Type: string

161

http-streamer

Optional property. Single values only.

redirect-on-overflow
A URL to redirect clients to if either of the limits have been reached. Type: string Optional property. Single values only.

162

http-server
http-server An on demand HTTP server.

Properties
porter-username
The username to authenticate to the porter. Type: string Optional property. Single values only.

description
The _description of the server. Type: string Optional property. Single values only.

mount-point
The mount point on which the stream can be accessed. Type: string Optional property. Single values only.

issuer-class
The Python class of the Keycard issuer to use. Type: string Optional property. Single values only.

hostname
The server's host name to display. Type: string Optional property. Single values only.

bouncer

163

http-server

The name of a bouncer in the atmosphere to authenticate against. Type: string Optional property. Single values only.

port
The port to listen on (if type is 'master'). Type: int Optional property. Single values only.

type
'master' to listen on a port, or 'slave' to slave to a porter (default master). Type: string Optional property. Single values only.

path
The base path to map to the mount-point Type: string Optional property. Single values only.

ip-filter
The IP network-address/prefix-length to filter out of logs. Type: string Optional property. Multiple values allowed.

porter-socket-path
The path to the socket to communicate with the porter. Type: string Optional property. Single values only.

porter-password
The password to authenticate to the porter

164

http-server

Type: string Optional property. Single values only.

165

shout2-consumer
shout2-consumer A consumer that can stream to Icecast servers using shout2

Properties
short-name
A short name for the stream. Type: string Optional property. Single values only.

description
A description for the stream. Type: string Optional property. Single values only.

mount-point
The mount point on which to publish the stream. Type: string Required property. Single values only.

url
A URL to associate with the stream. Type: string Optional property. Single values only.

ip
The IP address of the Icecast server. Type: string Optional property. Single values only.

password

166

shout2-consumer

The password to authenticate to the the Icecast server. Type: string Optional property. Single values only.

port
The port on which the Icecast server is listening. Type: int Optional property. Single values only.

167

Bouncer Components

168

htpasswdcrypt-bouncer
htpasswdcrypt-bouncer A bouncer using htpasswd and crypted keycards.

Properties
data
In-line htpasswd data to use as a backend. Type: rawstring Optional property. Single values only.

filename
An htpasswd file to use as a backend. Type: string Optional property. Single values only.

169

ical-bouncer
ical-bouncer A bouncer that allows access to a stream when there is an event in the iCalendar file.

Properties
file
The path to an iCalendar file to use. Type: string Required property. Single values only.

170

ip-bouncer
ip-bouncer A bouncer that authenticates based on remote IP address.

Properties
deny
A match rule for denying authentication. This uses the same syntax as the allow rules. Type: string Optional property. Multiple values allowed.

deny-default
Whether to default to denying authentication. Defaults to True, which is equivalent to Apache's 'Order Allow,Deny' Type: bool Optional property. Single values only.

allow
A match rule for allowing authentication. Match rules are IP blocks, such as 127.0.0.1/32. Type: string Optional property. Multiple values allowed.

171

Miscellaneous Components

172

porter
porter A component that listens to a network port on behalf of other components (like http-streamer and http-server).

Properties
username
The username to authenticate to the porter. Type: string Optional property. Single values only.

socket-path
The socket path to use to connect to the porter. Type: string Optional property. Single values only.

protocol
The porter protocol to use (defaults to flumotion.component.misc.porter.porter.HTTPPorterProtocol'). Type: string Optional property. Single values only.

iptables-port
The network port for the porter to report (useful when using iptables to redirect incoming 80 to 8800). Type: int Optional property. Single values only.

interface
The IP address or hostname associated with the interface we want to listen on. Type: string Optional property. Single values only.

password

173

porter

The password to authenticate to the porter. Type: string Optional property. Single values only.

port
The network port for the porter to listen on. Type: int Optional property. Single values only.

174

Part III. Flumotion Plugs Reference

Table of Contents
IX. AdminAction Plugs .................................................................................................... adminaction-loggerfile .............................................................................................. X. Bouncer Plugs ............................................................................................................ bouncer-testtoken .................................................................................................... bouncer-trivial ........................................................................................................ XI. Component Plugs ....................................................................................................... component-cortado .................................................................................................. component-example ................................................................................................. XII. IdentityProvider Plugs ............................................................................................... identityprovider-example .......................................................................................... XIII. Component Plugs .................................................................................................... manager-example .................................................................................................... manager-manhole .................................................................................................... XIV. RateController Plugs ................................................................................................ ratecontroller-fixed .................................................................................................. XV. RequestLogger Plugs ................................................................................................. requestlogger-file .................................................................................................... XVI. StreamData Plugs .................................................................................................... streamdataprovider-example ...................................................................................... 177 178 179 180 181 182 183 185 186 187 188 189 190 191 192 193 194 195 196

176

AdminAction Plugs

177

adminaction-loggerfile
adminaction-loggerfile Logs all actions made by admin clients to a log file.

Properties
logfile
Path to log file to which to log admin actions. Type: string Required property. Single values only.

178

Bouncer Plugs

179

bouncer-testtoken
bouncer-testtoken A test bouncer plug that only allows one token.

Properties
authorized-token
The token that is authorized Type: string Required property. Single values only.

180

bouncer-trivial
bouncer-trivial A bouncer plug that always accepts authentication requests.

Properties

181

Component Plugs

182

component-cortado
component-cortado Serves the embedded Cortado Java player.

Properties
has-audio
Whether audio should be streamed. Type: bool Required property. Single values only.

index
The name of the index file. The default is index.html. Type: string Optional property. Single values only.

height
The height of the cortado applet. Type: int Required property. Single values only.

stream-url
The URL to the stream we are displaying. Type: string Required property. Single values only.

html-template
A HTML template to use to serve the cortado applet. Type: string Optional property. Single values only.

framerate

183

component-cortado

The frame rate used in the cortado applet. Type: float Required property. Single values only.

buffer-size
The size of the buffer in the cortado applet. Type: int Required property. Single values only.

codebase
The base URL used to fetch the cortado applet code. Type: string Required property. Single values only.

width
The width of the cortado applet. Type: int Required property. Single values only.

has-video
Whether video should be streamed. Type: bool Required property. Single values only.

184

component-example
component-example Shows how a component plug works by printing to console.

Properties

185

IdentityProvider Plugs

186

identityprovider-example
identityprovider-example Shows how an identityprovider plug works.

Properties

187

Component Plugs

188

manager-example
manager-example Shows how a manager plug works by printing on console.

Properties

189

manager-manhole
manager-manhole Creates a manhole to a manager to which you can log in over telnet or ssh.

Properties
initially-open
Whether the SSH port is open from the start Type: bool Optional property. Single values only.

ssh-authorized-keys-file
Path to a file containing authorized keys for SSH login Type: string Optional property. Single values only.

port
The port to listen on for incoming manhole connections Type: int Optional property. Single values only.

190

RateController Plugs

191

ratecontroller-fixed
ratecontroller-fixed Rate controls on demand streaming using a fixed bitrate.

Properties
rate
The average rate to send all files at, in bits per second. Type: int Required property. Single values only.

initial-level
The initial amount of data that can be sent at full speed, in bits. Type: int Optional property. Single values only.

max-level
The maximum amount of data to send at full rate at any given moment, in bits. Type: int Optional property. Single values only.

192

RequestLogger Plugs

193

requestlogger-file
requestlogger-file Logs all stream requests to a W3C-compatible log file.

Properties
logfile
Path to log file to which to log requests. Type: string Required property. Single values only.

194

StreamData Plugs

195

streamdataprovider-example
streamdataprovider-example Shows how a streamdataprovider plug works.

Properties
description
Description of the stream Type: string Required property. Single values only.

196

Bibliography
[pam-home] Pluggable Authentication Module homepage http://www.kernel.org/pub/linux/libs/pam/index.html [gstreamer-home] GStreamer homepage http://gstreamer.freedesktop.org/ [twisted-home] Twisted homepage http://www.twistedmatrix.com/products/twisted [xiph] Xiph.org homepage http://www.xiph.org [linux1394] IEEE 1394 for Linux homepage http://www.linux1394.org/ [flvtool2] flvtool2 Flash Video Indexer http://www.inlet-media.de/flvtool2 [flumotion-services] Flumotion Services http://www.flumotion.com/

197

Index
A
adminaction-loggerfile:logfile, 178 adminaction-loggerfile:properties, 178 Administration Window, 114 Architecture, Atmosphere, 30, 31, 32 atmosphere, 116 audiotest-producer:drop-probability, 121 audiotest-producer:frequency, 121 audiotest-producer:properties, 121 audiotest-producer:rate, 121 audiotest-producer:volume, 121 av-basic-watchdog-combiner:audio-channels, 139 av-basic-watchdog-combiner:audio-samplerate, 139 av-basic-watchdog-combiner:ical-schedule, 139 av-basic-watchdog-combiner:properties, 139 av-basic-watchdog-combiner:video-framerate, 139 av-basic-watchdog-combiner:video-height, 140 av-basic-watchdog-combiner:video-pixel-aspect-ratio, 139 av-basic-watchdog-combiner:video-width, 139 av-switch-combiner:audio-channels, 141 av-switch-combiner:audio-samplerate, 141 av-switch-combiner:ical-schedule, 141 av-switch-combiner:properties, 141 av-switch-combiner:video-framerate, 141 av-switch-combiner:video-height, 142 av-switch-combiner:video-pixel-aspect-ratio, 141 av-switch-combiner:video-width, 141

Components, 30, 32 Connections, 75 Consumer, 31 Consumption, 100 Content License, 111 Converter, 31

D
Debugging, Deployment, Dirac Encoder, 94 dirac-encoder:bitrate, 145 dirac-encoder:properties, 145 disk-consumer:directory, 158 disk-consumer:filename, 157 disk-consumer:ical-schedule, 158 disk-consumer:properties, 157 disk-consumer:react-to-stream-markers, 157 disk-consumer:rotate-type, 158 disk-consumer:size, 158 disk-consumer:start-recording, 157 disk-consumer:stream-marker-filename-prefix, 157 disk-consumer:symlink-to-current-recording, 158 disk-consumer:symlink-to-last-recording, 157 disk-consumer:time, 157

E
Encoding, 92 Encyrption, 54

F
Feed, 30, 30, 32 file descriptor, 57 Firewall, 54 Firewire, 87, 91 firewire-producer:framerate, 122 firewire-producer:guid, 122 firewire-producer:height, 122 firewire-producer:is-square, 122 firewire-producer:properties, 122 firewire-producer:scaled-width, 122 firewire-producer:width, 122 Flash, 4, 24, 35, 51, 92 Flow, 30, 32 Flumotion Services S.A., flumotion-admin, 5 flumotion-inspect, 36 flumotion-manager, 5, 74, flumotion-worker, 5, 44 flvtool2, 51

B
Bouncer, 31, 32, 35 bouncer-testtoken:authorized-token, 180 bouncer-testtoken:properties, 180 bouncer-trivial:properties, 181

C
Certificate, 54 component-cortado:buffer-size, 184 component-cortado:codebase, 184 component-cortado:framerate, 183 component-cortado:has-audio, 183 component-cortado:has-video, 184 component-cortado:height, 183 component-cortado:html-template, 183 component-cortado:index, 183 component-cortado:properties, 183 component-cortado:stream-url, 183 component-cortado:width, 184 component-example:properties, 185

H
htpasswd, 37

198

Index

htpasswdcrypt-bouncer:data, 169 htpasswdcrypt-bouncer:filename, 169 htpasswdcrypt-bouncer:properties, 169 HTTP Streaming, 101, 102, 103, 104 http-server:bouncer, 163 http-server:description, 163 http-server:hostname, 163 http-server:ip-filter, 164 http-server:issuer-class, 163 http-server:mount-point, 163 http-server:path, 164 http-server:port, 164 http-server:porter-password, 164 http-server:porter-socket-path, 164 http-server:porter-username, 163 http-server:properties, 163 http-server:type, 164 http-streamer:bandwidth-limit, 161 http-streamer:bouncer, 160 http-streamer:burst-on-connect, 160 http-streamer:burst-size, 161 http-streamer:burst-time, 159 http-streamer:client-limit, 161 http-streamer:description, 159 http-streamer:domain, 159 http-streamer:duration, 159 http-streamer:hostname, 160 http-streamer:ip-filter, 159 http-streamer:issuer-class, 160 http-streamer:mount-point, 160 http-streamer:port, 161 http-streamer:porter-password, 161 http-streamer:porter-socket-path, 159 http-streamer:porter-username, 160 http-streamer:properties, 159 http-streamer:redirect-on-overflow, 162 http-streamer:type, 161

jpeg-encoder:framerate, 146 jpeg-encoder:properties, 146 jpeg-encoder:quality, 146

L
loop-producer:framerate, 125 loop-producer:height, 125 loop-producer:location, 125 loop-producer:properties, 125 loop-producer:width, 125

M
Manager, 32 manager, 117 manager-example:properties, 189 manager-manhole:initially-open, 190 manager-manhole:port, 190 manager-manhole:properties, 190 manager-manhole:ssh-authorized-keys-file, 190 memory limit, 58 MP3, 24, 92 Mulaw Encoder, 99 mulaw-encoder:properties, 147 multipart-muxer:properties, 154

N
NTSC, 87

O
ogg-muxer:properties, 155 On Demand Streaming, 112 openssl, 54 Optimization, Overlay, 88 overlay-converter:cc-logo, 136 overlay-converter:fluendo-logo, 136 overlay-converter:height, 137 overlay-converter:properties, 136 overlay-converter:show-text, 136 overlay-converter:text, 136 overlay-converter:width, 136 overlay-converter:xiph-logo, 136

I
ical-bouncer:file, 170 ical-bouncer:properties, 170 Icecast Streaming, 108, 109, 110 icecast-producer:properties, 124 icecast-producer:url, 124 identityprovider-example:properties, 187 Installation Dependencies, ip-bouncer:allow, 171 ip-bouncer:deny, 171 ip-bouncer:deny-default, 171 ip-bouncer:properties, 171

P
PAL, 87 Performance, Planet, 30, 32 planet, 117 porter:interface, 173 porter:iptables-port, 173 porter:password, 173 porter:port, 174 porter:properties, 173

J
JPEG Encoder, 96

199

Index

porter:protocol, 173 porter:socket-path, 173 porter:username, 173 Ports, 55 Producer, 31 Production, 83

R
ratecontroller-fixed:initial-level, 192 ratecontroller-fixed:max-level, 192 ratecontroller-fixed:properties, 192 ratecontroller-fixed:rate, 192 repeater:drop-probability, 135 repeater:properties, 135 requestlogger-file:logfile, 194 requestlogger-file:properties, 194

S
Security, shout2-consumer:description, 166 shout2-consumer:ip, 166 shout2-consumer:mount-point, 166 shout2-consumer:password, 166 shout2-consumer:port, 167 shout2-consumer:properties, 166 shout2-consumer:short-name, 166 shout2-consumer:url, 166 single-switch-combiner:ical-schedule, 143 single-switch-combiner:properties, 143 Smoke Encoder, 95 smoke-encoder:keyframe, 148 smoke-encoder:properties, 148 smoke-encoder:qmax, 148 smoke-encoder:qmin, 148 smoke-encoder:threshold, 148 Sound Card, 90 soundcard-producer:channels, 126 soundcard-producer:depth, 126 soundcard-producer:device, 126 soundcard-producer:input-track, 126 soundcard-producer:properties, 126 soundcard-producer:rate, 126 soundcard-producer:source-element, 126 Speex Encoder, 98 speex-encoder:bitrate, 149 speex-encoder:properties, 149 SSL, 34, 42, 53, 54, 55 streamdataprovider-example:description, 196 streamdataprovider-example:properties, 196 Streaming to Disk, 105, 106, 107

Test Audio, 89 Theora Encoder, 93 theora-encoder:bitrate, 150 theora-encoder:keyframe-maxdistance, 150 theora-encoder:keyframe-mindistance, 150 theora-encoder:noise-sensitivity, 151 theora-encoder:properties, 150 theora-encoder:quality, 150 theora-encoder:quick-compress, 150 theora-encoder:sharpness, 150 Transport Protocol, 53 TV Card, 86 tvcard-producer:brightness, 128 tvcard-producer:channel, 129 tvcard-producer:contrast, 129 tvcard-producer:device, 129 tvcard-producer:framerate, 128 tvcard-producer:height, 128 tvcard-producer:hue, 128 tvcard-producer:properties, 128 tvcard-producer:saturation, 128 tvcard-producer:signal, 128 tvcard-producer:width, 129

V
videotest-producer:drop-probability, 131 videotest-producer:format, 130 videotest-producer:framerate, 130 videotest-producer:height, 130 videotest-producer:overlay-timestamps, 130 videotest-producer:pattern, 131 videotest-producer:pixel-aspect-ratio, 130 videotest-producer:properties, 130 videotest-producer:width, 130 Vorbis Encoder, 97 vorbis-encoder:bitrate, 152 vorbis-encoder:channels, 152 vorbis-encoder:properties, 152 vorbis-encoder:quality, 152

W
Webcam, 85 webcam-producer:brightness, 132 webcam-producer:contrast, 133 webcam-producer:device, 133 webcam-producer:element-factory, 133 webcam-producer:format, 132 webcam-producer:framerate, 132 webcam-producer:height, 132 webcam-producer:hue, 132 webcam-producer:mime, 133 webcam-producer:properties, 132 webcam-producer:saturation, 132

T
TCP, 53, 54

200

Index

webcam-producer:width, 133 Windows Media, 4, 24, 35, 92 Worker, 32 worker, 117

201

También podría gustarte