Server Multimedia Basics

This section talks about Windows 2000 servers, and how they are used to stream multimedia files. Streaming is different from simply offering a link with which users can download and play a file (such as an .avi file). When a multimedia file is offered via a link as a download, the entire file is transferred to the client computer before playback begins. When a multimedia file is streamed, the content is delivered as needed over time.

A Windows 2000 server doesn't necessarily have the server-side multimedia software installed. You can check whether the software is installed by clicking the Start button, selecting the Programs menu, selecting the Administrative Tools menu, and then selecting Configure Your Server. A window will appear (as shown in Figure 20.2) with which you can configure your server, including the multimedia options.

Figure 20.2. This Window Appears, Allowing You to Configure Your Server.


Drill down into the Web/Media Server link, and then select Streaming Media Server, and finally click the Manage Windows Media Services link. This will bring you to a screen from which the Windows Media Services can be configured. Normally, though, there's nothing necessary the configuration is done during install time.

The Windows Media Services will expect all multimedia files that are to be streamed to be in a specific directory (or any of its subdirectories). Normally this directory is named ASFROOT and is off the hard drive's root. For instance, on all the servers in our company, this directory can be found at C:\ASFROOT.

Your Web application will not have direct access to the files in the multimedia home directory. Instead, you will reference files by the server name, and then the file. The following refers to an .asf file named Presentation.asf in the multimedia home directory, for a server named Dellap: mms://Dellap/Presentation.asf

Your Web application will actually reference a file (normally with an .asx extension) that specifies the multimedia server and file. The .asx file will normally reference either a .asf file or a .wmf file. The following .asx file is an example:

 <ASX version = "3.0"> <entry>     <Ref href="MMS://Dellap/OnlineTraining.asf" /> </entry> </ASX> 

Besides making sure that the server is ready to deliver streamed content, you'll need a way to insert markers and Text commands into the media file. I've found that Vegas Video 3.0 works extremely well. You can get a trial version at Figure 20.3 shows how easy it is to insert a marker.

Figure 20.3. Inserting Markers Is Easy with Vegas Video 3.0.


The markers allow the application to seek to various places in the media file. Each of the table of contents items calls the GoMarker() JavaScript method with a number. The first item will call the method with a 1 as an argument, as follows:

 GoMarker( 1 ) 

Subsequent items in the table of contents list have marker numbers that increment by one for each item.

In addition to inserting markers into the media file, Vegas Video also inserts Text commands. The Text commands trigger a call to the ScriptCommand() JavaScript method. When this method is called, the text parameter is used to set the slide window so that the appropriate slide is shown. For instance, the Text command for the third marker is M3. This causes the file M3.gif to be shown in the slide window. Figure 20.4 shows how to easily insert Text commands into the media file.

Figure 20.4. Inserting the Text Commands Is Simple. You Have to Make Sure That the Parameter Has the Name of the Next Image.


The following list summarizes what you must do to use this application on your server:

  • Make sure that the media streaming services have been installed on the server.

  • Identify the media home directory.

  • Create an .asf or a .wmf file with markers and Text commands from M1, M2, M3, and so on. Although both file formats have the same approximate sizes, .wmf might be a better choice because more software supports editing .wmf files than .asf files.

  • Create slides for the presentation made of GIF images.

  • Underneath the current Web application directory, create a directory into which the video.asx and the slides subdirectory will be created.

  • Create a video.asx file for the media file in the newly created directory.

  • Move the slides into a directory named Slides inside of the newly created directory (the files should be named M1.gif, M2.gif, M3.gif, and so on).

ASP. NET Solutions - 24 Case Studies. Best Practices for Developers
ASP. NET Solutions - 24 Case Studies. Best Practices for Developers
ISBN: 321159659
Year: 2003
Pages: 175 © 2008-2017.
If you may any questions please contact us: