June 93 - MAKING BETTER QUICKTIME MOVIES
MAKING BETTER QUICKTIME MOVIES
KIP OLSON
QuickTime 1.5 makes it easier than ever to make CD-playable movies. These tips on
capturing, compressing, and playing back movies will help you use the new Apple
Compact Video compressor to its best advantage, creating movies that will play well off
a standard CD-ROM drive on a Macintosh LC computer.
QuickTime introduced the world of digital video to the Macintosh and enabled a whole
new category of multimedia content: movies. With QuickTime, it's simple to play back
movies in any application and to exchange movies between applications using the
standard cut/copy/paste mechanism. But no one ever said it was going to be easy to
create them!
What makes movie creation tricky is the tradeoffs required to get QuickTime movies
to play off a CD-ROM drive, the most effective distribution medium for digital video.
Uncompressed, full-screen, full-motion video requires a data transfer rate of about
27,000 kilobytes/second, yet a typical CD- ROM drive has a data transfer rate of only
100 kilobytes/second. QuickTime solves this problem by using video compression,
which requires you to make tradeoffs between frame size, frame rate, image quality,
and sound quality when making a movie.
The tips in this article will help you make the right tradeoffs to produce high-quality
movies that will play off CD-ROM. You'll also find tips on capturing digital video,
using the MovieShop utility on this issue's CD to produce compressed movies, and
playing back what you've created. I assume you're already familiar with the basics of
movie making with QuickTime.
TIPS ON TRADEOFFS
Making the right tradeoffs is the key to producing better QuickTime movies. Depending
on your target platform, to get smooth playback you may need to limit the frame size
and rate, minimize the differences between frames, and trade off audio for video
quality.
PLATFORM
Before you get started, you need to decide which Macintosh platform your movie will
play on. Obviously, a Macintosh Quadra 950 with a double-speed CD-ROM drive can
play much larger, higher-quality movies than a Macintosh LC with a standard CD
drive. Table 1 shows some common platforms and their capabilities. (See the following
sections for more on frame size and rate.)
Table 1
Common QuickTime Platforms
• Bits/Pixel
• Built in CD Drive
• Maximum Movie Frame Size, Rate
• Market
Quadra 950
• 1, 4, 8, 16, 24
• Optional
• 320 x 240, 24 fps
• Power user, professional
Performa 600
• 1, 4, 8, 16
• Optional
• 320 x 240, 15 fps
• Consumer, home
LC II
• 1, 4, 8, 16
• No
• 240 x 180, 12 fps
• Education
Macintosh II
• Card-dependent
• No
• 160 x 120, 15 fps
• Loyal customers
For the purposes of this article, our target platform is the Macintosh LC II with an
AppleCD SC CD-ROM drive (transfer rate of 100 kilobytes/second). Movies created
for this platform should play back well on virtually every color Macintosh, covering
as much of the installed base as possible. However, keep in mind that machines that
use NuBus video, such as the Macintosh II, won't have the playback performance of the
LC II. You should always test your movies on the platforms they'll play on.
FRAME SIZE
The frame size determines how large the movie will be on the screen. The larger the
frame size, the greater the number of pixels that have to be updated every frame. This
can be a problem for less powerful machines, so you often need to limit the frame size
to get smooth playback.
Frame sizes are typically specified by horizontal and vertical pixel measurements.
Some common frame sizes for digital video are shown in Table 2.
Table 2 Common Frame Sizes for Digital Video
Frame Size Description Pixels/Frame Capability Required
640 x 480 Full-screen 307,200 Hardware acceleration
320 x 240 Quarter-screen 76,800 Fast CPU like a Macintosh
Quadra
240 x 180 Eighth-screen 43,200 Apple Compact Video
compressor
160 x 120 Sixteenth-screen 19,200 Apple Video compressor
Note that full-screen movies are practical only with hardware acceleration, and for
quarter-screen movies you need a fast CPU like a Macintosh Quadra. With our LC II
platform and the Apple Compact Video compressor made available by QuickTime 1.5,
we can create eighth-screen movies, which have more than twice the screen area of
the "postage-stamp movies" possible with QuickTime 1.0's Apple Video compressor.
For the Apple Compact Video compressor to function optimally, the frame size should
be a multiple of 4 in each dimension. This is because the compression algorithm uses a
4-pixel by 4-pixel cell.
FRAME RATE
The frame rateis the number of frames displayed in each second of the movie, typically described in frames per second (fps). The frame rate to use for a movie depends on the
frame rate of the source material, whether film or videotape. For the smoothest
results, you should use a frame rate of which the source material frame rate is a
multiple, but this may only be possible if you have hardware acceleration or a fast
CPU. Still, an acceptable compromise is available if your platform is limited.
The frame rate of source material in the NTSC video format is approximately 30 fps.
Much source material is shot using film at 24 fps and then transferred onto videotape.
Frame rates to use for movies based on these types of source material are shown in
Table 3. Other video standards such as PAL and SECAM have different frame rates; if
your movie is based on one of these types of source material, you'll have to compensate
accordingly. For our target platform, we can use 12 fps with good results.
Table 3
Common Frame Rates for Digital Video
If Your Source Material Is NTSC Video:
Frame Rate Description Capability Required
30 fps Full-motion Hardware acceleration
15 fps Half-motion Fast CPU like a Macintosh Quadra
12 fps Half-film rate Apple Compact Video compressor
10 fps Third-motion Apple Video compressor
If Your Source Material Is Film:
Frame Rate Description Capability Required
24 fps Full-motion Hardware acceleration
12 fps Half-motion Apple Compact Video compressor
10 fps Third-video rate Apple Video compressor
There are a couple of minor quirks having to do with frame rate that you should be
aware of when you make a movie. First, you'll note that I said the NTSC frame rate
isapproximately 30 fps. For reasons lost in the dawn of television, the NTSC frame
rate is actually 29.97 fps. If you assume the frame rate is 30 fps, long movies can
lose synchronization between sound and video over time, since there are fewer video
frames than expected. For example, if you digitized 100 seconds of video, you would
expect to get 3000 frames, but you would really only get 2997 frames in that period
of time. The GrabGuy utility and the HyperCard® Movie Making Stack (found on
theQuickTime 1.5 Developer CDand on this issue's CD) automatically take care of this
problem, but if you find sound sync drifting over time on long movies, you may need to
duplicate a video frame every 1000 frames to get things back in sync.
The second item to note involves transferring 24-fps film to 30-fps video. On
videotape, each frame is composed of two fields, one containing the odd scan lines and
the other containing the even scan lines. These fields are interlaced to produce the
frame. When film is transferred to video, six extra frames are "made up" every
second. Typically, once every four frames, two adjacent film frames are put into the
two fields of a single video frame to form a fifth frame. Figure 1 shows how this
works. These made-up frames have a blurred look when digitized.
Figure 1 Making Up Extra Frames When Film Is Transferred to Video
You can use a couple of different methods to digitize only the original film frames and
skip the blurry made-up frames. If you have a capture system that can grab individual
video fields, you can set it to capture at 12 fps, and it will skip the duplicate fields and
give the original 12 film frames each second. Or simply capture at 30 fps and throw
away every fifth frame, yielding the original 24 film frames.
FRAME DIFFERENCING
Frame differencingis the technique used by QuickTime of storing and updating only the
pixels that differ from the previous frame, so that much less data has to be stored and
displayed. For example, in Figure 2 the frame on the right contains only the
information needed to update the areas of the screen that differ from the frame on the
left. As a consequence, less data has to be stored on disc for the second frame and it
takes less time to draw. This in turn allows larger frame sizes and frame rates, giving
better-quality movies.
Figure 2 Example of Frame Differencing
When you're using the Apple Compact Video compressor, it's a good idea to create
movies in which not much changes from one frame to the next, since frame
differencing is one way the compressor achieves lower data transfer rates. Here are
some things to keep in mind to get the most benefit from frame differencing:
• When possible, use source material with constant backgrounds and solid
colors -- especially all-black and all-white areas -- to reduce the difference
between frames.
• When possible, use videos of "talking heads." These are great candidates
for frame differencing, since typically only the lips and head move.
• Avoid videos with lots of panning and zooming or with complex
backgrounds. These effects increase the difference between frames and thus
decrease the possibility of compression gains.