Preparing Your Content to migrate away from Windows Media Services
Windows Media Player renders audio and video content in the same way, whether a file is on a Windows Media server, a Web server, a network server, or a local hard disk. The server does not affect the quality of the media. What the server does affect is how the packets of data that contain the media are delivered to Windows Media Player.
A Windows Media server is designed to handle busy, congested networks and low-bandwidth connections to client computers that are running Windows Media Player. This section describes what you should consider before you encode content that will be hosted on a Web server, and then shows you how to configure Windows Media Encoder 9 Series.
Encoding Content for a Web Server
If you stream by using a Web server instead of a Windows Media server, keep these things in mind:
- A Web server is not designed for streaming media, so playback is more likely to be interrupted by periods of buffering. Buffering occurs when Windows Media Player is not receiving audio and video data packets fast enough. Windows Media Player has to stop to refill its memory buffer before it can proceed with playback. To help correct for this, you may have to encode files at a lower bit rate than you would if they were being streamed from a Windows Media server.
- Web servers do not support intelligent streaming. Multiple-bit-rate files contain a number of video streams—each of which are encoded at a different bit rate. These files enable the server to perform intelligent streaming. When using intelligent streaming, Windows Media Player sends feedback to the Windows Media server about current network conditions. The Windows Media server then delivers the most appropriate video stream for the current bandwidth from among the streams that are contained in the file. Because a Web server has no mechanism for dealing with intelligent streaming, it sends the entire file, which contains all the streams, and only the highest bit rate stream plays. This can result in wasted bandwidth and a poor user experience.
The procedures in this section describe how to configure Windows Media Encoder 9 Series for Web server streaming. You can download the encoder from the Windows Media Web site. These procedures include:
- How to configure Windows Media Encoder 9 Series to encode a file.
- How to create a Windows Media metafile.
- How to add a tag to an HTML file.
To configure Windows Media Encoder 9 Series to encode a file
- On the toolbar, click New Session. The New Session Wizard starts.
- On the Wizard tab, click Convert a file.
- On the File Selection screen, type both the file that you want to convert (the source file) and the file that you want to create (the output file).
- On the Content Distribution screen, click Web server (progressive download). When you click Web server (progressive download), only those encoding options that pertain to encoding files for Web servers are displayed.
- On the Encoding Options screen, select how you want to encode your audio and video from the lists, and then click to select the appropriate bit rate check box.
- On the next two screens, type display information and review your settings.
- After you quit the wizard, click Start Encoding.
If you want to edit or create a new a profile, click Properties, and then click Edit on the Compression tab. In the Custom Encoding Settings dialog box, you enter the primary settings that the encoder will use to create your content. Keep in mind that the file you encode for a Web server must be able to play as it is downloading (progressive download). Therefore, for the smoothest playback, you should choose CBR (Constant Bit Rate) mode and only one bit rate.
Note: Creating and managing profiles is a method provided for advanced users with a detailed knowledge of bandwidth capacity, media settings, and codec usage. For more information, see Windows Media Encoder Help.
After you encode your files, there are two more steps to prepare your content for streaming from a Web server: creating Windows Media metafiles with .wax, .wvx, or .asx file name extensions, and adding tags to your HTML files. The HTML tag points the user’s browser to the metafile, which points Windows Media Player to the content (the Windows Media file). You must use a metafile to reference the media because a direct reference to the media in an HTML tag will cause many browsers to attempt to download the media rather than stream it.
How to create a Windows Media metafile
- Open a text editor, such as Notepad.
- Type the following metafile script, but replace the URL with that of your file. Reference the audio or video file just as you would any other Web file.
- You can place the metafile in the same folder as that of your digital media file. If you do so, you can use a relative path, which is simply the name of the file. The REF line would look like this:
- Save the text file using the name of your digital media file followed by the .wvx extension if the metafile points to a file with a .wmv extension, or .wax if the metafile points to a file with a .wma extension, such as YourFile.wvx. You can also use the .asx file name extension for either audio or video.
When an end user clicks the reference on the Web page, the metafile is downloaded and Windows Media Player opens. Windows Media Player opens the metafile, and then opens and plays the Windows Media file from your Web server.