FLV and F4V video formats for Flash



By default, Adobe Media Encoder encodes video for use with Flash using the F4V video format using the H.264 video codec for use with Flash Player 9.0.r115 and later, and the FLV format using either the On2 VP6 codec for use with Flash Player 8 and later, and the Sorenson Spark codec for use with Flash Player 7 and later. To understand how Flash achieves high-quality video with low bandwidth requirements, you must understand video compression.

There are two types of compression that can be applied to digital media: spatial and temporal. Spatial compression is applied to a single frame of data, independent of any surrounding frames. Spatial compression can be lossless (in which no data is discarded from the image) or lossy (in which data is selectively discarded). A spatially compressed frame is often called an intraframe.

Temporal compression identifies the differences between frames and stores only those differences, so that frames are described based on their difference from the preceding frame. Unchanged areas are repeated from the previous frames. A temporally compressed frame is often called an interframe.

H.264, On2 VP6, and Sorenson Spark are temporal codecs. Although many other codecs use spatial compression (for example, JPEG is a spatial codec), the efficient temporal compression of the H.264, On2 VP6, and Sorenson Spark codecs, among other features, distinguishes them from other compression technologies because these codecs require a much lower bitrate to produce high-quality video.

It’s important to note that interframe codecs also use intraframes. Intraframes are used as the reference frames (key frames) for the interframes. Both the On2 VP6 and Sorenson Spark codecs always begin with a key frame. Each key frame becomes the main reference frame for the following interframes. Whenever the next frame is significantly different from the previous frame, the codec compresses a new key frame.

An important dependency of the key frame distance is that it affects the ability of Flash Player to seek (fast-forward or rewind) through an FLV or F4V file. Flash Player can only advance from key frame to key frame, so if you want to skip to different places and pause the frames, use a lower key frame distance value. If you want to advance to every frame in an FLV or F4V file, use a key frame distance value of 1. You set the keyframe distance in the Advanced section of the Video tab in the Export Settings dialog box. When you reduce the key frame distance value, raise the bitrate for the video file to maintain comparable image quality. You set the the bitrate in the Video tab of the Export Settings dialog box.

H.264, On2 VP6, and Sorenson Spark video codecs

When encoding video using Adobe Media Encoder, you can choose from three different video codecs with which to encode your video content for use with Flash Player:

H.264
Support for H.264 video was incorporated into Flash Player beginning with version 9.0.r115. F4V video is a container format for the H.264 video codec, also referred to as MPEG-4 AVC (Advanced Video Encoding). The H.264 video codec provides higher quality video at lower bitrates than the Sorenson Spark and On2 VP6 video codecs used by earlier version of Flash Player, however, it is more computationally demanding than either of these codecs.

In addition to the F4V container format, Flash Player 9.0.115.0 and later versions support file formats derived from the standard MPEG-4 container format. These file formats include MP4, M4A, MOV, MP4V, 3GP, and 3G2, if they contain H.264 video or HE-AAC v2 encoded audio, or both.

Note: If you need to use video with alpha channel support for compositing, use the On2 VP6 video codec; F4V does not support alpha video channels.

On2 VP6
The On2 VP6 codec is the preferred video codec to use when creating FLV files you intend to use with Flash Player 8 and higher. The On2 VP6 codec provides:
  • Higher quality video when compared to the Sorenson Spark codec encoded at the same bitrate

  • Support for the use of an 8-bit alpha channel to enable compositing of video

    To support better quality video at the same bitrate, the On2 VP6 codec is noticeably slower to encode and requires more processor power than Sorenson Spark on the client computer to decode and play back. For this reason, carefully consider the lowest common denominator of computer you expect your viewing audience to use when accessing your FLV video content.

Sorenson Spark
Introduced in Flash Player 6, the Sorenson Spark video codec can be used to publish Flash documents requiring backwards compatibility to Flash Player 6 and 7. If you anticipate a large user base that uses older computers, use FLV files encoded with the Sorenson Spark codec, as it is much less computationally demanding to play back than either On2 VP6 or F4V video.

F4V and FLV encoding presets

When exporting with Adobe® Media Encoder CS4, choosing the FLV | F4V format automatically makes available a list of associated FLV and F4V presets designed for particular delivery scenarios. Selecting a preset, in turn, activates the appropriate default options in the various settings tabs (Video, Audio, and so on). In most cases, one of the provided presets matches your output goals. However, you can also adjust the parameters of an existing preset and save it as a custom preset. The following table lists the encoding settings used when you select from the FLV | F4V presets. The table lists the dimensions of the video produced by a given preset, the video codec used, and the Flash Player version that supports it.

Format

Preset label

Dimensions

F4V with the H.264 video codec (Flash Player 9.0.r115 and higher)

Same As Source

Maintains dimensions and frame rate of source. Using the same dimensions as the source video also eliminates the black borders associated with letter- and pillar-boxing.

 

1080 pixels; Source, Half Size

960 x 540 pixels

 

1080 pixels; Source, Quarter Size

480 x 270 pixels

 

720 pixels Source, Half Size

640 x 360 pixels

 

720 pixels Source, Quarter Size

320 x 180 pixels

 

HD 1080 pixels

1920 x 1080 pixels

 

HD 720 pixels

1280 x 720 pixels

 

Web Large, NTSC Source

Maintains proper aspect ratio of NTSC video

 

Web Large, PAL Source

Maintains proper aspect ratio of PAL video

 

Web Large, Widescreen Source

Maintains proper aspect ratio of widescreen video

 

Web Medium

360 x 264 pixels

 

Web Medium, Widescreen Source

Maintains proper aspect ratio of widescreen video

 

Web Small

328 x 240 pixels

FLV with On2 VP6 video codec (Flash 8 and higher)

Same As Source

Maintains dimensions and frame rate of source. Using the same dimensions as the source video also eliminates the black borders associated with letter- and pillar-boxing

 

Web Large, NTSC Source

Maintains aspect ratio of NTSC video

 

Web Large, PAL Source

Maintains aspect ratio of PAL video

 

Web Large, Widescreen Source

Maintains proper aspect ratio of widescreen video

 

Web Medium

360 x 264 pixels

 

Web Medium, Widescreen Source

Maintains proper aspect ratio of widescreen video

 

Web Modem

164 x 120 pixels

 

Web Small

328 x 240 pixels

FLV with Sorenson Spark video codec (Flash 7 and higher)

Same As Source

Maintains dimensions and frame rate of source with Sorenson Spark codec. Using the same dimensions as the source video also eliminates the black borders associated with letter- and pillar-boxing.

Exporting for Adobe Media Player

Adobe Media Player is designed to play FLV files, either streaming from a server or played back from a local hard disk. With Adobe Media Encoder, you can export FLV files for playback in the Adobe Media Player. Select FLV | F4V from the Format menu in the Export Settings dialog box. Then, select specific settings to meet the requirements of the FLV host or your target audience.

For information on selecting an FLV codec in the Export Settings dialog box, see About the On2 VP6 and Sorenson Spark Video Codecs on the Capturing And Encoding Video page on the Developer Center website.

For information about choosing the best video, audio, encoding, and bit rate settings for your target audience, see the Flash video (FLV) bitrate calculator on the Developer Center website.

For more information about exporting video for the Adobe Media Player, see www.adobe.com/go/lrvid4116_xp.