Previous | Next

Multimedia Streaming with NetShow

Microsoft NetShow version 2.0 is a platform for streaming multimedia over networks ranging from low-bandwidth dial-up Internet connections to high-bandwidth switched local area networks. Using NetShow, companies can offer new streaming content for such applications as training, corporate communications, entertainment, and advertising to users all over the world. NetShow is a powerful broadcast system that is easy to acquire and operate and that empowers companies to offer rich, high-quality interactive content over networks.

Microsoft NetShow 2.0 provides a complete platform for integrating audio and video into online applications, bringing the power of networked multimedia to the Internet and corporate intranets. With its leading-edge live and stored media-streaming technology, Microsoft NetShow 2.0 allows users to receive audio and video broadcasts from their personal computers. It uses a client/server architecture and sophisticated compression and buffering techniques to deliver live and on-demand audio, video, and illustrated audio (synchronized sound and still images) to users of the NetShow Player. The NetShow Player continuously decompresses and plays the content in real time. Users can listen and watch live audio and video programs or navigate on-demand audio and video content.

Note

NetShow complements NetMeeting, and the two make up Internet Explorer’s main delivery systems for multimedia communication. Whereas NetShow delivers content from one source to many on the Internet or an intranet, NetMeeting allows person-to-person and group interactive sessions.

Advanced Streaming Format

Advanced Streaming Format (ASF) represents the file format in which NetShow content is created. It is a low-overhead storage and transmission file format that encapsulates multimedia data types (images, audio, and video) as well as embedded text (URLs, for example) and allows for the synchronization of these objects within a stream. When you create NetShow content, you create ASF streams or files.

ASF provides industry-wide multimedia interoperability, with ASF being adopted by all major streaming solution providers and multimedia authoring tool vendors.

Each ASF file is composed of one or more media streams. The file header specifies the properties of the entire file, along with stream-specific properties. Multimedia data, stored after the file header, references a particular media stream number to indicate its type and purpose. The delivery and presentation of all media stream data is synchronized to a common timeline.

NetShow Player

There are two ways of using NetShow Player to play content:

Installing and Configuring the NetShow Player

Playing ASF files requires prior installation of the Microsoft NetShow Player, a third-party player that supports ASF files, or an application that supports the NetShow ActiveX control. After the player is installed, a user either clicks on a link to the NetShow content and it plays in an external help application, or it plays embedded in an HTML page or application that uses the NetShow ActiveX control. Whether content plays in the external player or is embedded is determined at the time the content is authored. The NetShow ActiveX control ships with the NetShow Player installation.

Where to Find the NetShow Player

The NetShow Player is available in the full installation of Windows 98. If you select the full installation when installing Windows 98, it gives a choice of components to install. Choose the category Multimedia, and you will be allowed to select Microsoft NetShow Player 2.0.

It is also available on the Microsoft NetShow Web site at http://www.microsoft.com/netshow/. Additional NetShow products, such as the NetShow Tools, Software Development Kits, and NetShow Server are also available there, as well as versions of the player for Windows NT 3.51, Windows NT 4.0, Windows 3.1, Macintosh, and UNIX computers.

The NetShow Player installed with Windows 98 is the same as the one on the NetShow Web site. However, it does not contain the Netscape plug-in that allows you to play NetShow content embedded in an HTML page and played back by a computer running Netscape Navigator.

Installing the NetShow Player

If you choose the standard installation of Windows 98, the NetShow Player will not be installed automatically. It is easy to install later, however.

To install NetShow Player after installing Windows 98

  1. In Control Panel, click Add/Remove Programs.
  2. Click the Windows Setup tab.
  3. Click Multimedia, and then click Details.
  4. Select the Microsoft NetShow Player 2.0 check box, click OK, and you will be guided through the installation process.

Configuring the NetShow Player

You can use the Advanced tab of the File/Properties menu or the View/Play Settings menu to control the buffering and protocols settings for NetShow. The Advanced tab gives you control in two areas: Buffering and Protocols.

The Buffering option can be used to decrease or increase the amount of time it takes before content begins to play. Normally the default time is sufficient and users under normal circumstances would not need to change it. However, if network conditions make playback quality unacceptable, you can increase the buffer time to try to improve performance. Most content is normally set to buffer between five and ten seconds.

You can also make some selections in the Protocol area, as shown in Table 20.3.

Table 20.3 NetShow Player protocol settings

Setting Description
Multicast Multicast enables the client to receive multicast streams. It allows the administrator to send one copy of the content to many users on the network, as long as that network is multicast-enabled. Networks that are not multicast-enabled and ASF files not being streamed from a NetShow server are sent through unicast. Unicast means that one stream is sent for every request.
UDP UDP enables the client to receive streams through UDP. It is well-suited to audio because it sends packets regardless of connection quality. Therefore, users hear fewer delays or pauses. The problem with UDP is that if a company’s firewall does not accept UDP streams, the stream stops at the firewall, and the user gets an error message. If the company’s network administrator has set up their firewall to support UDP streams on a particular port, the user can specify that port. If UDP does not work, the stream automatically rolls over to TCP transmission.
TCP TCP transmission sends the stream through more firewalls. TCP forms a reliable stream—if packets are lost, the stream stops and lost packets are recovered. This means that users experience more delays and pauses over a network that is congested.
HTTP HTTP transmission sends the stream through almost all firewalls and proxy servers through port 80, using either the existing browser proxy settings or a customized setting.

Using the NetShow Player

Playing NetShow content is straightforward. Normally, a user clicks on a link to the content, and it starts playing. This allows the user to listen to or watch the content and continue to browse the Web or run other applications.

Markers

Markers are like bookmarks in the file. They can allow you to quickly skip from one part of the content to another. This feature becomes very important to developers who wish to create interactive applications using NetShow, because they can use VBScript or JavaScript to present questions to the user and respond to the selection given by skipping directly to a particular part in the ASF file. For example, a developer writing an interactive training application could present material and, at a specific point in the file, insert a URL flip command in the stream that flips the user’s browser to an HTML page with quiz questions on it. Based on the answer to the quiz question, the developer can automatically make the user repeat a section if the answer is incorrect or continue to the next section if the answer is correct.

To see whether the person who created an ASF file used markers, look for the tick marks under the slider bar on the player. If you hover your mouse over the tick marks, you can see their description:

Notice the "Road Work Ahead" label that appears when the mouse hovers over the corresponding marker.

If you would like to see a marker list, right-click the ASF while it is playing, and select Marker List.

You can skip to a specific marker by clicking on the marker number and clicking Go To Marker. This feature is especially convenient for content embedded in an HTML page with no controls showing.

Advanced Player Features

After users learn that playing content over the Internet means compromises in the size of images, frame rate, or clarity of the images, they often become curious about the bandwidth the file uses for adequate playback. They also learn how to find out more about the ASF file in case they are having problems getting it to run. Here is how to find out the details of the ASF file, even if it is embedded in an HTML page. First, right-click on the content while it is playing. Then select Properties.

You are presented with a separate window with multiple tabs to choose from. The General tab details the ASF title, author, copyright, rating and description. The Details tab gives you the following information:

Protocol.

Shows what protocol is being used between the player and the NetShow server or HTTP server or file server running the content. Choices are File for play from a local drive or file server, MMS or HTTP for play from a NetShow server, or HTTP for play from an HTTP server such as Microsoft’s Internet Information Server or some other HTTP server (such as a UNIX server).

Source link.

Shows the server or share location for the file or stream. Bandwidth shows how much bandwidth the file will take up when playing back. In the example above, it takes 72,000 bps or a LAN connection or dual-channel ISDN connection. Error Correction shows whether the file was created with error correction features enabled.

If playback of a file is inconsistent or the picture or sound is poor, checking the Statistics tab can be helpful.

On networks, such as the Internet, where varying traffic conditions mean varying performance, you can see that the reception quality and numbers of packets lost vary when the Internet gets busy. When the connection is poor, you see the red part of a pie chart that gets bigger and smaller with connection variances.

Hosting NetShow Content

After NetShow content has been created, it can be hosted in several ways.

From a Local Drive.

You can play ASF files from a local drive. When linking to the content, use file://c:\directory\filename.asx as the path.

From a File Server.

You can play ASF files from a file server or network drive. When linking to the content, use file://\\servername\share\filename.asx as the path.

From a NetShow Server.

You can play ASF files from a NetShow server. The NetShow server software is available from http://www.microsoft.com/netshow/. It allows you to stream using UDP, TCP, or HTTP, which means a great degree of flexibility in configuration to support the widest array of networks. It also provides the ability to do live streaming, multicast, unicast, scheduling of programs, and administration. When you play content from a NetShow server, use mms://servername/path/filename.asx as the path.

From an HTTP Server.

You can play ASF files from a standard HTTP server (such as Microsoft Internet Information Server or a UNIX-based HTTP server). First, you need to register the ASF and ASX MIME types on your HTTP server. Instructions on registering MIME types are at http://www.microsoft.com/netshow/. Then just store the ASF on the HTTP server and link to it (see "Linking to NetShow Content" later in this chapter for information).

Linking to NetShow Content

After NetShow content is created and hosted, the content developer can link to it in a variety of ways.

Links from HTML Pages

Most users start by using a standard anchor tag to link directly to an ASF file (like <a href="http://servername/path/filename.asf">). However, browsers by nature understand how to send files from a server to a user’s computer. For example, when you link to a Word document (.doc) or an Excel spreadsheet (.xls), the browser sends the entire file to the client. When you link directly to an ASF file, the same thing happens—the entire ASF file is downloaded to the user’s cache directory, and the file plays back from there. This defeats the purpose of streaming, however. So to cause the browser to stream, we have to introduce a redirector file called an ASX.

When a user links to an ASX file, the user’s browser downloads the entire ASX file to the user's cache directory. (Do not worry. The files are only about 1 KB in size.) Then the user's computer receives the signal in the file associations table that when it reaches an ASX file, it should start the NetShow Player. The NetShow Player opens, looks in the ASX for instructions on where to get the ASF file, and starts the stream playing.

If you have an ASF file that you want users to be able to connect to on demand, or in a unicast fashion, create an ASX file by going into your favorite text editor, such as Notepad, and type the following:

ASF path

where path is one of the following, depending on where you are streaming the content from:

For example, you might use the following text in an ASX file:

ASF mms://netshow.microsoft.com/welcome.asf

After you enter this data into Notepad, save the file as Filename.asx and host it on the HTTP server that contains your HTML pages. Make sure the ASX is working by double-clicking its name in Windows Explorer. It should bring up the NetShow Player and start the content streaming. To make the link to the ASF file, therefore, link to the ASX file instead, and use the following syntax:

<a href=http://servername/path/filename.asx >Description</a>

To edit an existing ASX file, open up a text editor, such as Notepad, and open the file.

Note

There are two types of ASX files: handcrafted, for use with stored content, and machine-generated for use in multicasting content from the NetShow server. The machine-generated files are encrypted and allow you to publish an announcement that supports multicast. They are generated in the NetShow Program Manager and are created by right-clicking an existing NetShow program and choosing Announce. This process creates an ASX file that you can link to in the standalone player, use with an embedded object on an HTML document, use with an anchor tag in an HTML document, or distribute as appropriate.

Embedding Content in HTML Pages
Internet Explorer

To embed ASF files in an HTML page for the Internet Explorer browsing software, use the following code:

<OBJECT ID="NSPlay" WIDTH=160 HEIGHT=128 CLASSID="CLSID:2179C5D3-EBFF-11CF-B6FD-00AA00B4E220"> 
<PARAM NAME="FileName" VALUE="http://server/path/myvideo.asx">
</OBJECT>

You need to change the VALUE for the ASX to reflect the location of the ASX on your HTTP server, and you need to change the WIDTH and HEIGHT to reflect the actual size of the ASF.

Netscape

The NetShow Player installed from http://www.microsoft.com/netshow/ includes a Netscape plug-in for Windows 95 and Windows NT clients. (The NetShow Player installed with Windows 98 does not include the Netscape plug-in.) To use it, just add some code to the <object> tag used earlier:

<OBJECT ID="NSPlay" WIDTH=160 HEIGHT=128 
CLASSID="CLSID:2179C5D3-EBFF-11CF-B6FD-00AA00B4E220"> 

<Embed type="video/x-ms-asf-plugin"
src="http://server/path/myvideo.asx"
filename="http://server/path/myvideo.asx"
pluginspage="http://www.microsoft.com/netshow/download/player.htm"
ControlType=1
width=290
height=250>
</embed>
</OBJECT>

The <embed> part of this code invokes the NetShow plug-in for Netscape.

For additional information about how to embed NetShow content in an HTML page while using the codebase property to auto-install the NetShow Player, see http://www.microsoft.com/netshow/.

Starting NetShow Content from E-Mail Messages

First, you need an ASX file. Insert the file into an e-mail message as an attachment. When the user receives it, he or she can double-click it, and the NetShow content starts streaming from the specified server.

There are some big advantages to inserting ASX files into e-mail messages as a way to encourage people to view live or stored content. First, this method saves bandwidth. Instead of sending an e-mail message to large numbers of people with big multimedia files that could clog network bandwidth, when you send ASX files, you send only a tiny (approximately 1 KB) file that does not take up network bandwidth until the user starts playing the file. Also, sending ASX files means that the NetShow content plays in its external player, freeing the user to continue reading e-mail or work on other applications. Last, it allows the content developer to sidestep the entire browser issue by not requiring that the user have a browser installed.

Placing NetShow Content on the Active Desktop

One of the features of Internet Explorer is its ability to embed content onto the Active Desktop. This can be especially useful to allow you to put live NetShow streaming audio or video content directly onto the desktop so you can listen to your favorite radio station on a site, such as AudioNet (http://www.audionet.com/) or your favorite live video-based business news on a site, such as MSNBC Business Video (http://businessvideo.msnbc.com/).

To place NetShow content on the Active Desktop

  1. Right-click on the desktop and select Properties.
  2. Click the Web tab and make sure View my Active Desktop as a web page is selected.
  3. Click New, and then click No to indicate that you do not want to connect to the gallery.
  4. Enter the URL for the Web page you would like to have displayed on your desktop.

It is easy to resize the window so you can see only the part of the page that contains the NetShow content.

Configuring for Play over a Variety of Networks

One of the new features of NetShow 2.0 is the ability to do protocol rollover. Protocol rollover allows you to try sending the ASF over a default protocol (such as MMS using UDP from the NetShow server). If it fails, it tries sending over an alternative server or protocol that you specify in the ASX file. This is especially convenient when you are concerned whether your content will penetrate customers’ firewalls. You can set it up to try UDP first, and if that fails because the users’ companies do not accept UDP traffic through their corporate firewalls, you can tell it to try the same content over HTTP or from a different server. This procedure uses the advanced capabilities of ASX files.

You can also insert the program title, description, author, and copyright information from the ASX. This information appears in the properties of the ASF when the user plays the file.

To use these features, go into Notepad and create and type the following lines that apply to what you are trying to do:

[Reference]
Ref1=mms://servername/path/asfname.asf (this is the first reference to try)
Ref2=http://servername/path/asfname.asf (this is the second reference to try)
BaseURL = http://servername/path/dir/ (this is the Base URL for relative references in the ASF stream to use as a base path)
[Description]
Program Title=Title of the ASF here 
Program Description=Description of your ASF here
Program Author=Your name here
Program Copyright=Copyright or other information here

Base URL is used when you want to create NetShow content that uses URL flips but does not rely on the ASF being on one particular server. For example, if you created an ASF that included URL flips to a specific directory on an HTTP server, to duplicate the content on another server using protocol rollover, previously you would have had to rebuild the ASF with new hard-coded URL flips for every server. With NetShow 2.0, you specify a Base URL in the ASX file, which allows you to move or duplicate the NetShow content to other servers.

Save this text file as Asxname.asx and post it to your HTTP server or network server, as before. Also, note that you do not need REF1 and REF2 if the virtual path is the same for both protocols. For example, if you had HTTP streaming enabled on the NetShow server or had a WWW virtual root that was the same, the first REF1 would be sufficient because of the protocol rollover feature of NetShow version 2.0 clients.

Technical Notes on the NetShow Player

NetShow provides a wide range of audio and video compression models to accommodate various forms of content and different bandwidths and bit rates. Following is a partial listing of codecs supported by NetShow:

NetShow has the following minimum system requirements:

NetShow has the following recommended system requirements:

Troubleshooting the NetShow Player

If you encounter problems when playing back NetShow content, they are usually in one of the following areas:

Codecs

Codecs (compressors/decompressors) are required on the content creation side as well as the client side to play the content back. If the content creator uses a codec that is not installed on the client computer, then the content does not play back. While playing the content, the user can right-click on the ASF, select Properties, and then click the Codecs tab. If any of the codecs listed say NO in the Installed

column, the user is missing a codec necessary for playing the audio or video. The quickest way to get the largest set of NetShow codecs is to re-install the NetShow Player from http://www.microsoft.com/netshow/.

Firewalls

Many corporations administer firewalls to prevent unauthorized access to corporate networks. Most firewalls are based on packet filtering. Packet filtering takes place when the computer examines the source and destination IP addresses of a packet and forwards only those packets for which access has been granted. When playing NetShow content, if it is being sent using a protocol that is not allowed through the corporation’s firewall, it will not play. Therefore, if NetShow content does not play at all, make sure the company’s firewall supports the protocol used (for example, UDP, TCP, or HTTP). For a list of firewalls that support NetShow, go to http://www.microsoft.com/netshow/firewall.htm.

Common Errors

When NetShow Player opens, the animation stops.

If all you see is a black screen, you should see if you have the correct codec installed to render the video.

To check if you have the right codec installed

  1. Right-click in the player window and select Properties.
  2. In the NetShow Player Properties dialog box, select the Codecs tab. The codecs used to compress the ASF information are displayed.
  3. Verify that the video codec used to compress the ASF information is installed on your computer. If the codec is not installed, contact the person who created the ASF stream for information about how to get the proper codec. Most content creators either use standard NetShow codecs or provide a way for you to download the codec before watching the ASF information.
Audio is distorted or video is choppy.

Distorted audio and video are usually caused by one of two things: there is a large amount of network traffic, or the audio and video were created that way.

To determine if network traffic is the problem

  1. Right-click in the Player window and select Statistics.
  2. In the NetShow Player Properties dialog box, determine how many (or what percentage of) packets have been lost. If you are losing more than five percent of the packets, network traffic is your problem.
  3. If NetShow Player is losing only a few packets, check to see if Buffering appears in the Current Time/Total Time indicator. If NetShow Player must constantly buffer information, there is network traffic, and NetShow Player must wait to receive ASF information.

If you are not losing any packets and there is no significant network traffic, the content was likely created that way. Take into consideration the type of ASF content you are watching. Video requires considerably more network bandwidth than image flipping, and the higher the audio quality, the more bandwidth is required.

Audio sounds scratchy, hisses or pops, or is silent.

This problem can often be caused by problems with incompatible or improperly implemented sound devices.

To determine if the problem is due to poorly implemented or incorrect sound devices

  1. Open Sound Recorder.
  2. Open the Microsoft Sound directory (in the Media directory under your Windows directory).
  3. Play one of the sounds. If it sounds OK, then proceed to the next step. If the sound does not play correctly, you may need to check the directions for installing your sound device and re-install it.
  4. On the File menu, click Save As, and then click Change.
  5. Select the same Format and Attributes as the clip you are having the problem with, and then click OK.
  6. Save this file with a different name or in a different directory, so as not to overwrite the Microsoft Sound file.
  7. Open the file saved in the previous step and play it. If it does not play correctly, check the drivers you are using to ensure that they are the most recent and proper drivers for your sound card.

Note

Another possible cause of audio problems can be the sampling rate of the content. Sampling rates of 12 and 24 kilohertz (kHz) are not supported in many hardware sound devices and drivers. Content authors should choose a sampling rate other than 12 or 24 kHz when creating content.

You have problems when using dial-up networking to gain access to a network.

These problems are usually caused by incorrect settings for the proxy server the firewall is using.

To verify that your proxy settings are correct

You get a Failed Network Connection message.

One possible reason for this message is that your NetShow Player settings may conflict with your Internet Explorer settings. This occurs if you adjust the NetShow Player protocol settings in the Advanced Settings tab and do not restart NetShow Player. Clicking Apply does not cause these changes to take effect.

Getting Help on the World Wide Web

For more information, see the NetShow Web site at http://www.microsoft.com/netshow/. Material here includes NetShow Software Development Kits, online documentation, tools, and the Content Creation Authoring Guide. The Content Creation Authoring Guide is a detailed resource for people who want to understand how to create NetShow content for the highest quality and performance. The NetShow Web site also includes demonstrations, NetShow-based tutorials on NetShow, lists of companies providing services and products based on NetShow, support information, and white papers.