Accessibility

Flash Quick Starts: Building Flash video projects

Using the Adobe Flash CS3 Video Encoder

Adobe Flash CS3 Video Encoder is a stand-alone video encoding application that lets you encode video in Adobe Flash video (FLV) format. The FLV format lets you easily incorporate video into a web page or Flash document in a format that can be viewed using Adobe Flash Player.

This quick start covers the following topics:

Introducing Flash video and Flash Video Encoder

Flash video is an integral part of the viewing experience, not a separate pop-up window that plays video externally and interrupts the experience. Flash treats Flash video as a media type; you can layer, script, and control video like any other object in a SWF file.

Flash Video Encoder lets you encode video files in either the On2 VP6 or Sorenson Spark video codecs. A codec is an algorithm that controls how video files are compressed during import and decompressed during playback. You can use Flash Video Encoder on a computer that does not have Adobe Flash CS3 Professional or other Adobe Creative Suite 3 software installed.

You can batch-process multiple video clips when you use Flash Video Encoder on a dedicated computer for video encoding.Batch processing produces an expedited workflow. For example, you can add, reorder, and change the encoding settings of files in the batch processing queue while Flash Video Encoder is encoding video files.

Note: The Flash Video Encoder can encode a video only if the following conditions are met:

Adding a video to the encoding queue

When configuring encoding settings, you can select individual files and specify different settings based on the type of video format and quality required for each file, or you can select multiple files and specify the same settings for all of them.

Encoding video with the Flash Video Encoder:

  1. Start Flash Video Encoder by selecting Start > All Programs > Adobe Flash Video Encoder (Windows), or open the folder that contains the Adobe Flash Video Encoder application, and double click the application icon (Macintosh).
  2. In the Flash Video Encoder, add source video clips to the list of files to encode by clicking Add (File > Add) and selecting one or more files on your computer.

    Tip: You can also add files to the queue by dragging files directly into the list.

  3. Click Settings (Edit > Encoding Settings) to display the Flash Video Encoding Settings dialog box.

    Flash Video Encoding Settings dialog box

    Flash provides several pre-configured encoding profiles that you can use to encode your video. In the Encoding panel, you can select an encoding profile to determine the level of compression to be applied to the video clip.

    The encoding profiles are based on the Flash Player version for which you intend to publish content and the data rate at which you want your video content to be encoded. If you choose an encoding profile using Flash Player 8or later, the On2 VP6 video codec is used to encode the video. If you choose an encoding profile using Flash Player 7 or earlier, the Sorenson Spark video codec is used to encode the video.

  4. Verify that the encoding profile you've selected is appropriate for your intended application. The text box below the Flash video encoding profile drop-down list displays the Flash Player version, video codec, video bit rate, and audio encoding information for the selected encoding profile.

    encoding profile

  5. Enter a filename for the encoded FLV file. If you don't specify a filename, Flash Video Encoder uses the filename of the source video clip. When naming a file, do not enter the .flv file type; Flash Video Encoder enters the file type automatically.

    You can specify a destination folder in which to save the encoded FLV file relative to the folder containing the source video clip. Follow these guidelines when specifying a destination folder:

    • Ensure that the destination folder already exists. If you specify a folder that does not exist, an error message informs you that the file cannot be encoded because the folder cannot be found.
    • Separate the folder name and the filename using either a forward slash (/) or backward slash (\) for Windows, or a forward slash (/) for Macintosh.

    Tip: You can specify a folder in which to save encoded files using the Flash Video Encoder Preferences (Edit > Preferences).

  6. (Optional) Click the other tabs to further adjust the encoding settings, embed cue points, or modify the video clip's size or playback length using the crop and trim controls.
  7. Click OK to close the Flash Video Encoding Settings dialog box.
  8. Click Start Queue to begin encoding your files.

    Flash Video Encoder starts encoding the first file in the video encoding list. While a file is being encoded, the Status column of the video encoding list provides information on the status of each video:

    • Encoding indicates that the file is currently being encoded. Flash Video Encoder encodes one file at a time only.
    • Waiting indicates that the file is in the encoding queue but has not been encoded. You can remove a file from the queue that has not been encoded or that is not being encoded.
    • Skip indicates that the file will be skipped during the encoding process. You can choose to skip files or change their status to Waiting.

    If you exit and restart Flash Video Encoder, or if you stop and restart the queue, a dialog box appears that lets you select the file to encode.

  9. The FLV encoded files are saved to the same folder as the source video files with an .flv file type to identify them. If you encode the same file more than once, an incremental number is appended to the filename for each additional encoding.

    Note: The encoded FLV files will not be in the same folder as the source videos if you specified a new location in the Flash Video Encoder Preferences dialog (Edit > Preferences) or if you specified a new location in the Output filename field in the Encoding Profiles tab in the Flash Video Encoding Settings dialog (Edit > Encoding Settings).

Customizing video encoding settings

Flash Video Encoding Settings let you create custom video encoding settings to manage bandwidth, cuepoints, and video size and length.

Specifying custom video encoding settings:

  1. Select the file or files whose encoding settings you want to modify.
    To select multiple files in the encoding list, Control-click (Windows) or Command-click (Macintosh), or select Edit > Select All to select all files in the encoding queue.
  2. Click Settings (Edit > Encoding Settings).
    The Flash Video Encoding Settings dialog box appears. This dialog box lets you perform the following actions:
    • Specify alternate encoding settings to deliver video for different bandwidths and applications.
    • Create cue points to trigger events.
    • Crop and resize the video clip to alter its dimensions.
    • Trim the length of the video to change its beginning and ending frames.

Note: When editing multiple videos at once, you are not able to create or edit cue points, crop a video clip, or trim the length of the video; you must perform these actions separately on each video, or load a Flash video encoding profile which already contains these settings.

Saving and loading encoding profiles

In addition to the predefined Flash video encoding profiles, you can save and load your own custom encoding profiles. Creating your own custom encoding profiles helps maintain consistency across videos when you want to encode several video files with the same settings. For example, if you were encoding multiple videos and each video had three versions (small, medium, and large) you could create an encoding profile for each quality level.

Saving a custom encoding profile:

  1. Select a video from the encoding queue.
  2. Click Settings (Edit > Encoding Settings). The Flash Video Encoding Settings dialog box is displayed.
  3. Click the Encoding Profiles tab.
  4. Click the Save Encoding Profile button (the disk icon), and save the file to a location on your computer.

The previous steps created and saved a new custom encoding profile. Depending on the settings you specified before saving the profile, an XML document similar to the following may have been created:

<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<FLVCoreSettings version="1">

    <Version>2</Version>

    <EncodeVideo>
        <VideoCodec>vp6</VideoCodec>
        <VideoDataRate>700000</VideoDataRate>
        <Deinterlace>false</Deinterlace>
    </EncodeVideo>

    <EncodeAudio>
        <AudioCodec>mp3</AudioCodec>
        <AudioDataRate>128000</AudioDataRate>
        <AudioChannels>2</AudioChannels>
    </EncodeAudio>

    <CuePoints>
        <CuePoint>
            <Time>0</Time>
            <Type>event</Type>
            <Name>cp1</Name>
            <Parameters>
                <Parameter>
                    <Name>videoid</Name>
                    <Value>vid0135</Value>
                </Parameter>
                <Parameter>
                    <Name>presenter</Name>
                    <Value>Speaker A</Value>
                </Parameter>
                <Parameter>
                    <Name>publisher</Name>
                    <Value>Publisher B</Value>
                </Parameter>
            </Parameters>
        </CuePoint>
    </CuePoints>

    <Trim>
        <In>0</In>
        <Out>10000</Out>
    </Trim>

</FLVCoreSettings>

The previous XML document specifies that the video should be encoded with the On2 VP6 video codec at 700 kbps, use the MP3 audio codec at 128 kbps (stereo), include a single cue point with 3 custom parameters, and crop the video at 10 seconds.

Note: The previous XML document doesn't show an exhaustive list of possible options. Some additional nodes may be present depending on other options, such as if the video should be resized, or cropped, or if a custom video frame rate was specified. Also, if the video was encoded without audio or video streams, certain nodes may not be present in the encoding profile XML document.

Applying a custom encoding profile to a video:

  1. Select one or more videos from the encoding queue.
  2. Click Settings (Edit > Encoding Settings). The Flash Video Encoding Settings dialog box is displayed.
  3. Click the Encoding Profiles tab.
  4. Click the Load Encoding Profile button (the folder icon), and locate a previously saved encoding profile from your computer.

Defining and embedding cue points

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. Cue point times are specified using the format 00:00:00.000 (hour:minute:second.millisecond).

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 Using ActionScript 3.0 Components and the ActionScript 3.0 Language and Components Reference.

Adding a cue point:

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

    Note: You can add cue points to a single video only. You cannot select multiple videos and assign cue points to each of the videos.

  2. Click Settings (Edit > Encoding Settings). The Flash Video Encoding Settings dialog box displays.
  3. Click the Cue Points tab to display the cue point controls.

  4. Use the playhead to locate a specific point in the video where you want to embed a cue point.

    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.

    Tip: 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. The left or right arrows move the playhead by one thousandth of a second (0.001). Holding the Shift key down while pressing the left or right arrow keys moves the playhead by a hundredth of a second (0.01), and pressing the Ctrl key while pressing the left or right arrow keys moves the playhead by two tenths of a second (0.2).

  5. When the playhead is positioned at a place in the video where you want to embed a cue point, click the (+) button on the left side of the Cue Points tab.

    Flash Video 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.

    A cue point marker is displayed on the slider control at the point where the cue point was embedded. You can use the cue point marker to further adjust the placement of the cue point. For greater precision, you can use the Left and Right Arrow keys to move the cue point marker in millisecond increments. To do this, select the cue point marker, and then use the arrow keys to further adjust its position.

    Note: Only one cue point can be embedded at a specified time code within the video clip.

  6. 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 point in the video.

      Note: Adding additional keyframes can lower the overall quality of a video clip. For this reason, navigation cue points should only be used when users will need to seek to a particular point within the video.

  7. (Optional) 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.

  8. (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.

Removing cue points:

  1. Select the cue point in the cue point list.
  2. Click the Delete Cue Point button (-). The cue point is deleted from the cue point list.

Saving and loading cue points to an external XML file

The Flash Video Encoder also supports loading and saving cue points to an external XML file which makes it easy to define cue points with the same attributes in several videos. This can be very useful if you are encoding the same video with several different quality levels and don't want to redefine the same cue points in each file.

Saving cue point data to an XML file:

  1. With at least one cue point defined, click the Save Cue Points button (the disk icon) on the cue points tab.
  2. Select a location to save the XML document to and click the Save button.

The previous steps created a new cue points XML file and saved it to your computer. Depending on the cue points you specified before saving the file, an XML document similar to the following may have been created:

<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<FLVCoreCuePoints version="1">

    <CuePoint>
        <Time>0</Time>
        <Type>event</Type>
        <Name>slide1</Name>
        <Parameters>
            <Parameter>
                <Name>id</Name>
                <Value>value</Value>
                </Parameter>
        </Parameters>
    </CuePoint>

    <CuePoint>
        <Time>5000</Time>
        <Type>event</Type>
        <Name>slide2</Name>
        <Parameters>
            <Parameter>
                <Name>param1</Name>
                <Value>value1</Value>
            </Parameter>
            <Parameter>
                <Name>param2</Name>
                <Value>value2</Value>
            </Parameter>
        </Parameters>
    </CuePoint>

    <CuePoint>
        <Time>20000</Time>
        <Type>event</Type>
        <Name>slide3</Name>
    </CuePoint>

</FLVCoreCuePoints>

The previous XML document identifies three cue points. The first cue point occurs at 0 seconds and contains one custom parameter, the second cue point occurs at 5 seconds and contains two custom parameters, and  the third cue point occurs at 20 seconds and does not contain any custom parameters.

Tip: Instead of editing cue points information in the Flash Video Encoder directly, you can export the cue points XML document to a file on your hard drive, edit it using a text or XML editor, and then import the cue point XML file back into the video encoder.

Loading previously saved cue point data:

  1. Click the Load Cue Points button (the folder icon) 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.

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

Note: Only one cue point can be embedded at a specified time code within the video clip. If you attempt to import a cue point XML file with multiple cue points defined at the same timestamp the Flash Video Encoder will display a dialog box informing you that the XML file is in an invalid format.

Cropping, trimming, and resizing video

Flash Video Encoder provides the following editing options that let you crop and trim video clips before encoding them:

Cropping lets you alter the dimensions of a video clip. You can eliminate areas of the video to emphasize a particular focal point within the frame, such as highlighting a character by removing unwanted imagery or backdrops.

Resizing lets you modify the width and height of the video frame. You can specify a frame size in pixels or as a percentage of the original image size.

Trimming lets you edit the beginning and ending points (the in and out points) of a video. For example, you can adjust the trim of a video clip to begin play back 30 seconds into the full clip, removing unwanted frames.

Cropping a video:

  1. Select a video in which you want to edit. To select a video in the encoding list, click the video name in the video encoding queue.
  2. Click Settings. The Flash Video Encoding Settings dialog box appears.
  3. Click the Crop and Resize tab to display the crop and resizing controls.
  4. Enter values for the right, left, top, and bottom edges to crop the video, or use the slider controls to visually adjust the dimensions of the video. Guides in the preview window indicate the cropped area.
  5. Click OK to return to the main Flash Video Encoding dialog box.

Resizing a video:

  1. Select a video in which you want to edit. To select a video in the encoding list, click the video name in the video encoding queue.
  2. Click Settings. The Flash Video Encoding Settings dialog box appears.
  3. Click the Crop and Resize tab to display the crop and resizing controls.
  4. Select the Resize video option.
  5. (Optional) Select the Maintain Aspect Ratio option to keep the aspect ratio the same as the original video clip.

    Note: If you resize a video clip's frame size, and do not select the Maintain Aspect Ratio option, the video may become distorted.

  6. Specify values for Width and Height. You can specify a frame size in pixels or as a percentage of the original image size.
  7. Click OK to return to the main Flash Video Encoding dialog box.

Trimming a video:

  1. Select a video in which you want to edit. To select a video in the encoding list, click the video name in the video encoding queue.
  2. Click Settings. The Flash Video Encoding Settings dialog box appears.
  3. Click the Crop and Resize tab to display the crop and resizing controls.
  4. To set the in and out points (the points at which the video begins and ends), drag the in and out point markers below the scrubber bar until you finish adjusting the video clip size.

    The video preview window lets you visually identify beginning and ending frames where you can trim the video clip. You can also use the elapsed time counter (located in the Trim section of the dialog box) to locate specific points in time where you can trim the video clip.

  5. Preview the video by dragging the playhead over the scrubber bar to ensure that it plays appropriately.
  6. Click OK to return to the main Flash Video Encoding dialog box.

For more information

For more information about working with video in Flash, please see "Working with Video" in Using Flash.

For more information about the FLVPlayback component, please see the following resources:

Also check out the Flash Video Encoder documentation.

Related Flash Quick Starts


About the authors

Chris Bedford works for Adobe on the Flash documentation team, where he writes Using Flash and other Flash related documentation. Chris grew up in northern California during the 1970's, with a British father and an Italian mother. He'd often wake up to his mother's opera arias playing on the stereo, and a breakfast that included marmite on toast. He doesn't feel particularly Californian, but isn't certain what other nationality he could lay claim to. He'd like to think he’s British by osmosis (as indicated by his liking for Bass ale, marmite, and Public Image Ltd.). However, all of his culinary preferences are firmly rooted on the Italian side.

Peter deHaan works for Adobe on the Platform Documentation team, which produces the Programming ActionScript 3.0 and ActionScript Language Reference manuals (among many other things). While not working on Flash, Flex, and ColdFusion applications, Peter enjoys playing Dance Dance Revolution. Peter's rarely updated blog can be found at http://blogs.adobe.com/pdehaan/ and http://blog.flexexamples.com/.