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
 

Introduction to Windows Media Metafiles

David Wrede
Microsoft Corporation
August 2003

Applies to:

Microsoft® Windows Media® Player 9 Series

Summary

Windows Media metafiles provide metadata and playback instructions for digital media files. There are two types of metafiles: client-side and server-side. Client-side metafiles provide instructions for Windows Media® Player, while server-side metafiles provide instructions for a Windows Media server. This article describes how to use client-side metafiles with Windows Media Player 9 Series.

Introduction

Windows Media metafiles, commonly known as playlists, are text files that link Web pages to Windows Media–based content on a Windows Media server or Web server. The purpose of a metafile is to redirect streaming media content away from browsers, which in most cases are not capable of rendering the content, to Microsoft® Windows Media Player. Windows Media metafiles have a .wvx, .wax, or .asx extension. When a browser downloads a file with one of these extensions from a Web site, the browser opens Windows Media Player. Windows Media Player then locates and plays the content specified in the file.

A Windows Media metafile contains a type of Extensible Markup Language (XML) scripting that can be interpreted only by Windows Media Player. A metafile script can be as simple or complex as you need it to be. The most basic metafile contains simply the Uniform Resource Locator (URL) of some digital media content on a server. A complex metafile can contain references to multiple files or streams arranged in a playlist, instructions on how to play the files or streams, text and graphic elements, and hyperlinks associated with elements on the Windows Media Player user interface.

At the end of this article you will find the code for an example metafile that demonstrates the features described in the rest of the article.

This article covers the following topics:

Creating a Simple Metafile

To get started creating a simple metafile, open your favorite text editor, such as Microsoft Notepad, and type the following items:

<ASX version="3.0">
   <Entry>
      <ref HREF="Path"/>
   </Entry>
</ASX>

In the third line, replace Path with the path or URL of your Windows Media–based content using a syntax from the following table.

Source of content Syntax
File on a Windows Media server rtsp://ServerName/Path/FileName.wmv
Multicast stream that is accessed from a Windows Media server http://WebServerName/Stations/kxyz.nsc
Unicast stream that is accessed from a publishing point on a Windows Media server mms://ServerName/PublishingPointAlias
File on a Web server http://WebServerName/Path/Filename.wmv
File on a network share file://\\ServerName\Path\Filename.wmv
File on a local hard disk file://c:\Path\Filename.wmv

After you type this into Notepad, save the file as Filename.wvx if it is used to redirect video files that have a .wmv extension. Save the file with a .wax extension if it redirects audio-only files that have a .wma extension. Typically, Filename is the name of the Windows Media file or stream, but it can be any name you choose. Check to be sure that the metafile is working by double-clicking its file name in Windows® Explorer. Windows Media Player should open and start streaming the content.

After you've confirmed that the metafile works, save it to your Web server along with your Web pages, and link to it by means of an <a href> tag, or embed it in a Web page using the <OBJECT> tag.

Click here for more, page 2 of the article......