A few decades back, when Videomaker was just starting out, shooting and editing got a little complicated with the introduction of VHS, VHS-C and Betamax. If you read a two page article, you would discover the differences. When the digital age dawned, everything went out the window. Suddenly there was a bewildering array of video formats — .wmv, .asf, .rm, .mov, .mpeg. On top of that, many of these standards had their own substandards (MPEG-1, MPEG-2, etc.) How’s anyone supposed to keep it straight?
Containers and codecs
Possibly one of the most confusing things about video formats is the idea that there’s a “container” and “codec“. It’s enough to make you yearn for the days when you just put a tape in the camera and pressed record. The plethora of video formats means that, whatever type of video production you’re doing, there’s a good way to make it happen. Twenty years ago, everybody was watching movies the same way — either on a screen via a projector, or on a television set. Today many, many more options exist and people are taking advantage of them all. From high-end 4K home theaters, to video streaming from a cellphone, video is everywhere. By understanding the various formats, you can ensure that your video is viewed in the right way with the best quality.
An analogy of video formats
Figuring out exactly what containers and codecs are can be a little bewildering, because it’s a very technical subject. Think of containers as a type of publication. It might be a hardback book, a glossy magazine, a newspaper, a pamphlet or a gum wrapper. These all contain words, and potentially photographs, or images. Yet they each work in a different way.
Think of the video format like the way you view text or images in a publication. You could print Tolstoy’s “War and Peace“, for example, on Dove candy wrappers. It will take thousands of wrappers and who would want to read it that way? In the same way, you can create your vacation footage in an uncompressed format, but the file becomes enormous. There is no way you could upload it to the web or send it in an email. Similarly, you want your copy of “War and Peace” bound beautifully in a hardback book. If you are printing a takeout menu, on the other hand, you’ll want color photos on heavier paper. Words with images appear in a comic book, or a hardback book, or a newspaper. The images of a fashion magazine, however, require heavy-weight glossy paper to reproduce properly.
Every video application has a proper codec and container. Unfortunately, codecs and containers get improvements and updates regularly. You may rarely see today, what was a popular format a few years ago. Additionally, some containers and some codecs are proprietary. That means, occasionally, there are licensing issues related one type of container with another type of codec.
Keep in mind, when you compress video data, there is some data lost in the process. Video compression applications work by looking for redundancies in a frame and maintain them frame to frame. For example, one bit of blue sky is the same as another bit of blue sky. The blue section carries though each frame. At high compression rates, this becomes obvious. At lower rates it’s difficult to notice.
Every video maker’s temptation is to use lossless formats to preserve all the original data. That isn’t practical for uploading, sending or storing your file. It is best to create multiple versions of your files for multiple uses. One file format you will uploaded to your web site. You may choose a different format or size to email to your clients. You might save the final product in a third video format to a hard drive for projection at an event.
Formats with lossy vs lossless compression
Edit and distribute in the highest quality
The highest quality video format is the one you originally captured. While digital files do not degrade in quality, every time they are converted, there is a lose in data. Converting your uncompressed files directly from your camera, even into a high quality file, does result in some loss of quality. It’s necessary to compress files in order to be able to share them. Avoid re-compressing any more than you have to.
Keep your master files in the original video format. Generally, you should edit and create versions at whatever sizes necessary. Whenever possible, you don’t want to convert a file from a file previously compressed.
You can rely on your editing applcation for lot of the work in deciding how to compress video files. Most consumer editing software today will have presets for various methods of distribution — such as email, YouTube or video display.
Let’s define a few specific video formats and the different containers. A video’s file extension usually refers to the container. A few containers have codecs that they almost always use and other containers are often used with many different codecs.
Audio Video Interleave (.avi)
Microsoft developed and released this with Windows 3.1 way back. AVI files were once a workhorse of digital video. If I say “AVI is dead” the comments section will clog with people still using it. I’ll say that it’s popularity has waned, but you will find lots of legacy AVI files all over the web. Short answer, don’t output video to it, but keep a player handy.
Advanced Systems Format (.asf)
ASF is another proprietary Microsoft container. It usually houses files compressed with Microsoft’s WMV codec. To make things confusing, the files are usually designated .wmv and not .asf. The ASF container has the advantage over other formats in that it’s able to include Digital Rights Management. (DRM – a form of copy protection) Microsoft designed this format for streaming video from media servers or over the Internet. Short answer, again, don’t output video to it, but keep a player handy.
QuickTime (.mov or .qt)
Apple developed QuickTime and it supports a wide variety of codecs. It’s a proprietary format though and Apple decides what it supports. Like Microsoft’s version, .avi, Quicktime looked like it was going to fade into the sunset. It looked like it was about to as it die when Apple released the Maverick update. Quietly the update replaced anything inside a .mov container with h.264. In fact, both Nikon and Canon DSLR’s output h.264 video wrapped in a .mov container. Short answer: Sure, why not. Most people will be able to read .mov files for a while now.
Advanced Video Coding, High Definition (AVCHD)
AVCHD is a very popular container for data compressed with h.264. It comes to us through a collaboration between Sony and Panasonic as a format for digital camcorders. It’s a file based video format. That means it’s meant to be stored and played back on storage devices like flash drives or SD cards. This format supports both standard definition and a variety of high definition variants.
This format is an extraordinarily robust container. It includes, not just things like subtitles, but menu navigation and slideshows with audio. Short answer: Yes.
MPEG-4 which was based on the Quicktime file format comes in a variety of extension including mp4, m4a, m4v, f4v, f4a, m4b, m4r, and f4b. Apple created this standard as an extension of MPEG-4. Originally the format was proprietary to Apple DRM to keep their files from playing on non-apple devices. You would use it, among other places, when distributing content on iTunes. The formats are so similar. In some instances, where the DRM isn’t being used, simply change the file extension to .mp4 and you can play the file.
There are a number of Codecs out here and we have a good tutorial here. Two of the most common are:
Windows Media Video (.wmv)
Once the Internet became a primary delivery vehicle for things like video, people started trying to come up with ways to share video that wouldn’t take up a lot of bandwidth and disk space. One of the big advances was the idea of streaming video — where your computer downloads only a part of a video and begins to play while the download continues — this means you don’t have to wait two hours for a movie to download before you can start watching. Over the years the WMV format has grown to include support for high definition 720 and 1080 video. To make things complicated, files that end in .wmv are usually stored in an .asf container.
Not only do you need to call the MPEG-2 compression codec h.262, you have to keep from confusing it with the format used to compress Blu-ray disks as well as lots of web video. One of the very nice things about h.264 is that you can use it at very low and very high bitrates. The h.264 will send highly compressed low resolution video across the web and then happily encode your high definition movie at super high bitrates for delivery to a High Definition television. This is a very common codec for camcorders and digital video cameras. Its container is AVCHD.
What’s the best video format?
While there isn’t one “best video format,” there are best video formats for particular jobs. Ask yourself a few questions about your intended audience: Will they be watching video streaming over the Internet? What kind of connection speeds? Do they have a DVD player or a Blu-ray player? — are the longevity of the format and how widespread its adoption.
For a number of years, a good bet for a forward-looking, high-quality, versatile video format is h.264. (MPEG-4/AVC – Advanced Video Coding). H.264 is supported by a number of important players including Microsoft, Apple and Adobe. Though in early 2011 Google dropped support for h.264 from its Chrome browser. They cited the desire to use only open-source (i.e. non-patented, royalty-free) standards. Microsoft swiftly made a Chrome extension which restored support. Google’s answer was rolling out .vp9 (later vp10) used as part of HTML5. Performance of the two codecs is very similar. Adoptions and usage will determine if there’s an eventual winner.
Switching between video formats
If you do transfer between formats, remember that re-compression causes degradation. If quality is of paramount importance, don’t delete the originals, archive them somewhere. Be sure to note that when moving between containers, data streams like subtitles and chapter data may be lost, if the new container doesn’t support them.
As viewing experiences and platforms evolve, video delivery will continue to evolve and change. You will see new codecs and containers that will deliver larger amounts of data more quickly and with additional data streams. There will never be a final format. Just keep your audience in mind and the type of video you want to deliver. There will always be some options that are superior to others. Good organizational skills and regular migrating to new formats will make sure that your video survives as technology changes.