Home / Articles / Beginner's Guide to Distributing Flash Video

Beginner's Guide to Distributing Flash Video

Chapter Description

Creating video files with a video-compression tool is only one step in the process of taking your video content to the Web. To enable the best user experience for visitors watching your videos, you need to know how to distribute your video files on Web servers, streaming servers, or possibly even a content distribution network (CDN) such as Akamai, LimeLight, and others. In this chapter, you'll learn the differences between distribution file formats and protocols for Flash Video, along with their advantages and disadvantages.

Playback: Live Streaming vs. Prerecorded

You can not only compress and deploy FLV files from your own source video files, but also stream live video from your Web cam to an FMS application. This application in turn can redistribute your live video stream to other users. FMS can even record the live stream for later playback!

Requirements for live streaming

In order to stream live video and audio from a camera and microphone on a computer or device, you need the following:

  • Flash Player 6 or higher
  • Flash Communication Server (FCS) 1.0 or higher, or FMS 2.0 or higher
  • Reasonably fast Internet connection from Flash Player to the FCS/FMS application, with a recommendation of at least a 128Kbps or faster upload rate for minimum quality video and audio and ideally a 384Kbps or higher upload rate
  • Compatible USB or FireWire Web cam or video source
  • Microphone connected to sound card or audio-in port, USB headset/microphone, or a Bluetooth headset/microphone
  • A Flash movie (the publisher) that negotiates the connection to a FCS/FMS application and publishes the video and audio stream to the server
  • A Flash movie (the subscriber) that connects to the FCS/FMS application and plays back the live video and audio stream

You don't need your own FCS or FMS license in order to stream a live audio and video feed over the Internet. You can use a hosted FCS or FMS account, as I mentioned earlier in the chapter. However, most FVSS providers do not offer live streaming capabilities.

Built-in real-time compression

Luckily, you don't need special hardware to compress the live video from a Web cam (or video source; see "Not Just for Web Cams"). Flash Player 6 and higher have a built-in Sorenson Spark video encoder, as well as a Speech codec that can encode audio.

Using ActionScript, you can control the quality and bitrate of the live video and audio stream published from a Flash movie. You can control all aspects of the video stream, including frame rate, frame size, bitrate (or data rate), or quality. The audio stream can be published in the following kilohertz rates: 5, 8, 11, 22, or 44.

Currently, the Flash Player doesn't ship with a built-in On2 VP6 encoder. However, Adobe has released Flash Media Encoder, a free standalone application that can encode live video as a real-time stream to an FMS. On2 sells Flix Live 8 for Windows, an application that streams live VP6-encoded video directly to an FMS application. Both of these applications allow you to take advantage of the higher quality of the On2 VP6 codec with live streams. You'll find links to these applications at www.flashsupport.com/links.

Live streaming video from prerecorded Flash Video

Live streaming Flash Video has a few key differences from prerecorded Flash Video content. Live streaming video can only be compressed and streamed by the Flash Player in the Sorenson Spark codec. Although you have substantial control over many aspects of live streaming compression, you can use only CBR encoding with live video—no VBR encoding is available for live streams.

One of the most critical operational differences is control of bitrate. With live streaming video, the published video is being pushed to the FCS or FMS application at a specific bitrate. If the bitrate of the publisher stream is too high for a subscriber, then that user's viewing experience of the live stream will suffer. FCS or FMS can't adjust a published stream's bitrate on the fly—at best, it can only drop frames on that subscriber's stream. You should either use a bitrate for your live stream that is compatible with all subscribers or publish more than one stream. To publish more than one stream, you need more than one video camera or source connected to your computer: one for each published stream. This is also true for audio streams—you need one audio device for each audio stream published. You can also craft subscriber movies that turn off the video portion of a stream and play only the audio portion if the subscriber's bitrate can't support both data streams.

5. Budgets: Bandwidth and Transfer Rates | Next Section Previous Section

There are currently no related articles. Please check back later.