What is Flash Stage Video, and How Does It Affect Me?

Feb 22, 2011


Last week, Adobe released a new version of Flash – 10.2, containing a new hardware acceleration mode for H.264, called Stage Video.

Common Questions:

Doesn’t Flash already support hardware acceleration for H.264?

In general, the answer to this question is “yes,” if you’re using Flash version 10.1. Your mileage may vary, depending on system hardware capabilities and Flash’s support for various hardware. Here’s how standard Flash hardware acceleration works:

  • Video content is downloaded or streamed from content server.
  • Flash passes the video bytes directly to the hardware H.264 decoder, if available.
  • The decoder sends back the raw decoded video to Flash
  • Flash composites the video with all of the other non-video visual elements (in the JW Player’s case, this includes the controlbar, playlist, plugins, etc.). This happens for each frame of the video, assuming there are no skipped frames.
  • The Flash plugin places the composited image into the web browser.

This method is vastly more efficient than the non-hardware-accelerated alternative, where Flash performs the H.264 decoding in software.

If Flash already has hardware acceleration, why do we need a new method?

In general, enabling hardware acceleration for H.264 decreases the load on the CPU. However, because Flash is still rendering video once per frame and compositing all of the Flash graphics with the video, there is still significant overhead involved. This manifests itself more clearly with larger videos (1080p and above) and slower CPUs.

Adobe’s solution is to remove the video from Flash’s rendering pipeline entirely. Enter Stage Video.

Here’s how it works:

  • Video content is downloaded or streamed from content server.
  • Flash passes the video bytes directly to the hardware H.264 decoder.
  • Flash instructs the decoder to render the video directly to the screen.
  • Flash renders all of the non-video elements and places them on top of the rendered video.

Because Flash no longer has to make any calculations to render the video, this takes even more load off of the CPU.

Are there any limitations to Stage Video?

Yes, there are a couple of limitations, and for some applications, they can be a deal-breaker. Luckily, for most web video player applications, such as the JW Player, these limitations aren’t as big of a deal:

  • Since Flash is no longer involved in the video rendering pipeline, features such as visual effects, translations and transformations are not available in Stage Video mode.
  • The “wmode” (window mode) Flash parameter must be set to “direct” in most browsers. This means that the Flash plugin can’t be placed above or below any HTML entities on a web page. Stage Video is available in full-screen mode regardless of what “wmode” you use.

When will the JW Player support Stage Video?

We haven’t nailed down a timeline for Stage Video support, but it’s on the short list of future player improvements. We’ve already created a player with experimental support for Stage Video. You can download it here, and enable Stage Video acceleration by setting the provider option to stage. For now, only standard progressive download mode is supported (no [nid=12534 HTTP] or [nid=12535 RTMP] streaming).

To benchmark the new player, open up your Task Manager (on Windows) or Activity Monitor (on Mac OS X) and take a look at Flash’s CPU utilization while watching an HD video. Try your video with provider set to stage, (Stage Video on), then switch provider to video to see how the player performs without Stage Video.

As always, we’d love to hear your feedback in the comments below.