Forums
in > Search
Welcome to Pinnacle Systems - Forums Sign in | Join | Help

HTML for embedding progressive WMV files

Last post 12-11-2007, 8:23 by DStone. 0 replies.
Sort Posts: Previous Next
  •  12-11-2007, 8:23 79588

    HTML for embedding progressive WMV files

    When publishing for the web, it's common to use Windows Media format (.WMV) files for distributing the media. There are 3 basic methods of using WMV files in the web. The first is a simple download. This has the advantage of not requiring anything special in the way of web servers or browsers. However, the media has to be completely downloaded before it can be viewed, and you may have to start a separate application (e.g. the Windows Media Player) in order to view the media.

    The second method uses a streaming web server to stream the video over the net. This requires special software (the streaming server) and is beyond the scope of this document to detail. Streaming media does not require the entire media be downloaded. It will start playing as soon as there is enough buffered by the web browser. The appropriate media player is automatically launched if an external player is required.

    The third method uses progressive download. It's a best-of-both-worlds solution. You do not require any specialized web server, the media does not have to be fully downloaded before playback, and playback can happen automatically. The only requirement is that the WMV file be encoded specifically for progressive download. A major difference in using a streaming server vs. progressive download is that streaming servers can serve up the video to a lot more sites simultaneously than can progressive downoad.

    Once the video is encoded to WMV format and uploaded to the web server, you need to create an HTML page which embeds the media player as an object on the page. The following HTML will work as a basic page:

    <html>
    <head>
    <title>Fill in your title here</title>
    </head>
    <body>
    <OBJECT ID="MediaPlayer" WIDTH="320" HEIGHT="240"
    CLASSID="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" TYPE="application/x-oleobject">
    <PARAM NAME="FileName" VALUE="http://www.nonexistant.net/nosuchfile.wmv">
    <PARAM NAME="autostart" VALUE="1">
    <PARAM NAME="showcontrols" VALUE="1">
    <EMBED TYPE="application/x-mplayer2" src="http://www.nonexistant.net/nosuchfile.wmv"
    WIDTH="320"
    HEIGHT="240"
    AUTOSTART="1"
    SHOWCONTROLS="1">
    </EMBED>
    </OBJECT>
    </body>
    </html>

    Replace the title with something appropriate. Also replace the URLs for the source (http://www.nonexistant.net/nosuchfile.wmv) with the real URLs. And you need to change the width and height to match how the media was encoded.

    Note that the player and parameters are specified twice and in two different ways. This is because different browsers require different mechanisms. This template covers both, and the browser will use which ever one it needs and ignore the other.

    To playback the video, you post the link to the HTML page and not directly to the media.

    To encode for progressive download, you can use the WMV exporter in Liquid. For full-screen video, the High Quality NTSC (or PAL) preset does a very nice job. A 5-minute NTSC video using this profile requires are 30Mb of space at 640x480, but it starts playback after about 1Mb of buffered download. The Medium quality profile produces 1/2 size video (320/240) and requires about 12Mb.

    For more control, you can use the Windows Media Profile Editor and create new profiles for Liquid. You can also use the Windows Media Encoder outside of Liquid and gain complete control over the encoding process. The WMV encoder and profile editor are available in the same package free from Microsoft. Click HERE for more information.

     Hope this helps.

View as RSS news feed in XML
Copyright © 2012 Corel, Inc.. Terms of Use | Privacy Policy