Nov 00 QTToolkit
Volume Number: 16
Issue Number: 11
Column Tag: QuickTime Toolkit
Word is Out
by Tim Monroe
Using Text in QuickTime Movies
When QuickTime was first introduced, it was able to handle two types of media data:
video and sound. Curiously, the very next media type added to QuickTime (in version
1.5) was text, or the written word. Part of the motivation for adding text media was to
provide the sort of "text below the picture" that you see in movie subtitles or
television closed-captioning, as illustrated in Figure 1. Here, the text provides the
words of a song, which can be useful to hearing-impaired or non-English speaking
users. Similarly, the text might provide the dialogue of a play or a readable version of
the narration. Of course, the text doesn't have to just mirror the voice part of an audio
track; it can be any annotation that the movie creator deems useful for the viewer.
Figure 1. A movie containing a text track.
The text you see in Figure 1 is not part of the video track; rather, it is stored in a text
track (whose associated media is of type TextMediaType). Typically the text track is
situated below the video track (as in Figure 1), but in fact it can overlay part or all of
the video track. In order for both the text and the overlain video to be visible, the
background of the text track should be transparent or "keyed out"; the text is then
called keyed text. Figure 2 shows some keyed text overlaying a video track. Keying can
be computationally expensive, however, so keyed text is seen less often than
below-the-video text.
Figure 2. A movie containing a keyed text track.
QuickTime provides the capability to search for a specific string of characters in a
text track and to move the current movie time forward (or backward) to the next (or
previous) occurrence of that string. In addition, the standard movie controller
provides support for a special kind of text track called a chapter track. A chapter track
is a text track that has been associated with some other track (often a video or sound
track); when a movie contains a chapter track, the movie controller will build,
display, and handle a pop-up menu that contains the text in the various samples in that
track. The pop-up menu appears (space permitting) in the controller bar. The various
parts of the associated track are called the track's chapters. When the user selects an
item in the pop-up menu, the movie controller jumps to the start time of the selected
chapter. Figure 3 shows our standard appearing-penguin movie with a chapter track
that indicates the percentage of completion (both before and after the user clicks on
the pop-up menu). Notice that we've had to hide the step buttons in the controller bar
to make room for the chapter pop-up menu. Notice also that the text track itself is not
visible.
Figure 3. A movie with a chapter track.
The QuickTime Player application, introduced with QuickTime 3.0, employs a slightly
different user interface for accessing a movie's chapters. As you can see in Figure 4, a
QuickTime Player movie window replaces the pop-up menu with a set of up- and
down-arrow controls, which select the previous and next chapter.
Figure 4. The chapter controls in a QuickTime Player movie window.
QuickTime 3.0 also included a web browser plug-in that supports linked text. Linked
text is contained in a hypertext reference track (usually shortened to HREF track),
which is simply a text track that has a special name (to wit, "HREFTrack") and
contains some media samples that pick out URL links. If a text sample contains text of
the form , the QuickTime Plug-In will load the specified URL in the frame