previous next

SMIL Files with Ad Content

When you have configured your ad serving system and created your target HTML page, you can create SMIL presentations that include ads. You treat ads as you do other media clips, defining display regions, associating ads with regions, and using timing commands as necessary. Instead of giving ad URLs, though, you use <RealAdInsert/> tags to designate ad placement. The following example lays out an industry-standard ad banner (468x60 pixels) with a video clip.


<smil>
<head>
<!--presentation with video clip and ad banner-->
<layout>
<root-layout width="472" height="200" background-color="black"/>
<region id="adbanner" top="2" left="2" width="468" height="60"/>
<region id="videoregion" top="66" left="146" width="176" height="132"/>
</layout>
</head>
<body>
<par>
<video src="rtsp://realserver.company.com/video/video.rm"
region="videoregion"/>
<RealAdInsert region="adbanner"/>
</par>
</body>
</smil>

The <RealAdInsert/> tag example above includes the SMIL region attribute to associate the ad with the correct SMIL region. You can include other SMIL attributes, such as the dur or fill attribute, in a <RealAdInsert/> tag as well.

Additional Information
For information on SMIL layout and timing, see the SMIL chapter in RealSystem G2 Production Guide.

Overriding Mount Point Variables

Within a <RealAdInsert/> tag, you can override attributes defined for the ad insertion mount point in the RealServer configuration file. You might change the URL where RealServer finds the ad, for instance. To do this, include a new mount point variable and value in the <RealAdInsert/> tag just as you would include a SMIL attribute. For example, the following <RealAdInsert/> tag sets the URL where RealServer finds the HTML page that contains the ad URL:


<RealAdInsert region="adbanner" AdURL="http://www.company.com/ads.html"/>

Within that same <RealAdInsert/> tag, you could override additional mount point features by specifying a new value for AdRetrievalMountPoint, for example.

Additional Information
For more on mount points variables, see "Ad Insertion Parameters".

Embedding Clips in a Web Page

As explained in the chapter on Web-page embedding in RealSystem G2 Production Guide, you can embed any SMIL-based presentation in a Web page. You omit the SMIL layout section, then use <EMBED> tags to embed the SMIL regions and RealPlayer controls in the Web page.

If you are using GIF banner ads, it is simpler to set up your HTML page to insert the ad directly from the ad server, rather than using RealSystem ad insertion feature. If you are serving rich media ads such as RealVideo or RealFlash, the RealSystem ad insertion features will provide superior bandwidth management.

Example: Image Banner Ad with Video Clip

The following is a simple banner GIF that appears below requested video clip. The ad banner's hyperlink URL is thrown to the browser when the viewer clicks the image.

Video Clip With Banner Ad Playing in RealPlayer

SMIL File for Banner Ad

The following is the SMIL source file that lays out the video clip above the banner in the videoregion and ad_banner regions, respectively. Note that the <RealAdInsert/> tag includes an AdURL variable that sets the HTML page where RealServer finds the ad URL to include in the SMIL file. This overrides the AdURL variable configured in RealServer:


<smil>
<head>
<meta name="title" content="G2 Video Experience"/>
<meta name="author" content="RealNetworks, Inc."/>
<meta name="copyright" content="(c) 1999"/>
<layout>
<root-layout width="472" height="270" background-color="black"/>
<region id="videoregion" top="20" left="135" width="250" height="170"/>
<region id="ad_banner" top="200" left="2" width="468" height="60"/>
</layout>
</head>
<body>
<par>
<!-- Requested content -->
<video src="rtsp://lizh.prognet.com:8800/g2video.rm" region="videoregion"/>
<!-- Banner ad -->
<RealAdInsert fill="freeze" region="ad_banner"
AdURL="http://www.real.com/ads/g2ads_4.html"/>
</par>
</body>
</smil>

Returned Target HTML file

When a viewer requests this SMIL file, RealServer requests the URL http://www.real.com/ads/g2ads_4.html. This rudimentary HTML file returns an ad banner URL and hypertext link from a commercial ad server. The following shows the HTML page returned to RealServer after the ad server fills the page with an ad URL:


<HTML>
<HEAD>
<TITLE>G2 banner ads</TITLE>
</HEAD>
<BODY>
<A HREF="http://www.amazon.com/exec/obidos/ASIN/0679433740/realamzntom">
<IMG SRC="http://images.real.com/ads/pics/amzbocelli_rsr.gif"></A>
</BODY>
</HTML>

RealServer parses this returned file to extract the hypertext link URL and the image URL. It replaces the requested SMIL file's <RealAdInsert/> tag, which looks like this:


<RealAdInsert fill="freeze" region="ad_banner" AdURL="http://www.real.com/ads/g2ads_4.html"/>

with an image URL and SMIL hypertext link that looks like this:


<a href="http://www.amazon.com/exec/obidos/ASIN/0679433740/realamzntom">
<img src="rtsp://realserver.company.com/httpfs/http://images.real.com/
ads/pics/amzbocelli_rsr.gif" fill="freeze" region="ad_banner"/>
</a>

Note that the image's HTTP URL is encapsulated in an RTSP URL to RealServer.


Copyright © 1999 RealNetworks
For information on RealNetworks' technical support, click here.
Comments on this document? Click here.
This file last updated on 05/03/99 at 17:33:29.
previous next