Video Format Guide
By Scott Nesbitt - Sunday, March 15, 2009
Video may have killed the radio star, but it's become more than just something that we watch on our televisions. Video is definitely an essential part of the desktop and Web experiences of most computer users. And more than just a few mobile phone users, to boot.
But like anything in the realm of computer technology, the video we watch is wrapped up in a morass of jargon and of weird extensions. If you don't know your .avi from your .mov or .flv, then read on.
Formats vs. container formats
When it comes to other kinds of files, we all have a pretty good idea of what a file format is. We know that a Word file is a binary that contains all of the text that we've typed into the word processor, the style information, and graphics too. But the situation is different with video.
When people talk about video formats, they're referring to something called a container format. The container format is a detailed description of what's inside a video file. It describes the structure of the file, as well as the kind of data that the file contains.
The container format also holds information about something called a codec. The codec is information about how the file was encoded, specifically what software (called a codec, not surprisingly) was used to digitally encode the file. This is important, especially for a couple of the formats that are described in this TechTip. Why? Not every media player supports the same codecs. In many cases, you'll need to install a specific codec in order to play a file using your favorite media player.
MPEG is short for Motion Picture Experts Group. It's a standard for both a variety of video and audio formats, and for compressing those formats. In fact, the array of formats that use MPEG compression can be confusing.
There are different versions of the MPEG format (often called levels) which help contribute to this confusion. The three MPEG levels that you're likely to encounter are MPEG-1, MPEG-2, and MPEG-4.
What's the difference between all of them? MPEG-1 is the oldest of these. It was first used in video CDs (the precursor to the DVD), where space was at a premium. MPEG-2 tackled (and still does) the transmission of digital and high definition over digital networks, satellite TV, and (later) the Internet. In fact, MPEG-2 is so efficient that it pretty much killed off MPEG-3 -- it handles high definition video just as well as its descendant. MPEG-4 does pretty much everything MPEG-2 does, but with better quality and compression. MPEG-4 adds another twist to the mix: it supports Digital Rights Management (DRM), which enables content producers to prevent copying of their content.
Note: An upcoming TechTip will look at DRM and its implications.
If you run into any video files with the extension .mpg or .mp4 you have an MPEG file on your hands. It's a popular format because it provides a good tradeoff between file size and quality. Just about every media player supports MPEG, although some players support the format better than others. I've found that it's a rare MPEG file that won't play on the various media players that I use in Linux or on Windows.
If there's a format that doesn't get a whole lot of respect it's AVI (short for Audio Video Interleave). Originally developed for Microsoft Windows, AVI has become ubiquitous across several operating system and on the Web. While it isn't as popular as it once was, it's not rare for you to run into AVI files
AVI files, which have the extension .avi, are often disparaged from a couple of reasons. First, they use little or no compression. That means the file sizes are larger than just about any other format out there. And AVI files often use a variety of codecs to encode them. This causes trouble, because you might not have the proper codec installed for your media player and the file won't play. This is especially true on operating systems other than Windows. It's not uncommon for an AVI to not play on Windows without the proper codec. Windows Media Player can sometimes automatically download that codec, but usually you'll have to search for it yourself.
Since it's an established format with a long history, you'll find that most media players for Windows, Mac OS, and Linux can handle a number of AVI files. The one player that I've found which works best is VLC.
WMV and ASF
Windows Media Video (WMF) and Advanced System Format File (ASF) were created in part to deal with the shortcomings of AVI.
WMV is a compressed file format (at least, with better compression than AVI) with the extension .wmv. It was developed primarily for streaming video across the Web. Microsoft claims that WMV has better file quality than MPEG. That may or may not be true, but WMV files are generally larger than MPEG files. Often by a factor of two.
ASF, on the other hand, is a container format for WMV. It encapsulates not only the video and audio data for a WMV file but also Windows Media DRM data. All of this is wrapped in a file with the extension .asf.
The biggest criticisms of WMV and ASF are that they're specific to Windows, and that ASF supports very restrictive DRM. As for the first complaint, it is possible to play WMV files on other operating systems. On Mac OS, for example, you can get a player called Flip4Mac WMV which enables you to edit WMV files and convert them to QuickTime. This allows you to play WMV files on not only your Mac but also on your iPod. On Linux, the VLC and xine players can handle WMV files that don't have DRM applied to them. Well, at least most of the time.
And that's the main point of contention with the second complaint. DRM-protected WMV and ASF files generally won't play on other operating systems, or with anything other than Windows Media Player on Windows. An interesting aside is that Microsoft's Zune player doesn't support Microsoft's DRM scheme so you can't play WMVs with DRM applied to them. Ironic, isn't it?
Once upon a time, Flash was used almost exclusively to create demos, tutorials, and annoying splash pages for Web sites. Now, thanks to the popularity of video sharing sites like YouTube, Flash has become an almost ubiquitous video format.
Most Flash video files have the extension .flv or .swf, although you might see the files with the extension .f4p (protected Flash video). Flash is usually used for streaming video across the Internet, and is able to do this quite efficiently because files can be compressed to make them smaller.
The compression can be a bit of a problem, though. The main codec used to encode Flash files is based on bitmap images -- each element and frame in the video is a set of pixels. When pixels are compressed, they become fuzzy and lose varying amounts of color depth. You've probably seen badly compressed Flash videos on YouTube. They're blurry and look washed out.
Flash is more or less a cross-platform format. Adobe Systems, which owns and develops the software that enables people to create and view Flash video, has Flash players for Windows, Mac OS, and Linux. On top of that, a number of media players (such as RealPlayer, Windows Media Player, VLC, xine, Gnash, and QuickTime Player) support Flash. Some of these players only support older versions of the Flash format, though.
Whereas Windows has AVI (and now WMV and ASF), Mac OS has QuickTime. You can tell that you have a QuickTime file if you see the extension .mov or .qt.
QuickTime is a compressed format, using a compression scheme developed (and closely guarded) by Apple. This compression scheme is very efficient, and can noticeably shrink the size of a file but without losing much of the quality. In fact, QuickTime files arguably offer some of the best quality video available.
One interesting characteristic of the QuickTime format is that it contains multiple tracks. Each track contains different types of data. For example, one track will contain audio, the second video, and the third subtitles. This separation of content makes a QuickTime file easy to edit.
QuickTime files are usually best played using Apple's own QuickTime Player, which is only available for Mac OS and Windows. You can also download add-ons for Windows Media Player to enable it to play back QuickTime files. On Linux, the MPlayer and xine media players can handle QuickTime although you might need to install additional codecs.
People don't just watch videos on their televisions and computers anymore. More and more, they're watching them on their smartphones as well. Whether it's an iPhone, a BlackBerry, or one of the many phones from companies like Nokia you can get and watch high-quality video on a device that literally fits in the palm of your hand.
One format that makes it possible is 3GPP multimedia. 3GPP (which has the extension .3gp) is one of those container formats that I mentioned at the beginning of this TechTip. It was created to move audio and video to mobile phones -- either from phone to phone via email or MMS, or over the Internet.
Most modern smartphones, especially ones with built-in video capture and playback, will play and record 3GPP files. Like other formats, the quality of 3GPP files varies depending on the resolution of the camera used to capture the video and the compression options that were used when saving the file. Obviously, the higher the compression rate, the lower the quality of the video. I've received video taken with a smartphone that was fuzzy, and video that's been as clear as the best MPEG files I've seen.
While just about any smartphone will play 3GPP files, on the desktop only a handful of media players can handle these files. The best-known ones include VLC, RealPlayer, MPlayer, and Apple QuickTime Player.
Tech Tips Article - http://www.geeks.com/techtips/default.asp