QuickTime Technicalities

An excerpt from the

(To go to the New Complete Mac Handbook page, click the above image.)

QuickTime Technicalities
The frame rate
The size of the movie window
Frame rate x movie size = hard work
Factors that influence playback performance
The speed of the CPU
The speed of your storage devices
The speed of your video circuitry
What happens when your Mac isn't fast enough?
So what do you need for smooth playback?
Squeeze Play: QuickTime Compression
How QuickTime compression works
Temporal and spacial compression
Understanding key frames
Peg your hopes on MPEG?
Apple's MPEG card -- finally
A Field Guide to QuickTime Trade-Offs
Frame size
Frame rate
The color depth
The audio track


QuickTime Technicalities

Because QuickTime can perform its playback magic with no additional hardware, your Mac's processor must do all the work. As a result, your machine's speed determines how well it will be able to play back QuickTime movies. (Of course, this doesn't apply if you have dedicated digital video cards such as a Radius Spigot Power AV or Data Translation Media 100 system. In this case, the card's circuitry aids in the movie capture and playback processes.)
Two key factors work together to determine just how hard your Mac will have to work in order to play back a movie.

The frame rate

The frame rate is the number of frames per second the movie displays. The faster the frame rate, the more fluid the motion -- and the more data your Mac must read from disk (or a CD-ROM) every second. An old color Mac such as an LC or original II can show about 10 frames per second (fps) -- a rather slow frame rate that gives movies a jittery, Keystone Cops flavor. A mid-range 68040 Mac can play about 15 fps, just shy of the frame rate used by Super 8 movies (remember them?). A Power Mac can play 30 fps -- the television industry standard in the United States.

The size of the movie window

When QuickTime 1.0 came out in 1991, QuickTime movies measured 160 by 120 pixels -- about the size of an Elvis postage stamp. Improvements in the QuickTime software and in the overall performance of the Mac family have boosted frame sizes significantly. These days, a common movie size is 320 by 240 pixels -- one fourth of the standard Mac's screen size of 640 by 480 pixels. This size, sometimes called a quarter-screen movie, is what you'll find on the Macworld Power User Clinic CD-ROM that comes with this book.

Frame rate x movie size = hard work

If you do some multiplication, you realize that a single frame of a 160 by 120 QuickTime movie contains 19,200 pixels. A single frame of a 320 by 240 movie contains 76,800 pixels.

Now multiply that pixel count by the number of frames per second to get an idea of how much data has to be slogged around each second. To play a 320 by 240 movie at 15 fps, a Mac has to display 1,152,000 pixels every second. And that's for frame rates and movie sizes that are slower and smaller than what you're used to seeing on television. (QuickTime provides numerous features that reduce the actual number of pixels that must be displayed each second; I'll have more to say about this later.)

Factors that influence playback performance

QuickTime has to do a lot of work in order to play back a movie, but it can't do the work unless your Mac is up to the task. Several factors influence your Mac's ability to play back movies.

The speed of the CPU

When QuickTime plays a movie, it must decompress the data that comprises each frame. (I'll describe QuickTime's compression/decompression concepts in more detail shortly.) The speed of your Mac's central processor determines how quickly the computer can compress and decompress video. Power Macs are best at this processor-intensive task.

The speed of your storage devices

All the data that comprises a QuickTime movie has to be stored somewhere; that "somewhere" is usually a hard drive or a CD-ROM. A storage device must be fast enough to supply the data that QuickTime needs, when it needs it.

Although Apple's latest quadruple-speed drives have transfer rates of roughly 600,000 bytes per second, the vast majority of CD-ROM producers still prepare their movies with double-speed drives in mind -- otherwise, their products wouldn't work on the majority of today's Macs. And that means going through some technical gyrations to create movies that play back smoothly from a CD (more about this subject later).

The speed of your video circuitry

This is a subtle one. It's easy to see why CPU and hard drive performance influence movie playback; video speed isn't as straightforward.

Video performance affects playback because of the sheer number of pixels that must be displayed every second. The data that represents those pixels must travel from the Mac's video memory and through the digital-to-analog converters and all the other circuitry responsible for painting pixels on the screen.

If that circuitry is located on a NuBus video card -- that is, if you're using a video card instead of the on-board video circuitry that most Macs have -- there's an additional bottleneck: the NuBus slot, whose rules about data transfers limit speed with which data can move between NuBus cards and the rest of the Mac's circuitry.
Yet another video-related performance issue is the number of colors your video hardware can display. If your Mac has only 8-bit video circuitry (the maximum setting in the Monitors control panel is 256 colors), QuickTime must translate the colors in the movie into ones that your Mac can display. This dithering process takes time -- time that the Mac could spend reading data from the disk and decompressing it. (Video producers can work around this by creating a custom color palette for the movie. When the movie opens, the Mac uses this custom palette, and QuickTime is spared the chore of dithering on the fly.)

What happens when your Mac isn't fast enough?

In a word, dropped frames. (Okay, in two words.) If you run a QuickTime movie that, for any reason, exceeds your Mac's capabilities -- its frame rate is too fast, its window is too large -- QuickTime drops frames as necessary in a near-futile struggle to keep the video synchronized with the audio. The results are jerky video that is poorly synchronized.

So what do you need for smooth playback?

By now, you should be getting an idea of the kinds of features a Mac should have in order to handle the demands of dynamic data. In a nutshell, they are:

Squeeze Play: QuickTime Compression

Whether your QuickTime movies come from an animation program or a camcorder, one of the biggest problems you'll face as a QuickTime movie producer is that movies can use astronomical amounts of disk space. A five-second movie recorded with sound uses almost 10MB of disk space -- that's 2MB per second. When you run out of hard disk space while making your first movie, you realize just how ill-equipped many Macs really are for the digital video revolution.

Fortunately, QuickTime's compression features dramatically reduce disk space requirements -- and in the process, they make movie playback easier for the Mac.

How QuickTime compression works

If you've used programs such as Aladdin's StuffIt, you know that a file can be compressed to use less disk space, and then decompressed when you want to use it. QuickTime's compression and decompression features are similar, but much more sophisticated. For example, QuickTime decompresses movie frames on the fly as a movie plays. That QuickTime can decompress and display 10 to 30 color images every second with no additional hardware is remarkable, and a testament to the talent of QuickTime's programmers.

QuickTime includes several compressors, each of which provides a different degree of space savings and image quality. Compression almost always means trading image quality for disk space, but it's a worthwhile trade-off, especially because the results are still more than adequate for most applications.

Compression can also allow for faster playback frame rates on slower Macs -- or from slower storage devices. Indeed, it's the incredible compression capabilities of QuickTime's Cinepak compressor that enables smooth movie playback from CD-ROM drives.

Temporal and spacial compression

Many of QuickTime's compressors incorporate two kinds of compression -- temporal and spatial. Spatial compression saves space by removing information within a single image or video frame. Consider an image that's half blue sky: Instead of QuickTime describing the image by saying, "row one is blue, row two is blue, row three is blue," and so on through row 60, it can simply say: "The first 60 rows are blue."
Temporal compression saves space by only describing the changes between frames. For example, if there's an airplane flying across that blue sky, instead of describing each frame in its entirety, QuickTime records only the differences between each frame. Temporal compression is also called frame differencing.

Understanding key frames

When you use temporal compression, you generally have a key frame -- a frame that contains every pixel in the image -- at regular intervals. Key frames are especially important if you want fast random access to different parts of the movie; if you plan to drag the movie controller back and forth a lot to skip around within the movie, you'll want enough key frames.

How many are enough? It's common practice to have one key frame every second -- for example, one key frame every 15 frames in a 15-fps movie. The more key frames you have, however, the higher the movie's data-transfer requirements -- and the greater the chance that the movie won't play smoothly on slower Macs.

QuickTime's approach to compression is modular too. By adding new codecs (compression/decompression extensions) to your System Folder, you can enhance QuickTime's compression capabilities. Some video-capture boards include codecs that provide better compression than Apple's.

Peg your hopes on MPEG?

An up-and-coming standard for digital video compression is MPEG, short for Motion Picture Experts Group. MPEG appears to the standard that will be used by the first interactive television systems and the brave new world of 500-channel cable systems.
There are two variants to MPEG. MPEG 1 is designed to allow movie playback from CD-ROM drives at 320 by 240 pixels and 30 frames per second. MPEG 2 provides a 704 by 480 pixel movie size at 30 fps. It's this variant that is being adopted by the satellite broadcast and cable industries. Both variants require hardware assistance -- coprocessors to do decompression -- for playback.

Apple's MPEG card -- finally

In the summer of 1995, Apple finally MPEG playback card, which had been rumored for at least a year. The MPEG Media Card works in any Mac or Power Mac with an LC processor-direct slot. (It doesn't work in LC630 DOS Compatible or the Performa 640 DOS Compatible, since those Macs' processor-direct slots are used by the DOS compatibility card.) The card supports full-screen video playback at 30 frames per second. It includes an enhanced version of the Apple Video Player utility that provides VCR-like buttons playing and navigating through MPEG movies.

A Field Guide to QuickTime Trade-Offs

Making QuickTime movies is all about making trade-offs -- between disk space, data-transfer rates, and movie quality. This section details the factors that you must weigh against one another when making your own movies.

Frame size

As mentioned earlier, the size of the movie window not only impacts the movie's storage requirements but also how well the movie plays back on Macs with slower video hardware. A larger movie window -- say, 320 by 240 pixels -- generally imposes more performance demands than does a smaller window, say 240 by 180.

Frame rate

The number of frames displayed per second also impacts storage requirements and playback quality. A movie with 10 fps uses less disk space than a 15-fps movie, but it looks jerky. 30 fps yields the smoothest results, but uses three times the disk space as 10 fps.

For "taking head"-style movies -- like the interviews on the Macworld Power User Clinic CD-ROM that accompanies this book -- 15 fps usually delivers very good results.

The color depth

The higher the bit depth of a movie -- the more bits that are assigned to each pixel -- the larger the movie and higher its data rate. Fortunately, 16-bit color (the Thousands setting in a QuickTime compression dialog box) delivers image quality that's virtually indistinguishable from 24-bit color (the Millions setting).

The audio track

I haven't said much about the audio half of the QuickTime equation -- the next chapter covers music and sound in detail. As with video, however, the higher the quality, the more demanding the movie. A 44KHz, 16-bit soundtrack (CD quality) in stereo imposes far more processing, storage, and data-transfer demands than does a 22KHz, 8-bit soundtrack in mono. You need to balance your audio requirements against the capabilities of the Mac that will be playing your movies.

A 22KHz, 8-bit soundtrack generally yields good results with voice or music. (These are the specs I used for the movies on the CD-ROM that comes with this book.) For voice-only soundtracks that don't require excellent sound quality, consider dropping down to 11KHz.

If you must have a high-quality stereo soundtrack in a particular movie, you can still ensure that the movie will play smoothly on slower Macs by using the Cinepak compressor and specifying a desired data rate. The Cinepak compressor will reduce the movie's image quality significantly, but the movie will meet the data-rate requirement you specified. And you'll have the great soundtrack to make up for the pixelated appearance of the movie.


Home | Back to Video Info | General Mac Info | Digital Audio
HotMedia | About Heidsite