Accessibility

TechNote

Video strategies for Macromedia Flash websites

Introduction

Video support in Macromedia Flash has continued to evolve since its introduction in Flash MX and Flash Player 6. Flash Player 7 greatly improves video quality, supports higher frame rates, and provides additional opportunities for loading dynamic media at runtime.

At the core of Flash video is the Flash for Video (FLV) file format. FLV files contain encoded audio and video data that is highly optimized (through the use of Sorenson's Spark codec) for delivery through the Flash Player. This keeps the Flash Player footprint as small as possible by using a single video rendering format.

Edited video content is encoded into the FLV format as it is imported into the Flash authoring environment (or encoded into FLV format from third party applications via the Flash Video Exporter plugin). Once imported into the Flash authoring environment, FLV files can be converted to movie clips and can benefit from all of the programmatic manipulations ActionScript has to offer, or exported back out as standalone FLV files that can be invoked and streamed by the Flash player.

On the delivery side, developers can choose from a variety of options for embedding video into Flash movies or options for streaming external video files at runtime, or options for exporting Flash video to other formats. Developers need to carefully consider the types of video content, bandwidth, length, and the level of user interaction needed before choosing a suitable delivery mechanism.

In this TechNote we give an overview of the new video capabilities in Flash MX 2004 and Flash MX Professional 2004 and discuss some of the different strategies for incorporating and deploying Flash video. There are additional informational, how-to, troubleshooting, and third party resources at the end of this document to aid developers in using video for Flash.

Overview of new video capabilities in Flash MX 2004

With the introduction of the Flash MX 2004 platform, support for video has improved with the addition of many new capabilities to the authoring and runtime environment, giving developers moreoptions for delivering embedded video and progressive and streaming files. In short, developers have many new choices to tailor the delivery method to best match the nature of differing video content and ultimately to deliver the best possible user experience.

  • Video Import Wizard
    The wizard adds many new choices for encoding imported audio and video as well as providing basic clip scaling, cropping functions and contrast and brightness controls.
  • Media Components (Flash MX Professional 2004 only)
    a set of authoring components that enable connections to external video files and connections to Macromedia's Flash Communication Server (available separately), and a new set of Behavior actions that work with Slides to accelerate and simplify the creation of advanced interactive video presentations.
  • Flash Video Exporter (Flash MX Professional 2004 only)
    a new plug-in for use with third party applications that enables users to export Flash encoded audio and video directly from a third party authoring environment.
Video strategies for Flash websites

There are several alternative approaches to using video with a Macromedia Flash-based website. The overriding factor in choosing the optimum method for delivery is performance, which developers can best address by matching the appropriate delivery mechanism with the actual content. For example, approaches that work for short video clips embedded into a Flash movie will not work with large video files that require external streaming. Likewise it is not efficient to architect, code, deploy, and maintain an elaborate client-server delivery mechanism when presenting short, highly-compressed and optimized clips.

Video content has its own set of considerations that developers must take into account when applying optimal compression techniques which have an effect on image quality and file size. Developers must consider all of these factors and decide on what tradeoffs are acceptable when selecting the most appropriate method for delivering video within the Flash player.

There are three distinct approaches for delivering video content with FlashMX 2004 and Flash Player 7:

  • Embedded FLV Video content is imported into the Flash authoring environment and embedded into the published SWF.
  • External FLV Video content is remotely played from a host SWF containing a user interface and movie controls linking to the external file. Options include Progressive and Streaming FLV downloads to the Flash player.
  • Exported FLV Content created in Flash is exported to QuickTime, AVI, or sequences of still frames for playback by other software.
Embedded FLV

Embedded video is a straightforward method of delivering short video clips and has been around since Flash Player 6. It is an easy to use, timeline based technique and gives quick results. Video clips can be imported and encoded into the Flash authoring environment. Playback is limited to simple play and stop commands, and the video framerate must match that of the host movie, an important consideration that will require authoring for the lowest-common-denominator download speed.

For web delivery, content must be completely downloaded and must fit into available memory on the user's machine before playback can begin. The biggest limitations to embedded video are movies having a maximum of 16,000 frames and audio sync cannot be maintained beyond about two minutes. The entire video clip must be published each time the movie is tested or previewed, which can lead to lengthy authoring sessions.

Progressive FLV

Flash Player 7 introduced progressive download, a technique where external FLV files are cached on the user's local hard drive and played through the host SWF at runtime with no limitation to the file's size or duration. Audio and video stays in sync and the frame rate is completely independent from that of the movie host, enabling developers to create several versions of content optimized for different download speeds. Since an external FLV is published separately from the host FLA , authoring time is more efficient. For lengthy audio/video content that requires fairly straightforward delivery, external progressive FLVs can be a good choice.

The Flash MX Professional 2004 authoring environment contains Media Components that can be used to quickly add FLV or audio MP3 playback control to a Flash project. Media Components provide support for both progressive and streaming FLV files.

Streaming FLV

Streaming FLV files have many of the same properties of Progressive FLV files but are remotely served from Macromedia's Flash Communication Server (available as a separate product). This approach provides the most efficient delivery of FLV and audio MP3 files by streaming data to the host SWF file and requires the least hard disk and memory resources on the client end. Since data is not cached locally on a user's hard disk, this technique also provides the most secure method of delivering media.

Macromedia's Flash Communication Server has the ability to deliver multiple simultaneous real-time communications, provides smarter delivery of content by adjusting to the client's connection speed, and has advanced monitoring of traffic and throughput. For media projects that require the greatest flexibility in efficiently handling the most complex data streams, this is the best choice for delivery.

Exported FLV & QuickTime Flash Tracks

Flash can export movies to other formats such as Apple's QuickTime or Microsoft AVI. Flash can also export image sequences to a variety of formats, such as GIF, PNG, JPG, AI and EPS.

Note: AVI export is only available in Flash for Windows.

QuickTime video can be imported into Flash where Flash tracks can be added and exported back out as QuickTime and played with the QuickTime player or plugin. This provides much of the Flash feature set, especially navigational overlays and sprites, directly into a separate track within a QuickTime movie. Another use is to use Flash to "translate" graphics formats not supported by QuickTime into QuickTime movies.

Note: QuickTime support for Flash is usually based on the next-to-latest version of Flash. The current version of the QuickTime Player (version 6 as of this writing) supports playback of Flash Player 5 SWF files. This is because Apple's development of QuickTime is not synchronous with Macromedia's latest Flash Player development. Also, it is up to the software developer to decide how much of the Flash player feature set to include in its own players, so it is likely that not all of the Flash player functionality will be present in all software titles. This can limit the scope of ActionScript that can be carried out on these titles. For details see Apple's Developer Center article onQuickTime 6 support for Flash.

The Flash Media Handler inside the QuickTime player supports an optimized case for the alpha channel graphics mode, allowing a Flash track to be cleanly composited over other tracks. QuickTime allows the SWF file format to execute any of the standard Flash movieclip actions.

When exporting a QuickTime movie from Flash, you can specify dimensions, alpha transparency, layer options, streaming sound, controller placement, playback options, and more.

Deployment on CD-ROM/DVD

Flash content can be authored for deployment in CD-ROM or DVD, usually by creating a standalone projector that encapsulates the content and the Flash player. In cases where more functionality is needed than the Flash player is designed to provide, or in cases where full-frame video needs to be deployed along with graphic or sound assets not handled by Flash, it may be more suitable to develop in an authoring environment such as Macromedia's Director.

Additional Macromedia Developer Center and Support Resources
Macromedia How-to TechNotes about video
Macromedia Video Troubleshooting TechNotes
Third Party sites related to Flash and video

This list is not comprehensive, and these tools are not recommended or supported by Macromedia Technical Support, but they may be helpful:

  • Sorenson Squeeze for Flash MX - a comprehensive video compressor from the developers of the spark codec used in Flash
  • Anystream Agility - software for simplifying the process of transforming media for use on the Internet
  • Strata DVPro and Strata 3D Pro, Strata DV editor
  • RAD Game Tools has a free product called Smacker which can take an AVI, MPEG, MOV, and other video formats and create a series of JPG, BMP, GIF, etc. and export the audio to a WAV. These formats can then be imported into Flash.
  • KIRUPA "Flix" - convert video directly into SWF
  • FlashAnts - SWF2Video Plug-in for Adobe Premiere Pro
  • As the time of this writing the Flash/QuickTime discussion list is located at http://groups.yahoo.com/group/flashquicktime
  • Webmonkey.com:Multimedia:Video (contains general video articles)

AlertThis content requires Flash

To view this content, JavaScript must be enabled, and you need the latest version of the Adobe Flash Player.

Download the free Flash Player now!

Get Adobe Flash Player

Creative Commons License

Search Support


Document Details

ID:tn_14571
Browser:Chrome
Internet Explorer
Netscape
Opera
Safari
Firefox
Database:DB2
Informix
MySQL
Oracle
SQL Server
Sybase
MS Access

Products Affected:

flash