by Chris Woodford. Last updated: April 28, 2015.
Technology can be absolutely astounding!
MP3 players, such as iPods,
are a great example. Smaller than a pack of cards and only a little
heavier, they can store thousands of music tracks, photos, or videos so
you can take them with you wherever you go. A typical 20GB (gigabyte)
iPod has enough memory to store about 500 CDs—rather more than you can
fit in your pocket! So what exactly is "MP3" and how does it work?
Photo: My two Apple iPods: Quite possibly the best things I have ever bought in my
life. Left: My old 20GB, 4th generation Apple iPod does little more than play music. I still can't quite believe that this tiny little beauty holds (at the last count) 3,717 tracks on 401 albums by 250 artists—and yet fits in my pocket! Right: My new iPod Touch is
thinner and lighter, partly because it uses flash chips instead of a hard drive,
and its 32GB memory can store correspondingly more music. With built-in web browsing, email, and apps, it's a powerful pocket computer.
What is MP3 technology?
An MP3 player gets it name from the MP3 files that you store on it.
Just as DOC is a type of computer
file used by the Microsoft Word
word-processing program, and PDF is another type of file for storing
printable documents, so MP3 is a particular file type used for storing music.
Think of MP3s as computer files and an MP3 player as a
special type of computer, dedicated to playing back sounds
stored in coded format inside those files, and you're
halfway to understanding how it all works.
MP3 is an example of digital technology, which means
sounds you hear are stored in numerical form. CDs are digital too, but older music formats (including LP records and cassette tapes) used analog technology. That means music was stored as a physical or magnetic
representation of the original sound, without using any numbers at all. A sound twice as loud as normal might have been
stored by a groove on a plastic record that was twice as deep as normal, so the stored information was
a faithful "analog" of the original sound.
The key to storing music (or any other kind of sound) in digital format is a process called
sampling—and it's a kind of "music by numbers." When you were
younger, you might have learned to play a simplified piano, xylophone, or other musical
instrument with numbers stuck to the keys or bells. Instead of reading a musical score, you would have simply read
a list of numbers and pressed the corresponding key or bell to generate each note in turn.
(Jingle Bells, for example, looks a bit like this written in digital form: 3 3 3—3 3 3—3 5 1 2 3.)
MP3s and CDs work in a similar way. At the time of recording, a computer "listens" to the music track that's
being recorded and "samples" the volumes and frequencies of the sounds: about 44,000 times each second,
it analyzes all the sounds it can hear and converts them into a number. This process is carried out by an electronic circuit called an analog to digital converter, which turns sounds (analog) into streams of numbers (digital), which are then stored in sequence in an MP3 file or on a CD. When the file or CD is played back later, the reverse process happens: a digital to analog converter turns the numbers back into analog electrical signals that become sounds when they're fed into a loudspeaker.
The faster the computer samples (the higher the sampling rate, the more closely the digital file resembles the original sounds and the higher the quality of the recording. That's why higher sampling rates give better quality MP3 files.
The downside of a higher sampling rate is that it produces more digital information that has to be stored—a bigger file size,
in other words. (You can read a bit more about sampling in our article on analog and digital.)
Advantages of digital technology
What's so good about digital technology? One big advantage is that you can store
more information in less space. If you've got some
CD-ROMs or DVDs, you'll know that
particularly good at cramming large amounts of information into pretty
tiny spaces. The Encyclopedia Britannica,
whose 20-odd volumes
fill a whole shelf in your local public library, fits comfortably onto
a couple of CDs or a single DVD. Tricks like this are possible because
computers use a technique called compression—a way of squeezing
information so it takes up much less room.
What is compression?
Compression is the secret behind all kinds of digital technologies,
including digital photos, music
downloading, and a whole lot more, so
it's worth going into in a bit more detail before we get back to MP3
Old-style telegrams are a good example of compression in action.
Before telephones were invented, people
sent short messages to one
another over telegraph wires. The telegraphs were busy and costly, so
messages had to be kept short and people compressed their messages into
as few words as possible. A message like: "I think I might pay you a
visit later this week. I do hope that's alright. Maybe you could reply
and let me know if it's convenient?" was compressed into a telegram
like: "Visiting later in week. Hope OK. Let me know." Thus, the 27
words of the original message become 9 words in the telegram.
The message is still completely understandable, if a little more
terse. We can compress the original message because a lot of the
information is "redundant": some of the words are unnecessary and don't
really add all that much, so we don't lose the sense of the message
when we delete them. We could compress the message even further, but if
we take out more words, it'll soon stop making sense. In other words, the
more we compress a piece of information, the more we reduce its
quality. Even with a small amount of compression, some information has been lost: the telegram is
less polite than the original message. And there's no way the receiver
can take the 9-word message and figure out what were the other 18 words
we deleted, so telegrams are an example of what we call lossy
compression: the information we delete during compression is gone for
If you have a digital camera, you
probably know about compression
already. Your camera most likely stores photos in a format called JPG
(pronounced and sometimes written J-PEG). On most cameras, you can set
options so the photos are taken with higher or lower resolution (which
just means more or less detail). The higher the resolution, the greater
the detail, and the better the photos look—but the more space they take
up. Since your camera has a limited memory, you can opt to store lots
of low-quality, low-resolution (low-res) images or fewer
higher-quality, high-resolution (hi-res) images. The low-res images are
compressed more than the high-res ones and the JPG files are
correspondingly smaller. However, if you compress photos too much, you
start to lose the details very quickly. Underneath, I've
compressed a photo of an iPod at different resolutions to show you how
the details are rapidly lost (but note how many bytes of disk space is saved at
the same time).
There's no way of taking one of the low-res photos and
going back to the hi-res original: once the information is lost, it's gone
for good. That means JPG is also a lossy compression.
But note how much we can compress the original photo and still
recognize what it is. Even with 95% compression, we can still make out
that this is a photo of an iPod. With 50% compression, we hardly lose
any detail at all.
How is music stored inside an MP3 file?
Normal sound files stored on a computer take up huge amounts of
space. Consider: you can fit the Encyclopedia
Britannica onto a
couple of CDs, but one CD will normally hold only about an hour's worth
(maybe a dozen or so tracks) of music. That means each track on a
normal CD must be taking up a huge amount of space—equivalent to one or
two volumes of an encyclopedia! MP3 is a mathematical trick for taking
the same musical information and squeezing it into about one twelfth as
much space. You can make MP3 files that are smaller or larger by
compressing them by different amounts, but the more you compress them
the worse they'll sound. Just like telegrams and JPGs, MP3 is a lossy
Inside an MP3 file, music is stored as long strings of binary
numbers (zeros and ones) in a series of chunks called frames. Each
frame starts with a short header (a kind of table of contents),
followed by the music data itself. At the start of an MP3 file there is
a kind of "index card" that stores details of the track name, artist,
genre, and so on. This information is called metadata and each part of
it (artist, track, and so on) is stored in what's called an ID3 tag.
Many MP3 programs have an option that lets you "edit the ID3 tags." It
sounds technical and complex, but it's simply a way to change the
"index card" at the front of the MP3 file.
Artwork: A CD track takes up about 12 times as much room as the
same track converted into MP3 format.
The great thing about an MP3 file is that it takes up so little
room. A typical music track takes up only about five megabytes or so
when you turn it into MP3 form, compared to the 60 megabytes or so it
would take up on a CD. That means you can send an MP3 file over the
Internet twelve times more quickly and cheaply than the same
information stored in CD format. You can also store an awful lot more
MP3 files on your music player. The relatively small size of MP3 files
and the speed with which they can be downloaded has revolutionized the
music business since the mid-1990s.
Why CDs always sound better than MP3s
Why go to a store to buy a CD when you can download the track you want from the Net in a couple of minutes?
I've made compression sound like a brilliant thing—and it is—but there's
another side to the argument. There is a very good reason why you might want to pause before "ripping" your
CDs (converting them digitally) to MP3s and tossing them into the nearest trash can.
Let's take a look at a typical CD and its MP3 equivalent.
The superb album Takk, by the Icelandic band Sigur Ros, has 11 tracks and on the
CD the audio files range in size from 19.7MB to 105.1MB, taking up approximately 660MB
altogether. But look at those files in iTunes, Amarok, or another MP3 library
and you'll find they're compressed by about 90 percent: they go from just 1.8MB to 9.9MB.
Remember that MP3 is lossy compression: most of the audio information has been thrown away to
create the MP3s and you can never get it back!
Photo: Right: Takk by Sigur Ros.
Now most of the time, that doesn't matter. MP3s sound just fine. If you're listening to music on the train
or casually at home, an iPod sounds terrific. But listen to the same album
with even a moderately good CD player and a good pair of audio headphones and it will sound
stunningly better. Your ears really will notice the
extra 90 percent!
Here's a test I did recently. I tried listening to Takk with a cheap CD player
(rough cost $50) and a superb pair of headphones (roughly $100) and comparing it with my iPod (roughly $250).
There's absolutely no comparison in the quality of the sound: the CD player sounds infinitely better because
you hear so many more details—partly, I admit, because these headphones are so much better.
Try it yourself! I'd still rather have the iPod most of the time, but there
are times when I really want to hear a quality of sound, not just a quantity.
Of course, listening to an iPod with superb headphones also greatly improves the sound
quality—but, no matter how good your headphones, an MP3 player will never sound quite
as good as a CD player because of lossy compression.
How does an MP3 player work?
If MP3s are computer files, it follows that MP3 players must be
computers. It's absolutely true! The iPod in your pocket is a far more
powerful computer than the ones people had on their desks 20 years ago.
All computers, which are machines that process information (data),
have four basic components. They have an input device (for getting the
data in), a memory (for storing data), a processor (for working on the
data), and an output device (for getting the data back out again).
Think of an iPod or MP3 player and you'll see that it has all these
things. It has an input (probably a USB docking lead that hooks it up
to your computer), a memory (either a small hard drive or a
flash memory that
can store MP3 files), a processor (something that can read the MP3
files and turn them back into music), and an output (a socket where you
plug in your headphones). Most MP3 players have another output also: a
little LCD display that tells you what's playing.
Switch on your iPod to play your favorite track and it works just
like a computer. The processor chip loads an MP3 file, reads the ID3
index cards, and displays the artist and track name on the display.
Next, it works its way through the MP3 file reading each frame in turn.
It reads the header, followed by the data, and turns the digital
information (the binary ones and zeros) back into sound frequencies
that your ears and your brain decode as music. That's pretty much all
there is to it. But remember this: the real secret of a digital music
player is not the plastic gadget in your hand but the clever technology
behind the MP3 files it's playing!
Photo: A Sony Network Walkman MP3 player uses flash memory to store
songs instead of a hard drive, so it's much smaller and lighter than a traditional iPod. This is quite an old model with a 512MB memory, so
it can store only about 8-10 CDs worth of music. That may not sound much compared to an iPod, but it's just right for keeping in
your pocket or bag for those long, tedious journeys.
What's inside an iPod?
I don't recommend you take your iPod apart—you could easily damage it
or invalidate the warranty.
But if, like me, you have to replace a dying battery (a fairly simple
job if you go slowly and carefully),
you get a chance to see what's inside!
About half the space is taken up by a very thin hard drive (2),
which is about the same size as your iPod but only half as thick.
Underneath the hard-drive there's a lithium-ion rechargeable
battery (11) and a motherboard (main circuit board) packed with chips that control all the components (9). Beneath the
circuit board there's the scroll wheel (the iPod's equivalent of a
mouse) and the LCD display.
The circuit board is connected to the hard-drive by a flexible brown
plastic "ribbon" connector. There's a smaller ribbon connector
linking the circuit board to the docking connector (where you connect
your iPod to your computer).
Here's a full list of all the bits:
- Hard drive shock absorbers (blue). These little bits of rubber clip on to the sides of the hard drive and cushion blows
if you drop it.
- Hard drive. It's a standard, off-the-shelf PCMCIA drive. This one is a 20GB model made by Toshiba.
- Ribbon cable connector from the headphone socket and the "hold" button to the motherboard.
- Headphone socket.
- Clear perspex screen protector.
- Bottom of touch-wheel.
- Ribbon cable connector from touch-wheel to motherboard.
- LCD display screen (looking from the top). Like all the other components, this also connects to the
motherboard with a ribbon cable.
- Motherboard: The iPod's main circuit board contains its sound-processor and memory chips.
- Ribbon cable connector from motherboard to hard-drive. I've unplugged the hard-drive to take the photo, but this is
where it normally plugs in.
- Lithium-ion battery. This plugs into the bottom of the motherboard with a simple, standard, three-pin connector.
- Dock connector. This is where you plug your iPod in to charge it and synchronize it with your computer.
If your iPod is broken, and you're ready to consign it to the trash, it's worth knowing that all the main components are modular and all of them can be replaced if you're reasonably confident with electronics and you go slowly, carefully, and gently. If you know what you're doing, it
takes about a minute to replace a battery or a hard drive, five minutes to replace a broken screen, and maybe ten minutes to completely
replace the motherboard. You can easily find replacement iPod spares on auction sites such as eBay. The most difficult thing is removing the various ribbon connectors without breaking them (you can find out how do do that on many online
sites, including this WonderHowTo video.
Find out more
On this website
On other sites
- MP3 from Wikipedia: Quite a detailed technical introduction, but contains a
good diagram of the structure of an MP3 file.
- The Anatomy of an MP3 file by Scot Hacker. An extract from Scot's book about MP3 (see below), which explains how an MP3 file is structured internally into a header and frames. (Archived link via the Wayback Machine.)
- A Guide to the MP3 Conversion Process: This h2g2 guide explains sampling frequency, bit rate, and other key concepts.
- MP3: The Definitive Guide by Scot Hacker. O'Reilly, 2003. Great technical introduction to the basic technology of storing sounds in MP3 files.
- Understanding MP3 by Martin Ruckert. Birkhäuser, 2005. A fairly technical guide to how sounds are encoded in MP3s. A bit too complex for general readers.
Please do NOT copy our articles onto blogs and other websites
iPod is a trademark of Apple, Inc. registered in the U.S. and other countries.
More to explore on our website...