Digital Video for Multimedia Basics

Rich Young, July 1998

 

 

Going across platforms with digital video requires a common file format and codec that can be delivered on a variety of media be it optical, drive or network. Apple's QuickTime is the most popular movie file format and can be played on Windows,Mac, or UNIX stations. The Microsoft's ActiveMovie engine will attempt to the same; using the same engine Internet Explorer plays QT or Video for Windows. There are UNIX players that play many formats. The main problem is the delivery media which determines how much data can be displayed how fast. Bandwidth is a game of averages but the largest mass of devices becomes the lowest common denominator.

The current mass market platform for CD-ROM is 2x speed which has a peak transfer rate of 300 Kbytes/sec. The sustained rate is different for each platform and, especially on the PC, each machine. The PC suffers from lack of standardized hardware & from software that taxes CPU utilization. Graphics display also is lower quality on the PC although new machines,Windows 95, and/or more RAM will improve the situation. Until 4x or 8x drives dominate, 200 kb/s is a sustainable data rate for the "average" CD-ROM. The common carrier of media on the Internet is a 14.4 modem which delivers at 1.44KB/sec or about floppy every 15 minutes (depending on traffic). Even so, unless there is bandwidth conservation, net video may be the data pipe that breaks the Web's backbone.

CDs are usually optimized for 8-bit display. The main digital video codecs, though, are 24-bit native and scaleable to other bit-depths and frame sizes. A number of titles shipping for Christmas '97 will target 4x CD drives and thousand colors (15 & 16-bit) displays. It is possible to reduce the bit depth of frames before compression, but designing for the constraints of the medium (well designed palettes; less fancy lighting; less movement) will yield better results. Smaller files transfer faster so 8-bit graphics and lower quality video (i.e., more compression) and lower quality sound will be the rule until DVD hits.

By choosing content carefully then adjusting rates, size and quality, you can produce good-looking video. Just be sure to test early, test often and test on target platforms (the Macromedia tech support mantra).

 

The main things to keep in mind when working with Digital Video

 

Video File Size (in MB) =

(Duration in seconds) x (Horizontal width) x (Vertical length) x (Bits of color per pixel) / (8 [8 bits in a byte]) x (frames per second)

 

Uncompressed 24-bit Video
("legal" video is 29.97 fps & thus smaller; YUV color space is 16-bit so files are smaller)

640 x 480 pixels = 307,200 pixels per frame
307,200 x 24 bits x byte/8 bits = 921,600 bytes per frame
921,600 x 30 frames per second = 27.648 MB

 

Audio File Requirements =
(in bytes per second)

Sampling frequency (KHz)
x Sample size (1=8-bit,2=16-bit; eg, 8-bit/sample divided by 8 bits per byte)
x Channels (1=mono, 2=stereo)


 

Data Rate = File size/Duration

Delivery and storage device considerations make data rates important. Data rate, usually calculated in bytes per second is an average only; data spikes for a particular time are probable, so use Apple's unsupported Movie Analyzer (Mac) or Adobe Premiere's Data Analyzer (Mac/PC) or Doceo's VHS Play (PC; VidEdit from original the Video for Windows is unreliable). Doceo is a good source for digital video on Windows. Apple's unsuported MovieShop is still the only reliable way to limit data rate, but garbles 16-bit sound. Premiere's CD-ROM Movie-Maker (see Output Option on PC version) has a great interface for controls to make cross-platform movies plus unique custom keyframe placement. Media Cleaner Pro (Mac only from Terran Interactive; Windows version in progress) has great batch functions, compression previewing, special noise reduction and data rate controls and the ability to suspend renders. Media Cleaner Pro also integrates Web-video compression and has a Wizard that guides you through options for video compression using plain English. Terran Interactive's Web site is loaded with tips.

 

People seem to prefer

  • Smooth motion for action shots.
  • Better frame quality on low motion shots.
  • Well synchronized sound with bigger talking heads.

     

Frame Rate

  • You can get decent A/V sync with less than 30fps.
  • 10 to 15 fps keeps lip sync.
  • Influences are CPU speed, bus speed, RAM, disc speed.
  • Higher rates affect CPU utilization from 30-100%.
  • Capture at higher frame rate then reduce in even multiples (e.g., avoid 24 fps to 10) to avoid stuttering.

     

Frame Size

  • Depends on content and desired quality considering motion and video noise.
  • Size should be in multiples of 4 for Cinepak; QT works best with multiples of 2; even placement of the movie screen/stage effects playback because of memory seams.
  • Capture at output size unless scaling done with best quality in After Effects; if scaling with Premiere be sure to use the resize filter or "better resize" in (CD-ROM Movie Maker on the Mac) Special Settings. In Media Cleaner Pro use "accurate scaling."

     

Quality -- Source material

  • Get good lighting and use s-video or Component connectors (e.g., BetaSP) to reduce noise, which digitizes as data.
  • Solid color backgrounds compress well, although sharp edge contrasts will show artifacts in JPEG & then more in the delivery codec.
  • Avoid camera pans and zooms -- use tripod; keep talking heads still -- seat them in a chair with back support.
  • Keep transitions simple -- use cuts & wipes whenever possible.
  • A slight blur (.4 gaussian blur in AE) spreads noise across pixels so Cinepak edges are reduced.
  • Adjust "levels" in Premiere or AE (black 100%, white 0%) ; apply unsharp mask, levels & blur in After Effects if needed. Levels are called black & white restore in Media Cleaner Pro.
  • Windows displays are *darker* -- apply gamma .8 or so in Macintosh Premiere & test. With the Monitors & Sound (Monitors options on older versions) control panel you can turn off the Mac gamma adjustment to see how your files may appear on PCs.

     

Quality -- Data Rate

  • Very divergent opinions on data rate capabilities mean that testing on real-world machines is important: nail down target early and test on CD (check Jan Ozer's oldish comparison table of PC performance -- reference below); 200 kb/s is standard for 2x CD-ROMs.
  • Windows CD processes can be 25% slower than Macs.
  • Use Optimize Stills in Premiere output options make small QT slideshows with good audio sync for Director projects. Instead of creating new frames this feature tells QT to hold the still for a certain time.
  • Video on the Web is rapidly changing, so check Nels Johnson's column in DV magazine for the latest.

     

Quality -- Compression and CODECS (compressor/decompressor)

  • See Terran Interactive's Codec Central for an overview of compression on desktop systems.
  • Media Cleaner Pro, by Terran, has become the preferred application for Web and CD-ROM video compression, and is blessed by RealMedia, Apple and Microsoft (a Windows version is in progress). It has great batch functions, compression previewing, special noise reduction and data rate controls (including variable bit rate) and the ability to suspend renders! MCP also guides you through options for video compression. Media Cleaner Pro 3.1 will allow source video to be played from RAM.
  • There's an "EZ" version of Media Cleaner on the Premiere 5.0 disc that works with the included Premiere Export Module. Media Cleaner Pro also ships with select Media 100 and Avid systems. Media Cleaner Pro 3.0 allows for settings to be emailed and shared. This is useful if you need more machines rendering for the same job.
  • Premiere 5 has much improved batch processing, and can now process movies as well as projects. It doesn't provide the control, flexiblitiy or previews that MCP provides, but it is quite serviceable.
  • Test both spatial quality ("Quality" in standard QuickTime boxes; frame quality) and temporal quality (option click in "Quality" area; quality for frame differencing in some codecs like Cinepak).
  • The number of keyframes needed depends on interactivity and click motion; more kf = bigger file; you don't need any keyframes with Cinepak the file will still be small!
  • TrueMotion, nee Truemotion-S then Power!Video, looks great -- actually amazing on a fast machine; but it has trouble on the very low end & must be installed separately; remember to set the frame width to a multiple of 12 or so.
  • Indeo 3.2 looks almost as good Truemotion while playing but artifacts show up on frame stops; Indeo 4 is for high end PC's only; the Indeo is the single best site CD-ROM/Web movie creation information.
  • For Internet streaming you'll need a low data rate codec like Real Media or Sorenson in QT 3.0. Real Media delivery might require server software for good performance. If using Sorenson in QT, try using a ridiculously high keyframe rate of (1 every) 16,000! Remember that Sorensen is only good for data rates around 100k or less - after that picture quality does not seem to improve and there can be dropped frames from the increase in processor overhead. See Terran Interactive's Codec Central for details; see also Vertical Online's QuickTime 3 Sample Site.
  • Cinepak is still the best all-around software codec but can be ugly if you take the easy way out. I've seen nearly perfect Cinepak, but it was shot on film on a nice day in Marin. CinepakPro provides better compression algorithms.
  • Use QuickTime's Animation codec at 100%/Millions Colors+ for lossless compression with an alpha channel.Use Motion-JPEG A or B for video field support or Photo-JPEG if disk space is a problem.
  • If you get white frames in Windows you need to install the codec or "flatten" on the Mac.
  • Don't worry too much about palettes -- good source material & a little color correction is easier & gives better results. Some applications can calculate an optimal palette and embed a resource into your movie. Except in special instances, this is a waste of time. Only MoviePlayer can see the resource, which can be lost during the flattening process needed for cross-platform viewing. Plus, Cinepak & Indeo default to internal palettes in 8-bit so you can suffer double-dithering and slower performance. If you must, use Debabelizer for creating the palette or super-palette.
  • If developing in Director you can use a dummy picture to import the palette. But wait, there's more! You'll need the FixPal XObject to assert more than one palette for all of your QT movies!

     

Playing & Converting QuickTime and Video for Windows

  • With QT 2.5 or below on the Mac, 'flatten' the movie (move the resource fork into the data fork) with Premiere, Media Cleaner Pro, MoviePlayer or shareware utilities like 'flattenmoov'. Movies made with QT 3 contain only one fork so this shouldn't be a problem (though this may still be a problem using QT3 with certain applications).
  • Make flattening the very last step (don't even play it) on the Mac.
  • If you get white frames in Windows you need to install the correct version of the codec or flatten on the Mac.
  • Cinepak is the only compressor present in default installs of QT and VfW; others needs to be custom-installed and/or licensed.
  • In Windows the file extensions are .mov for QT & .avi for VfW -- all movie file names must end with these extension for applications to recognize them.
  • QT and VfW have different audio interleave methods -- in QT there are sound chunks usually released every 1/2 second; in VfW there are sound samples for each frame.
  • Premiere for Windows converts best since it recompresses to the native file format.
  • The Intel Indeo site has the definitive white paper on QT/VfW conversion and conversion utilites; see also the Adobe support site. MoviePlayer 3 can open AVI files if the codec is present; exporting to QT will convert it. The QT-AVI utilities are sometines hard to find; here they are for now.
  • QTW 2.1 or earlier supports only 1 video and 1 sound track. This was a Windows limitation -- Macromedia had to develop a 4 track sound mixer for the Windows port of Director 4.0.
  • QT Windows 3.0 will play QT files with all media tracks intact. Check Apple's QuickTime site for the latest information.

     

QT movies in Netscape

  • Apple's QuickTime plug-in for Netscape Navigator and Internet Explorer 3+ let you embed QuickTime movies and QuickTime VR Panoramas and Objects directly into web pages. For information, see QuickTime authoring resources.
  • To save QT movies from Netscape without QT Pro, click on the movie then select View>Page Info. Then click open the URL for that movie so the movie loads in the window below. Select that movie, then select File>Save As and save as source.

 

Weekly QuickTime updates and tutorials can be found at The Little Quicktime Page and at the QuickTime Gazette. Apple Quicktime, Microsoft's ActiveMovie/DirectShow and Intel Indeo will continue to develop quickly, so keep watch!

 

For additional information see these bookmarks, and:

Quicktime: Making Movies with Your Macintosh, Robert Hone, 1993, Prima; How to Digitize Video, Nels Johnson, et al., Wiley, 1994; Desktop Video Studio, Andrew Soderberg and Tom Hudson, Random House, 1995. For Video for Windows see Publishing Digital Video, Jan Ozer, Academic Press, 1997.

See Digital Video magazine for up-to-date news and help in a variety of DV topics.

 

Top of Page


 

Synesthetic Media Connections

Comments or suggestions welcome at RYoung097@aol.com

Many thanks to SFSU Multimedia Studies Program