Selecting optimal video format and codec for Web-based projects

Introduction

It should be said before you go any farther that working with multimedia, especially desktop video, can be a frustrating experience. Not everyone will have problems, but our experience has been that the equipment and software used in multimedia production is often "on the cutting edge" and is not as robust as products in the more established areas (such as word processors). Asking your computer to handle the massive amounts of data involved with video may make it somewhat "cranky," and you shouldn't be surprised by occasional crashes.

Macintoshes are usually more stable than Windows machines for desktop video, but neither is perfect. We've personally been up all night working to meet deadlines because our capture card didn't function properly, our editing package had bugs in it, and our modeling program crashed repeatedly.

This is not to say that you will have problems, but rather to let you know that if you do, you're not alone, and may not be doing anything wrong. Just remember to leave some room in your deadlines for unexpected problems, especially with new hardware or software. Keep your system extensions and devices to a minimum. Once you've got your system working really well, back it up (especially the System folder) so you don't have to start from scratch if the multimedia gremlins attack.

And no matter what happens, just keep in mind that it is poor multimedia etiquette to throw an uncooperative computer out of the office (bystanders tend to complain ;-)

Now, if all this hasn't scared you off, let's get started.

Making Multimedia Movies

Overview

Making multimedia movies involves several different steps which are briefly outlined below:

1. Start with your source material. Higher quality originals will give you better final movies.

2. Capture the video

3. Edit your video with an editing program. You can also add special effects to your video at this stage. Save the edited file uncompressed (the file will be fairly large).

4. Compress your movie. The compression step is often overlooked, yet has a dramatic impact on your final movie quality. You must compress your movies prior to distribution.

5. Distribute your final compressed movie. If you're making a CD-ROM, you'll probably use an interactive authoring tool and then "burn" a CD-R of the final project. If you're putting video on your site, you have to add HTML code to control movie.

Compression for WWW
Trying to take a huge file and push it through the low-bandwidth WWW is even harder than trying to make it play properly on a CD-ROM. Data rates are often 1/10th to 1/100th the size of a CD-ROM. Needless to say, this makes compression absolutely critical - anything you can do to improve how well your movie compresses will help.

Web data rates

As you all know, the Web has lower bandwidth than a CD-ROM. Users are often connected with extremely slow connections and you must make your movies as small as possible so that people can view them. Data rates range from about 50 Kilobytes per second (KBps) for fast connections down to only 2.5 KBps for 28.8 modems. Movies usually don't look so great at modem speeds.

File Formats

Several different file formats exist for working with digital video files on a computer. These formats can be conveniently divided into three categories:

  1. streaming digital video files (.asf)
  2. digital video files (.avi and .mov)
  3. hardware-based video files (.mpg).

Once you have installed a video capture board, turn your attention to the software that you'll use to actually perform the video capture. Video capture software can be divided into two groups:

  1. the software accompanying your video capture board
  2. video editing software that can communicate with your video capture board.

 

Generally, dedicated video editing software has more functionality than hardware-specific software provided with your board.

Several commonly used video capture software packages are:

Adobe Premiere

Microsoft VidCap

Asymetrix Digital Video Producer

Ulead Systems Media Studio Pro

Corel Lumiere

After the video stream has been digitized, the main objective is to set the desired frame rate, frame size, and data rate. These factors have direct impact on the success of your delivery. Improper selection of any these video attributes causes quality and bandwidth problems. If the video requires editing such as removing unwanted frames or adding transitions, most video editing packages allow you to do this at the same time that you set the size and the frame and data rates.

Setting these attributes is directly linked to the compression scheme you select. Certain codecs are more effective when, for example, certain frame sizes are selected. VDOWave is optimally designed to work best with 160 x 112 frame sizes, while MPEG-4 allows a much wider selection of frame sizes. Each attribute has its own characteristics that you need to understand in order to select the most effective codec for your content. The next section, "Compression and Storage," should be read carefully to answer many of your questions concerning this production phase.

If you want a general overview of the video capture through editing and conversion process, read the "Sample Content Creation Scenario" section later in this article.

MPEG VIDEO FORMAT

What is the MPEG format?
MPEG stands for the Moving Pictures Expert Group.  The group create standards for digital video and audio compression as part of the International Standards Organisation.  The format allows compression rates of 50:1 to 200:1.  It is not currently the most popular video standard on the WWW, but due to future developments it could well be in the near future.  There are currently four types of MPEG digital audio and video in use or planned for the near future;

MPEG-1 : This format was designed for CD-I and Video-CD media, it is a standard which allows a transmission rate of 1.5 Mbps.

MPEG-2 : This format is the standard for digital TV and D.V.D.s (Digital Video Disc).  This is an advanced version of layer-1, with the ability of coding interlaced images above 4 Mbps.

MPEG-3 : This is an audio compression standard.

MPEG-4 : This standard is planned for late 1998. A problem with many past standards was video and audio synthesis. This standard is supposed to overcome this standard as well as other improvements like an artificial intelligent approach to reconstructing images.



How is the video data compressed?
    There are basically five techniques to compressing data.

Advantages of MPEG

 
Disadvantages of MPEG



MPEG compared to other formats

 



The future
    I can see MPEG becoming the future most popular format, not only of computer video files, but also of home entertainment as DVDs become the next VHS, and as Digital TV takes off.  The formats will probably come together, as is already beginning to happen, as Quicktime is going to be used as the basis of MPEG-4.  All the companies like Sun, Microsoft, IBM and Apple will start to work together with MPEG to develop future formats.
 

MICROSOFT AVI VIDEO FORMAT

What is the AVI format?
    AVI format was developed by Microsoft as part of Video for Windows.  AVI stands for Audio Video Interleaved.  The drivers and player come with Microsoft Windows '95 and NT, if you have not got them because you use OS/2 or an Apple Mac you can get the drivers easily.  It is a special case of the RIFF (Resource Interchange File Format).  RIFF is a clone of the IFF format invented by Electronic Arts in 1984.  It was vented for Deluxe Paint for the Amiga, and when Deluxe Paint went to the PC, so did IFF.
    With software alone AVIs will play full motion video and audio in a small window at about 15 frames per second.  AVI use a number of different codecs.  There were originally two codecs, Video 1 and RLE (run length encoding), other codecs have been developed by third parties such as Indeo and Cinepak.  These codecs offer Mac compatibility and audio compression.


Advantages of AVI

Disadvantages of AVI


AVI compared to other formats


The Future of AVI
    Without the money of Microsoft the format will probably die in the near future.  The organisations involved like Indeo will try but there is not much point trying to compete with MPEG-4, already these companies are developing towards MPEG-4, making drivers and players etc.  It is going to be a very popular universal format, and AVI can't be improved to a level anywhere near it when MPEG has got so many people involved in it's development.

 APPLE QUICKTIME VIDEO FORMAT

What is the Quicktime format?
    Quicktime is a format developed by Apple Mackintosh and is the most popular video format currently available on the internet.  New developments in MPEG-4 are utilising quicktime, so existing content may be able to still be played on an MPEG-4 player, which will certainly please Apple as they would be able to encourage companies to create their web video in Quicktime format so it can be easily converted in the future to MPEG-4, which means more money for them now.  The Quicktime Pro 3 Package is available currently at Apple for US$29.99. The new Quicktime 3 player can be downloaded for free too.
 


Advantages of Quicktime

Disadvantages of Quicktime

 

Quicktime compared to other formats

 

The future of Quicktime
    Presently it looks like Quicktime and MPEG will eventually merge.  Apple will have a large roll to play in MPEG-4 and further developments in the future by the group.  It is probably better for digital video if it is developed by non-commercial organisations.  Then the technology will be open for other groups to utilise and improve upon.  The technology will move quicker, and due to the competition prices should be kept low.
 

INTERNET VIDEO

    There is a large amount of video available on the internet for download mainly in the formats covered by this site.  There is also live streaming video.  Don't expect long movies, the best you can get without a very long download is a short clip, a couple of minutes at the most.  Streaming video is usually low resolution, small screened and has a low frame rate.  Another problem is that the video may stop while the audio continues.  These characteristics are due to the speed of the data transmission over the internet.  The type of connection you have will affect the quality of the video.  The question is though, are we going to see better quality video streams in the future? Or is every advancement in video compression technology going to be counteracted by increasing levels of internet traffic caused by more users?

 


Compressing Video Content 

As discussed earlier in other sections, video files can get quite large depending on their frame rate, frame size, and color depth. For example, a 320 x 240, 15-fps video clip captured at 24-bit color can require a data rate of 3.46 MB per second to see and hear it. The key to playing video files over a network of limited bandwidth or storing video files on a computer hard disk is compression with codecs. Many codecs are available for differing video needs. For example, some codecs are optimized for low bit rates, while others are optimized for high bit rates. Others have optimal frame sizes and frame rates. As part of the planning process, it's important to determine what these factors are for your content, and with this understanding you'll be better able to select a codec optimal for your video needs. This list of codecs is not comprehensive, but provides a summary of video codecs commonly used when creating multimedia content.

 

Streaming video
Streaming video sounds like a good feature of the Internet, it's video on demand but you will need at least a 120 MHz Pentium processor and a 28.8K modem, and software, that could take a while to download. VDO, Vivo, Real Networks and Net Toob offer free downloadable software to view certain file types, there are other players, and other file types not covered by these players, but they are probably the most common.  A 28.8K image is blurred and jerky and often freezes while the audio carries on, but improvements in communications technology should improve things.

MPEG-4

MPEG-4 is a new international standard from the International Organization for Standardization (ISO).  The MPEG-4 Video (there is more to the standard than the video part) is closely related to ISO H.263.

There are (at least) three versions of MPEG-4 for Video for Windows from Microsoft and two versions from DivX. The most recent Microsoft MPEG-4, as of October 25, 1999, is Microsoft MPEG-4 Video Codec Version 3, identified by the Four Character Code

MP43.  MPEG-4 Version 3, MP43, Version 2, MP42, and Version 1, MPG4, are included in the Windows Media Technologies.  Specifically, the Windows Media Tools

contains the Microsoft MPEG-4 Video Codec Version 3 Application Extension, formerly known as a Dynamically Linked Library.

Which AVI video compressor is best?

"Best" depends on what the user is trying to do.  Selection of a video codec depends on several variables: time to encode the video, how widely known and available the video codec is, compression ratios that can be achieved for a target subjective quality level.  The

Performance of AVI Codecs section gives detailed information on the performance, compression ratios, video quality, etc. of AVI video codecs.

Cinepak is the most widely used AVI video codec.  Cinepak reportedly provides the fastest playback of video.  While Indeo 3.2 provides similar or slightly superior image quality for same compression, Indeo decompression is much more CPU intensive than Cinepak.  Cinepak was originally developed for the Mac and licensed to Apple by SuperMac.

It is now free with Video for Windows.  It is also free with Apple's QuickTime.

Summary
Compression reduces your huge video file to a size that will play properly from CD-ROM or the Web. Since you are going to lose quality, it is important that you use a dedicated compression tool to get the best results.

 

Glossary

Aspect Ratio

This is the ratio of the width by the height of a monitor or television screen. Most TVs and monitors have a 4 x 3 aspect ratio. The screens are 4 units wide and 3 units high.

Audio Gain

Sensitivity of the microphone measured in decibels.

Bandwidth

The amount of data/second that can be delivered across a connection, such as a cable, interface or bus. A 28.8 modem has a bandwidth of 28.8 Kb/second.

Broadcast

A streaming option that sends a single stream that branches down all channels, regardless of whether a client is listening. In relation to Sorenson Broadcaster, broadcast is generally used to mean "streaming."

CD-ROM

Compact Disc--Read Only Memory.

Codec

(coder/decoder or compression/decompression algorithm) As the name implies, codecs are used to encode and decode (or compress and decompress) various types of data--particularly those that would otherwise use up inordinate amounts of disk space, such as sound and video files. Common codecs include those for converting analog video signals into compressed video files (such as MPEG) or analog sound signals into into digitized sound (such as RealAudio). Codecs can be used with either streaming (live video or audio) or files-based (AVI, WAV) content. When the clip was encoded some sort of codec was used and you need the same codec in order to be able to view the clip. The most common codecs are available for download on the Internet.

Composite Video

A video stream that combines all the signals required for displaying video into one signal, thus requiring only one connection. NTSC is an example of composite video.

Compression

The act of making a file or data stream smaller. Compression can be either lossy or lossless.

Data Rate

A measurement of bandwidth. Higher data rate equals more bandwidth. In general, the higher the data rate, the higher the quality of video and/or audio.

Decoding

Reconstructing an encoded file or data stream.

Digitizer

The capture card or device that converts an analog signal into a digital signal. A video digitizer will convert an analog video signal into a digital stream or file.

Encoding

Analyzing and compressing a file or data stream.

Links