Accessibility

Flash Article

 

Creating Flash Video (FLV) Files with Flash Video Exporter

Macromedia

 

Note: This article describes legacy techniques in Flash video. To learn about the latest best practices for working with video in newer versions in Flash, please read the Flash Video Learning Guide and the most recent articles posted in the Flash Video Developer Center.

Macromedia Flash MX Professional 2004 includes Flash Video Exporter, which enables many third-party applications to encode video and audio directly into the FLV file format. This ability to prepare FLV files from within third-party applications improves the workflow between video applications and your Flash project.

Flash Video Exporter achieves its seamless integration within third-party applications by leveraging the QuickTime export plug-in architecture. Flash Video Exporter is a plug-in to QuickTime that you can use with third-party applications that support exporting to the QuickTime file format. However, Flash Video Exporter does not produce QuickTime movies, but FLV files that contain Flash Player–compatible video and audio streams. QuickTime movies use the .mov extension; FLV files use the .flv extension.

Requirements

To complete this tutorial you will need to install the following software and files:

Flash MX Professional 2004

Note: You must have Flash MX Professional 2004 installed on your machine to use Flash Video Exporter with your video editing application. The only exception is using the exporter in Demo Mode (see below).

Flash Video Exporter

Flash Video Exporter is included with Flash MX 2004 Professional version 7.2 (Ellipsis), both on the CD and in the downloadable version. However, if you updated to version 7.2, you should download the latest version of Flash Video Expoter.

Note: You must have Flash MX Professional 2004 installed on your machine to use the Flash Video Exporter with your video editing application. The only exception is using the exporter in Demo Mode (see below).

Flash Video Exporter and Video Editing Applications

After installing the Flash Video Exporter plug-in on your system, applications that support file export to the QuickTime file format will show Movie to Macromedia Flash Video (FLV) in their list of QuickTime export options. However, not all applications that support exporting to QuickTime support export to QuickTime Export Components. For a summary of leading third-party tools that support the Flash Video Exporter plug-in, refer to the section "Supported Third-Party Applications" later in this paper. For full details on using each of these third-party tools, refer to the individual product manuals.

Using Flash Video Exporter in Demo Mode

For the Flash Video Exporter plug-in to work properly you must have a valid Flash MX Professional license installed and activated on your computer. If you are using Flash MX Professional in evaluation mode, or if you do not have a valid Flash MX Professional license installed, you can still use Flash Video Exporter in Demo Mode. While in Demo Mode you can use all features of the plug-in, but the FLV files created will show two one-pixel diagonal lines running across the resulting video as shown in Figure 1.

Example of an FLV file encoded with Flash Video Exporter in Demo Mode.

Figure 1. Example of an FLV file encoded with Flash Video Exporter in Demo Mode.

Third-Party Applications Supported by Flash Video Exporter

As of the writing of this document, the following applications support the Flash Video Exporter plug-in:

Editing and Effects Applications

Batch Encoding Applications

Using the Flash Video Exporter Plug-in

The Flash Video Exporter dialog box, shown in Figure 2, lets you specify the video and audio quality of your FLV file during export from third-party editing and encoding applications. You can access this dialog box by clicking the Options button in the host application’s export dialog box. (For more details see the section "Using Flash Video Exporter from within Third-Party Applications" later in this article) The dialog box is divided into three groups: Video, Audio, and Other. Under Video you can specify the encoding options for your video; under Audio you can select the bit rate for your MP3 audio encoding; and under Other you can set your scaling and deinterlacing options. The following subsections explain in detail your encoding options.

Choose Options in the host application's export dialog box to access the Flash Video Exporter dialog box.

Figure 2. Choose Options in the host application's export dialog box to access the Flash Video Exporter dialog box.

Encoding Method

The Encoding Method pop-up menu contains three items. Choosing the first two encoding methods produces an H263 format video stream, which is best suited for general-purpose video. The third encoding method uses a Macromedia proprietary codec optimized for screen recordings. Here are more details on these three encoding methods:

Frames Per Second

The Frames Per Second text field lets you specify the frame rate for the encoded FLV file. To maintain the temporal quality of the original source clip, use the same frame rate. For full motion NTSC use 29.97 fps; for PAL use 25 fps. If you lower the frame rate (which can significantly reduce the video data that needs to be encoded), the Flash Video Exporter plug-in will drop frames at a linear rate to achieve the new fps rate. Be sure to choose an evenly divisible fraction of the original frame rate, or you may introduce highly distracting “stepping” artifacts.

Table 1: Divisible frame rates by video standard
  FPS Half Third Quarter
"Thirty" 30 15 10 7.5
NTSC 29.97 14.985 9.990 7.493
PAL 25 12.500 8.333 6.250
24p Progressive 24 12 8 6
Film 23.98 11.990 7.993 5.995

Note that 30 and 24 fps are not actually accurate frame rates in common use. (See the section "Technical Discussion of Video Fundamentals" in the Flash Video Learner's Guide for additional information on the NTSC and PAL video standards.) To keep audio and video in synch when creating long FLV files (longer than a couple of minutes), you must use the accurate frame rates when down-sampling the fps rate.

The pop-up menu to the right of the Frames Per Second text field lets you cycle through the commonly used frame rates, but you can enter any frame rate you want in the Frames Per Second text field.

Quality

Use the Quality pop-up menu to specify the estimated data rate settings for encoding video at a low, medium, or high quality. This option controls the value in the Limit Data Rate To text field by computing an approximate data rate based on the file's frame rate (fps) and size (horizontal and vertical pixels). If you change the value in the Frames Per Second, Height, and Width text fields, Flash Video Exporter updates the value in the Limit Data Rate To text field to reflect the new quality settings. For example, if you change the frame rate from 24fps to 12fps, then the value in the Limit Data Rate To text field will be reduced by exactly 50 percent, because the required bit rate to maintain the given quality level is exactly half if you reduce the number of frames per second by half.

If the available Quality setting options do not produce the desired quality results with your particular source footage, select Custom, and then enter a higher data rate into the Limit Data Rate To text field.

Limit Data Rate To

This setting is the key "quality" variable and indicates the number of bits per second that are allocated to encode the video. Larger bit rates produce larger files with higher image quality.

The Flash Video Exporter dialog box displays the data rate limit in kilobits or kilobytes per second. You can choose the unit you want from the pop-up menu to the right of the Limit Data Rate To text field. Some users might prefer to think in terms of kilobits while others think in terms of kilobytes. Those with a background in web development are familiar with bits and kilobits, because it is a web developer’s duty to keep files as small as possible for quick downloads. Those with a background in print or video are accustomed to working with file sizes in the kilobyte, megabyte, and even gigabyte range and therefore might prefer to work with kilobytes. Simply put, there are 8 bits in a byte, 8 Kbits in 1 KB, 8 Mbits in 1 MB, and so on.).

When you enter a value x in the Limit Data Rate To text field, you are essentially telling Flash Video Exporter, "Do not make my final file size larger than x kilobits or kilobytes for every second." If you have a 10 second clip and enter a value of 100 KB/sec, you’d end up with a clip no larger than 1,000 KB, or 1 MB. To keep down the file size, encoders will sacrifice image quality. To keep the image quality consistent, you can scale down the clip so fewer pixels per second are represented, or lower the frame rate so less frames per second are displayed.

When exporting files, you must find the right balance between image size, file size, and frame rate. For best results, consider your target delivery medium. For Internet delivery most FLV files are downloaded progressively to the client computer and then played back from the local hard disk. This technique provides a wide gamut of bit rates for delivery. For streaming FLV files, client connection speeds limit the bit rate that you can use.

Table 2 shows the approximate total download times for a one- and five-minute video clip encoded at 500 kilobits and 2,000 kilobits. Both clips assume no audio.

Table 2: Download times for video clips
  500 Kbit Video 2,000 Kbit Video
  Kbits 1 min 5 min 1 min 5 min
T3 1500 20 sec 2 min 80 sec 7 min
T1 768 39 sec 3 min 3 min 13 min
DSL 512 59 sec 5 min 4 min 20 min
DSL 384 1 min 7 min 5 min 26 min
Dialup 56 9 min 45 min 36 min 179 min

Table 3 lists the approximate data rates that you can use with Flash Communication Server to reliably stream video to target users on various connection speeds. These data rates include 10% extra headroom to allow for network traffic.

Table 3: Data rates for streaming video
Connection Connection Rate(Kbps) Recommended Maximum Bit Rate
DSL 1024 800 kbps
DSL 512 450 kbps
DSL 384 350 kbps
DSL 256 225 kbps
Dialup 56.6 40 kbps

Keyframes

The Keyframes pop-up menu lets you choose between automatic or custom keyframing. The keyframe interval value tells the encoder how often to re-evaluate the video image and record a full frame, or keyframe, into an FLV file. In Flash Video Exporter, this setting is the Keyframe Every X Frames value—it represents the number of frames between keyframes. The encoder approximates frames that reside between keyframes by estimating the full value of all pixels on the screen, principally by comparing multiple frames and eliminating information that is redundant.

The keyframe interval value can be any number up to 100. When you select Auto, Flash Video Exporter chooses a keyframe interval that is a multiple of the current frame rate. The Auto setting is a good starting point for all video footage. If your footage has a lot of scene changes or rapidly moving motion or animation, then the overall image quality may benefit from a lower keyframe interval. In general, a higher keyframe interval produces better image quality because bits are not wasted describing the areas of an image that remain unchanged from frame to frame.

There is a very important dependency on the keyframe interval, which refers to the ability of Flash Player to seek (fast-forward, rewind) through an FLV file. Flash Player can only frame-advance to keyframes, so if you want to be able to skip around to different places and pause the frames, you must use a lower keyframe interval value. If you want to be able to advance to every frame in the FLV file, use a keyframe interval value of 1. When you reduce the keyframe interval value, you must also raise the data rate for the Flash video to maintain comparable image quality.

Motion Estimation

The Flash Video Exporter encoder analyzes the differences and similarities between adjacent frames, and allocates bits depending on this information. Using the Motion Estimation pop-up menu, you can choose between Faster, which results in faster estimation of motion at the sacrifice of quality, or Better, which results in a more accurate estimation of motion at the sacrifice of speed.

Audio Bitrate

The Bitrate pop-up menu under Audio lets you to set the bit rate of your MP3 audio stream. Full audio tracks, such as music and significant background noise, require a higher bit rate. Simple dialogue, such as with a "talking head" shot, can be compressed to a much higher degree. Higher bit rate settings are encoded in stereo, while lower bit rate settings are encoded mono.

Resize To

The Resize To pop-up menu lets you scale your footage on output. The pop-up menu lists a number of common preset sizes, but you can enter a size of your choice in the Width and Height text boxes. You can also designate the output size by entering a percentage value of the source size rather than an arbitrary pixel value.

To keep the aspect ratio (the ratio of width to height) of the source video file, select the Lock Aspect Ratio check box. Leave this box unchecked if you want to export your video at a different aspect ratio than the source file.

In some third-party applications the source file’s image size may not automatically show up in the Flash Video Exporter dialog box. In these cases, if you want to constrain the proportions you enter the source file’s pixel dimensions, select the Lock Aspect Ratio check box, and then resize the image.

If your source video is made up of non-square pixels, such as D1 or DV video, use the scale function to scale the image nonproportionately down to a 4:3 aspect ratio. For example, if your source file is 720 x 480 (DV NTSC), then scaling to 320 x 240 (correct aspect ratio) will require a nonproportional scale (greater change in X axis than Y).

Deinterlacing

When encoding interlaced source footage (any NTSC or PAL footage shot with a video camera) you will most likely want to remove one of the fields, or deinterlace the footage, prior to encoding. Many third-party applications offer this capability within their own interface, but you can also choose this option in the Flash Video Exporter dialog box. Using the De-interlacing pop-up menu, you can choose to eliminate the upper or lower field. For more information, see the section "Interlaced and Progressive Video" in the "Technical Overview of Video Standards" section of the Flash Video Learner's Guide.

Using Flash Video Exporter from Within Third-Party Applications

This section provides brief descriptions of how you can access the Flash Video Exporter dialog box from within third-party applications.

Adobe After Effects

As of version 6.0 of Adobe After Effects Flash Video Exporter is not available in After Effect’s standard rendering cue. Instead, it is listed in the File > Export submenu. To access the Flash Video Exporter dialog box, select the Export command from the File menu (see Figure 3).

Accessing the Flash Video Exporter dialog box in Adobe After Effects 6.0

Figure 3. Accessing the Flash Video Exporter dialog box in Adobe After Effects 6.0

Important Note: When exporting files from After Effects, the current composite's resolution dictates the output of the FLV file. For example, if you have a D1 720 x 486 comp set to Quarter resolution and export to the FLV file format, Flash Video Exporter reads the file as 180 x 121. If you then choose 720 x 486 in the FLV output size, you will get a scaled-up, pixilated movie. So make sure to set your After Effects comp to Full resolution before exporting (see Figure 4).

Be sure your After Effects comp is set to Full resolution before exporting your video.

Figure 4. Be sure your After Effects comp is set to Full resolution before exporting your video.

Apple Final Cut Pro

With Final Cut Pro 4.0, you can export to Flash Video by selecting Export > QuickTime Conversion in the File menu. When you are working with earlier versions of Final Cut Pro and Final Cut Express select File > Export > QuickTime to open the export dialog box. To finish the conversion, select Macromedia Flash Video (FLV) from the Format pop-up menu (see Figure 5), and then click the Options button to proceed to the Flash Video Exporter dialog box.

Accessing the Flash Video Exporter dialog box in Final Cut Pro.

Figure 5. Accessing the Flash Video Exporter dialog box in Final Cut Pro.

Note: Final Cut Pro shows the current window's pixels size as the size of the video clip, so if you want to keep this size you must manually enter the Height and Width settings in the Flash Video Exporter dialog box. If you want to scale down proportionately, you must first enter the source clip's file size, then select the Lock Aspect Ratio check box to constrain proportions, and then resize the video.

Apple QuickTime Pro (Mac OS and Windows)

The Flash Video Exporter plug-in is based on Apple’s QuickTime architecture. QuickTime Player enables you to open video files saved in various video formats. When you upgrade to QuickTime Pro you can also export video files to a different format.

To export a movie to the FLV file format, open the file in QuickTime Player and choose Export from the File menu. This opens the Save Exported File As dialog box. Select Movie to Macromedia Flash Video (FLV) from the Export pop-up menu and then click the Options button to open the Flash Video Exporter dialog box (see Figure 6).

Accessing the Flash Video Exporter dialog box in Apple QuickTime Player

Figure 6. Accessing the Flash Video Exporter dialog box in Apple QuickTime Player

Avid Media Composer and Xpress

Accessing the Flash Video Exporter dialog box works the same in both Media Composer and in Xpress DV/Xpress Pro: Select Export from the File menu and then click the Options button in the export dialog box to open the Export Settings dialog box. From the Export As pop-up menu, select Macromedia Flash Video (FLV) (see Figure 7), and then click Format Options to launch the Flash Video Exporter dialog box.

Accessing the Flash Video Exporter dialog box in Avid Media Composer

Figure 7. Accessing the Flash Video Exporter dialog box in Avid Media Composer

Anystream Agility

To export to the FLV file format from within Anystream Agility, create a new job profile in the Main window or open an existing one. Select Add QuickTime Encode from the Encoder menu or press Control+T. Under QuickTime Format Type, select Other Formats from the QuickTime Format pop-up menu. Next, select Macromedia Flash Video (FLV) from the Format pop-up menu under Target Settings (see Figure 8).

Selecting the Macromedia Flash Video (FLV) file format in Anystream Agility

Figure 8. Selecting the Macromedia Flash Video (FLV) file format in Anystream Agility

Under Target Settings, you can also specify the width, height, and field mode of your video (see Figure 9).

Note: If you are specifying width and height settings under Target Settings, do not reapply a scaling factor in the Flash Video Exporter dialog box.

Under Target Settings you can specify the width, height, file extension, and field mode parameters of your video.

Figure 9. Under Target Settings you can specify the width, height, file extension, and field mode parameters of your video.

Canopus Procoder 2.0

To export to the FLV format from within Canopus Procoder, select the Target tab, click the Add button, and then select QuickTime Exporter (see Figure 10). From the Target Parameters tab, under Destination, select Macromedia Flash Video (FLV) from the pop-up menu. To access the Flash Video Exporter dialog box, click the Modify Exporter Settings button.

Accessing the Flash Video Exporter dialog box in Canopus Procoder

Figure 10. Accessing the Flash Video Exporter dialog box in Canopus Procoder

Discreet Cleaner (Mac OS)

Discreet Cleaner lets Flash MX Professional 2004 users encode multiple FLV files on unattended computers. Like other file formats such as QuickTime or JPEG, the Macromedia Flash Video (FLV) file format shows up in the Format list on the Output Tab of the Cleaner Settings dialog box (see Figure 11).

Output Tab of the Cleaner Settings dialog box

Figure 11. Output Tab of the Cleaner Settings dialog box

To access the Flash Video Exporter dialog box, choose Macromedia Flash Video (FLV) from the Format pop-up list, select the Options check box, and then click the Set button (see Figure 16).

Accessing the Flash Video Exporter dialog box in Discreet Cleaner

Figure 12. Accessing the Flash Video Exporter dialog box in Discreet Cleaner

Discreet Cleaner has many options to preprocess your image, including color correction, resizing, deinterlacing, cropping, pull-down removal, and so on. These settings are applied before the file is converted to the FLV file format.

Note: When exporting to the FLV file format, be careful not to apply duplicate scaling or de-interlacing passes by using both the Cleaner and Flash Video Exporter settings—this creates unwanted results such as applying two scale transformations, resulting in a smaller size than desired.

Discreet Cleaner XL (Windows)

Using Discreet Cleaner XL and Flash MX Professional 2004, you can encode multiple FLV files on unattended computers. To get started, select an existing profile, then click Encoder Setting to open the Encoder Setting Editor dialog box where you can select Macromedia Flash Video (FLV) under Encoding Format (see Figure 13).

ccessing the Encoder Setting Editor dialog box in Discreet Cleaner XL

Figure 13. Accessing the Encoder Setting Editor dialog box in Discreet Cleaner XL

Note: When exporting to the FLV file format, be careful not to apply duplicate scaling or deinterlacing passes by using both the Cleaner and Flash Video Exporter settings—this will create unwanted results such as applying two scale transformations, resulting in a smaller size than desired.

Other Third-Party Products That Support the FLV File Format

The following third-party products have built-in support for the Flash Video (FLV) file format:

For more information on how to export to the FLV file format, refer to their user manuals.

About the author

This content was authored by Macromedia, Inc.