StageVideo, Part 1: What is it?

I've been working with StageVideo more this year, as I've been giving talks on the topic (most recently at Adobe MAX). I posted the commented code from that talk (the simple code demo, and the more complex code demo), but didn't go into much detail about StageVideo itself and how it works.

So I thought it might be helpful to discuss it across a series of a few blog posts.

We'll start with what StageVideo is. StageVideo is hardware-accelerated video playback. What does that mean? It means that Flash puts more of the burden on your graphics card (or GPU), reducing the burden on the CPU.

The result? Massive performance savings. Of course, it depends on what you are trying to render on the screen, but in my talk I show Flash playing an HD video with some simple vector graphics rendering on top — without StageVideo I'm at 75% processor usage, and with StageVideo, I was running at 10% processor usage. WOW! Right?

What does that actually mean in practice? It means that you can deliver super high-res HD video through the Flash Player without dropping frames to more and more devices. I mean, the video quality that Flash Player can now support is pretty intense and amazing.

Now, it's important to realize that there are actually four different paths that your video can take to the screen — three of which are hardware-accelerated to different degrees. This depends on whether you use StageVideo or traditional Video, and whether you are playing a hardware-accelerated video codec (H.264) or a non-accelerated codec (Spark or VP6).

I try to summarize those paths in this slide from my talk:

As you'll note, the fourth path, when you utilize an accelerated video codec (H.264) and StageVideo is the most "Direct" path to the screen — the path that yields the optimal video rendering performance on the viewer's device.

Which devices?

As of right now, StageVideo works in the Flash Player for desktop browsers (Flash Player version 10.2 and later), AIR for Android (Honeycomb or later) and AIR for iOS. Support for AIR for the desktop is coming. (Yes, the StageVideo API includes awareness of whether or not StageVideo is currently supported on the viewing device.)

So, if you want to deliver the optimal video experience in Flash, you want to utilize StageVideo.

In subsequent posts, I'll discuss how to use StageVideo. But, if you'd like to get started seeing what quality video you can get through Flash, you can use Flash Media Playback, which is an Adobe-hosted video player to play your Flash media. Flash Media Playback will utilize StageVideo by default.

To get started with it, simply visit the Flash Media Playback Configurator, enter in the URL of your video, and click 'Preview'. You can change the dimensions of your video player to test playback at different sizes. And, if you like what you see, just copy the embed code and paste it anywhere else on the internet (your blog, forums… anywhere).

Share and enjoy!


Category: Code & Samples, General Posts

Tagged: , , , ,

3 Responses

  1. [...] s.parentNode.insertBefore(po, s); })();TweetIf you recall, in Part 1 of this series, I discussed what StageVideo is, and described some of the remarkable performance improvements that [...]

  2. Andrew says:

    Where does the multithreaded video decoding (desktop) feature in AIR 3.2 fit into your discussion on video paths?

    • rblank says:

      Andrew, I do not believe that StageVideo is yet supported on desktop AIR in 3.2. So, with multi-threaded video, rendering is improved and accelerated, but not hardware accelerated by stage video.

Leave a Reply