Cue points for FLV and F4V video files



Cue points cause the playback of video to start other actions within the presentation and let you synchronize the video with animation, text, graphics, and other interactive content. For example, you can create a Flash presentation that has video playing in one area of the screen while text and graphics appear in another area.

Each cue point consists of a name, the time at which it occurs in the video, type of cue point, and optional parameters. You specify cue point times using the format hour:minute:second:millisecond. When the encoded video file is played back within a Flash SWF file, and the video plays or seeks to the elapsed time specified by the cue point, the action you’ve specified is triggered.

Adobe Media Encoder lets you embed cue points in video clips using the Export Settings dialog box. You can assign each cue point an event type and parameter that can be used with ActionScript™ or the Flash FLVPlayback component to programmatically cause the video playback to start other actions in the presentation.

Note: In addition to embedding cue points within the encoded FLV video clip, you can create cue points using the FLVPlayback component. Using this component, you can create a cue point that is not embedded in the video clip itself, providing greater flexibility in triggering events. For more information, see the information on the FLVPlayback component in the ActionScript 2.0 Components Language Reference or the ActionScript 3.0 Components Language Reference.

Note that cue point metadata is stored differently in F4V and FLV file types. Refer to “Using cue points and metadata” in Programming ActionScript 3.0 for information on the differences between cue points in F4V and FLV files, and how to use them in Flash.

To synchronize an action for a cue point in an F4V video file, you must retrieve the cue point data from the onXMPData() callback functions and trigger the cue point using the Timer class in ActionScript 3.0. The onXMPData() callback function receives information specific to Adobe Extensible Metadata Platform (XMP) that is embedded in the Adobe F4V video file. The XMP metadata includes cue points as well as other video metadata. XMP metadata is introduced with Flash Player 10 and supported by subsequent versions of Flash Player and Adobe AIR. For more information on onXMPData()and F4V cue points see “Using onXMPData()” in Programming ActionScript 3.0.

Creating cue points from Adobe Premiere Pro and Adobe After Effects markers

Composition markers (After Effects) and sequence markers (Adobe Premiere Pro) can be converted into Flash cue points. When creating markers in Premiere Pro or After Effects, you can enter the Flash cue point name, names and values for any parameters, and select the type of cue point to create (for example, an Event or Navigation cue point). For more information on creating Adobe Flash cue points from composition markers or sequence markers, see After Effects Help or Adobe Premiere Pro Help.

About the cue point XML file

The cue point XML file lets you save your cue point data, and apply it to other video clips. The XML format lets you share it across platforms and applying it to any video that supports the F4V or FLV cue point format. An example of the file is shown below:

<?xml version="1.0" encoding="UTF-8"?> 
<FLVCoreCuePoints> 
    <CuePoint> 
        <Time>2000</Time> 
        <Type>navigation</Type> 
        <Name>CuePoint1</Name> 
    <Parameters> 
        <Parameter> 
            <Name>CuePoint1</Name> 
            <Value>Introduction</Value> 
        </Parameter> 
        <Parameter> 
            <Name>Cast</Name> 
            <Value>ActorNames</Value> 
        </Parameter> 
    </Parameters> 
    </CuePoint>
Important: If you modify the cue point XML file and insert invalid values or otherwise malformed XML syntax, Adobe Media Encoder will not be able to load the file.

The DTD (Document Type Definition) for the cue point XML file is shown below (A DTD defines the valid document structure of the XML file, with a list of supported elements and their meaning within the XML file itself):

<!DOCTYPE FLVCoreCuePoints [ 
<!ELEMENT FLVCoreCuePoints(CuePoint+)> 
<!-- FLVCoreCuePoints is the root element in the XML file and must contain at least one CuePoint element --> 
<!ELEMENT CuePoint(Time, Type, Name, Parameters?)> 
<!-- CuePoint contains the data for a particular cue point, and must contain one each of 
    Time, Type, and Name elements, and may contain one Parameters element --> 
<!ELEMENT Time(#CDATA)> 
<!-- Time contains the cue point time as an integer in milliseconds --> 
<!ELEMENT Type(#CDATA)> 
<!-- Type contains the cue point type as a case-sensitive string, either "event" or "navigation" --> 
<!ELEMENT Name(#CDATA)> 
<!-- Name contains the cue point name as a text string; it also can contain a parameter name when appearing 
    inside a Parameter element --> 
<!ELEMENT Parameters(Parameter+)> 
<!-- Parameters contains the cue point's parameters. It must contain at least one Parameter element --> 
<!ELEMENT Parameter(Name, Value)> 
<!-- Parameter contains the data for one of a cue point's parameters. It must contain one each of 
    Name and Value elements --> 
<!ELEMENT Value(#CDATA)> 
<!-- Value contains the value-part of the name-value pair for a cue point parameter --> 
]>

In addition to the restrictions enforced by the cue point XML DTD, the following characteristics apply to the XML format:

  • All comments regarding the data inside the tags in the DTD will be enforced on read; non-compliant XML will result in an error.

  • Cue points must appear in ascending time order within the XML file, and there can be only one cue point assigned at a given time.

  • The XML format is written as UTF‑8. Other encoding types are supported if they are properly declared via an XML declaration with encoding (for example, <?xml version="1.0" encoding="UTF-16"?> or a BOM marker in the file.

  • The only types allowed are “event” and “navigation,” both of which must be written using lowercase letters.

  • Time must be specified in milliseconds as an integer. You cannot use decimal points when specifying time (for example, 12.123 causes the XML file to fail).

  • Cue point files that do not successfully load generate an error message.

Adobe Soundbooth and the cue point XML file

Adobe Soundbooth™, a sound editing application, can import and export the cue point XML file. An advantage to creating the cue point XML file in Soundbooth, is that its Video panel lets you play back video footage while editing sound. This lets you insert cue point markers using both the video and audio components of the file. When you are ready to encode the video using Adobe Media Encoder, you can import the cue point file from Soundbooth and use the cue points to encode the FLV file. To learn more about using Soundbooth to create cue points, and importing the cue points XML file into Adobe Media Encoder, see the information on working with Flash and video in Using Soundbooth.

Define and embed cue points for Adobe F4V and FLV files

Cue points cause the video playback to start other actions within the presentation. For example, you can create a Flash presentation that has video playing in one area of the screen while text and graphics appear in another area. A cue point placed in the video starts an update to the text and graphic, while they remain relevant to the content of the video.

Each cue point consists of a name and the time at which it occurs. You specify cue point times using the format hour:minute:second:millisecond.

Create a cue point

  1. From the encoding queue, select a video in which you want to embed cue points.

    To select a video in the encoding list, click the video name in the video encoding queue.

  2. If you haven’t specified encoding settings for the video clip, do so now. Verify that the video use the FLV or FV4 encoding format. You can only embed cue points in FLV or F4V video files. To learn more, see Encode video and audio with Adobe Media Encoder.

  3. Select Edit > Export Settings.

    The Export Settings dialog box is displayed.

  4. The cue point controls are located in the lower left corner of the Export Settings dialog box.

    Cue point controls.

  5. Use the playhead to locate a specific point in the video where you want to embed a cue point. For greater precision, you can use the Left and Right Arrow keys to move the playhead in millisecond increments. To do this, select the playhead, and then use the arrow keys to further adjust its position.

    To locate a specific time, drag the playhead to the point in the video where you want to embed a cue point. The video preview window lets you visually identify points in the video at which to insert a cue point. You can also use the elapsed time counter (located beneath the video preview window) to locate specific points in time at which to embed cue points.

  6. When the playhead is positioned at a place in the video where you want to embed a cue point, click the (+) button on the right side of the cue point controls.

    Adobe Media Encoder embeds a cue point at the time indicated by the counter beneath the video preview window, and populates the cue point list with a placeholder for the name of the new cue point and the elapsed time at which the cue point is located (this is the time during playback when the event will be triggered), and displays a pop-up menu that lets you select the type of cue point to embed.

    Note: Only one cue point can be embedded at a specified time code within the video clip.
  7. Specify the type of cue point you want to embed. You can embed either a navigation or event cue point.

    • Event cue points are used to trigger ActionScript methods when the cue point is reached, and let you synchronize the video playback to other events within the Flash presentation.

    • Navigation cue points are used for navigation and seeking, and to trigger ActionScript methods when the cue point is reached. Embedding a navigation cue point inserts a keyframe at that point in the video clip to enable viewers to seek to that place in the video.

      Note: Adding additional key frames can lower the overall quality of a video clip. For this reason, only use navigation cue points when users need to seek to a particular place within the video.
  8. 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.

    To learn more about using cue points, and the parameter values they can use, see the following:

    • Information on working with video in Using Flash

    • FLVPlayback information in the ActionScript 2.0 Components Language Reference or the ActionScript 3.0 Components Language Reference

  9. (Optional) Save the cue points you’ve created so that you can apply them to other video clips. Click the Save Cue Points button (the disk icon) on the cue points tab, and save the file to a location on your computer.

Remove a cue point

  1. Select the cue point in the cue point list.

  2. Click the Delete Cue Point button (-), or press the Delete key.

    The cue point is deleted from the cue point list.

Load previously saved cue point data

  1. Click the Load Cue Points button  on the cue points tab.

  2. Select the cue point file you want to import, and click OK.

    The cue point file loads, and populates the cue point list with the cue points specified in the file.

    Note: When you load cue points from a file, any cue points you have created in the cue points list are replaced by the cue points in the file.