Posts tagged "osmf"

OSMF 1.6 Sprint 3 is here!

We have just released the next sprint drop for OSMF 1.6.  We continued to address some important bugs, a list of which can be found in the release notes.

We also want to make sure everyone is aware of the following: If StageVideo mode is enabled and a video resource is being associated with a smaller container, make sure that the scale mode will not be set to ‘none’, otherwise, the video will not be clippedaccording to the containers dimensions (this is the expected behavior).

We’ve have some really exciting advanced features in development, so be sure to check back with us over the following months.  As always, feel free to ping me with any questions or feedback at ckwon at adobe dot com.


Cathi, Sr. Product Manager for OSMF



Stage Video and Ad Insertion Plug-In for OSMF

OSMF 1.6 (pre-release “Sprint” 1) introduced Stage Video support. With Sprint 2, we wanted to see how well the implementation works for advertisement scenarios, so we created a sample plug-in for ad insertion.

Our intent is to provide the best Stage Video support in complex, multiple video scenarios and at the same time we’d like to establish a set of best practices related to implementing advertisement plugins.

Getting the source code

The source code is in the OSMF SVN repository and you can get it directly from these locations:
svn checkout
svn checkout

We have also uploaded the ZIP archive containing the source code to our SourceForge download section (check the OSMF 1.6 – Sprint 2 folder):

Using the plug-in with Strobe Media Playback

You can see a live demo of the plugin within Strobe Media Playback here:

Strobe Media Playback provides a mechanism that allows configuring and loading OSMF plug-ins through a very simple API.

A configuration snippet looks like this:

 var parameters =
     src: "rtmp://",	   		 			
     // Load the Ad Plug-in
     plugin_ads: "AdvertisementPlugin.swf",
     // Configure the Ad Plug-in
     ads_preroll: "",
     ads_postroll: "",
     ads_midroll: "",
     ads_midrollTime: 20,
     ads_overlay: "",
     ads_overlayTime: 25
 (  "StrobeMediaPlayback.swf",
     640, 480,
     { allowFullScreen: "true", wmode: "direct" },
     { name: "StrobeMediaPlayback" }

You can view the source of the live demo for additional configuration samples.

Using the plug-in with your OSMF-based player

To use the plug-in in an OSMF-based video player, you’ll need to configure and load the plug-in using the OSMF API.

The AdvertisementPluginSample application demonstrates this:

 // This is a normal video player setup.
 var mediaFactory:MediaFactory = new DefaultMediaFactory();
 var mediaPlayer:MediaPlayer = new MediaPlayer();
 var mediaContainer:MediaContainer = new MediaContainer();
 var resource:URLResource = new URLResource("rtmp://");
 var mediaElement:MediaElement = mediaFactory.createMediaElement(resource);
 // Load the plugin statically
 var pluginResource:MediaResourceBase = new PluginInfoResource(new AdvertisementPluginInfo());
 // You can load it as a dynamic plugin as well
 // var pluginResource:MediaResourceBase = new URLResource("http://localhost/AdvertisementPlugin/bin/AdvertisementPlugin.swf");
 // Pass the references to the MediaPlayer and the MediaContainer instances to the plug-in.
 pluginResource.addMetadataValue("MediaPlayer", mediaPlayer);
 pluginResource.addMetadataValue("MediaContainer", mediaContainer);
 // Configure the plugin with the ad information
 // The following configuration instructs the plugin to play a mid-roll ad after 20 seconds
 pluginResource.addMetadataValue("midroll", "");
 pluginResource.addMetadataValue("midrollTime", 10);
 // Uncomment the following lines to see a pre-roll, overlay, and post-roll ad.
 // pluginResource.addMetadataValue("preroll", "");
 // pluginResource.addMetadataValue("postroll", "");
 // pluginResource.addMetadataValue("overlay", "");
 // pluginResource.addMetadataValue("overlayTime", 20);
 // Once the plugin is loaded, play the media.
 // The event handler is not needed if you use the statically linked plugin,
 // but is here in case you load the plugin dynamically.
 // For readability, we don’t provide error handling here, but you should.
       // Now let's play the video - mediaPlayer has autoPlay set to true by default,
       // so the playback starts as soon as the media is ready to be played. = mediaElement;
// Load the plugin.

Implementation details

We chose to use the MediaPlayer API instead of the ProxyElement, SerialElement, or ParallelElement APIs. There are a few reasons why we wrote custom control code instead of using the composition APIs:

  • We have full control over the pre-buffering of the ads.
  • We don’t change the properties or traits of the main media.
  • We wanted to provide an example of how the MediaPlayer API can be used inside an OSMF plug-in.

The plug-in relies on getting references to both the MediaPlayer and the MediaContainer instances. The player is responsible for passing them to the plug-in as configuration metadata.

Implementing a mid-roll scenario involves the following steps:

  1. Pre-buffer the ad.
  2. Once the ad is ready to be played, pause the main video.
  3. Remove the main video from the MediaContainer and add the ad to it instead.
  4. Once ad playback has finished, remove the ad from the MediaContainer and add the main video back.
  5. Resume main video playback.

For displaying an overlay ad, we simply add the ad to the same MediaContainer and configure its layout.

These are some starting points. We encourage you to check the source code, and let us know what you think.


For a discussion of Stage Video in OSMF, see the OSMF Developer’s Guide. You can find the latest version of the dev guide in the latest OSMF sprint drop zips:

For more on writing plug-ins with OSMF, see the OSMF Plug-In Developer’s Guide:

Check some Stage Video related articles and content here:

Technical details about our current implementation:

Getting started with Stage Video support in OSMF and Strobe Media Playback:

Getting started with Stage Video support in OSMF and Strobe Media Playback


The guiding principle of the Stage Video implementation in OSMF is that the current API should allow a video player developer to upgrade to the latest version of OSMF and get the performance boost of Stage Video without having to modify their existing OSMF-based video players.  For more on the what, why, and how of Stage Video in OSMF, please check out our other blog post, Stage Video in OSMF.

Here I’d like to describe the new Stage Video-related features in Strobe Media Playback which you can use for troubleshooting your setup. After this, we’ll guide you through the process you can use for testing your video player with the latest OSMF codebase.

Strobe Media Playback – Watching Stage Video in Action

We have published a live Stage Video demo in our dev space on See it in here.

The player is instructed to show the Info Overlay at startup, so you should see the current version of the Flash Player installed in your browser. You can also see if the hardware-accelerated decoding and rendering is being used or not.

If you don’t have a version of Flash Player with Stage Video capability installed, the player will let you know about it:

You can download a version of Flash Player with Stage Video support here:

At this point you should be able to check that Flash Player is properly installed and see it in action:

You can see the performance boost that Stage Video brings by comparing the CPU levels in a player that uses Stage Video against a player that doesn’t. To make this kind of comparison easy, we exposed the enableStageVideo property as a configuration setting in Strobe Media Playback. When set to false, the Video object is used, even if Stage Video is available:

Check the Stage Video workflow implementation in your OSMF-based video player

Now you are probably eager to test the performance of your video player with the exploratory implementation of Stage Video support in OSMF.

For this you’ll need to get the Flex SDK that contains the latest Stage Video APIs, you’ll need our source, and you’ll need to set up your development environment.

  1. Get the source code from our Sourceforge SVN space: svn checkout
  2. Import the OSMF and StrobeMediaPlayback projects.
  3. Download the Flex Hero SDK (Flex 4.5 SDK – build here:
  4. Add the new Flex SDK to Flash Builder (right click on any project, Properties, ActionScript Compiler, Configure Flex SDKs). Set the new SDK as the default.
  5. Check that you can run the StrobeMediaPlayback project without any issues.
  6. Link your video player to the OSMF project that was imported in step 2.
  7. Go to the compiler properties (right click on it, Properties, ActionScript Compiler) and set “Use specific version” to 10.2.
  8. In additional compiler arguments add   -swf-version=11
  9. Go to your HTML page and add wmode=direct to your parameters. Your embed snippet should look like this:

, “StrobeMediaPlayback”
, 640
, 480
, “10.1.0”
, “expressInstall.swf”
, parameters
, {
allowFullScreen: “true”,
wmode: “direct”
name: “StrobeMediaPlayback”

At this point you are ready to run your video player.

Normally, your video player should behave exactly as it did before switching to the exploratory version of OSMF.


If the video is not visible, check to see if you have an opaque DisplayObject in your display list that may be covering the Stage Video. To fix this issue, you can make it transparent, for example. This was the only issue that we had to fix in Strobe Media Playback before we got seamless video playback and a great performance boost!


Getting started with Stage Video, by Thibault Imbert:

Stage Video on Adobe Developer Connection:

Get a Stage Video-enabled Flash Player 10.2:

Download the latest Flex Hero SDK:

A great blog entry and sample code, also by Thibault Imbert:

Simplifying StageVideo with StageVideoProxy,
by Kenny Bunch from Dream Socket:

Update February 19, 2010:

Here is some background on the underlying implmentation. Feedback wanted!

Stage Video in OSMF

Stage Video support, newly available with Flash Player 10.2, is now available in the latest OSMF (version 1.6, Sprint 1)  library. We’re offering some background on the “what,” “why,” and “how” of Stage Video in OSMF, with the hope of getting valuable feedback on the current implementation from our open source community.

Guiding Principles

Because of the great performance improvements that Stage Video provides, OSMF will now automatically use Stage Video whenever it is available. As a player developer using OSMF, you won’t need to worry about any Stage Video-related workflows – they are handled seamlessly.

If you have a player that uses features which are currently unsupported by Stage Video, you can still use OSMF 1.6 and exercise the (simple) option to disable Stage Video support. Your player can still be upgraded to OSMF 1.6 to take advantage of the latest bug fixes and improvements, while leaving Stage Video support aside.

Also, a website hosting an OSMF player isn’t required  to ask its users to upgrade their Flash Player version to 10.2. A site owner might want to ask his users to upgrade, especially if serving HD content, but OSMF doesn’t enforce this in any way.

The Stage Video Workflows

To add Stage Video support to a video player without using OSMF, you would need to handle workflows such as the following:

  • Monitoring when Stage Video becomes available or unavailable.
  • Making sure that videos are positioned correctly when switching from Video to Stage Video.
  • Keeping track of the instances that are currently in use when working with multiple Stage Videos.

You would also need to create a suite of automated unit tests and test these workflows on different operating systems and Flash Player-enabled devices.

By using OSMF, all these aspects are now handled for you. (And, at the same time you become part of a growing open source community that continuously contributes to the quality of this framework.)

One-Line Disabling of Stage Video Support

To turn off Stage Video support in an OSMF player, simply add the following snippet to your video player code before you create any media element:

OSMFSettings.enableStageVideo = false;

Flash Player Versions and OSMF Compilation Targets

Currently, OSMF is available in two variants:

  • OSMF for Flash Player 10.0 – This is the variant that provides the core OSMF features and the largest possible installed Flash Player base.
  • OSMF for Flash Player 10.1 – This variant contains support for additional 10.1 features such as Multicast, HTTP Streaming, playback of protected content, and Stream Reconnect.

Until Flash Player 10.2, if you didn’t use any of the 10.1 features, you didn’t need to worry about the OSMF 10.1 APIs at all. There are, in fact, many OSMF customers still using the 10.0 variant.

However, with the release of Flash Player 10.2, even developers who aren’t using any 10.1 features probably will want to make use of Stage Video, if possible. Therefore, instead of adding one or more additional OSMF compilation targets at this point, we decided to keep the current two variants and add Stage Video support to them both. Whichever OSMF variant you choose, you get Stage Video support by default.

Feedback Wanted

We’d love to hear about your experience with using the Stage Video support in OSMF.

In particular, we’d like to get feedback on the following:

  • Do you need additional access to Stage Video APIs?
  • If yes, what use cases would you try to implement, and how would you need to be notified of the Stage Video state changes?


Stage Video in OSMF is here!

We are pleased to announce the first sprint drop of OSMF 1.6!

The key feature of this sprint drop is support for Stage Video, a new feature in the recently released Flash Player 10.2.  Stage Video is a full hardware accelerated video pipeline, which enables playback of 1080p video while consuming only 1-15% of the CPU on a common Mac or Windows computer.

Adobe continues to evolve our video platform, enabling publishers to offer the best user experience possible, and Stage Video is the most recent addition.  We hope that you will check out the latest OSMF sprint drop and provide us with feedback on our Stage Video implementation.

Great article by Patrick Heinzelmann

Patrick Heinzelmann has done a great job of clearly laying out the differences between OSMF, Strobe Media Playback and Flash Media Playback Take a look at: Open Source Media Framework vs. Strobe Media Playback vs. Flash Media Playback

OSMF Classes at MAX

Adobe MAX 2010 is coming up like a freight train !  We have several great OSMF classes you can attend, taught by Brian Riggs, Greg Hamer and R Blank.  Go and sign up now at

Here is the class information:

Making Video Pay with Advertising and Analytics:  1 hour session with Brian Riggs

Explore how video players developed with Open Source Media Framework (OSMF) can be customized with ActionScript APIs and plug-ins. Learn how to integrate video with external media service providers including advertising, analytics, CDNs, and more. Led by OSMF engineers, this… Read more »

Explore how video players developed with Open Source Media Framework (OSMF) can be customized with ActionScript APIs and plug-ins. Learn how to integrate video with external media service providers including advertising, analytics, CDNs, and more. Led by OSMF engineers, this session will be a full deep dive on developing OSMF plug-ins to integrate robust media and video experiences that use delivery methods from HTTP through RTMP to reach the most people.

Robust Video Player Development with OSMF: 1.5 hour BYOL with Greg Hamer

Discover how Open Source Media Framework (OSMF) and the Adobe compiled version, Strobe Media Playback, make video player development simpler than ever. This lab will step you through a project using Adobe Flash Builder to start building robust video players… Read morDiscover how Open Source Media Framework (OSMF) and the Adobe compiled version, Strobe Media Playback, make video player development simpler than ever. This lab will step you through a project using Adobe Flash Builder to start building robust video players with all the features and functions seen on many popular websites today. You can make your company look great by learning how to easily implement HTTP Dynamic Streaming, Flash Media Server, DRM, advertising, and Omniture analytics. Save money in development and reach your audience faster with a better video experience.

Designing customer video players:  a 1.5 hour BYOL with R Blank

Find out how to create the best-looking HD video experiences on the web or on devices. Discover how easy it is to create custom skins for Strobe Media Playback, Adobe’s prebuilt video player (now in beta), and built on top of the feature-rich and robust Open Source Media Framework. Using Adobe Photoshop CS5, Illustrator CS5, and a little bit of Flash Professional CS5, you’ll step through the creative process to generate custom player skins and apply them to fit your business.

TubeMogul Plug-in for OSMF

Check out one of our newest Plug-in partners, TubeMogul.   They have just annouced a free video analytics service, which will be a great tool for detailed tracking of the usage of your OSMF based player.  As TubeMogul puts it:

 “TubeMogul InPlay’s analytics are relied on daily by thousands of top publishers and advertisers, from Discovery Networks to Red Bull. These very same analytics are now yours — free. InPlay’s self-serve suite seamlessly integrates into any OSMF player within minutes. Metrics tracked include streams, uniques, time-watched, city-level audience geography, video player embeds, what sites and search terms are referring viewers, completion rates and much more. Performance metrics include bandwidth delivered (and wasted), rebuffer rates by geography and more. All data is easily shared to clients and exported via Excel, data feeds and APIs. TubeMogul InPlay’s metrics can also be compared by any custom dimension, creating endless possibilities to increase publishers’ bottom lines.”


Another great OSMF player

Check out the live KickOff Concert for the World Cup at . Greg Hamer, one of the co-managers of the OSMF Users Group helped create the player with Vevo, AEG Live and Conviva. Learn more about it at Greg’s blog: blog  (and catch some of that World Cup fever at the concert ;>

OSMF App Studio

Our terrific partner KickApps has just launched a new hosted service for creating OSMF based video players.  It features a very intuitive drag and drop interface for creating your own custom player, and powerful integration with a variety of different plug-in partners.  Go and take a 30 day free trial at