Using Imported Artwork and Video > Importing video > About the Sorenson Spark codec |
![]() ![]() ![]() |
About the Sorenson Spark codec
Sorenson Spark is a motion video codec included in Flash MX that enables you to add video content to Flash. Spark is a high-quality video encoder and decoder that dramatically lowers the bandwidth required to deliver video into Flash while simultaneously increasing the video quality. With the inclusion of Spark, Flash takes an important leap forward in video capability. In previous versions of Flash, you could only simulate video using sequential bitmap images. Two versions of Sorenson Spark are available: Sorenson Spark Standard Edition is included in Flash MX and Flash Player 6. The Spark Standard edition codec produces good-quality video for low-motion content, such as a person speaking.
The Spark video codec is comprised of an encoder and a decoder. The encoder (or compressor) is the component in Spark that compresses your content. The decoder (or decompressor) is the component that decompresses the compressed content so that it can be viewed. The decoder is included in the Flash Player.
There are two different types of compression that can be applied to digital media: spatial and temporal.
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 simply repeated from the previous frame(s). A temporally compressed frame is often referred to as an interframe.
Spatial compression, on the other hand, 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 referred to as an intraframe.
Sorenson Spark is an interframe codec. Sorenson Spark's efficient interframe compression is part of what separates it from other compression technologies, requiring a much lower data rate than most other codecs to produce good-quality video. Many other codecs use intraframe compression; for example, JPEG is an intraframe codec.
However, interframe codecs also use intraframes. The intraframes are used as the reference frames (keyframes) for the interframes. Sorenson Spark always begins with a keyframe. Each keyframe 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 keyframe.
Tips for creating Flash video with Sorenson Spark
How you compress your video is largely determined by the content of the video. A video clip of a talking head with very little action and only short bursts of moderate motion compresses very differently than footage of a soccer match. Following are some tips on delivering the best possible Flash video:
Strive for simplicity. Avoid elaborate transitionsthey don't compress well and may make your final compressed video look "chunky" during the change. Hard cuts are usually best, or quick cross-fades. Videos that zoom out from behind the first track, do a "page turn," or wrap around a ball and then fly off the screen may look cool, but they usually don't compress well and should be used sparingly.
Know your audience data rate. When you deliver video over the Internet, you should produce files at lower intranet data rates. Users with fast Internet connections can view the files with little or no wait, while dialup users will have to wait for the files to download. In these situations, it is best to make the clips short to keep the download times within acceptable limits for dialup users.
Select the proper frame rate. Frame rate indicates how many frames are played each second. If you have a higher data rate clip, a lower frame rate can improve playback on lower-end computers. For example, if you are compressing a talking head clip with little motion, cutting the frame rate in half will probably only save you 20% of the data rate. However, if you are compressing high-motion video, reducing the frame rate has a much greater effect on the data rate.
Since video looks much better at native frame rates, we recommend leaving it high if your delivery channels and playback platforms allow. However, if you need to reduce the frame rate, the best results come from dividing the frame rate by whole numbers.
Select a frame size that fits your data rate. Like frame rate, the frame size for your movie is important for producing high-quality video. At a given data rate (connection speed), increasing the frame size results in decreased video quality. When you select the frame size for your video you must also consider frame rate, source material, and personal preferences. The following list should be used as a guideline. Experiment to find the best setting for your project.
Common frame sizes:
Modem: 160 x 120
Dual ISDN: 192 x 144
T1/DSL/Cable: 320 x 240
Know progressive download. You should know how long it is going to take to download your video. While your video clip is downloading, you might want to have other content that appears and "disguises" the download. For short clips you can use the following formula: Pause = Download time - Play time + 10% of play time. For example, If your clip is 30 seconds long and it takes one minute to download, you should give your clip a 33-second buffer: 60 seconds - 30 seconds + 3 seconds = 33 seconds.
Use clean video. The higher the quality of the original, the better the final movie. While frame rates and sizes of Internet video are usually less than what you see on a television, computer monitors have much better color fidelity, saturation, sharpness, and resolution than a conventional television. Even with a small window, image quality can be more important for digital video than for standard analog television. Artifacts and noise that would hardly be noticeable on TV can be painfully obvious on a computer.
Remove noise and interlace. After you capture your video content, you might need to remove noise and interlace.
Follow the same guidelines for audio. The same considerations exist for audio production as for video production. In order to achieve good audio compression, you must begin with clean audio. If you are encoding material from a CD, try to record the file using direct digital transfer instead of through the analog input of your sound card. The sound card introduces an unnecessary digital-to-analog and analog-to-digital conversion that can create noise in your source audio. Direct digital transfer tools are available for both Mac and PC platforms. If you must record from an analog source, be sure to use the highest quality sound card available.
![]() ![]() ![]() |