Flash Video 101: Flash Video Delivery Options
- Embedded Delivery of SWF Files
- Progressively Downloading FLV Video from a Web Server
- Streaming (FLV) Video Content
By James Gonzalez
When it comes to delivering Flash video, there’s no shortage of options. Macromedia Flash Basic 8 and Macromedia Flash Professional 8 provide several ways for you to include video in your Flash documents. How you choose to deploy your video will determine how you create your video content and how you integrate it for use with Flash.
You have three options to deliver Flash video to website visitors using Flash Player:
- Embedded video (requires SWF)
- Progressive download (requires SWF and FLV)
- Streaming video (requires SWF and FLV)
Embedded Delivery of SWF Files
Let me start with the embedded video delivery option. Since the introduction of Flash MX and Flash Player 6, multimedia developers have been able to embed video within Flash movies by importing video and placing it on the Timeline using the Video Import Wizard (see Figure 1).
Figure 1 Embedded video on the Timeline
When the Flash movie is published, the video is fully contained in the SWF file, only requiring a normal web server for delivery. With this method, the video content is placed on the Flash Timeline and "baked in" the SWF file with other Flash content. As with an imported bitmap or vector artwork file, an embedded video file becomes part of the Flash document. For this reason, you can import only very short video clips. Because the video is on the Timeline, the Flash Timeline Control API can be used to control video playback. Other content, events, and interactivity in the SWF file can be synchronized with the video through the Timeline.
Pros and Cons of Embedded Video
Perhaps the biggest benefit of the embed method of delivering Flash video is that it is easy to use and understand. Anyone familiar with the Flash Timeline should have no trouble delivering video with this method. However, when using this method, you are likely to experience the following drawbacks:
- Large SWF files and long download times: This method dramatically increases the size of your SWF file, resulting in long publishing times and poor viewing experiences because users have to wait a considerable time to download the SWF before playback begins.
- Difficult-to-change content: Making a change to the video can be tedious; you must reimport the video, possibly adjust your Timeline effects, and then republish the SWF file.
- Audio sync issues: The frames-per-second (fps) rate of the video and the Flash movie must match or else the audio and video will be out of sync.
- Lack of support for long video clips: There is a limit to the number of frames that Flash can accept, so you might not be able to import larger videos.
When to Use Embedded Video
Because of these limitations, embedded delivery is recommended only for special cases in which you absolutely need both the video and Flash content to be in the same SWF file and when the video is short and small.