Text Descriptors
Here is an example of a text track file that illustrates how text descriptors are used to control the formatting and timing of the text track.
{QTtext} {font:Geneva}
{plain} {size:9}
{timeScale:30}
{width:160} {height:32}
{timeStamps:absolute} {language:0}
[00:00:00.00]
One upon a time in a cubicle not so far away,
[00:00:06.09]
A tired but dedicated engineer
[00:00:20.19]
Worked on through the night...
[00:00:30.28]
As you can see, text descriptors are enclosed in curly braces ( { and } ) and specify the format of the text that follows. Some are simple one-word commands ( {bold} , for example) while others take additional information that follows a colon like {font:New York} .
stamps must always start with the {QTtext} descriptor. It can then be followed by any number of text descriptors, in any order. You can change the format of the text at any time by inserting a new text descriptor. {plain} , for example, will override a previous setting of {bold} .
QuickTime Pro reads and parses text track files when you import them. QuickTime Pro is not uppercase/lowercase sensitive. But it also does not have a spell checker. If a spelling error is encountered you may get an error stating that this file cannot be converted.
Q&A:
If a text track file you've created and imported with Movie Player is not displaying the way you think it should, you may want to try taking out any spaces inside the text descriptors. You must also ensure that the last line of the file is a contains a time stamp for the end of the movie. Some versions of QuickTime require that a carriage-return ("Return" on your keyboard) follows the final time stamp.
You can make Movie Player generate a basic text descriptor track for you by importing a short text file into movie player and then re-exporting it as "QuickTime to Text". If you click the options button in the export dialog and check the "Save text, descriptors, and time" option, the resulting text file will contain the basic text descriptors and time stamps for a file.
Current Text Descriptors
To understand the example above, and to create your own text descriptor and time stamp files, you will need to know the text descriptors you have to choose from. Here they are:
{QTtext}
This is required at the start of any file that has descriptors or timeStamps. If this is not the first thing in the file, the file is assumed to be normal text.
{font: fontname }
The parameter is the name of the font.
Example: {font:Apple Chancery}
This will change all text after the descriptor to the Apple Chancery.
{ fontstyle }
This specifies the style of the text that follows. There are eight valid font styles:
{plain} Plain text.
{bold} Bold text.
{italic} Italic text.
{underline} Underlined text.
{outline} Outlined text.
{shadow} Text with a drop shadow.
{condense} Text with spacing between characters decreased.
{extend} Text with spacing between characters increased.
justify: alignment }
This specifies the alignment of the text that follows. There are four valid parameters for justify:
{justify:left} Text will be aligned flush left.
{justify:right} Text will be aligned flush right.
{justify:center} Text will be centered.
{justify:default} Text will align to whatever the script system has set.
{size: pointsize }
This is the point size of the text (a point is 1/72nd of an inch). {size:18} will set the point size of text that follows to 18 point.
{textColor: redvalue , greenvalue , bluevalue }
To set the color of the text. There are three numbers between 0 and 65535 that make up the parameters. These numbers are RGBColor values. The order is red, green, blue. The values are separated by a comma ','. For example, {textColor: 0, 0, 65535} is blue text, {textColor: 65535, 32000, 0} is orange (lots of red plus some green equals orange, for computers anyway!). Spaces before the color values are allowed but not required.
{backColor: redvalue , greenvalue , bluevalue }
This is the same as textColor except that it changes the background color.
{height: texttrackHeightInPixels }
Takes one parameter, the height of the text track in pixels. {height:50} will set the text track height to 50. A value of zero will set the height to the best fit for the contents.
{width: texttrackWidthInPixels }
Same as height except a value of zero will set the width to 240 or to that of the movie if importing into a movie.
{language: languageNumber }
Text tracks can be set to a specific language. The ordinal (numeric) value of the language is used instead of the actual name. Example: {language:11} sets the language of the track to Japanese.
{timeStamps: relativeOrAbsolute }
Specifies if the timeStamps that follow are absolute or relative.
{timestamps:absolute} the timeStamps show the time the samples start relative to the beginning of the track. Note that since a track may not start at the beginning of a movie, this may not always (although it usually does) imply time relative to the start of the movie.
{timeStamps:relative} The timeStamps show the time relative to the previous sample.
{timeScale: numberPerSecond }
Think of this as the fractional part of a second. Ordinarily, people used to thinking about NTSC video probably think in 30ths of a second, while people used to film may think in 24ths of a second. So NTSC video users would specify a timescale of 30, while film animators would probably use a timescale of 24.
Hint: Movie Player expresses times based on a timescale of 30. If you are working with Movie Player, you will probably want to use a timescale of 30.
The number of digits in the last value of a timestamp is determined by the timescale. If {timeScale:10}, then the timestamp for 7.5 seconds would be ' [00:00:07.5] '. But If {timeScale:1000} , the same 7.5 seconds would be written as ' [00:00:07.500] '. The timeScale cannot go over 1000.
If you like math: Consider a timeStamp of [00:00:07.300] . If {timeScale:600} , then this is ipreted to be 7.5 seconds (7 + 300/600). If {timeScale:400} , it would be 7.75 seconds (7 + 300/400).
{textBox: top , left , bottom , right }
Used to set the dimensions and location of the textBox relative to the other visible tracks. Example: {textBox:0, 0, 80, 320} will draw the text in an 80-pixel-high by 320-pixel-wide box at the the top left of the movie window.
{anti-alias: onOrOff }
Display text anti-aliased. While anti-aliased text looks nicer, it incurs a significant performance penalty.
{keyedText: onOrOff }
Render text over the background without drawing the background color. This technique is otherwise known as "Masked Text."
{doNotDisplay: onOrOff }
QuickTime will not display the text after {doNotDisplay:off} . Kind of like commenting text out. To turn text display back on, use {doNotDisplay:on}.
{doNotAutoScale: onOrOff }
QuickTime will not scale the text following {doNotAutoScale:off} if the track bounds increase. To re-enable autoscaling, use {doNotAutoScale:on}.
{clipToTextBox: onOrOff }
Clips to just the text box. (This is useful if the text overlays the video, more of the video will be displayed during shorter text samples)
{useMovieBackColor: onOrOff }
Use the backColor of the movie instead of its own.
{shrinkTextBox: onOrOff }
Recalculates size of the textBox parameter to just fit the given text and stores this rectangle with the text data.
{scrollDelay}
{scrollDelay: 600} will cause subsequent text to be delayed one second (if the movie has a timescale of 600) before beginning to scroll. This only works when {scrolling:on} has been specified.
{ scrollIn: onOrOff }
Scrolls the text in until the last of the text is in view. This flag is associated with the scrollDelay parameter.
{scrollOut: onOrOff }
Scrolls text out until the last of the text is out of view. This flag is associated with the scrollDelay parameter. If both scrollIn and scrollOut are set, the text is scrolled in, then out.
{horizontalScroll: onOrOff }
Scrolls a single line of text horizontally. If the horizontalScroll flag is not set, then the scrolling is vertical.
{reverseScroll: onOrOff }
If set, scrolls vertically down, rather than up. If not set, horizontal scrolling proceeds toward the left rather than toward the right.
{continuousScroll: onOrOff }
New samples will cause previous samples to scroll out (scrollIn and/or scrollOut must also be set for this to take effect).
{flowHorizontal: onOrOff }
Lets horizontally scrolled text flow within the text box. This behavior contrasts with letting text flow as if the text box had no right edge.
{hilite: firstcharacter , lastcharacter }
Usedfor hiliting text. The parameters are first and last character to hilite in the text that follows. Example "{hilite: 11, 14} This is a text track" hilites the word 'text' in "This is a text track" sample.
{hiliteColor}
Use this to change the color used in highliting. The order of the parameters is red, green, blue. Example: {hiliteColor:35000, 0, 0} sets the hilite color to a shade of red.
{inverseHilite: onOrOff }
Use inverse hiliting rather than hilitecolor .
{dropShadow: onOrOff }
Support true drop shadows. Using SetTextSampleData, the position and translucency of the drop shadow is under application control. Not the same as {shadow}.
{dropShadowOffset}
{dropShadowOffset: 3, 4} will offset the text shadow 3 pixels to theright and 4 pixels down. Only works when {dropShadow:on} has been specified.
{dropShadowTransparency}
Pass in a value between 0 and 255. Changes the intensity of the drop shadow. Example: {dropShadowTransparency: 127}





