XML captioning & cue points
The correct way to do captioning, according to the W3C guidelines, is to use an external XML file, which lists the cue points and the captions.
Timed-text specifications by the W3C
Download this XML template,which you can modify for your own video.
Save the template in the same folder as your Flash SWF file and your FLV file, with a .
Modify it by noting time codes when new captions need to appear in your Premiere preview.
This template contains
- Header information identifying your XML file as a list of cues that comply with the Time-text specifications
- style information, which you can modify to suit your own video and page design
- a list with a few cue points that you can modify, by changing the cue time points and the caption text.
- beginning and ending cue points define the duration of the caption that accompanies the video
- beginning cue points only define a caption that will end when the next caption begins
- if the ending cue points overlaps the beginning of the subsequent cue point, the first one wins.
How to caption your FLV video that is played from a Flash SWF file
Types of Captioning --
See UDWA, Ch. 7: The third version is adequate since you want to convey the meaning of the video
- Transcripts: Word-for-word copies of what is spoken, and may include audio or visual cues, so that it makes sense without the video
- Subtitles: Synchronized chunks of text used to translate the spoken content into another language. No text equivalents for sounds
- Captions: Synchronized chunks of text, optimized for deaf and hard-of-hearing viewers. May not include exactly what speakers are saying but may be contracted for easier reading
Figure out the cue points where you want a caption
- Open the video project in Premiere (the prprpj file)
- Scrub through the movie preview in the Monitor on the right
- Write the text for the first caption after the first <p> in the XML file, with the begining timecode of 00:00:00:00
- When you reach a frame at which you need to change the caption, note the time in the next <p> statement in your XML file.
- You can indicate the ending time of each caption or you can only use the beginning times.
- Be sure your caption times do not overlap. The results will not be what you expect.
- Save your xml file when you are finished with a name such as captions.xml
Configure the Flash Movie Components for the Captions
Open a new ActionScript3 document in Flash. Save the FLA file (e.g., captioned.fla) in a FlashCaptioning folder.
You need an FLV file that has time codes and captions defined in an external xml file. The xml file should be in the FlashCaptioning folder.
What you need to drag onto the stage in the Flash FLA file:
- The FLVPlayback component, with parameters set to play the FLV file to which you configured captions in an XML file, with an instance name of your choice
- Import a video for which you have timecodes for captioning into the FLA file, and encode it
- Or calculate timecodes and captions for a Premiere Project, and export the video as an FLV file into the FlashCaptioning folder
- The FLVPlaybackCaptioning Component, which enables captioning of an FLV video, with an instance name of your choice.
- this component is invisible so it does not matter where you put it.
- the captionTargetName should hold the instance name of the dynamic text area that will hold the captions, e.g. CaptionBox
- showCaptions should be true
- simpleFormatting should be
- false if you want to display your captioning in a dynamic textbox external to the movie
- true if you want the captions to display on the movie itself, which may block out part of your movie display.
- source should be the name of the xml file holding the time codes and captions, e.g. captions.xml
- Dynamic text box.
- Select the text tool
- be sure Dynamic Text is displayed in the upper left property inspector
- give it the instance name CaptionBox
- Drag the text tool across the stage in the area you want the captions to appear.
- Select a font that is large enough and will be visible, and be sure it is multiline.
- Save the FLA file
- Control>Test Movie should display the FLV video, and the captions in the separate dynamic textbook. As the movie plays the captions change, according to the timecode.
Cue points in FLVPlayback Components Parameters
These methods are not the one recommended by the W3C. You can locate the timecodes this way, but Premiere has an easier interface to use for the same process.
These methods are "destructive" because you cannot change the cuepoints if your timing is off.
Adding Cue Points in Flash video capture
However, it allows you to place 2 kinds of cue points within your video as you capture it in th Flash encoder.
The Navigation cue point places a keyframe inside the video, to which you can jump, using actionscript..
To define and embed cue points, use Flash Video Encoder or import a video clip using the Video Import wizard.
- Click Cue Points tab.
- To locate a specific frame (point in the video) to embed a cue point, use the playback head.
- For greater precision, select the playback head & use left and right arrow keys to locate specific points in the video.
- To locate a specific frame, use the pointer to move the playback head to the point in the video to embed a cue point.
- Use video preview window to pick points in the video to insert a cue point.
- To locate specific points in time at which to embed cue points, use the elapsed time counter
- When the playback head is positioned on a frame where you want to embed a cue point, click the Add Cue Point button.
- Flash Video Encoder
- embeds a cue point on that frame of the video
- populates the cue point list with a placeholder for the name of the new cue point, and the elapsed time and video frame at which the cue point is located
- displays a pop-up menu to select the type of cue point to embed.
- A cue point marker appears on the slider control at the point where the cue point was embedded. To adjust the placement of the cue point, use the cue point marker.
- Choose type of cue point:
- Event cue points
- trigger ActionScript methods when the cue point is reached
- synchronize the video playback to other events in the Flash presentation.
- Navigation cue points
- used for navigation and seeking
- trigger ActionScript methods when the cue point is reached
- inserts a keyframe at that point in the video clip.
- Enter parameters for the selected cue point.
- Parameters are a set of key-value pairs that you can add to the cue point.
- The parameters are passed to the cue point event handler as members of the single parameter object.
Resources for Flash Video Captioning
- Chisholm and May, Universal Design for Web Applications, 1st ed. Ch 7
- Green & Stiller, Flash CS3 for Designers, Friends of Ed, pp. 378ff.
- Reinhardt, Adobe Flash CS3 Professional Video Studio Techniques, Ch. 10
- Shupe & Rosser, Learning ActionScript 3.0, 1st ed., Ch 12.5
- Johnson, Adobe Flash CS4 Professional, On Demand