Understanding Metafiles and Packages


Windows Media provides many options for packaging and presenting content, and this enables you to create an engaging experience for end users. Most options deal with creative ways to use and program Player features, such as skins, borders, HTMLView, metadata, custom plug-ins that you can build to add functionality to the Player, and a versatile Player object model. The Windows Media Player SDK describes these options and how to implement them.

The SDK also describes how to package and present content using Windows Media metafiles. While the options just mentioned enable you to customize the look and functionality of the Player, metafiles enable you to customize the presentation of the content itself. The main function of a metafile is to create playlists, which are simply lists of digital media content.

Metafiles were originally created to provide a simple redirection function. When linking to a Windows Media stream on a Web page, rather than reference the stream directly, you reference a metafile that contains the URL of the stream. When an end user clicks the link, the metafile downloads and the browser opens Windows Media Player. The Player then interprets the contents of the metafile, locates the stream, and begins playback.

The reason for adding this redirection mechanism is that many browsers are not designed to handle streaming media protocols, like MMS and RTSP. For example, if you were to link directly to a file on a Windows Media server with a URL that began with “mms://”, one browser might attempt to download the content and generate an error when it could not, while another browser might attempt to display the content as a Web page.

The basic metafile, then, acts as a simple redirector and contains a link to a file or live stream. Later versions of the metafile enable you to add multiple links to the metafile and create playlists of digital media content. You can also package the playlist with other content and create download packages.

Uses for Metafiles

The following sections summarize the different presentation solutions provided by Windows Media 9 Series metafiles.

Simple Redirector

The metafile contains the URL of one file or stream. The Player opens and interprets the contents of the metafile, and then plays the digital media. Metafiles are typically hosted on Web servers and linked to from Web pages with a URL such as http://WebServer/Content.asx. However, they can also be sent in e-mail messages or included in a download package.

Simple redirectors are a type of client-side metafile, meaning they are downloaded and interpreted by the Player software. Client-side metafiles use file name extensions such as .wvx, .wax, and .asx. You can use .wvx if the digital media contains video, .wax if it contains audio only, and .asx if it contains a mix of content types, such as a playlist that contains some audio and some video files.

Client-side Playlist

The same as a simple redirector, except that it contains multiple URLs of files and streams. The Player opens and interprets the metafile, and then plays each file or stream in order. The metafile can also contain descriptive information and URLs of image files, called banners, which are displayed on the Player. Links can be associated with titles and banners. When an end user clicks a linked banner, for example, the browser opens to the Web page in the link. As with a simple redirector, a client-side playlist uses .wvx, .wax, and .asx extensions.

Windows Media Download Package

A client-side playlist can be packaged with a skin, images, and possibly digital media content in a Windows Media Download Package file. Then the file can be downloaded by end users or delivered on other media, such as CDs. The Player opens the download package file, interprets the metafile and the skin definition file (if there is one), displays the skin as a border, and runs the playlist. Windows Media Download files use a .wmd file name extension.

Server-side Playlist

With a server-side playlist, the concept and end-user experience are similar to a client-side playlist, but the implementation is different. Instead of being downloaded from a Web server, a server-side playlist is hosted on a Windows Media server and is handled like a digital media file, using a protocol such as RTSP or MMS. You link to a server-side playlist file with a simple redirector file. The Player opens and interprets the redirector, locates the playlist, and then plays the server-side playlist as a stream, but without downloading it.

With a client-side playlist, the Player does the work of interpreting the playlist and locating the digital media. With a server-side playlist, the server does all that. A server-side playlist is written using Synchronized Multimedia Integration Language (SMIL), and has a .wsx extension. An example of a server-side playlist URL is rtsp://WMServer/Playlist.wsx.

Server-side Playlist on a Publishing Point

You can also make the playlist file the source of a publishing point. End users can then access the playlist by linking to the publishing point instead of the playlist file, using a URL such as rtsp://WMServer/PubPointPlaylist. One advantage of hosting a playlist from a publishing point is that you can customize the publishing point properties applied to the playlist, such as limits, security, and forward error correction. Another advantage is that you can broadcast the playlist. This is how Contoso Movies Online is going to implement the movie info channels. Each channel is a broadcast publishing point that sources from a server-side playlist.

Working with Metafiles

There are many ways to use these metafiles to create a custom presentation. We will use the following tools, which we will describe in more detail as we see how the Contoso staff creates a mockup of an info channel:

Wrappers

Think of a wrapper as a playlist that includes the source of a publishing point as one of its media elements. You can create a wrapper playlist for a publishing point that plays content when an end user first connects, when a publishing point source ends, and at points during a source playlist. For example, when an end user accesses a video file from a publishing point, a wrapper can be used to play an ad file before or after the video. Contoso will use wrappers in the info channel to display an image file before switching to the broadcast in progress, and to play an ad during the playlist.

ASP Pages

The entries in client-side or server-side playlists typically refer directly to a file or stream, such as mms://MovieServer/LivePublishingPoint. However, the entries can also point to content through an ASP page. For example, an entry in a playlist can point to an ASP page with a URL like httpd://AdServer01/AdRotator.asp.

The advantage of being able to access content through ASP pages is that you can create dynamic playlists. For example, you can serve ads in a playlist that are personalized to each end user, or you can add content on the fly to a playlist that is running. The Contoso info channel will use an ASP page to access a playlist that plays ads randomly.




Microsoft Windows Media Resource Kit
Microsoft Windows Media Resource Kit (Pro-Resource Kit)
ISBN: 0735618070
EAN: 2147483647
Year: 2005
Pages: 258

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net