Stream QuickTime From Your Web Page
If you want to stream QuickTime media directly from your Web page, you're in the right place.
In this article, I'll briefly explain the embedding process and provide links to more detailed information on Apple's QuickTime Web site.
First, developers might be confused over QuickTime's two delivery methods: progressive downloading, named Fast Start, and streaming.
What's the difference?
Fast Start preceded streaming as a method of QuickTime media delivery. It works by initiating playback as the media file downloads to your computer. However, with long-form media, such as a feature film, storing large file sizes on a user's computer isn't practical. Also, the content owner might want to prevent the file from being downloaded.
With streaming, content does not download to your computer but is broadcast, with the QuickTime player discarding the information after it has been assembled and presented for playback.
Apple provides a great comparison of the two methods. If you don't know which method will be the best way to deliver your media, you should review the comparison page.
Assuming you've made the decision to stream QuickTime media from inside a Web page, here's how it works.
Get Ready to Stream
First, prepare your media for streaming. This process is the same, regardless of whether you plan for playback to occur in the QuickTime player or from a Web page.
Apple's instructions for preparing media include "hinting" each media track within the QuickTime media so the server will know how to package it for network streaming.
Once you've created your "hinted" QuickTime movie, upload it to a QuickTime streaming server.
Let's assume your QuickTime movie is named, MyMovie.mov -- the .mov extension denotes QuickTime media files.
Set Your Reference File
Because Web browsers do not support streaming protocol, a separate metafile is required to allow streaming from a Web page. This "reference movie" resides on the Web server. It refers to your media file, MyMovie.mov, which uses the rtsp:// (streaming) protocol.
A key benefit of the reference movie is that it allows you to create alternate data rates for streaming. The QuickTime plug-in will automatically select the data rate best optimized for the user's connection speed without requiring separate links in the Web page for different data rates.
To create a reference movie, download QuickTime's MakeRefMovie application, which is available for Mac and Windows operating systems.
This application instructs how to create the reference movie and how to insert into it the rtsp: URL that points to the QuickTime movie on your streaming server.
After creating the reference movie -- we'll call it MyReferenceMovie.mov -- upload it to your Web server, not your streaming server.
The next step is to link this file to your Web page. Once linked, the Web page interacts with the QuickTime plug-in installed on the user's computer and directs it to stream the QuickTime movie.
Unfortunately, a simple hyperlink cannot be used to refer to the reference file to initiate streaming. You must use the embed tag in combination with a QuickTime poster movie that has been embedded in the Web page. Learn how to create QuickTime poster movies at the Apple QuickTime site.
The poster movie, which we'll name MyPosterMovie.mov, is a single-frame snapshot from your QuickTime movie. It serves as a graphical hotlink to your reference movie.
The QuickTime poster movie also resides on the Web server in the same directory where the Web page and MyReferenceMovie.mov are stored. Its dimensions are identical to those of the QuickTime movie to facilitate the proper display of the streaming QuickTime movie in the Web page. Make sure you know the precise dimensions of the movie display.
Before writing the HTML for your Web page, let's review the files to make sure they're in their proper places.
Your QuickTime movie, MyMovie.mov, which has been hinted for streaming, resides on your QuickTime streaming server.
The reference movie, MyReferenceMovie.mov, resides on your Web server along with your poster movie, MyPosterMovie.mov. Let's assume these files are in the same directory as your Web page.
Add the HTML
The HTML you need uses the embed tag, which enables media types to be handled by external applications. In this case, this will be the QuickTime plug-in, which is included with all QuickTime player downloads.
The embed tag provides for a long list of attributes, many which are specific to QuickTime. Attributes are included in the embed tag to provide additional control over how the streaming movie is presented to viewers.
In the example above, I included a few attributes I recommend always using.
The "type" attribute prevents Windows Media players, which are not compatible with the QuickTime format, from attempting to stream this file.
The "autoplay" attribute controls whether the media will start automatically or start at user discretion.
The "target" attribute tells the QuickTime plug-in to replace the poster movie with the streaming QuickTime movie when the user clicks the Play button.
Also, to display the QuickTime control bar for viewers, add 16 pixels to the height of your movie's display size. If your movie is an audio-only file, set the height to 16 pixels to display the Control bar only.
For a comprehensive overview of streaming with QuickTime, I highly recommend visiting Apple's QuickTime tutorial section. There you'll find an easy-to-navigate menu that will lead you to all the information you need.
Copyright © 1995-2001 Pinnacle WebWorkz Inc. All rights reserved. Do not duplicate or redistribute in any form.