AGOCG logo
Graphics Multimedia VR Visualization Contents
Training Reports Workshops Briefings Index
This report is also available as an Acrobat file.
Back Next Contents Digital Video for Multimedia: Considerations for Capture, Use and Delivery

Section 2: Digital video: issues and choices

Battle of the codecs

Before providing details of the various codecs available, we will first take a look at Video for Windows and Quicktime and clear up an area of potential confusion. Neither Video for Windows nor Quicktime are codecs in themselves, but rather, they act as containers for new video codecs

Video for Windows from Microsoft set the standard for incorporating digital video under Windows by creating a new file standard called AVI (Audio Video Interleaved). The AVI format merely defines how the video and audio will be stored on your hard disc. That is, the video and audio are laid down with frame 1 of the audio, followed by frame 1 of the video, the same for frame 2 and so on; a process referred to as Interleaving. This may appear simple but is important, as without interleaving, programs would have to jump from place to place on your hard disc to find the next bit in the sequence. This slows things down and so anything that reduces the demands made on the hard disc by video is important. What AVI does not do, however, is define how the video will be captured, compressed or played back. This means that as new technology for video is introduced, i.e. a new codec, it can be incorporated into Video for Windows. AVI files may be played using the Media Player supplied with Windows 3.1x or Windows 95 or from within applications.

Quicktime: Apple have provided their own video-plus-audio file format equivalent to Video for Windows, called Quicktime. Quicktime provides a basic set of software schemes that meet a range of compression needs for still images, animation, video and sound. A codec for playing Quicktime movies is available for Windows (although Quicktime movies play back slower on PCs than AVI files) and converters for Quicktime to the AVI and MPEG (see below) formats are available. Quicktime 2.0 will capture movies at 30fps and quarter screen resolution (320 x 240). If 15 fps is acceptable you can show movies at full screen but performance will depend on the power of your MAC.

A number of codecs which support the AVI format exist for Video for Windows and Quicktime's video-plus-audio format and include Indeo 3 (Intel), Cinepak (licensed from SuperMac) and Microsoft Video 1, offering compression ratios of up to 50 to 60:1.

Indeo: One of the most important advantages of Indeo is that compression can take place in real-time, that is 'on-the-fly'. Many video capture cards support Indeo compression. Decompression is in software only. However, if the video requires extensive editing, real-time compression should not be used. Indeo is a proprietary blend of colour sampling, vector quantization and run-length encoding. It is a 24 bit codec and dithers well to 256 colours when displayed on an 8 bit display; there is no need to reduce the number of colours as the codec copes by itself. Having said that, reducing to 256 colours helps reduce file size. Needless to say, to reap the benefits, Indeo video should be played on 16 bit or higher displays. Compression ratios of 10:1 are obtainable. Two versions of the codec in use are Indeo 3.2 and Indeo Interactive.

Indeo Interactive is an entirely new hybrid, wavelet-based software codec that enables real-time interaction and control of video and graphics imagery in multimedia/game applications. For a comparison of this with MPEG compression and other codecs visit the following World Wide Web address:

Wavelet: wavelet based technology is not a codec in itself but a type of transform used during video compression. Another type of transform that is employed within codec technology is DCT (Discrete Cosine Transform) used in JPEG and MPEG compression algorithms

Cinepak: As with Indeo, Cinepak also offers very good image quality. Cinepak is a vector quantization based codec. Vector quantization stores information about differences between frames of video by quantifying the magnitude and direction of a pixel's movement. During decompression the codec uses a CLUT (colour look up table) to recreate the colour of each pixel in a frame. It is a highly asymmetric codec, taking 300 times longer to compress than decompress. Decompression is highly efficient. General opinion is that Cinepak is better than Indeo 3.2 for high action sequences. Both compression and decompression are performed in software. Compression ratios of 10-20:1 are obtainable. Cinepak was originally developed by SuperMac for integration into Apple's Quicktime (see below) but has been licensed to Microsoft for Video for Windows.

Microsoft Video 1: Is not in the same league as Indeo and Cinepak. It is a simple codec based on run length encoding and optimised for animation or cartoons.

AVI and Quicktime files can be played back in software alone and because of this the speed of playback and the size of the video window will depend on the power of the processor and graphic capability of the machine. The video will be scaled accordingly. A clip that looks perfectly acceptable on a Pentium 90 system may be barely recognisable as a piece of video on a 20 MHz 386. On a Pentium, Cinepak and Indeo can achieve 25 fps at 320 x 240 pixels and can be enlarged to 640 x 480 using graphics acceleration.

Both Video for Windows and Apple Quicktime are designed with open codec architectures. This is important for the future of digital video as it allows new codecs to be incorporated as they are developed. An example is Indeo Interactive - the most recent version of Indeo. To make use of this new codec is simply a matter of downloading the new drivers from Intel's World Wide Web site and installing them within Video for Windows. There is no need to buy any new hardware or software.

Other codecs include:

JPEG: As with still image formats, the widespread need for compression methods has resulted in the emergence of a plethora of techniques. Consequently the International Standards Organisation (ISO) set up two groups, the Joint Photographic Expert Group and the Motion Picture Expert Group (MPEG) to establish international standards for the compression/decompression of still and moving video and associated audio. JPEG is now a well-established codec for still image compression. It removes the redundancies in individual frames.

Motion JPEG (MJPEG) is a modified version of standard JPEG based on the same algorithms as JPEG to create I-frames (compressed intraframes). MJPEG capture boards are available, but beware, there are various non-compatible versions of MJPEG around. The codec is symmetrical; compression and decompression taking around one-thirtieth of a second for each I frame.

MPEG: Already we have two standards for MPEG - these are MPEG I (a sub-set of which has been defined for VideoCD/White Book CD and CD-I) and MPEG II. MPEG II is designed to offer higher quality at a bandwidth of 1.2 Mbit/second at 704 x 480 pixels and 30 frames per second and is used for images of high definition TV size. MPEG I has been developed to fit into a bandwidth of 1.5 Mbit/second to allow data retrieval from single speed CD-ROMs at 320 x 240 pixels at 30 fps. Compression ratios from 30:1 to 200:1 are obtainable.

MPEG is even more advanced than Motion JPEG and uses a process called predictive calculation. MPEG uses the same algorithms as for JPEG to create one I-frame. Information in the current I-frame is used to predict the information in following frames; the differences from its predictions being encoded only. This is known as Interframe compression, the frames being referred to a P frames.

A further standard, MPEG IV (incorporating MPEG III ) is under development. Algorithms for playing MPEG I movies in software alone are available for use under Video for Windows and Apple's Quicktime but will suffer the same scalar problems. Boards for providing hardware-assisted playback are also available, allowing full-screen, full-motion video. However, MPEG is still not mainstream technology and several computer magazines are reporting on incompatibility problems between computer, CD-ROM drive and MPEG playback cards and software.

One of the drawbacks of MPEG is that a great deal of processing power needs to be applied to perform the compression in the first place. Traditionally this has meant expensive, dedicated MPEG editing systems, or paying a lot of money to a bureau to do it for you. However, relatively low-cost expansion cards are beginning to emerge which claim to do the job for you. We have trialed one such card - see section 3: Digital Video on Trial for further details.

Fractal Technology: A proprietary format developed by Iterated Systems, it offers greater compression using algorithms based on fractal transforms. Still images can be compressed by up to 100:1. For video, Iterated Systems have developed "Softvideo," providing full screen colour video at 30 frames per second on a PC using software alone. However it takes 15 hours to compress one minute but decompression is fast. A key factor of fractal compression, for both still and moving images, is scalability. That is, the video's resolution is independent of the size of window in which it plays. As fractal images are encoded with equations, they have no inherent size and look equally as good on any size monitor.

The key question is whether developers should move to MPEG I or stick with software. Most people agree that MPEG I playback looks better and it has the added advantage of compressing audio. However, faster CPUs and buses on multimedia PCs, low cost general purpose video acceleration cards and new software codecs -such as that from Intel, Indeo Interactive - may save software codecs from being replaced entirely by MPEG. On fast Pentium and Power PCs, Cinepak and Indeo can achieve 25 fps at 320 x 240 pixels. The window size can be blown up to 640 x 480 using new graphics accelerator cards often supplied as part of the PC. The quality is perhaps not quite so good as MPEG, but close, and is a lot cheaper for encoding and playback.

Selection of CODEC

There are three primary criteria to consider when selecting a codec:

As usual there are tradeoffs within these criteria. For example, one codec may produce high levels of compression but the quality of the resulting video is poor. Another codec may produce high quality video at high levels of compression, but a powerful computer with hardware acceleration is needed to playback the video in real-time. For further guidelines on choosing a codec and examples, refer to information later in this section and section 3: Video on Trial.

Back Next Contents

Graphics     Multimedia      Virtual Environments      Visualisation      Contents