Streaming Media

A little background

There are two ways to provide multimedia (primarily sound and video) over the Web. The easy way is to let users download the files then run them locally, but that can mean a very long wait as multimedia files are typically extremely big. The alternative is to use streaming media, where the application doesn't have to wait for the whole file to arrive before it starts playing it. Obviously, there are limitations, especially in terms of quality. Partly this is solved by buffering- the streaming media client waits until it has some of the file in memory before it starts playing then, if the connection is a bit shaky, it can carry on playing whilst the connection catches up. At the other end, decent streaming media servers are clever enough to figure out the speed of the connection and to reduce or improve the quality to match (e.g. by sending smaller images, poorer quality audio or fewer images per second), as well as doing a load of other clever networking things like multicasting which you don't need to know about. We are not going to use such a server today as the setup and admin of such a thing is a little tricky, so we will rely on the intelligence of the client (Windows Media Player) to sort out playback.

Standards

There are two main standards for streaming media, Real and Microsoft's ASF (Advanced Streaming Format). As Real make it very hard to get their free tools (although they are available if you search hard enough at www.real.com) we are going to use similar tools from Microsoft to make our presentations. Rather than attempt the complex world of video production, we are simply going to make some narrated slide-show presentations.

Process

In a perfect world you would make your own video recordings, pictures, sound bytes and so on and then turn them into streaming media presentations. However, because of the technical limitations of the labs, we are a bit more limited in what we can easily do. 

To start with you can use the sample files which are provided by Microsoft, then you can try one of your own.

Preparation

We will be using two tools. Mainly, we shall use an elderly application called Windows Media Author, but you will also need to record some sound. I would suggest you use the standard sound recorder accessory supplied with Windows NT.

Note that we are using out-of-date tools and that, if you wish to try this at home, you can get a simpler-to-use set of applications from the Microsoft site at http://www.microsoft.com/windows/windowsmedia/en/default.asp 

Getting started

Find a machine with microphone and speakers. You may have to share a machine with one or more colleagues.

Start the Windows Media Author. This may be found by starting My Computer or Windows Explorer and navigating to 

C:\Program Files\Windows Media Components\Tools\tagasf.exe 

Select "Open the sample project"

You should see something like this. Notice that the window is composed of three main areas. Click on each area on the picture below for a brief description...

Now start to play with the application itself. Start by moving the mouse slowly over the various objects on the screen. If you wonder what a particular object does, let the mouse rest over it for a couple of seconds, and you should see a brief description of its function. 

Find the preview button, and play the presentation. You may have to listen carefully as the soundtrack is notably quiet.It is worth listening to, however, as it explains a fair bit about what you can do with the package as well as a little about how to use it.

Now make a change to the playback speed. This should clear the timeline so that you can build your own presentation by dragging the elements down yourself. Feel free to experiment. BTW, I have no idea what role the "Caption" option plays, but see if you can work it out. As far as I can tell, it does nothing at all. Note that, when you need to save the file, you should save it into C:\temp as you do not have permission to write files in the default location.

Do it yourself

Your task is to create a short presentation. Perhaps you have some of your own images, or alternatively you might search for some free images on the Web. You can save images by right-clicking on them from within Internet Explorer or Netscape and choosing to save the image. It's up to you where you save them, either in your drive W: or in C:\temp. If you choose your drive W:, I would suggest making a folder specially for them.

It is usual to record your soundtrack first. Do so using the Windows sound recorder (should be available from the accessories menu), and save it into the same folder as you have saved your images.

The following is adapted from Microsoft's own tutorial...

To setup a project in Windows Media Author

  1. Open Windows Media Author from the Start menu. On the Welcome dialog box, select Create a New Project.
    • Content window. This area is a bin that holds image and audio files. You drag content from this bin to build the project.
    • Image info window. This area displays a thumbnail image and information about a selected file.
    • Edit window. This area contains the graphical timeline on which you build a project.

      You start a new project by adding to the content window. You can add more content or delete content from this window at any time.

  2. On the Insert menu, click Insert Media.
  3. Locate the content, select your image files and audio file(s) with a .wav extension. Then click Open. The files are added to the Content Window.
  4. In the bandwidth list on the toolbar, make sure 28.8 kbps is selected. The Windows Media file you create from this project is for a bandwidth of 28.8 kilobits per second (Kbps).
  5. On the File menu, click Save.
  6. Create a folder  in W:\ into which Windows Media Author saves your content and a project file, and then click Save.

    This project folder will hold any additional content files, Windows Media files, and template Web pages you create. So that Windows Media Author can keep track of the content, only add to or remove files from this folder using the Insert Media and Remove Media commands.

To place audio on the timeline in the Edit window

To place images on the timeline

To encode the project

  1. On the File menu, point to Preview, and then click Converted Media.
  2. If a message appears, click OK.

    The project is encoded to a Windows Media file. Then, Windows Media Player opens and plays it. After viewing the file, you can make changes to the images and repeat these steps as often as necessary.

    When you are satisfied with playback, you can use this Windows Media file as your final product.

Linking to Your Content

After you have created Windows Media files and copied them to your server, you make them available to end users by:

To create a Windows Media metafile (not required if you choose to create an HTML page when you save the project)

  1. Open a text editor, such as Microsoft Notepad, and then copy and paste this code:
    <ASX version="3">
       <Entry>
          <ref HREF="http://itsuite.it.bton.ac.uk/student/our-user-id/your-folder-name/yourfilename.asf"  />
       </Entry>
    </ASX>
    Change the URL to reflect what you have called your presentation.	
  2. Save the file to the folder you created earlier. Name the file using the name of the Windows Media file followed by an .asx extension, for example File.asx.
  3. Test the Windows Media metafile by double-clicking the file icon or opening it in Windows Media Player. If the URL and other scripting elements in the metafile are correct, Windows Media Player will locate and play the content.

To add a link to your Web page

  1. Open the Web page in an editor and add a link to the .asf file 
  2. Test your Web page using Internet Explorer (Netscape may not work properly in the labs)

If all has gone well, you should now have a multimedia presentation on the web