Basic Digital Video Concepts
The following is a list of aspects of digital video that can be manipulated with standard video-editing software. It is important to be familiar with these terms so you can create video optimized for web delivery.- Movie length
-
It's a simple
principle -- limiting the length of your video clip limits its
file size. Videos longer than a minute or two may cause prohibitively
long download times. If you must serve longer videos, consider one of
the streaming video solutions.
- Frame size
-
Obviously, the size of the frame has an
impact on the size of the file. "Full-screen" video is
640 480 pixels. The amount of data required to deliver an
image of that size would be prohibitive for most web applications.
The most common frame size for web video is 160 120 pixels.
Some producers go 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 the user's 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 still capable of producing fairly
smooth video playback. For "talking head" and other
low-motion subjects, even lower frame rates may be satisfactory.
Commercial Internet broadcasts are routinely done as low as 0.5,
0.25, or even 0.05 frames per second (resulting in a slideshow effect
rather than moving video).
- 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 in different degrees in relation to each other, depending on the
application, 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 also
sacrifice image quality.
- Data rate (bit 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 calculated 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 128 Kbps 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 ways. This section looks at a variety of compression schemes and introduces the methods they use for achieving compression rates. Understanding your options can help you make better decisions for optimizing your video files.
25.2.1. Lossless Versus Lossy Compression
Compression can be "lossless," which means no information is lost and the final file is identical to the original.
Most compression schemes use forms of lossy compression. Lossy compression sacrifices some data from the file to achieve much higher compression rates. Lossy compression schemes, such as MPEG, use complicated algorithms that toss out data for sound and image detail that is not discernible to the human ear or eye. The decompressed file is extremely similar in character to the original, yet is not identical. This is similar to the way JPEG handles still images.
25.2.2. Spatial Versus Temporal Compression
Spatial (or intraframe) compression takes place on each individual frame of the video, compressing the pixel information as though it were a still image.
Temporal (or interframe) compression happens over a series of frames and takes advantage of areas of the image that remain unchanged from frame to frame, throwing out data for repeated pixels.
Temporal compression relies on the placement of key frames interspersed throughout the frames sequence. The key frames are used as masters against which the following frames (called delta frames) are compared. It is recommended that a key frame be placed once every second; therefore, if you have a frame rate of 15 fps, set your key frame rate once every 15 frames.
Videos without a lot of motion, such as talking head clips, take the best advantage of temporal compression. Videos with pans and other motion are compressed less efficiently.
25.2.3. Video Codecs
There are a number of codecs (compression/decompression algorithms) that can be used to compress video files for the Web. Many of these codecs can be applied to several different file formats (discussed in the next section of this chapter).
Video-editing software packages often offer a long list of codecs in their compressor list options. Here we focus on just those that are relevant to video intended for web delivery.
------
Video File Formats
As with audio, in the early days of the Web, adding video to a web page meant using one of the currently available video formats (such as QuickTime or AVI) and linking it to a page for download. The evolution of streaming media has changed that, and now adding video content like movie trailers, news broadcasts, even live programming to a web site is much more practical and widespread.
This section looks at the video formats that are most common for web delivery.
25.3.1. QuickTime Movie (.mov)
QuickTime is a highly versatile and well-supported media format. While originally developed as a video format, it has evolved into a container format capable of storing all sorts of media (still images, audio, video, Flash, and SMIL presentations). For the complete list of file formats supported by QuickTime, see http://www.apple.com/quicktime/specifications.html.
QuickTime, a system extension that makes it possible to view audio/video information on a computer, was introduced by Apple Computer in 1991. Although developed for the Macintosh, it is also supported on PCs via QuickTime for Windows. QuickTime has grown to be the industry standard for multimedia development, and most hardware and software offer QuickTime support. Both Netscape Navigator 3.0+ and Internet Explorer 3.0+ come with QuickTime plug-in players, so the majority of web readers are able to view QuickTime movies right in the browser.
25.3.1.1. Streaming
QuickTime movies can be streamed using a number of streaming server packages, including Apple's QuickTime Server for Mac OS X or its open source Darwin Streaming Server for Unix. To give the illusion of streaming from an HTTP server (pseudo-streaming), create FastStart Quicktime movies, which begin playing right away and continue playing as the file downloads.
25.3.1.2. Creating QuickTime movies
You can take care of rudimentary video editing, such as deleting and rearranging, right in Apple's free QuickTime Player. The QuickTime Pro version ($29.95) offers more features and is sufficient for most basic tasks. For advanced video editing, use a professional video editing tool such as Adobe Premier or AfterEffects (most video editors support QuickTime). You may also use a file converter, such as Cleaner from Terran Interactive (http://www.terran.com) to convert existing files to QuickTime format.
Other video editing applications for the Mac include iMovie (which ships free on newer Macintoshes) and Final Cut Pro, a more professional video editing program.
An important step to remember when saving a movie is to make it self-contained. This process resolves all data references and prepares the file to go out on the Internet on its own. You will also be asked to pick a codec (QuickTime supports several). Cinepak is a good general purpose codec; Sorenson is more efficient but not as well supported.
25.3.1.3. Reference movies
Another interesting feature of Version 2.0 and higher of the QuickTime plug-in is its support for reference movies. Reference movies are used as pointers to alternate versions (or "tracks") of a movie, each optimized for a different connection speed. When a user downloads the reference movie, the plug-in ensures that the best track for the current connection speed is played.
You could also save a version of your movie that doesn't use the Sorenson codec in the reference file. This movie will play for users who don't have the latest plug-in version, ensuring backwards compatibility.
No comments:
Post a Comment