Almost everyone is familiar with the most commonly used file formats – for music, mp3 and wmv, for video, avi and mpeg, and for images, jpeg and gif. Unfortunately, these common formats are not the only ones we run into on a daily basis. On any given day, we are likely to also see .flv on Youtube or .pdf while opening documents.
It seems as though there is an unending list of file formats that accomplish the same task – saving a bunch of data. What is the purpose of the existence of these seperate formats, and why do they extend the list of available formats to “Save As…“? Is there any real difference between which extension a particular file is saved as, as long as it’s appropriate for the media being saved? Why, why, why do they plague me with their endless resistance to conversion?
The list of questions could go on, pretty much for the length of this article, but I believe I should provide some answers, since the questions are probably what led you here in the first place. So here goes nothing – a guide to the inner workings of the common, but still unusual file formats.
- File Format: a specific way to encode data that is to be saved as a file. Please note that the file format does no encoding on its own – the encoding is left up to the codecs.
Codec: a program/algorithm that encodes/decodes data to convert a file between different formats. The popular media codecs are generally for shrinking file size. Laurence did a post on codecs last year.
Lossy Codec: refers to a codec that sacrifices file quality for the sake of compression.
Lossless Codec: does not destroy any data, regardless of whether or not the data is necessary for the file’s integrity.
Metadata: information about the file that is stored within the file itself – for example, when a picture was taken and what type of camera it was taken with, or the artist of an audio track. Karl has done a post on how to remove metadata from photos.
Container: a file format that concerns itself more with how data is stored, and not necessarily coded.
Bitrate: the number of bits processed per second. To put things into perspective, mp3′s generally have a bitrate of 128 kbit/s, while CD’s generally have bitrates of around 1.4 Mbit/s.
VBR/CBR: the difference between variable bitrate and constant bit rate is just that – VBR uses a higher bitrate to encode (and thus, allocates more space to) more complex parts of the audio file.
Audio File Formats Explained
.aiff /.wav – These are both uncompressed, lossless formats, which means it takes about 10MB to save a minute’s worth of music. aiff was developed for Apple’s OSX, and wav for PCs, although both formats are compatible with both operating systems.
Wav is the format preferred by PC wielding audiophiles; mac users generally rip CD’s into the aiff file format. There are codecs like FLAC and WavPack that will compress .aiff and .wav files, although the resulting file will still be huge compared to the ubiquitous mp3 format. Simple Help has a great tutorial about playing .flac files in iTunes here; it is for Mac OSX users only.
.aac – Apple’s default audio format, AAC is a lossy compression scheme that was developed to replace mp3, but never achieved the prominence that mp3 has with listeners. Some argue that AAC produces the same quality audio at 96 kbits/s as a mp3 does at 128 kbit/s, but with the recent developments in mp3 codecs (particularly LAME), mp3s have performed far better in listening tests against AAC than in previous years. Nevertheless, when it comes to a sound quality to file size ratio, AAC beats MP3.
.ogg – Vorbis, which is the name of Ogg’s audio format, is an open source lossy compression format that is favored by developers of free software for its patent-free nature. Despite its claims of being able to produce better sounding music at smaller file sizes, Vorbis is not widely used because of its slow encoding time and the lack of native support from popular music players such as iTunes and Winamp.
However, many video game makers and programmers have begun using Vorbis because it is open source, and thus does not demand licensing fees like mp3 and aac do. If you are interested in testing the sound quality of Vorbis yourself, try the aoTuV modification of Vorbis and install the XiphQT plugin for iTunes.
If you’re willing to sacrifice the storage space, and have ears sensitive enough to tell the difference between a CD and a ripped track, go with .wav or .aiff. Otherwise, .aac and .mp3 encoded at bitrates above 256 kbit/s are indistinguishable from CDs for the average person.
Vorbis performs the best at low bitrates around 64 kbit/s, whereas the LAME encoder for MP3 performs better at higher bitrates. Regarding VBR and CBR, the general rule of thumb is that VBR will produce better sound quality at a lower file size than CBR can.
Ultimately, it is up to your own ear to determine which codec to use, and which format is best for you. Perhaps you’d like to perform your own listening test, to determine how picky your ear is. If so, try WinABX, which is a program that performs double blind listening tests. When you finally decide which format and bitrate is optimal for you, get yourself a codec pack, and convert your music with the multitude of audio converters that are out there.
Not to ignite a flame war, but which format/codec/bitrate do you use? Do you think AAC or Vorbis will ever gain the type of popularity that MP3 has right now? Leave your opinion in the comments, and stay tuned for Part 2: Video!
More articles about: