Captioning for Quicktime
Creating the Caption File
Article Contents
- Page 1: Introduction to Captioning for Quicktime
- Current page: Page 2: Creating the Caption File
- Dissecting the Caption File
{QTtext}{font: Arial}{justify: center}{size: 12}{backcolor:0, 0, 0}{timescale: 30}{width: 320} and {height: 60}[00:00:00.00] Dorothy: Toto, I don't think we're in Kansas anymore[00:00:04.15] {justify:left}{italic}barking{plain} [00:00:07.04]- Hints about the Quicktime caption file and captioning in general
- Creating Your Caption File
- Dissecting the Caption File
- Page 3: Creating the Quicktime Text Track
- Page 4: Adding Captions to a Quicktime Movie
- Page 5: Using SMIL to Add Captions to Quicktime Movies
- Page 6: Adding Quicktime Content to a Web Page
Dissecting the Caption File
A Quicktime caption file is a text file that contains the caption text as well as information that defines when individual caption displays will appear and what they will look like. You can use MAGpie - external link to create the caption file or you can create it manually. We will go through the process of creating the caption file manually so you get an understanding of what the file does and how it works. The basic layout of the caption file is this:
{QTtext}{font: Arial}{justify: center}{size: 12}{backcolor:0, 0, 0}
{timescale: 30}{width: 320}{height: 60}
[00:00:00.00]
Dorothy: Toto, I don't think we're in Kansas anymore
[00:00:04.15]
{justify:left}{italic}barking
{plain}
[00:00:07.04] View the previous example as a Quicktime Caption Movie (Quicktime required).
Now let's take a look at this code piece by piece.
{QTtext}
This piece of code will tell Quicktime Pro that this is a Quicktime caption file containing text.
{font: Arial}
Though there are no real standards for web captioning, most people use a sans-serif font - usually Arial or Geneva. Avoid fancy, uncommon, or hard to read fonts for your captions. You can change the font for individual lines of captioning if you choose.
{justify: center}
The justification of the captions is up to you, but center justified captions are usually easier to read.
{size: 12}
This defines the font size in points for your captions. Be sure your fonts are big enough to read, but small enough to allow some extra space. Some computers display fonts larger (i.e., if you have large fonts turned on in Windows) and the captions may be cut off. Size 12 is usually sufficient. If you want to display them in a larger caption window, then you might use 13 or 14.
{backcolor:0, 0, 0}
This line of code tells Quicktime what color to display the background of the captions. The three numbers represent the amount of Red, Green, and Blue respectively to display. The values can be 0 - 65534. All three zeros correspond to no color or black. Most captions on the web use white text on a black background.
If you want to change the background color, just increase one or more of the numbers. 65534, 0, 0 means the highest amount of red, no green, and no blue, so you'd get a red background. 65534, 0, 65534 indicate the highest amount of red, no green, and the highest amount of blue - which is a combination or red and blue. Purple! You can play with these colors to get any color on the planet, but remember that you probably just want to stick with black.
If you change the background color, you may also want to change the color of the text. To do this, just add {textcolor:0, 0, 0} to the first line of the caption file (the numbers work the same as backcolor) and make sure there is plenty of contrast between the text and background colors.
Note
MAGpie provides a simple interface to change background and text colors.
{timescale: 30}
Timescale indicates how we are going to designate units of time for captions appearing on the screen. A value of 30 means that each second will be broken into 30 parts.
To fully understand timescale you must also understand the concept of timecode. Timecode is how time is represented in video. A typical timecode looks like this [00:01:42.15]. You'll notice several of these in the example code above. Think of timecode as a stopwatch that times the length of your movie. The first two numbers represent hours, the second two numbers are minutes, the third set of numbers are seconds, and the final two numbers are fractions of seconds. Notice that colons separate hours, minutes, and seconds, but a period separates seconds and fractions of seconds. So, the timecode [00:01:42.15] indicates that we are 1 minute, 42 seconds, and 15 SOMETHINGS of a second into the movie. This is where timescale comes into play. If the timescale is 100, then .15 designates 15/100th of a second. If timescale is 30, then the 15 indicate 15/30th or half of a second.
If you use MAGpie, use {timescale: 100} because it is easier to make adjustments and MAGpie displays time this way. If you are going to create the caption file manually, select timescale of 30, because Quicktime displays timecode in 30ths of a second.
Note
Common timescale values are:
- 100
- 30 - Typically the number of frames per second in full motion video
- 24 - The number of frames per second for film
- 10 - Number of frames per second for most web video
{width: 320} and {height: 60}
Width and height that the caption area should display, in pixels. If you use MAGpie to create the caption file, you will probably need to edit width and height. This width value should usually be the same width as your video, unless the video is very small, in which case you might specify a larger width value.
[00:00:00.00] Dorothy: Toto, I don't think we're in Kansas anymore
The zeros represent the first timecode in your movie. All caption files should start with the zero timecode, even if you don't want anything to display in the captions at the very beginning. Starting with zero allows the captions and audio/video to be synchronized. In this case, the text after the timecode will be displayed at the very beginning of the movie. It will be displayed in the font, justification, and size set in the first line.
[00:00:04.15] {justify:left}{italic}barking{plain} [00:00:07.04]
The second timecode in the caption file begins the display of a new caption. The Dorothy... text will display for the first 4 and 15/30th (or 4 1/2) seconds. The word barking will then be displayed. The curly brackets ({ and }) indicate special formatting for the captions. In this case, the word barking is preceded by {justify: left} and {italic}, so it will display at the left of the screen in italic font. The word barking will display until we are 7 and 4/30th seconds into the movie.
Note
In Quicktime captions, when you specify any formatting, that formatting will remain on until you turn it off with {plain}.
Hints about the Quicktime caption file and captioning in general
- The movie preferences can be listed in any order, but
{QTtext}must be the first item in the text file. - Timecodes should be placed on a line all by themselves. This makes editing much easier.
- Be careful not to mistakenly use a colon in place of the period before the fractions of a second.
- Text formatting codes like
{justify:left}and{italic}will remain active until another text formatting code overrides or negates it. In the example above,{plain}would stop the text from displaying italicized. You would have to add{justify:center}before the next caption to get the captions to be centered again. - If you specify more than one alignment per section of captions, then the last alignment specified will set the alignment for the entire caption. In other words, you can't have the first line of one caption centered, then the next line left aligned.
- You can add many different text-formatting codes in your file. Get a complete list at the Quicktime site - external link. There are lots of fun things you can do, such as changing sizes, locations, or colors, and you can even add links.
- Always make sure your caption file ends at the same time as your video. The caption file should end with a timecode that is equal to the length of the movie.
- Captions are often aligned to the left or right to indicate dialogue from someone that is not currently visible in the video.
- Italics usually indicate some nonverbal sounds, including special effects and background sounds. Narrations are also italicized. Only caption important audio content.
- Most television captioning usually does not display speaker's name (e.g., Dorothy:) if the speaker is visible in the movie because the viewer can look to see who is speaking while reading the captions. Off screen speakers are also rarely identified, unless it isn't obvious who is speaking. On the web, where video quality may be poor and the size of the video may make it difficult to identify who is speaking, you may want to specifically identify the speaker if it isn't obvious. Only identify the speaker's name when the speaker changes, and don't identify them repeatedly if there is a long section where they are the only one speaking.
- It is common on the web to display the speaker's name left aligned on one line, then the dialogue center aligned on the next line. Though this makes identifying speakers easy, it does waste most of the space available on the first line of caption space. A preferred method is to include the speaker name followed by a colon, and then begin the dialogue on the same line.
- Captions should typically be verbatim, word-for-word records of what is spoken. It is, however, common to remove unnecessary content, background dialogue, or filler words (like 'um') where appropriate or when caption timing will be affected.
Creating Your Caption File
The best way to create your Quicktime caption file is with MAGpie. If you want to create the file manually, all you need to create a caption file is a text editor such as Notepad for Windows or SimpleText for Macs. You'll also need Quicktime Pro - external link. It may be helpful to have a transcript of your movie before you begin. You can also add the text for the captions as you go.
- Open your text editor to display a new, blank document.
- Add the Quicktime preferences as found in the example code above, or copy and paste them from this box:
Notice that this box also includes the first timecode for the beginning of the movie (all zeros). - Make modifications as you like. These are standard settings. You will probably want to modify the width and height to the size you want. The width will usually match the width of your video file. Height is typically 40 to 70 pixels, based on the length of individual captions. 50 pixels will nicely accommodate three lines of 12 point Arial text.
- If you have a transcript of the video, copy and paste it into the text editor after the first timecode. Make sure the transcript contains text only. Most characters are acceptable except for
{and}. These are special characters in the caption file and will have to be replaced with other characters, such as(and). - While keeping the text editor open, open your audio/video file in Quicktime Pro. Yes, you must have Quicktime Pro - external link to do this.
- Select (or Ctrl + J). This will open a second window.
- Two menus will appear in the window. In the right hand menu, select .
- Begin playing your movie until there is a logical break point in the dialogue (usually after a sentence or two). You may need to fast forward, rewind, or drag the location slider until you get more accurate at controlling Quicktime. Pressing the spacebar on your keyboard will toggle between play and pause. Stop the video precisely at the breaking point in the dialogue.
- If you have pasted the transcript into the text editor, find the place in the text that coincides with the break in the dialog within the video. Otherwise, type in the text up to the stopping point on a blank line after the first timecode. Be sure to break the text at a logical place. You should try to break text where you would expect the speaker to take a breath. Make sure each text section is not too long, because you are limited on the amount of text that can be displayed at one time - based on the caption window and font size. At this time, the section of text, up until the stopping point should be on a line all by itself, immediately below the opening timecode.
Note
Line breaks work differently on Macs and PC's. If you hit enter to start a new line within a captions on a Mac, it will work fine. If you insert a hard return on a PC in some text editors, then a line will be skipped before the next line of caption begins. This wastes a lot of space.
To fix this problem, a full-featured text editor such as TextPad - external link can be used. If you are using Notepad, you'll need to copy, then paste in a special character for a line break into the PC text file. You can view this character in this text file ( on the link and select , then open the file with Notepad to view the character). It looks like a little square. Pasting this into your caption file will cause Quicktime to go to the next line. Do not insert a hard return, except before or after timecode, unless you want an empty line to be displayed. Again, using TextPad or another text editor should solve this problem.
- Go back to Quicktime and note the current timecode that is displayed in the window.
In your text editor, enter this timecode on a new line beneath the text that will comprise the first caption. This timecode will represent the end of the first caption and the beginning of the second. It may be easier to copy one timecode, paste it wherever a new caption begins, then modify the numbers to reflect the correct time. This saves time because you don't have to type in the full timecode format repeatedly.
- Repeat steps 8 - 10 until the entire movie is captioned. Make sure the ending line of the caption file is a timecode that is exactly the same as the ending timecode of the movie. The Duration value on the Movie Properties window indicates the ending timecode for the movie. If you don't want to display captions for a section, just enter the beginning timecode and the ending timecode on adjacent lines, with nothing between them.
- Save your text file to your computer. Windows users, make sure that you save it as a text (.txt) file.
If you did everything correctly, you now have a caption file that is ready to be converted into a Quicktime text track.
There are several ways to go about adding captions and timecode. Experiment until you find a pattern that works for you. Adding the captions manually can be quite time consuming, which is why most people use a program like MAGpie. But regardless of how you create the caption file, it's important to know how it works, how to modify it, and how to fix mistakes.