Accessibility

Table of Contents

Webcasting live video with Flash Media Live Encoder

Configuring Flash Media Server

Flash Media Server offers a unique combination of traditional scalable streaming media capabilities and a flexible development environment for creating and delivering innovative, interactive media applications to the broadest possible audience. This article focuses solely on Flash Media Server's live streaming capabilities.

This article assumes that you have Flash Media Server installed and running locally. The application setup is the same whether the server is running locally or remotely. You can use any version of Flash Media Server for this task, including the free Developer Edition.

If you do not already have Flash Media Server installed, download it and follow the documentation to install it. To see a video tutorial covering the installation of Flash Media Server 2 on Windows as well as Linux, check out Train Simple videos: Introduction to Flash Media Server 2 in the Flash Media Server Developer Center.

To create a Flash Media Server application for your live video stream, do the following:

  1. Go to the directory [Flash Media Server install directory]\Applications
  2. In the Applications directory, make a subdirectory called myLiveApp.

    Note: Make sure that there are no typos in your subdirectory name. Hereafter, this subdirectory name is your Flash Media Server application name, and it will be referred to both in configuring the Flash Media Live Encoder and in authoring your playback SWF file. The spelling in each case must match exactly.

  3. Copy main.asc into the \Applications\myLiveApp directory. A version of main.asc is provided with Dreamweaver CS3. For Flash CS3 Professional users, extract the main.asc file contained in the Samples.zip file linked to at the beginning of this article.

    For Dreamweaver users, the required main.asc file can be found in the following Dreamweaver directory:

    [drive]:\Program Files\Adobe\Adobe Dreamweaver CS3\configuration\Templates\Video_Player

    If you are still using Flash Professional 8, you can find the required main.asc file here:

    [drive]:\Program Files\Macromedia\Flash 8\Samples and Tutorials\Samples\Components\FLVPlayback

    Note: These versions of main.asc contain logic required by components that you will be using to author the playback SWF file in a later section. In Flash Media Server, files with .asc extensions denote files that contain server-side ActionScript logic.

  4. Whichever version of main.asc you use, open it and examine its contents. Look for the application.onConnect function. You may find the line p_client.writeAccess, which prevents live streaming from happening by default. If you see it, be sure to comment out this line as follows:

    application.onConnect = function(p_client, p_autoSenseBW)
    {
       //Add security here
       //p_client.writeAccess = ""; // prevents creating shared object or live streams.
       this.acceptConnection(p_client);
    
       if (p_autoSenseBW)
          this.calculateClientBw(p_client);
       else
          p_client.call("onBWDone");
    }

That's all the setup required of you on the server side. Before proceeding to the next section, make sure that Flash Media Server is running.