Compression 349
Video
Compression
Web Design in a Nutshell, eMatter Edition
as small as 120×90 pixels. It is not recommended that you use a frame size
larger than 320×240 with current technology. Actual size limits depend mostly
on CPU power and bandwidth of your Internet link.
Frame Rate
The frame rate is measured in number of frames per second (fps). Standard
TV-quality video uses a frame rate of 30 frames per second to create the effect
of smooth movement. For the Web, a frame rate of 15 or even 10 fps is more
appropriate, and is still capable of producing fairly smooth video playback.
For “talking head” and other low-motion subjects, even lower frame rates may
be useful. Commercial Internet broadcasts are routinely done at 0.5, 0.25, or
even 0.05 frames per second.
Quality
Many video-editing applications allow you to set the overall quality of the
video image. The degree to which the compression algorithms crunch and
discard data is determined by the target quality setting. A setting of Low or
Medium results in fairly high compression, and is appropriate for Web
delivery. Frame rate and quality are often traded off, depending on the appli-
cation, to reduce bandwidth requirements.
Color Bit Depth
The size of the video is affected by the number of pixel colors in each frame.
Reducing the number of colors from 24- to 8-bit color will drastically reduce
the file size of your video, just as it does for still images. Of course, you will
also sacrifice image quality.
Data Rate
This is the rate at which data must be transferred in order for the video to
play smoothly without interruption. The data rate (also called “bit rate”) for a
movie is measured in kilobytes per second (K/sec or kbps). It can be calcu-
lated by dividing the size of the file (in K) by the length of the movie (in
seconds). So, for example, a highly compressed movie that is 1900K (1.9 MB)
and 40 seconds long has a data rate of 47.5K/sec.
For streaming media in particular, a file’s data rate is more important than its
total size. This is due to the fact that the total bandwidth available for delivery
may be severely limited, particularly over a dial-up connection. For example,
even an ISDN line at 128kbps offers a capacity to deliver only 16K of data per
second.
Compression
Digital video wouldn’t be possible without methods for compressing the vast
amounts of data necessary to describe sound and frame images. Video files can be
compressed in a number of different ways. This section looks at a variety of
compression schemes and introduces the methods they use for achieving compres-
sion rates.