Electronic Devices: How Mp3 Files Work

Explains MP3 compression, and why it is used for audio files.

MP3s, for good or for ill, have become a pervasive aspect of the computer and internet culture across the world. What is so special about this file format that allowed it to have such a profound impact on our culture and the way people listen to music all over the globe, and how does it work?

The key to the success of MP3 files can be summed up in a word: compression. They became so widespread and prevalent because they are so much smaller in file size than any other computer audio format at the time they were introduced.

Music CDs store audio information in a high-quality, uncompressed format. Every second of each song on the CD is sampled over 40,000 times for each speaker, with each sample being 2 bytes long. Essentially what this means is that each second of a song on a CD is a bit less than 180 kilobytes long, and so a song that is 4 minutes long would be nearly 43 megabytes in size. When all that was available was dialup internet, swapping songs of this size was incredibly inconvenient. Therefore, dedicated fans of music created a compression algorithm, similar in concept to what is used to compress images into JPEG format.



This compression technique uses knowledge of what the human ear can and cannot hear to remove excess data in the file. The compression program only removes those sounds which are not needed to maintain sound quality. For example, if a particularly loud sound is being played in one channel, it will drown out all the other sounds that may be going on at the same time, those weaker sounds are therefore not stored in the compressed MP3 file. Furthermore, some sounds that cannot be heard by the human ear at all are completely removed. The end result is not a song of perfect CD quality, of course, but in recent years the creation of MP3 files has advanced to where they can be compressed to a point so near to CD sound quality that it is nearly impossible to tell the difference. Granted, these higher-quality files are larger in file size, though that is less a detriment as it once was. To compare, a common compression rate for MP3s is 128kbs - that is to say, each second of the song contains 128 kilobits of data. Uncompressed, each second consists of 1.4 million bits of song information.

Once the process of compressing audio into MP3 files was developed, MP3 software followed swiftly behind it. Without the software, the MP3 files would be useless, so it is good to know what they do. These players open an audio file and read it in real time, sending out audio through the computer's sound card, based on the instructions that are stored in the MP3 file. The software reads MP3s in much the same way CD players read the audio data on CDs and play it back, allowing the user to skip forward to a particular second in a song at any time with great ease.

© High Speed Ventures 2011