Video Compression

From Streaming 411

Jump to: navigation, search

Contents

Video compression

"A picture is worth a thousand words" is a hard fact that most DV engineers have to face in compression. Compression is mostly about removing redundant info, either permanently (lossy compression) or temporarily (lossless). The more “predictable” the picture is, the easier it is to compress it. This is why noise has such a bad effect on compression and why it’s preferable to always use a tripod when videotaping. All digitized data is actually compressed, remember we’re already discarding information in the sampling and quantization phases.

Formats

Unlike audio coding, which has some pretty well established and widely used de-facto standards, like MP3, AAC or just plain PCM for raw audio, video coding seems to be in a constant process of change, a complex subject with each case being slightly different. In video, an engineer is usually faced with the followin questions when deciding the apropriate codec:

  • Compatibility
  • Filesize and bandwidth
  • Temporal quality for the give purpose
  • Encoding time

Compatibility

It doesn't matter how good your video looks if no-one can actually view it. This is why I would argue that compatiblity is the most important factor in deciding which compression settings to use.

File size

Filesize and bandwidth were the original driving factors behind developing newer and more efficient compression methods. The file size is expressed simply by the used bitrate and length:

filesize = bitrate * time

Let's take an example: An advertising company gives us a demoreel of all their commercial shorts they've done in the past 3 years with a total duration of 01:26:22.8. The customer wants to distribute this on a business card-sized CD that can store up to 50 MB. Let’s find out the necessary bitrate and compress the material.

50 000 kB / 5182 s =

An extreme example on the subject of cost is the popular video service YouTube. According to their sources (http://www.youtube.com/blog?entry=jNQXAC9IVRw) serves about 15 mil videos a day to their viewers. They have chosen to use VBR encoding in their videos, with an average bitrate of about 300kb/s. Given their nature, the clips are relatively short, averaging at maybe 2 minutes in length. This means the average filesize on YouTube might be around 4 MB. Knowing this, we can quickly estimate the daily bandwidth at around 30 TB.

There's two basic types of compression: lossless and lossy.

Temporal quality

How the video looks for a given purpose is extremely important.

File formats

The file format defines how a file container should be read from and written to. That's why video file formats are sometimes often called "multimedia containers". Most file formats don't actually define the way the information inside the file should be coded. A notable exception to this are the MPEG-file formats which define both.

You can think of the file format as the guidelines given to write this or any other thesis. Each school usually defines it's own set of guidelines for thesis layout to which all thesis written there should adhere to. At the very least, a thesis should always include certain elements (title, TOC, Glossary, conclusion etc), but the guidelines shouldn't dictate the language or alphabet.

There aren't that many multimedia file formats in common use today, so we can even list them here:

QuickTime. The original, and arguably most common multimedia file format still in use. Developed by Apple Computer in 1991, the QuickTime container was the first to solve the audio-video syncronisation problems. It now defines a rich set of media handling capabilities - an unlimited number of tracks, up to 24 channels of audio (since QuickTime 7), the ability to mix different codecs in a single file an unmatched list of supported media types (video, audio, text, still images, 3D and panoramic VR images) and delivery mechanisms (Web, CD, streaming).

AVI. Audio Video Interleave. A multimedia container introduced by Microsoft in 1992. While technically inferior to many others in this list, AVI still enjoys widespread use due to it being the prefered container for many of the new generation efficient codecs.

WMV. Windows Media Video is the default file format that’s bundled with every modern copy of Microsoft Windows and is therefore a very important. The Windows Media Framework also supports a handful of other file formats and codecs.

MPEG. Moving Picture Experts Group format is unique in that it defines both the container, and the codec. A number of MPEG version exist today, starting with the original MPEG-1 specification that was the basis for the Video CD distribution medium. It's successor MPEG-2 was ratified as the standard format for video DVD's and has been widely adopted. The MPEG file format is controlled by a group of companies instead of a single entity.

Flash video (FLV). Macromedia's proprietary file format used and popularized by their Flash product. Recording to the {Flash Player Penetration Survey} conducted in September of 2006, 96% of the current web browser install base has the Flash Player plugin installed. This is a very good thing in terms of compatiblity. Flash also allows for a very rich set of interactivity and good DRM support. It’s an interesting platform that answers many of the challenges media professionals are faced with, however it’s completely proprietary nature makes it’s viability as a long-term media platform questionable. As of this writing, Flash is also entirely a consumer-oriented video product with no apparent broadcast or HD support.

Ogg. An open source multimedia file format.

Personal tools