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.
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.
sprite = new MediaContainer();
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.
private function loadVASTDocument(vastURL:String):void
var loadTrait:VASTLoadTrait = new VASTLoadTrait(new VASTLoader(),
if (event.loadState == LoadState.READY)
var generator:VASTMediaGenerator = new VASTMediaGenerator();
var mediaElements:Vector.<MediaElement> =
loadMediaWithAd(mediaElements.length > 0
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.
private function loadMediaWithAd(adElement:MediaElement):void
var serialElement:SerialElement = new SerialElement();
if (adElement != null)
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.