Video Advertising Standards: OpenX + OSMF video ads

This post is also available in: Russian


In this article, we will give further detail on video advertising on the Internet. We will discuss the most often used technical standards for video advertising and features offered by the OpenX open ad server. Also, we will discuss how you can use OSMF video advertising tools in combination with OpenX.

VAST and Other Standards

First of all, let’s recall how the ad server delivers online advertising. Its task is to receive an ad request sent from a webpage or a video player and return back the ad code. The server selects the ad from a set of available content based on the advertising context rules defined by the advertising campaign manager. Ad code format is regulated by the online advertising standards.

Web based banner advertising has a long history. It has emerged when the browsers had very limited capabilities. For this reason, the banner code is usually a Java Script run in a browser, or simply an iframe tag to embed images or text. Each banner network or ad server has its own type of ad code, and there have been no need to standardize it as it is run directly by the browser.

A completely different situation occurs when video ads are embedded into video players. There is a variety of video players developed for multiple platforms and technologies. You can use Flash, HTML5, native applications, and special media plugins for a variety of mobile and consumer devices. Virtually every major video portal maintains its own player(s). Nevertheless, this multitude of players has no common language to display ads. This is quite in contrast to browsers that commonly support HTML and JavaScript. Therefore, the need to standardize the advertising code instructing the player of ad sequence, had emerged.

The most famous formats used for this purpose are: VAST, MAST, and VPAID. Each of them performs its own function and can be used in conjunction with other standards. Let’s discuss each of them.

VAST (Video Ad Serving Template, current version 2.0) has been developed by the Interactive Advertising Bureau, involved with a variety of online advertising standards. VAST template is an XML requested by a video player and containing the advertising message data. The standard can support the following types of video advertising: linear ads including pre-roll, post-roll and mid-roll (i.e., displayed before, after the video or during a commercial break, respectively); overlay ads — an advertising text and/or image appearing on top of the video without interruption; or companion ads that are shown on a webpage outside of the video player but are associated with certain player events (linear ad start/end or skipping to the next video in a playlist). The template also contains URLs to be called by the player to track ad viewing events. Based on such events, ad server statistics is generated. In VAST, event alerts conform to the Interactive Advertising Bureau recommendations to measure video ad performance. Apart from the ads description, the VAST template can also contain a reference to another VAST ad located on another server. Also, you can use a special Extensions tag, to make your own custom extensions to the template.

VAST does not define all aspects of video advertising playback. For example, you cannot use it to define any complex interactions between the player, a webpage and the ad. The VAST template does not specify ad display time and location, as it is supposed that a video player is better informed of the current context to make decisions.

Another standard is MAST (Media Abstract Sequencing Template). It has been developed by Akamai under the Open Video Player initiative to standardize, on the video player level, such issues as ad sequencing and location. MAST has been designed for compatibility with VAST and VPAID.

MAST is an XML scenario defining when and where to show the particular ads. In the meanwhile, the ads to be shown are defined by VAST. This description consists of triggers (i.e., actions), their firing and ending conditions, and advertising sources and locations. The standard is not strictly dictating the content format and element semantics. This depends on a specific MAST engine implementation. For a sample implementation, please refer to the standard specification.

VPAID (Video Player Ad-Definition Interface) is also a standard developed by IAB. It regulates the interface between the interactive advertising formats and the video player. It has been designed to deal with incompatibility between the highly complex and specific advertising formats and multi-vendor video players. You do not necessarily need this standard to display simple formats, such as a linear ad or an overlay. But if these formats interact with the player in some way, for example, run scripts or pause the main video for user interaction, then using of VPAID can be justified.

The VPAID interface methods are implemented on the ad side. The ad can influence video player behavior only by sending events to it. The ad can not affect the player’s response to these events. This is done to protect the player against the malicious code injected into the ads. The advertising can support the following methods, properties and events:

  • Initialization, when the ad can specify its original status and load additional resources;
  • Alert to re-calculate ad window size when the player is resized;
  • Ad playback control – start, end, pause, continue;
  • Ad display mode management – full size or collapsed;
  • Advertising options: linear or nonlinear, expanded or collapsed, remaining time, playback volume;
  • Ad lifecycle events: download, start, end; alert of property change, alert to send events to the reporting subsystem and various user interactions with the advertisements.

Here are the examples of complex ad formats justifying the use of VPAID to achieve the maximum player compatibility: a linear ad with clickable overlay referring to the advertiser website; a clickable overlay launching a linear video ad.

However VPAID has some limitations. Both the ad and the video player must use the same technology stack. For example, you can not setup interaction between a Silverlight player and an Adobe Flash ad.

Using Standards in Development

OpenX ad server is bundled with the OpenX Video Ads plug-in. You can easily install it to enable video ad delivery in the VAST standard. By default, OpenX does not support MAST or VPAID formats.

OpenX supports two basic video ad formats: linear ad (pre-roll, mid-roll or post roll), and overlay. The overlay can be a picture, text, SWF file or an HTML code. The specifics of how a particular ad format will be presented to the user should be implemented in the video player.

For video advertising, OpenX provides all the same features of targeting and statistics as for the conventional formats. For more detail, please refer to More on OpenX Features. Moreover, video advertising reports include not only the standard measures of impressions and clicks, but also statistics on video specific events: video viewing quartiles, pause, stop, or mute. Thanks to the OpenX built-in capabilities you can add arbitrary event parameters, like video ID to trigger the ad. You can revise the OpenX statistics to make a variety of reports meeting the requirements of a particular advertising site. For example, you can design a report on ad revenue sharing with the content rights holders.

On the client side, VAST is enabled by the Open Video Ads library used in such popular Flash players as JW Player and Flowplayer. This library is downloadable, so you can use it in your own player under the GPL license. This library also supports VPAID.

The OSMF framework includes plugins to support all the three standards. Let’s consider how to embed pre-rolls into your OSMF player. To try this sample yourself, you’ll need to install the OpenX server with the OpenX Video Ads plugin and add a few test clips. To learn how to do this, please refer to our post Showing Ads in OpenX . Also, you’ll need to download the full OSMF archive with the source code, in order to use the VASTNew plugin.

First, let’s create a sprite to contain the player.


1
2
sprite = new MediaContainer();
addChild(sprite);

Then, before loading the main video, let’s send a request to the ad server to get the ad code. The link to request the ad code from OpenX will almost always look identical to the below snippet, except for your actual OpenX server URL. The only thing you should pay attention to is the zone number that is set in the zones parameter. It must be identical to the zone you have linked your ads to.


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
loadVASTDocument("http://openx.denivip.ru/openx/www/delivery/fc.php"
+ "?script=bannerTypeHtml:vastInlineBannerTypeHtml:vastInlineHtml"
+ "&zones=pre-roll0-0%3D16&nz=1&source=&r=R0.622637958265841"
+ "&format=vast&charset=UTF-8");

...

private function loadVASTDocument(vastURL:String):void
{
    var loadTrait:VASTLoadTrait = new VASTLoadTrait(new VASTLoader(),
        new URLResource(vastURL));
    loadTrait.addEventListener(LoadEvent.LOAD_STATE_CHANGE,
        onLoadStateChange);
    loadTrait.load();

    function onLoadStateChange(event:LoadEvent):void
    {
        if (event.loadState == LoadState.READY)
        {
            loadTrait.removeEventListener(LoadEvent.LOAD_STATE_CHANGE,
                onLoadStateChange);

            var generator:VASTMediaGenerator = new VASTMediaGenerator();
            var mediaElements:Vector.<MediaElement> =
                generator.createMediaElements(loadTrait.vastDocument);
            loadMediaWithAd(mediaElements.length > 0
                ? mediaElements[0]
                : null);
        }
    }
}

OSMF has embedded features to load and parse the VAST template and to create the special media elements for video ads. All you have to do after that, is to create a SerialElement to play back two videos, – first the pre-roll, and then the main video.


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
private function loadMediaWithAd(adElement:MediaElement):void
{
    var serialElement:SerialElement = new SerialElement();

    if (adElement != null)
    {
        serialElement.addChild(adElement);
    }

    serialElement.addChild(new VideoElement(
        new URLResource("http://openx.denivip.ru/"
        + "test-portal/video/omlet.f4v")));

    sprite.addMediaElement(serialElement);
    mediaPlayer.media = serialElement;
}

The framework will take care of sending events to the OpenX server and to create a clickable overlay referring to the advertiser site.

If you are interested in the OpenX open ad server, please also refer to other articles on this topic.

One thought on “Video Advertising Standards: OpenX + OSMF video ads

  1. Hi Team, I using Openx 2.8.9 but this version doesn\’t support the vpaid. I read your blog and i want buid three standards for my system.Can you support step by step ?Thanks,

Leave a Reply

Your email address will not be published. Required fields are marked *

Please type the characters of this captcha image in the input box

Please type the characters of this captcha image in the input box