Home : Video : Formats : Windows Media : Streaming

Streaming Video using Windows Media

In order to use Windows Media for streaming or downloading video and audio, you need to do three things (unless you already have a WinMedia file ready to go, in which case you only need to do the last thing):

  1. Choose a format
    Windows Media has several different file formats (see the links at the bottom of the page). If you're not sure which format to use, WMV is the easiest for video. You may also be limited to the options in your editor, which brings us to...
  2. Create a video/audio file
    The easiest way to create a Windows Media file is to export a file from your favourite editing application. Open the original video clip, then look under File > Export to see what options you have.
    For an example of how this works, see Exporting WinMedia from Adobe Premiere.
  3. Place the files on a web page
    This involves entering some HTML code, shown below.

The rest of this page assumes you have a file in your chosen format and you are ready to place it on a web page. There are two ways to do this: Hyperlinking and embedding.


Hyperlinks to Windows Media Files

Make a hyperlink directly to the video file using the following code (change "videofilename.wmv" to your own file name):

<a href="videofilename.wmv">Click here to view video</a>

A link is created like this: Click here to view video

When the end user clicks this hyperlink, their Windows Media Player will open and load the video file for playing. The video may begin playback almost immediately (simulating true streaming) or it may not. The results are unpredictable, which is one reason you might choose to embed the file instead.


Embedding Windows Media Files

Embedding a Windows Media file places the video clip on the web page, as per the example on the right. To create a simple embedded video file like this, use the code below (swap both instances of videofilename.wmv for your own file name).

<OBJECT ID="MediaPlayer" WIDTH="192" HEIGHT="190" CLASSID="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
STANDBY="Loading Windows Media Player components..." TYPE="application/x-oleobject">
<PARAM NAME="FileName" VALUE="videofilename.wmv">
<PARAM name="ShowControls" VALUE="true">
<param name="ShowStatusBar" value="false">
<PARAM name="ShowDisplay" VALUE="false">
<PARAM name="autostart" VALUE="false">
<EMBED TYPE="application/x-mplayer2" SRC="videofilename.wmv" NAME="MediaPlayer"
WIDTH="192" HEIGHT="190" ShowControls="1" ShowStatusBar="0" ShowDisplay="0" autostart="0"> </EMBED>
</OBJECT>

The Windows Media player which appears on the page can be customised to some extent; for example, you can choose whether or not to show the playback controls, status indicator, etc. For more information see Embedding Windows Media Files and Examples of Embedded Files.


See also :

Subscribe to us on YouTube