CCAG Home


 NetShow Overview

 What's New

 Contents

 Multimedia Basics

 Audio

 Illustrated Audio

 Video

 Encoder

 Codecs

 Hot Topics

 Glossary & Index

General NetShow Hot Topics

This General NetShow Hot Topics section contains tips and techniques to enhance your general knowledge of NetShow--general production techniques, browser integration issues, script commands, as well as ASF (Advanced Streaming Format) questions.




General NetShow Know-How

With Microsoft Internet Explorer, right-click on the link, and select "Save Target As..." from the pop-up menu. You can also alter the File association of ASF and ASX files to prompt you to open or save by viewing the file association information under View / options/ and Filetypes. This suggestion if ONLY if you feel comfortable changing system settings and is for advanced users.

No, they are set automatically when you install Microsoft Media Player. This is true even when you install Internet Explorer after installing Media Player.

You don't need to if Netscape Navigator is installed prior to installing Media Player. If you're using a browser other than Microsoft Internet Explorer or Netscape Navigator (or if you've installed Netscape Navigator after installing Media Player), you must set the MIME types manually. Refer to your browser documentation to determine how to add the following settings:

MIME type: video/x-ms-asf
Extensions: asf,asx
Helper application: nsoplayr.exe

In order to have the ASF file stream rather than be downloaded an .asx (advanced stream redirector) file needs to be called via the link rather than the .asf file. An .asx file provides the information that Microsoft Media Player needs to receive either unicast or broadcast ASF information. When excecuted, .asx files launch Media player and then seek out the server that contains the .asf file or that is broadcasting the ASF stream. The server then begins streaming the .asf file to Media player. Without the .asx file the .asf file will be downloaded.

When a user hits a link to an ASX file, the user's browser downloads the entire ASX file to the user's cache directory (these files are small -- about 1 KB in size). Then the user's computer looks in its file associations table and sees that when it hits an ASX file it should launch the Media player. The Media player launches, 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 access on-demand, or in a unicast fashion, creating an ASX file is simple. Just go 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:

Example:

mms://servername/path/asfname.asf (for content that's on a NetShow server)
http://servername/path/asfname.asf (for content that's on an HTTP server)
file://\\servername\path\asfname.asf (for content that's on a network server)
file://c:\path\asfname.asf (for content that's on a fixed drive such as your hard drive)

Once you've entered this into your text editor, save the file as filename.asx. Check to make sure that the ASX is working by double-clicking on it in Windows Explorer. It should bring up the Media player and start the content streaming.

In Microsoft NetShow there are 2 types of ASX files. There are encrypted, machine-generated files and non-encrypted, handcrafted ASX files.

Non-encrypted .asx files can be created by anyone with a text editor and are used to receive unicast information. The .asx file can contain reference and description sections depending on what information you want to send to the browser; see the example above.

The encrypted .asx file allows you to publish an announcement that will support broadcast. They are generated in the NetShow Station Manager and are created by right-clicking on an existing NetShow program and choosing Announce. This will create an ASX file that you can link to in the stand-alone player, use with an embedded object on an HTML document, use with a anchor tag in a HTML document, or distribute as appropriate. You need to use encrypted, machine-generated ASX files that are created from the Station Manager if you wish to broadcast.

The reference section provides the path(s) to an .asf file(s). Media Player reads the .asx file and attempts to find the first .asf file listed in the reference section. If it cannot find the .asf file, or some problem prevents the .asf file from playing correctly, Media Player looks for the next URL, called a rollover URL. NetShow continues looking for URLs in the .asx file to play until it successfully starts one. Rollover URLs can be a path to the same .asf file hosted on a different server, or the URL can be the path to a different .asf file. The processing order of the URLs in the reference section is from the top downward. If the first URL fails, the next URL is tried until one that works is found.

When defining the URLs in the reference section, you can specify either the MMS or HTTP protocols. When listing multiple URLs, give each one a different reference number. The reference section of a sample .asx file would look like this:

<ASX Version = "3.0" BannerBar = "Fixed">
<ABSTRACT>This text will show up as a Show Description</ABSTRACT>
<Entry>
<Ref href = "keister.asx />
<ABSTRACT>This text will show up as a ToolTip</ABSTRACT>
<TITLE>The title for the stream</TITLE>
<AUTHOR>The name of the author</AUTHOR>
<COPYRIGHT>1998 Your Company</COPYRIGHT>
<MoreInfo href = "http://www.microsoft.com/netshow" />
</ENTRY>
<BANNER href = "banner1.jpg"> </BANNER>
<Logo href = "icon.jpg" Style="mark" />
<Logo href = "icon.jpg" Style="icon" />
</ASX>

Each URL in an .asx file should specify:

  • A protocol (you can specify MMS, MMSU, MMST, or HTTP)

  • The name of the server

  • The publishing point or virtual directory (if necessary)

  • The .asf file

  • An optional description section provides additional text information about the .asf file. The information in the description section appears in the Media Player title bar or on the Media Player Properties page. A description section looks like this:

    <TITLE>The title for the stream</TITLE>
    <AUTHOR>The name of the author</AUTHOR>
    <COPYRIGHT>1998 Your Company</COPYRIGHT>

    To add a description section to an .asx file, on the line following the reference section, enter the description section. If the reference and description sections above were part of the same .asx file, it would look like this:

    <ASX Version = "3.0" BannerBar = "Fixed">
    <ABSTRACT>This text will show up as a Show Description</ABSTRACT>
    <Entry>
    <Ref href = "keister1.asf />
    <Ref href = "keister2.asf />
    <Ref href = "keister3.asf />
    </ASX>

    Assuming that you are using Internet Explorer, you can click on a link that calls an .asx file and choose Save Target As.... This will create an ASX file for future use.

    Use an embed tag inside an object tag. This calls the Microsoft Media plug-in. Here is some sample code:

    <OBJECT ID="NSPlay" WIDTH=160 HEIGHT=128 CLASSID="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" CODEBASE="http://www.microsoft.com/NetShow/download/en/nsasfinf.cab#Version=2,0,0,912">
    <PARAM NAME="FileName" VALUE="http://server/path/sample.asx">
    < Embed type="video/x-ms-asf-plugin"

    src="http://server/path/sample.asx"
    filename="http://server/path/sample.asx"
    pluginspage="http://www.microsoft.com/NetShow/download/player.htm"
    ShowControls=1
    width=160
    height=128
    </EMBED>
    </OBJECT>
    <a href="http://server/path/sample.asx">Start the NetShow Presentation in the stand-alone player.</a>

    Add parameters to your embed tag (see embed example above). Here is a list of parameters, organized by availability status, showing their value types and what the different values indicate or render.

    The following parameters are standard:
    SRC: String-location & name of the asx file
    WIDTH: Integer-width of the player, in pixels (not necessary for audio-only)
    HEIGHT: Integer-height of the player, in pixels (not necessary for audio-only)

    The following parameters are supported and tested:
    AutoStart: BOOL-0 (default) or 1
    DisplaySize: Integer-0 (standard), 1 (half size), or 2 (double size)
    AutoRewind: BOOL-0 or 1 (default)
    ClickToPlay: BOOL-0 or 1 (default)
    PlayCount: Integer-Number of repeat play, default is 1
    CursorType: Integer-Type of the cursor used, default is 0
    AllowChangeControlType: BOOL-defaut is TRUE
    ControlType: Integer-0 (no control), 1 (simple) or 2 (complete), default is 0

    The following parameters are accepted by NetShow's Netscape plug-in but do not make into effection (the Microsoft Media Player OCX does not allow them to be set dynamically):
    TransparentAtStart=1
    TransparentOnStop=1
    CurrentPosition=10
    EnableContextMenu=0

    The following parameters are supported by NetShow's Netscape plug-in but are not fully tested:
    Rate: Integer-default is 1
    InvokeURLs: BOOL-0 or 1(default) note this param is not well tested
    CurrentMarker: integer-default is 0
    AllowScan: BOOL-default is TRUE
    AnimationAtStart: BOOL-default is TRUE
    AnimationOnStop: BOOL-default is FALSE
    SendKeyBoardEvents: BOOL-default is FALSE
    SendMouseClickEvents: BOOL-default is FALSE
    SendMouseMoveEvents: BOOL-default is FALSE
    SendStateChangeEvents: BOOL-default is TRUE

      Error correction is only necessary on the Internet, where packet loss may occur. As files stream across a network, it is possible for packets of information to be lost, particularly on the Internet. When packets are lost, the viewer can experience choppy play, loss or gaps in the audio, and even loss of entire images. If packets stop being delivered, Media Player stops rendering until it can rebuild its buffer.

      To improve performance when packets of information are lost during transmission, NetShow Server uses error correction and concealment. The Microsoft NetShow T.A.G. Author and the NetShow Encoder can optionally include this redundant error-correction data in the stream, which enables Media Player to correct for certain levels of packet loss. If there is extreme packet loss (to the point where error correction is not possible), Media Player masks the errors. For audio masking, Media Player uses neighboring audio information to conceal the loss of data. If you convert images into loss-tolerant .jpg images, Media Player uses a smoothing algorithm to conceal any lost image data. See each tool's documentation for instructions on using error correction when building an .asf file. Most tools will have error correction turned on as the default.

      Remember that error correction takes up approximately 1/8, or 12%, of your file's data rate. For a 28.8 kbps file, where you need to have a total data rate of about 24 kbps, that is about 3 kbps of error correction information.

      You can use any image creation software to create your files and save them in any of the following formats, .bmp, .dib,. .rle, .gif, or .jpg. However, when you add a .gif file to the timeline in the Microsoft NetShow T.A.G. Author you will be prompted to convert your image to either .bmp, .dib, .rle, .jpg, or loss-tolerant jpeg.

      If you plan to embed your Microsoft Media Player into an HTML page, you can have captions appear on the page or in a separate frame form your player. You can use captions to show the current topic in a presentation or training session, to display lyrics for a song, or to highlight important points. In order for the captions top appear in your HTML page, you will need additioonal scripting code. One method is to use the ActiveX Label control in cojuction with VBScript code using the <OBJECT> tag to include the object and setting initial property values using <PARAM> tags.

      <OBJECT
      CLASSID="CLSID:99B42120-6EC7-11CF-A6C7-00AA00A47DD2"
      ID="ActiveLbL"
      WIDTH=150
      HEIGHT=50
      ALIGN=LEFT
      HSPACE=5>

      <PARAM NAME="Caption" VALUE="This is my caption">
      <PARAM NAME="Angle" VALUE="0">
      <PARAM NAME="Alignment" VALUE="4">
      <PARAM NAME="Mode" VALUE="1">
      <PARAM NAME="BackStyle" VALUE="0">
      <PARAM NAME="FontName" VALUE="Verdana, Arial, Helvetica">
      <PARAM NAME="FontSize" VALUE="12">
      <PARAM NAME="FontItalic" VALUE="0">
      <PARAM NAME="FontBold" VALUE="0">
      <PARAM NAME="FontUnderline" VALUE="0">
      <PARAM NAME="FontStrikeout" VALUE="0">
      </OBJECT>

      For more information on ActiveX controls, visit the ActiveX Gallery at http://www.microsoft.com/activex/gallery. A programming reference on Microsoft ActiveX controls is available at http://www.microsoft.com/workshop/prog/controls/ctrlref-f.htm.

      This is a two-fold answer. To insure smooth transmission of your files across networks, your total file data rate should be lower than the bandwidth. In addition, due to the inclusion of file "overhead" such as error correction code and file headings, only a portion of the remaining data rate carries actual media. At lower bandwidths, the file data rate should be about 90% of the target bandwidth and the data rate of the media should be approximately 70% of the bandwidth. As the data rate increases, particularly on intranets, this becomes less of a factor. Look at the following table for specific recommendations:

      Suggested Data Rates

      Network

      Measure

       

      Bandwidth

      File Data Rate Media Data Rate

      Modem (low)

      14.4-Kbps

      =

      14,400

      ~12,000

      ~9,600

      Modem (high)

      28.8-Kbps

      =

      28,800

      ~24,000

      ~20,000

      ISDN

      56.6-Kbps

      =

      56,600

      ~53,000

      ~50,000

      Intranet (low)*

      100-Kbps

      =

      110,000

      ~105,000

      ~100,000

      Intranet (high)*

      200-Kbps

      =

      210,000

      ~200,000

      ~190,000

      Specialized Intranet*

      1 Mbps

      =

      1,000,000

      No significant loss

      * Does not represent size of entire network. Data rates are based on the total size of the network divided by the probable number of simultaneous users.

      If you created your .asf file in the Microsoft NetShow T.A.G. Author, then you can add the urls to your .asf file where you would like the URL flip to occur.


       From the Edit menu, select Script Commands and then select Add

       Specify the time you want the URL flip to occur.

       Define as TYPE URL.

       In the parameter box, type in the URL you want to flip, followed by the frame name.

       To call up the Microsoft Web page in your designated frame called showme you would type http://www.microsoft.com/&&showme in the parameter field.

       Save your .asf file.

      Create your Web pages using HTML. A demonstration of this is available. Use the View Source option on your browser for the HTML source code.

      In the Microsoft NetShow T.A.G. Author Script Commands dialog box, use a command like this:

      URL http://WebServer/Page.htm&&TargetFrame