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.