Platinum Edition Using Windows NT Server 4

Previous chapterNext chapterContents


Chapter 60

Broadcasting with NetShow

Some of the main topics in this chapter are

With the technological barriers that limit broadcast-quality audio and video over the Internet slowly crumbling, Microsoft has entered the fray with its own streaming media server. Microsoft NetShow is closely integrated into the Windows NT Server architecture, providing convenient Web-based administration. Unlike other streaming solutions, NetShow is capable of both unicast (point to point) and multicast (point to multipoint) transmissions. NetShow provides capability to control virtually every aspect of your transmission by breaking broadcasts up into streams, channels, and programs. Whether you're looking to broadcast prerecorded (on demand) audio, or live (real time) streaming video, NetShow can fit the bill. As an added bonus, NetShow can operate on a machine that does not have any other Internet servers (such as IIS) installed.

Setting Up NetShow

NetShow operates as an extension to the Windows NT Server operating system. Installation and configuration of your NetShow server should take less than 30 minutes, letting you dig straight into the creation and delivery of streaming content. NetShow is comprised of three components:

NetShow is included as part of Windows NT Server 4.0 Service Pack 2. You may also obtain a copy of the NetShow components from the Microsoft Web site.

http://www.microsoft.com/netshow Always make sure that you have the most recent version of the NetShow Server, Content Creation Tools, and NetShow Player. As of this writing, Microsoft NetShow 2.0 is found on the NetShow Web site.

NetShow Requirements

Determining the needs for your NetShow installation depends on what components you require. You may install both the NetShow Server and Content Creation Tools on the same machine. Keep in mind that large demand NetShow streams will consume considerable resources on your server, so you may elect to install the Content Creation Tools on a separate workstation. Regardless of what you choose to install, you should regard the minimum and recommended operating requirements outlined by Microsoft:

NetShow Administration requires Microsoft Internet Explorer 3.01 or higher. Use of any other Web browser is not currently supported.


CAUTION: At the time of this writing, Microsoft Internet Explorer 4.0 is in beta testing. NetShow Administration does not function properly when using IE 4.0 PR1 or PR2. This situation should be remedied for IE 4.0's release.

Portions of NetShow require DCOM95 when you're using Windows 95 to administer your server or encode real-time events. DCOM95 is available at

http://www.microsoft.com/oledev/olemkt/oledcom/dcom95.htm

In addition to the preceding requirements, carefully consider the available storage on your machine. If you're broadcasting prerecorded audio or video streams, you face a large amount of files to store. Make sure that your machine has enough fixed disk storage to hold your content files. Although the content files are compressed, you'll face content files approaching multiple megabytes in size. Ultimately this is dependent on the type and length of content you're delivering. For example, a 22kHz, 16-bit mono music sample can require a data rate of 2.65M per minute to hear it as it was intended when it was digitized. This can translate into a sizable chunk of your storage. If you're dealing with large content files, be prepared to make room for them.

Also carefully plan out your network connectivity. As you broadcast more streams of content, you'll consume more of your server's available bandwidth. If you're transmitting several different channels of a moderate size over a LAN, your bandwidth consumption may be negligible. However, if you're streaming full motion video to many points within your organization, you may very well encounter a bandwidth crunch. As with everything in computers, you can never have too much bandwidth. Make sure that your machine is equipped to handle the load and that your network environment is suited for the task. In a corporate environment, you may want to look to tried-and-true methods for improving the network speed of your server:

http://www.microsoft.com/netshow/download/en/require.htm Microsoft's up-to-date NetShow requirements are provided on the Web. This includes a list of video capture cards that have been tested with the content creation tools.

Installing the NetShow Server and Content Creation Tools

Anyone familiar with Microsoft installation programs will be right at home with the installation of NetShow. The entire installation takes less than 10 minutes, including an informal test of each program. The NetShow installation procedure formally involves you deciding what components to install on your machine and selecting the appropriate option. If you fulfill the minimum requirements, there's no need to shut down any of your services or prepare your server in any way.

Installing the NetShow Server. The NetShow Server can only be installed on a Windows NT Server machine, not a Windows NT Workstation machine. To install the NetShow Server, locate your copy of the NetShow Server Setup program (nsserver.exe) and select the installation options appropriate for your needs. Remember that you need Microsoft Internet Explorer 3.01+ to use the NetShow Administrator. You also need DCOM95 if you are using Windows 95. Keep in mind that the NetShow Server needs an account with administrative permissions to run. Online help and reference material for NetShow Server is copied to %SystemRoot%\Help\NetShow.

Installing the Content Creation Tools. Before your server can start broadcasting to the world with NetShow, you must create your content files. All content is created by using the NetShow Content Creation Tools. These tools include programs for converting existing AVI, WAV, and MOV files to NetShow's own Active Streaming Format (ASF). You are also given a tool for real-time encoding of audio and/or video for live broadcasts. To install the given tools, locate your copy of the NetShow Content Creation Tools setup program (nstools.exe) and execute it.

The setup program copies the NetShow tools to the default NetShow directory (%HOME%\Program Files\NetShow). As with the NetShow Server, online documentation is copied to the %SystemRoot%\Help\NetShow directory.


TIP: Microsoft has created a valuable resource in the form of the Content Creation Authoring Guide (CCAG) . The CCAG, available as a set of Web pages, is available from Microsoft at http://www.microsoft.com/netshow/download/en/download.htm. The CCAG contains helpful information on successful content creation, both audio and video.

Equipping Your Clients

Before anyone can see your precious content files, your clients must be equipped with the appropriate version of the NetShow Player. Each version of the NetShow Player can play the content files from previous NetShow versions, as long as the compression codecs are present on the client system. There are several ways of presenting your content files to the client, including embedding the player within a Web page. This is detailed later in this chapter. If you would rather make sure that your client has all the appropriate files beforehand, you can provide the NetShow Player setup program to your client users. The setup program contains all the files that the user will need, including NetShow Player, ActiveX controls for use within a Web page or application, a NetShow plug-in for Netscape Navigator, and the required compression codecs. To install the player, locate the setup program (nsplay.exe) and execute it.

After a complete installation, the client machine can freely view any NetShow content file you can throw at it. You also have the flexibility of authoring your pages for any need because all the files needed for the different methods of presenting your content are provided.


TIP: If you're broadcasting on the Internet, provide a link either to the complete NetShow Player setup program for your visitors or to the Microsoft NetShow Web site (http://www.microsoft.com/netshow). This gives your visitors the means to obtain the complete player.

Understanding NetShow

NetShow's architecture is a powerful blend of traditional streaming technologies and new techniques. NetShow gives you a variety of features for controlling how you use NetShow, depending on the types of media you want to stream. Another factor in how you use NetShow is the type of network you are using to deliver your content. Before you can begin creating your NetShow content and delivering it to anxious clients, familiarize yourself with several important concepts unique to NetShow. A firm grasp of the NetShow idioms will make your administration all the easier. If you have any experience with other streaming servers on the market (such as Real Audio/Video, Vivo, and so on), you likely have a good understanding of some streaming concepts. As applicable as this may seem, you have to adjust to a slightly different thinking with NetShow because its structure differs considerably.

NetShow Basics and Terminology

The first source of contention between NetShow and other streaming products is NetShow's broadcasting capabilities. Microsoft refers to the traditional two-way, point-to-point communications model as unicast communications. Standard streaming software, like most network software, communicates by using unicast transmissions. The client and the server can communicate, giving the client some control over the stream (such as for pausing or skipping streams). Unfortunately, unicast broadcasting is resource intensive. For each subsequent client communicating with the server, more overhead for processing is required (to communicate with each client).

In addition to processing, considerable network resources are used as the content files (often the same files) are shunted off to the various connected clients. To alleviate this problem, Microsoft introduced multicast capabilities into NetShow. Multicast broadcasts involve the server broadcasting only one copy of the content file over the network and many different clients receiving the same broadcast. Because this is connectionless, multicasting requires considerably less resources and bandwidth than unicasting. Unfortunately, because the client is not directly connected to the server in a peer-to-peer communication model, no control over the stream is possible.

Multicasting isn't available to everyone. Your network routers must support multicast communications for the scheme to work. If you're broadcasting on a LAN, this isn't a concern, but as soon as you begin transmitting to the Internet, multicasting vanishes as a viable option. The method you use for transmitting your content (unicast or multicast) dictates the types of streaming you can use. When you are multicasting, you can transfer ASF (Active Streaming Format), RTP, WAV Audio, and file transfer streams. If you're using unicasting, you're locked into using only ASF streams.


TIP: Microsoft advises, when possible, to distribute a single stream to NetShow servers on individual nodes and then use multicasting on each node's NetShow Server to communicate with clients on that node.

What Are Streams and Programs? Already you've seen the term "stream" used several times. In NetShow terms, a stream refers to the data transmitted from the server to the client machine. This also includes any of the properties associated with that data. When you are referring to a single stream or group of multiple streams, you are referring to a program. Within NetShow, you use a program to organize the streams that you intend to multicast over your network. Analogous to a television program sent over the airwaves, when you start a program, the streams are sent out to the clients on the network, in the order that you specify. Within NetShow, streams are sent to the client as data that is rendered as it arrives. Simply put, this means that as the data arrives to the client, the client can view the content.

NetShow supports four stream types, three of which are only available in multicast environments:

Channels and Announcements. Just as you use channels to locate a particular program on television, clients using NetShow Player use channels for locating specific NetShow programs. NetShow channels provide the player with the information on a program, including the multicast address, the port number to listen to, and the stream type. The channel files are text files saved with the .nsc extension. Channels can also be used to contain information for clients that are not multicast-equipped, allowing them to obtain a unicast of the same program. Used with ASF streams only, channels are mandatory in multicast environments and optional when unicasting. For users interested in viewing NetShow content, announcements are used to retrieve the channel file containing the program information. Announcements are a text file, saved with the .asx extension. For unicast users, announcements contain the information needed for the client to reach the unicast stream.

Overview of the NetShow Architecture. With the concepts of streams, programs, channels, and announcements combined, you can create a high-level view of the NetShow architecture. Using the streaming method appropriate for the network, the data stream is transmitted to the client machine by using the NetShow Player. The data stream is then rendered in real-time into a form usable by the client, such as audio or video. When the client is receiving a unicast stream, the player can communicate with the server and control the stream. However, when the stream is a multicast stream, the player has no control over the stream other than turning it off and choosing not to use it.

Microsoft's online documentation provides the diagram shown in Figure 60.1 as an overview for the NetShow architecture.

Fig. 60.1

NetShow links the content media with the client, using the intermediary form of streams.

NetShow's architecture is remarkably similar to traditional broadcasting. Although you have the choice of transmitting data peer-to-peer, you can use the traditional model to broadcast your content to the mass of your client machines. Each client then has the option to view the stream or ignore it.

Creating Content

At the heart of your NetShow server is the content you'll transmit to your clients. Creating content files for NetShow is simple, letting you convert your media files from other formats into a usable ASF file. The power of this arrangement is twofold: First, you can use whatever authoring and editing environment you choose to create your media. This means that you can create your content by using powerful tools for professional audio and video editing. Second, if you already have your content created but in a different format, you can convert those files into a form usable for broadcast. Microsoft made a wise move in choosing an adaptable format and providing flexible tools for NetShow.

Creating your content for broadcast involves 4 steps:

1. Production This is the actual process of recording and editing your media file.

2. Building the ASF Your media file is then compressed into a usable ASF file, using one of the NetShow compression codecs.

3. Scripting the ASF If you're looking to add extended functionality to your ASF, such as URLs or captioning, you can add scripts to your ASF.

4.Testing the ASF Before you broadcast your content, the testing process eliminates any potential problems.

The process of producing content for broadcast over NetShow is not unlike preparing content for radio or television. The same principles still apply, such as recordings carried out in a controlled environment have better results. There are fundamental steps you should be taking when producing your content. There are two stages involved in production:

Before you begin recording, you'll need the following resources:

Here are some tips for recording quality audio streams:

Here are some tips for recording quality video streams:

Using your audio and video capture equipment, coupled with your editing packages, you need to create your content as you want to see it in NetShow. Your content files must be stored as standard Windows wave files (.WAV) for audio streams, whereas video streams can use either the standard Video for Windows format (.AVI) or Apple QuickTime movie format (.MOV). The NetShow conversion tools can translate your presentation from these three formats into the proprietary Active Streaming Format (ASF), ready for broadcast. For editing your material, look to industry standard editing packages for both audio and video. Industry leaders such as Adobe, Macromedia, MetaTools, and Sonic Foundry offer solutions for producers.

You typically want to avoid compressing your content before you're ready to convert the files to ASF format. Use an uncompressed original for all your editing and leave the compression to the NetShow codecs within the conversion tools. If you compress your work files and then recompress them with NetShow, your presentation's quality will suffer dramatically.

For audio editing, information on Macromedia's SoundEdit16 package can be found at

http://www.macromedia.com/software/sound/

Sonic Foundry's SoundForge, another leading audio editing suite, also has information available on the Web at

http://www.sfoundry.com/pages/forge.htm

For video editing, you may want to consider Adobe Premiere and Adobe After Effects. Both products are detailed on the Adobe Web site at

http://www.adobe.com

MetaTools Final Effects, another video effects suite, has information on the Web at

http://www.metatools.com

Building ASFs

The Active Streaming Format is a blanket format for NetShow's content. An ASF is a standardized method for delivering streaming data to a client but does not specify the compression method. Compression for NetShow is handled by compression codecs that provide both the server and the player with instructions on how to compress/ decompress the stream. Varieties of different codecs are installed when you set up the NetShow Player. Different codecs are suited for different types of content and media. Third-party codecs may be added to NetShow for improved compression offerings, but the viewing party must have the same codec to view the stream. Codecs give you many choices in how your content will be compressed, but that does not mean every codec is suitable for every situation. There are a variety of factors to consider when selecting a codec:

Each of these points has an impact on choosing the best codec for your content. Microsoft has created a detailed reference for codecs and NetShow, which is available on the Microsoft NetShow Web site at http://www.microsoft.com/netshow/codecs.htm. Refer to this page and the CCAG before choosing a codec.


CAUTION: Always make sure that your viewing audience has the same compression codec that you're using for your stream. If you're using a codec not supported by the client, the client's player won't be able to decompress and understand the stream, let alone display its contents.

To create ASF files usable for NetShow, Microsoft has created four tools:

The ASF Editor

The ASF Editor is a tool used to combine audio, image, and script elements into a form that can be synchronized for output to an ASF file. After your ASF file has been created, you can broadcast the stream over a network or the Internet by using NetShow Server. Using a timeline to position your elements, you can use the ASF editor to specify the bandwidth requirements for the presentation and compress the required audio and image files. The editor is an easy-to-use tool, supporting drag-and-drop manipulation. The ASF Editor screen, as shown in Figure 60.2, is divided into four areas:

Fig. 60.2

The ASF Editor interface is easy to learn. It was designed for quick manipulation of your content files.

Creating Your ASF Project. To create an ASF file in the ASF Editor, you must create an ASF Editor Project (.AEP) file. The AEP file contains all the information pertaining to your ASF, including the content files, the bit rate, the timeline, and so forth. You can create a new AEP by choosing File, New. This clears the current workspace and lets you begin. The actual process of creating your ASF Editor Project begins by adding your content files to the content window. You can add files to the content window in either of the following ways:

As you add files to your project, the content window updates to reflect the new files. When files are added to the content window, they become available to you for inclusion in your ASF. Just because a file is present in the content window, it does not mean that the file is built into your final ASF. Instead, the content window acts as a "staging area" for your files; the files are only incorporated into the ASF when you drag the file's icon into the edit window. When you drag the file into the edit window, a rectangular block (for audio and image files) or a bar (for URLs) is inserted into the window. After your file is part of the edit window, you can freely position the files along the timeline, as needed.

Converting Files. If you're working with a file that may present problems because of its size or format, you can convert it into a different format or compression level. You can convert a file within the edit window by right-clicking and choosing Convert. The Convert command is sensitive to the file type you are working with and displays the dialog box appropriate to either an image or an audio file. You can choose to change the file's format, size, colors (for images only), and image quality. You can also adjust the compression algorithm of any image or audio file. These conversions do not alter your original files in any way.

Synchronizing with the Presentation Assistant. When you want to synchronize events (such as images or URL placements) with a particular point in your audio, you can use the Presentation Assistant. The Presentation Assistant lets you "drop" images at a selected point in the audio playback. To use the assistant, follow these steps:

1. Select a time range in the edit window.

2. Optionally, select images from the content window to place in the queue. If you do not select any images, the Presentation Assistant will place the images in the selected time range in the queue.

3. Choose Tools, Presentation Assistant.

4. The Presentation Assistant dialog box, shown in Figure 60.3, appears. Click Start to begin playing the audio.

Fig. 60.3

The Presentation Assistant lets you synchronize images with your audio timeline.

5. When the audio playback reaches a point where you want an image to appear, click Drop.

6. Repeat Step 5 until you have placed all your images (reflected by the Drop button turning gray), or until the time range finishes playing.

7. When you are finished inserting images, click Stop.

8. Click OK to apply your changes. The image timing information then appears in the edit window.

Errors and How to Correct Them. When you try to send more information in your stream than the bandwidth allows, the ASF Editor gives you an error indicator. If you do not address these errors, your stream may not function properly for all clients. Microsoft recommends the following things for reducing errors:

Build Your ASF. When you've customized your ASF stream to your satisfaction, you're ready to build your ASF. Building an ASF requires that your ASF project be free of errors. If a file is in error in the edit window, the editor refuses to build the ASF. When you build your ASF, the editor composes all the elements of your project and compresses them into one ASF file. This file is then ready for streaming from your NetShow server. You can also use this file to test your stream from a NetShow Player. To build your ASF, click the Build button on the toolbar. As the editor prepares your ASF file, a progress dialog box appears to reflect the status. Upon completion, your ASF is ready to go!

Converting Existing Audio with the WAVToASF Tool

When you want to create an ASF from your existing WAV files but do not plan on including any images, the WAVToASF command-line conversion tool is your choice. Remember that you should be working with a WAV file that has had all editing and conversion completed beforehand. You can convert a compressed or uncompressed WAV file, provided that the compression codec is present on your machine. To convert your WAV file to an ASF file:

1. Open an MS-DOS command window.

2. In the directory that contains your original WAV file, enter

wavtoasf -in filename.wav -out filename.asf

where filename.wav is the correct file name for your input WAV file, and filename.asf is the correct name for the ASF file to be created.

3. Test your newly created ASF file by using NetShow Player.

Converting Existing Video with the VidToASF Tool

After you have produced and edited your video content to your satisfaction and saved it as an AVI or MOV file, you can proceed to convert the file to an ASF file. You should be using a previously compressed copy of your QuickTime or Video for Windows file because the VidToASF conversion tool directly transforms the file without any compression. This tool behaves very much like the WAVToASF tool:

1. Open an MS-DOS command window.

2. In the directory that contains your original AVI or MOV file, enter

vidtoasf -in filename.avi/filename.mov -out filename.asf

where filename.avi/filename.mov is the correct file name for your input video (QuickTime or Video for Windows) file, and filename.asf is the correct name for the ASF file to be created.

3. Test your newly created ASF file by using NetShow Player.


CAUTION: Unfortunately, NetShow support of QuickTime MOV files is incomplete. QuickTime files with non-ACM or ICM data cannot be converted to ASF files. To add to the list, QuickTime VR is not supported at all. Thankfully, almost all QuickTime audio and video files found on the Internet fall into the supported category.

Live Streams with the Real-Time Encoder Tool

When you're working with live broadcasts, the existing tools simply cannot do the job. Microsoft sagely included the Real-Time Encoder for digitizing live audio and video streams into usable ASFs, ready for transmission. The Real-Time Encoder does not transmit the ASF stream to the client; instead, it delivers it to the NetShow Server. How the live ASF stream is broadcast depends on whether your server is multicasting. In multi-casting environments, a direct ASF stream can be delivered to the server, which in turn will deliver the stream to the clients. In unicasting environments, the real-time encoder can create ASF files for transmission through the server. The Real-Time Encoder also lets you have complete control over the stream attributes, such as the compression codec and level, the screen size (for video), and so forth. All compression and stream creation is handled by the encoder, leaving you free to concentrate on other things.

Because the compression and stream creation is handled by the encoder, you must configure the tool for your stream. You can create a new configuration each time, or store your settings in ASF Stream Descriptor (.ASD) files. The ASD file is then used by the NetShow Server in multicasting environments, to give the server the appropriate information on the stream. When you create a new channel (later in this chapter), you point to an ASD file for the stream. You may also optionally use a template for creating a new configuration, which forces you through the configuration process one step at a time. To create a new configuration using a template, follow these steps:

1. Open the ASF Real-Time Encoder and choose File, Open.

2. Browse to the \Program Files\Microsoft NetShow\Stream Formats\ directory. This directory contains (by default) six template ASD files, labeled to describe the type of network scenario each was created for.

3. Select an ASD file and click Open. The first page of the Configuration Wizard appears (see Figure 60.4).

4. Choose the source(s) that you want to record. When the check boxes are selected, that source is recorded. The drop boxes let you choose different sources on your machine.

5. If you want to include scripting commands in your real-time encoding, click the Include Script Commands check box.

6. Click Next. The second page of the wizard, Bandwidth Selection, appears.

Fig. 60.4

The Input Source page of the Configuration Wizard lets you choose where your live input is coming from. In this figure, only a live audio source is available because this machine does not have a supported video capture card.

7. Select the bit rate appropriate for your stream and click Next. The higher the bit rate, the higher the quality of the transmission.

8. The Compression Formats page appears (see Figure 60.5). Use the drop-down lists to select an appropriate compression codec and format for each source.

Fig. 60.5

Compression lies at the heart of your encoding. Use a compression code and format suited for your content type.

9. When you're satisfied with your selection, click Next to advance to the Output page.

10. Choose how you want your stream sent to the server and click Next. For multicast environments, you may prefer to send your stream directly to the server. If you plan on unicasting this content, or broadcasting it on-demand at a later time, you may choose to record it to a local ASF file.

11. If you selected to transmit your stream to a server, the Transmission page (see Figure 60.6) appears. You may choose to allow a remote server to connect to your machine at a specific IP port, or connect directly to a NetShow Server by using DCOM.

12. When you're satisfied, click Next. If you did not also choose to store the ASF to a local file, skip to Step 14.

13. If you chose to store the stream to a local ASF file, the Local File page appears (see Figure 60.7). Specify the criteria for the file, such as the path, the maximum size, and the maximum duration. When you are finished, click Next.

Fig. 60.6

If you choose to let a remote server connect to an IP port, the server will be connecting to the encoding machine to obtain the stream.

Fig. 60.7

When storing your stream to a local ASF file, you can limit the file's size and duration.

14. The Description page of the wizard, shown in Figure 60.8, lets you enter a description for your stream. This description is shown in NetShow Player's Properties Page and is visible in the Channel Manager. Enter your description.

Fig. 60.8

Using a descriptive comment for your stream makes it easier to identify. When you're working with many streams, this should become a habit.

15. Click Finish to close the wizard.

After the encoder is configured as you need, you're ready to begin recording your live source. To begin real-time encoding, follow these simple steps:

1. Before beginning, make sure that your volume levels are correct. Click Volume to open the Volume Control.

2. To begin recording, click Start.

3. If you enabled script commands, enter a script command in the Script Command text box and click Send.

4. When you're finished recording, click Stop.

Scripting your ASFs

A clever feature of NetShow is scripts. Using either Visual Basic Script or JavaScript, you can interleave script events into streams and ASF files. You can use this functionality to create interactive applications that operate over low bandwidth. All script commands are executed and handled client-side. Examples of scripted commands that can be embedded are URL flips, hotspots, or captions. You can even send commands to assemble complete Web pages on-the-fly. NetShow script commands are sent as a complete table within the ASF header, increasing the size of the stream slightly. This also delays the player from rendering the content as quickly. For complete information on how to author scripting commands, refer to the NetShow On-Demand Client SDK.

http://www.microsoft.com/netshow/docs The NetShow On-Demand Client SDK is found on the (surprise!) Microsoft Web site.

Testing

Before you send your content out to the masses, conduct a brief (but thorough) testing of your ASFs. This is particularly important if you're using sequenced events (slideshows with captions, for example) and scripting commands. When testing your streams, consider these two points:

Testing your streams can save you considerable headaches later. If you fail to test your streams, you may very well be neglecting to properly service your clients.

Delivering Content

With your ASF stream ready to go, you're now ready to set the client up for viewing your content. You have three options for presenting your content to visitors: as a stand-alone player, launched from a link on a Web page, or embedded in a Web page as a full presentation. The first option requires the least preparation on your part. You provide the URL for the ASF file to the visitor, and the visitor manually points the player to that location. This also lets you present your content in isolation. Unfortunately, a stand-alone player is not a very enriching experience for most visitors and requires effort on their part. At the minimum, launching the player minimizes the work involved for the visitor. At the most, embedding the player into a Web page lets you create a complete multimedia experience for the visitor, without any extra steps for them to carry out.

When you're pointing visitors to your ASF files, you can optionally use a redirector file, called an ASX file. When accessed by a Web browser, the ASX file points the browser to the streaming server that actually contains the content. The Web browser then locates the server and transfers the ASF file. ASX files can also contain two differing paths for your content files for redundant service. If the first server fails, the second server is used in its place. A standard ASX file looks like this:

[reference]
ref1: = mms://my.servername.dom/virtualdir/filename.asf
ref2: = http://my.servername.dom/virtualdir/filename.asf

In this sample ASX, the first reference points to a server using the NetShow protocol. The second reference, used only if the first reference fails, tells the player to obtain the stream via HTTP instead.

Playing Stand-Alone

To have your clients use the Player stand-alone, they must manually point the Player to the precise location of the URL. When you use a stand-alone Player, the Player acts independently of everything else the user does. Using the stand-alone method, a user can open a remote or local ASF file. For your user to connect to your stream, she must follow these steps:

1. Open NetShow Player from the Start menu or Program Manager.

2. Choose File, Open Location.

3. Enter the URL for the NetShow stream. For example, mms://my.servername.dom/virtualdir/filename.asf.

4. Click OK.

Launching the Player from a Page

To simplify the process of a stand-alone player, you can launch the player from a hyperlink on a Web page. Using this method, the visitor only has to go the Web site and click the hyperlink to begin the stream. You may use a hyperlink that points either to an ASF or ASX file. Launching from a Web page requires minimal effort on your part or the part of your Web developer. This method does require that your visitor has the NetShow Player installed on her machine. To launch the player from your Web site, you must include a hyperlink pointing to your content. For example:

<HTML>
<HEAD><TITLE>NetShow Files</TITLE></HEAD>
<BODY>
<P>Click <A HREF=http://my.servername.dom/virtualdir/filename.asx>HERE</A> to view the current technical briefing.</P>
</BODY>
</HTML>

Embedding the Player in a Page

If you want your visitors to enjoy a simple, full multimedia experience, you can choose to embed NetShow Player in your Web page. If some of your viewers do not have NetShow Player, you can supply a link for them to download it. Another, more elegant solution is to embed the player into a Web page, forcing the browser to download and install the required files for the player. No user intervention is required, and the user is set to view your content.

When authoring for Internet Explorer, the NetShow ActiveX component lets you incorporate full NetShow support directly into your Web page. You can also use client-side scripting within your browser to control your visitor's player while he is on your page. Unfortunately, this option is not fully supported for users with other browsers. A NetShow plug-in is provided for Netscape Navigator users, as well as the capability to use the NCompass Labs ActiveX plug-in for Netscape, allowing Netscape users to use the ActiveX NetShow Player control. Consider your audience carefully when planning on embedding the player.

To embed the player in your Web page, a moderate amount of additional HTML code is required. The following example demonstrates how to embed the player into a Web page:

<HTML>
<HEAD>
<TITLE"Embedding Your NetShow Presentation</TITLE>
</HEAD>
<BODY>
<!--Begin Internet Explorer Code -->
<OBJECT CLASSID="clsid:2179C5D3-EBFF-11cf-B6FD-00AA00B4E220"
HEIGHT=240
WIDTH=320
NAME=NSOPlay
ID=NSOPlay
ALIGN=center>
<PARAM NAME="FileName" VALUE="mms://sample/sample.asf">
<PARAM NAME="ControlType" VALUE="1">
<PARAM NAME="AutoStart" VALUE="TRUE">
<!--End Internet Explorer Code-->
<!--Begin Netscape Navigator Code-->
<EMBED CLASSID="clsid:2179C5D3-EBFF-11cf-B6FD-00AA00B4E220"
HEIGHT=240
WIDTH=320
NAME=NSOPlay
ID=NSOPlay
ALIGN=center>
<PARAM NAME="FileName" VALUE="mms://sample/sample.asf">
<PARAM NAME="ControlType" VALUE="1">
<PARAM NAME="AutoStart" VALUE="TRUE">
<!--End Navigator Code-->
</OBJECT>
</BODY>
</HTML>

http://www.microsoft.com/netshow/howto/author.htm For more information on embedding the player into your Web page, visit Microsoft's own resource.

NetShow Administrator

Rather than add another server management tool to your arsenal, Microsoft chose to use its own Web browser for NetShow Administration. NetShow Administrator is a special set of local Web pages with ActiveX (DCOM) objects. These pages let you control virtually every aspect of your NetShow Server, including control of channels, programs, and multicast/unicast streams. The NetShow Administrator icon is located in the NetShow program group in your Start menu. Because NetShow Administrator can be installed on a machine that is not the server, you may need to point to your NetShow server.


CAUTION: At the time of this writing, administration of the NetShow Server is not currently supported over remote access. The Administrator uses DCOM (Distributed COM) for communication with the server over a network. DCOM communication does not function over RAS and some networks. This may be corrected in time for the release of NetShow 2.0.

When you launch NetShow Administrator, Internet Explorer is opened to the Administrator page. The Administrator screen, shown in Figure 60.9, is broken into three areas. The topmost frame contains links to the NetShow online documentation as well as the version information (both represented by the icons in the upper-right corner of the window). The left-hand frame is the control frame, where you select the area of your server to control. This frame also lets you choose what server on your network to manipulate. As you select buttons in the control frame, the frame's contents update to reflect the appropriate options. When you select an option in the control frame, the larger right-hand frame changes to display the controls for the administrator. Each screen contains controls specific to the aspect of your server that you're manipulating, such as channels or streams.

Using the Administrator, you can control your NetShow Server locally or from another workstation. Before you begin broadcasting, you need to set up your first channels and programs.

Managing Channels

For NetShow, channels provide your clients with information on how to connect to your stream. This includes the IP address and the port, as well as the stream format. NetShow channels are much like traditional broadcast channels on television, giving viewers a means of locating programming. Channels let you stream data for both multicast and unicast. You can use channels to:

Fig. 60.9

NetShow Administrator operates from within your IE browser. These pages use controls to manipulate your server.

After a channel is created, clients can use the channel file to connect to your stream. This channel file should be located in an accessible location, such as on your Web server. The actual management for your channels is broken down into a few functions:

Configuring Channels. Creating and configuring channels is an easy task in NetShow Administrator. The process is quickly completed and requires little attention once finished. At some point, you may want to go back and modify your channel, and thankfully, NetShow makes it easy. Before you can create a channel on your NetShow Server, you need certain information:

To create a new channel, open NetShow Administrator and click Configure Channels. The Configure Channels page appears (see Figure 60.10). Follow these steps:

Fig. 60.10

The Configure Channels page is where you manage your channels. When first creating your channel, make sure that the Channel Wizard is enabled.

1. Deselect the Use Channel Wizard check box. If it isn't selected, you're presented with the standard interface.

2. Click New to create a new channel. The New Channel page appears (see Figure 60.11).

3. Enter a name for your channel in the Channel Name text box.

4. Optionally, enter a description for your channel in the Description text box.

5. Optionally, enter contact information for the channel administrator (presumably you).
This includes a postal address, telephone number, and e-mail address.

6. If you plan on using multicast in this channel, enter the IP address in the Multicast IP Addr text box, and the port number in the Port text box.

7. Enter your multicast scope value in the TTL text box.

Fig. 60.11

You begin setting up your NetShow broadcasting empire in the New Channel page.

8. If your server has more than one network adapter, select the address of the adapter to use for multicasts from the Adapter Address drop box. If you have only one adapter, leave it set to Default.

9. To make this channel available for unicasting, enter the name of the unicast server in the Unicast URL text box.

10. Enter the location for the channel file in the Channel File URL text box.

11. You can use this channel to multicast, to distribute to a different NetShow server, or both. Select accordingly from the three respectively named check boxes.

12. If you want to archive your streams for later use (such as on-demand broadcasting), click Enable AutoArchive. Specify the maximum file size in the text box and click Archive Directory to select an archive directory location.

13.
To add streams to your channel, click Add. This opens a file selector to locate your stream files. Recorded streams are ASF files, and real-time streams are ASF files. You can also select a stream from a different server by choosing an NSC channel file. Repeat the process as needed, or remove extraneous streams with the Delete button.

14. Click OK to create your new channel.

15. If you chose to use the channel for multicasting, you're prompted to export the channel file. Click Yes.

16. A file selector appears, for you to store your NSC channel information file. Locate the directory you want to store your NSC file in and save it with the appropriate name. Click OK.

After your channel has been created, you can go back and modify it as you need. To modify your channel, select it from the channel list and click Edit. To remove an existing channel, select the channel and click Delete.

Managing Streams. Using the Manage Streams page, you can view the details on any stream currently running on your NetShow Server. You can also terminate any stream, effectively turning it off for all clients. To view stream details or terminate streams, open NetShow Administrator and follow these steps:

1. Click Manage Channels to change to the Manage Channels view.

2. Click Manage Streams. The Manage Streams page appears and displays all running streams.

3. Select the stream you want to view. The display changes to reflect the currently selected stream.

4. To close this stream, click Terminate Session.

Managing Connections. When you want to view or terminate connections to your NetShow Server by other servers or clients, the Manage Connections page does the trick. Operation of the Manage Connections page is nearly identical to that of Managing Streams. To terminate a connection, open NetShow Administrator and follow these steps:

1. Click Manage Channels to change to the Manage Channels view.

2. Click Manage Connections. The Manage Connections page appears and displays all open connections.

3. Select the connection that you want to terminate and click Terminate Connection.

Managing Programs

NetShow programs are a series of streams played in consecutive order. Just like a television program, when the program begins it plays completely, followed by the next program. When you start a NetShow program, the server starts multicasting the first stream assigned to your program. When the stream ends, the next stream in the program begins. This process continues until the last stream finishes multicasting. You can choose to automatically repeat programs (think of cable), and you can define how long each stream in the program should run. You also use programs to organize inputs for multicast streams, such as live audio streams. Programs are an important concept in NetShow broadcasting. To create a program, follow these steps within NetShow Administrator:

1. Click Manage Programs. The Manage Programs page appears (see Figure 60.12).

2. Choose Program, New to reach the New Program dialog box (see Figure 60.13).

3. Enter the program information, such as the Name, Description, Author, and Copyright.

Fig. 60.12

The Manage Programs view lets you create your programs and assign streams to them.

Fig. 60.13

The New Program dialog box enables you to assign a description to the program. Notice the play options, allowing you to repeat programs.

4. Specify the Play Options for this program. You may have this program play once, or repeat any number of times.

5. If you want this program to stop broadcasting on any errors, select the Stop Program on Error check box.

6. Click OK to dismiss the dialog box and return to the Manage Programs page.

7. Choose a new stream type to add by choosing Stream, New. Your new stream may be an ASF Stream, RTP Live Audio, RTP WAV Audio, or File transfer.

8. A dialog box reflecting the stream type appears, prompting you to define the stream properties. Define the stream properties for this program and close the dialog box. Your new stream is added to the program display.


NOTE: Information on stream properties is provided in the NetShow Administrator reference documentation.
9. Repeat steps 7 and 8 for each stream that you want to add to your new program.

Before clients can see your program, you must "flick the switch" on it. To start your program, follow these steps in Manage Programs view:

1. Select the stream you want to start.

2. Choose Program, Start.

3. If you want to announce your program and create a new ASX file, choose Program, Announce Program. Specify the file name and location of the new ASX file in the file selector, and click Save.

You can stop any program that's currently running by selecting the program in Manage Programs view and then choosing Program, Stop.

Managing Unicasts. When you're broadcasting over the Internet, you'll most assuredly be unicasting your content. The NetShow Administrator provides you with a series of pages used for managing your unicasts, giving you more control over your broadcasting efforts. The controls that the Administrator gives you are similar to the controls found in a Web server for determining virtual directories, logging, security, and client management. To begin managing your unicasts, open the NetShow Administrator and click on the Manage Unicasts button. The Manage Unicasts view opens, as shown in Figure 60.14.

Fig. 60.14

Managing unicasts gives you tighter control of broadcasting over the Internet and similar network environments.

Setting Publishing Points. Just as a Web server has virtual directories, your NetShow Server has publishing points. The Set Publishing Points page lists each of the virtual publishing points for your NetShow server. You can add additional points for unicast content that clients and other servers can access. To add a new publishing point, follow these steps:

1. In Manage Unicasts view, click Set Publishing Points. This accesses the Set Publishing Points page.

2. Deselect the Use Publishing Point Wizard check box to use the standard interface.

3. Click New to open the Set Publish Points page (see Figure 60.15).

Fig. 60.15

Publishing points act like virtual directories on a Web server. You can use these to distribute your content.

4. Click Alias to add a new publishing point. If you select the Home option, you're defining (and most likely replacing) NetShow Server's root publishing point.

5. Enter the publishing point's alias in the Alias text box. This is the name that your URLs use to access the publishing point.

6. Enter the complete physical path to the publishing point directory. This is the path on your server, or to a network server.

7. Click Save to add this publishing point.

You can modify your publishing points at any time by selecting an existing point and clicking Edit. You can remove an existing point by selecting it from the list and clicking Delete. Configuring Logging. If you have configured logging for an IIS server, you'll feel right at home configuring logging for unicasts. The Configure Logging page, shown in Figure 60.16, lets you enable (or disable) the access logs for your unicast server. You may choose to log on a daily, weekly, monthly, or file-size basis. You also can specify the location of the plain text log file on your server. To configure logging, follow these steps:

1. Within the NetShow Administrator, click Manage Unicasts to switch to the proper view.

2. Click Configure Logging.

3. To enable logging, select the Enable Logging check box.

4. Specify the period for your log files. If you choose to base the period on the size of the log file, enter the maximum log file size in the text box.

5. If you want to change the location of the log files, enter the complete path in the Log File Directory text box.

6. Click Apply.

Fig. 60.16

Configuring logging for unicasts is almost identical to configuring logging for IIS servers, except that logging to a database is not an option.

Managing Clients. Just as with multicasting, unicasting lets you monitor and terminate client connections. The Manage Clients view, shown in Figure 60.17, lists each active connection. You can select any connection from the list and click Terminate Connection to close the client's session with your server.

Fig. 60.17

Need to kick a user off? The Manage Clients page lets you see who is connected to your server and close a user's connection.

Setting Properties. To control your NetShow server's properties, Microsoft included the Set Properties page in NetShow Administrator. This page, shown in Figure 60.18, lets you limit the total number of connections allowed by NetShow Server, the maximum bandwidth usage for the server, and the maximum bandwidth consumption for single sessions. Additionally, you can activate security for your ASF files, based on NTFS file permissions. By default, NetShow ignores these permissions. To control your server's properties, follow these steps in NetShow Administrator:

1. Make sure that you're in Manage Unicasts view.

2. Click Set Properties.

3. To define the total number of connections your server will allow for NetShow requests, enter a new value in the Maximum Connected Clients text box.

4. You can limit the overall bandwidth consumption of the NetShow Server. Enter the maximum bandwidth, in Megabits, in the Maximum Aggregate Bandwidth text box.

5. If you want to limit the maximum bit rate for individual connections, enter a value (in megabits) in the Maximum File Bit Rate text box.

6. To enable file-level access checking (based on NTFS file permissions), select the check box at the bottom of the page.

7. Click Apply to commit your changes.

Fig. 60.18

You can use the Set Properties page to limit the bandwidth consumption for your NetShow Server and its clients.


Monitoring Events. The Manage Channels and Manage Unicasts views in the NetShow Administrator let you monitor events. Specifically, the Monitor Events page gives you an immediately accessible log of activity for your NetShow Server. Connections, server messages, and errors are detailed within the monitor as color-coded entries. You may choose to limit monitoring to a few event types, or disable the monitor entirely. The Monitor Events page for each view gives you keen insight into how your server is performing and what is going on. Figure 60.19 shows the Monitor Events page for unicasts.

To monitor events, select the view you want to watch (Manage Channels or Manage Unicasts) in NetShow Administrator and follow these steps:

1. Click Monitor Events to access the Monitor Events page.

2. To disable the monitor, deselect the check box at the top of the monitor.

3. To select the event types to monitor, use the check boxes for the event categories: Admin, Server, Client, and Alert.

4. To limit the number of lines to buffer in the monitor, enter a new value in the text box and click Set.

5. To redefine the color coding for an event category, click Set Color beside the appropriate event.

6. To erase the current monitor, click Clear.

7. To view the monitor in a different window, click New Monitor Window.

Fig. 60.19

The Monitor Events page for unicasts lists each unicast event, in a color-coded fashion. You can limit the monitor log size, specify the type of events to trap, or customize the color-coding.


Previous chapterNext chapterContents


Macmillan Computer Publishing USA

© Copyright, Macmillan Computer Publishing. All rights reserved.