HOME |   REGISTER FOR YOUR FREE AD   |  LOGIN |   
Keep surfing....
How to Record Music on the computer  
How to stream Audio and Video
Build a website  
Make a million on the web in 10 easy years
Get listed in the search engines
Build a web Database
How to get your kids interested in music
Fun with .asx files
 
Reset your sound module
Links we like
All the Search Engines
Contact Us
Advertise
Privacy
 

File or Clip Properties

When creating content, you can insert file properties, such as title, author, and copyright, directly into a Windows Media file, or you can insert the properties in the Windows Media metafile that is used to link to the content. Any properties that you enter in the metafile override those contained in the Windows Media file. You can also set properties for an entire playlist that contains multiple Windows Media streams. When you play the content, some properties are displayed on the Windows Media Player user interface, and others on the Windows Media Player Properties sheet.

Here is an example of a playlist metafile that contains global playlist properties as well as properties for individual clips that are contained inside Entry elements. In this case, the properties are set using Abstract, Author, Banner, Copyright, MoreInfo, and Title elements.

<ASX version = "3.0">
   <ABSTRACT>This text will show up as a Tooltip and in the Properties 
       dialog box.</ABSTRACT>
   <TITLE>Global title of the show</TITLE>
   <AUTHOR>The name of the author</AUTHOR>
   <COPYRIGHT>2003 by Your Company</COPYRIGHT>
   <MoreInfo href = "http://www.microsoft.com/windows/windowsmedia" />
   <Entry>
      <Ref href = "rtsp://ServerName/Path/FileName.wmv " />
      <Banner href="http://Servername/Path/Banner1.gif">
          <MoreInfo href ="http://www.microsoft.com/windows/windowsmedia" />
          <Abstract>This is the description for this clip.</Abstract>
      </Banner>
   </Entry>
   <Entry>
      <Title>Markers Discussion</Title>
      <Copyright>2003 Microsoft Corporation</Copyright>
      <MoreInfo href = "http://www.microsoft.com/windows/windowsmedia"></MoreInfo>
      <Ref href = "rtsp://ServerName/Path/markers_info.wmv" />
   </Entry>
</ASX>

The MoreInfo element adds functionality beyond simple text. In this example, MoreInfo elements add hyperlinks to the clip and show text on Windows Media Player. End users can click the text to link their browsers to Web sites that, for example, provide more information about an advertisement or music video.

With Windows Media metafile scripting, you can add Banner elements to Windows Media Player as the stream plays. With this element you can place a banner (194 pixels wide x 32 pixels high) image on the Player at the bottom of the Video and Visualization pane. You can then add a hyperlink to the banner with a MoreInfo child element.

In the example playlist, the Banner element in the first Entry element of the playlist displays an image in the banner bar of Windows Media Player just below the video display. The Banner element also contains MoreInfo and Abstract child elements that add a hyperlink and abstract text to the banner.

Ad Insertion

You can send script commands in a stream that instruct Windows Media Player to cut away from the stream and play other streams or files according to scripting in a metafile. This scripting technique can be used for inserting advertisements in a stream. For example, during a live Internet broadcast of a ball game, a script command can be sent at the beginning of every commercial break, instructing each client (Windows Media Player) to play commercials listed in its metafile. When clients finish playing the commercials, scripting in the metafile instructs each client to cut back to the live broadcast. To take it a step further, Active Server Pages (ASP pages) and server-side scripting can be used to create metafiles on-the-fly for each client. So conceivably, by using metafile scripting, ad insertion could be personalized for each end user connecting to the ball game.

Ad insertion is implemented using the Event element. The following example inserts the ad Advert.asf into the broadcast unicast stream BallGame when a client receives a script command with the Event type and the Time-Out parameter. When the ad is finished, the client resumes playing the previous entry.

<ASX VERSION="3.0">
<ENTRY>
   <REF HREF="http://sample.microsoft.com/BallGame" />
</ENTRY>
<EVENT NAME="TimeOut" WHENDONE="RESUME">
   <ENTRY CLIENTSKIP="NO">
      <REF HREF="http://Server/Content/Advert.asf" />
   </ENTRY>
</EVENT>
</ASX>

Playlists

Playlists are powerful and flexible. With playlists, you can schedule content to play in succession, or you can insert advertising or special-interest clips into a presentation after a specific period of time or at a specific point. Windows Media Services and Windows Media Player work together to play the clips in a playlist with minimal buffering time or interruption between clips.

The simplest playlists are created by adding multiple Entry elements to a metafile. Here's an example of a simple playlist:

<ASX version = "3.0">
<Title>Title</Title>
   <Entry>
      <Ref href = "rtsp://ServerName/Path/title1.wmv" />
   </Entry>
   <Entry>
      <Ref href = "rtsp://ServerName/Path/title2.wmv" />
   </Entry>
   <Entry>
      <Ref href = "rtsp://ServerName/Path/title3.wmv" />
   </Entry>
   <Entry>
      <Ref href = "rtsp://ServerName/Path/title4.wmv" />
   </Entry>
</ASX>

Server or Protocol Rollover

You can use metafiles to provide a means of automatically switching to alternate content sources when a stream cannot be accessed or played for some reason. This is called rollover, and you can use it to specify alternate content on different servers or even different types of servers. You can, for example, specify a first alternate on a different Windows Media server. If that content fails to play, the client can rollover to a second alternate on a Web server:

<ASX version="3.0">
   <Entry>
      <ref HREF="rtsp://Server1/Path/File1.asf"/>
      <ref HREF="mms://Server2/Path/File1.asf"/>
      <ref HREF="http://WebServer/Path/File1.asf"/>
   </Entry>
</ASX>

Windows Media Services 9 Series can use RTSP, HTTP, or MMS for streaming. It uses RTSP when trying to connect to Windows Media Player 9 Series. If that attempt is unsuccessful, the server uses HTTP to connect to the Player. Earlier versions of the Player do not support RTSP, but they do support MMS. If the server cannot connect to the Player by using MMS, then the server tries to connect using HTTP. Windows Media Player automatically tries to rollover to different protocols according to its Windows Media property settings before trying the rollover URLs in the metafile.

Putting It All Together

Here's an example of a metafile that includes a variety of functionalities:

  • File and clip properties set through the Abstract, Author, Copyright, MoreInfo, and Title elements.
  • Relative paths to URLs received through script commands set using the Base element.
  • Hyperlink from a banner ad to a Web page using the MoreInfo and Banner elements.
  • Banner element used to add custom graphics in Windows Media Player.
  • Playlist created by inserting multiple Entry elements in succession. The first Windows Media file plays for only 30 seconds, as specified in the Duration element.
  • Server and protocol rollover set by placing multiple Ref elements in succession within one Entry element.
  • Clip configured, by setting ClientSkip="no" in the Entry element, so that the end user cannot fast-forward through it.
<ASX version = "3.0" BannerBar = "FIXED">
   <ABSTRACT>This text will show up as a ToolTip for the show.</ABSTRACT>
   <TITLE>Show Title</TITLE>
   <AUTHOR>Show Author</AUTHOR>
   <COPYRIGHT>2003 by Your Company</COPYRIGHT>
   <Base href= "http://samples.microsoft.com/" />
   <MoreInfo href = "http://www.microsoft.com/windows/windowsmedia" />
   <Entry ClientSkip = "no">
      <Ref href = "rtsp://Server1/path/File1.asf" />
      <Ref href = "rtsp://Server2/path/File1.asf" />
      <Ref href = "http://Server3/path/File1.asf" />
      <Duration value = "00:00:30" />
      <Banner href="http://AdServer/Path/Banner1.gif">      
          <MoreInfo href = "http://www.microsoft.com/windows/windowsmedia" />
          <Abstract>This is a tooltip for clip 1.</Abstract>
      </Banner>
   </Entry>
   <Entry>
      <Title>Markers Discussion</Title>
      <Copyright>2003 by Your Corporation</Copyright>
      <MoreInfo href = "http://www.microsoft.com/windows/windowsmedia"></MoreInfo>
      <Ref href = "rtsp://Server1/Pubpoint/marker.asf" />
      <Ref href = "mms://Server1/Pubpoint/marker.asf" />
   </Entry>
</ASX>

For More Information

To learn more about metafiles, see the Windows Media metafile reference section on the MSDN Web site or download the Windows Media Player 9 Series Software Development Kit (SDK) from the Microsoft Web site. That SDK contains the metafile reference.

Legal Notice

This software is based in part on the work of the Independent JPEG Group.

GIF decompression code, copyright 1990, David Koblas. Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. This software is provided "as is" without express or implied warranty.

Back to Windows Media HOMEPAGE at meetnewplayers.com