by Chris Woodford. Last updated: April 16, 2018.
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: The Apple iPod: one of the pocket MP3 players that put digital music on the map. Left: My old 20GB, 4th generation Apple iPod does little more than play music. I still can't quite believe that this tiny little box holds (at the last count) 3,717 tracks on 401 albums by 250 artists—and yet fits in my pocket. Right: My newer 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 information it captures each time (the higher the bit depth),
and more detail it captures each second (the higher the bit rate),
the more closely the digital file resembles the original analog sounds and the higher the quality of the recording.
Screenshot: Software for "ripping" (converting) CDs to make MP3s typically lets you choose from a variety of different "encoding" types, including MP3. You can usually change the bit rate as well for better or worse quality (and bigger or smaller files). This program, Asunder, lets you select a bit rate from 65kbps (low-quality) up to 245kbps (high quality). A five-minute CD track will convert into something like a 3MB MP3 file at 65kbps or a 10MB file at 245kbps.
A higher sampling rate, bit depth, and bit rate give a better quality MP3 file.
Typically, CD-quality sound involves sampling at a rate of 44.1kHz (44,100 times per second) and a bit depth of 16 (16 binary zeros and ones, so something like 0110110101001011). A really high quality MP3 "ripped" (generated from) a CD might be produced using a bit rate of 320kbps (320,000 bits per second), while a lower quality one might use 64kbps (64,000 bits per second) or even lower. The downside of higher sampling/bit rates and bit depth is that they produce more digital information that has to be stored—a bigger file size, in other words—and takes longer to download. (You can read a bit more about sampling in our article on analog and digital.)
What is compression?
One big advantage of digital technology is that you can store
more information in less space. If you've got some encyclopedias on
CD-ROMs or DVDs, you'll know that
computers are 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.
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. In the example shown here, 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).
Photo: Lossy compression in action. With 10% compression, the original file takes up 10,000 bytes. Increasing the compression dramatically reduces the byte size (50% = 4000 bytes, 90% = 2500 bytes, and 95% = 1900 bytes), but with increasing loss of quality.
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 bits (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
10–12 times as much room as the same track converted into MP3 format
(depending on the bit rate).
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.
Photo: Right: Takk by Sigur Ros.
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!
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?
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. The lack of hard drive and tiny screen also gives amazing battery life; a standard alkaline battery will power this little player for about a month of heavy use!
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!
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
Gadget Hacks video.
Alternatives to MP3
Just like "iPod," "MP3" became a generic name for digital music players—but just because you
have an MP3 player (or an iPod, for that matter), it doesn't mean you have to play MP3 files on it.
There are numerous other forms of encoding digital music (representing music in digitally coded form)
and most MP3 players will play quite a few different ones.
iPods, for example, will happily play MP3s, but iTunes will
generally sell you files with a suffix M4A.
What's the difference? M4A files are compressed with a newer
and more efficient algorithm (mathematical method) than MP3s,
which gives files of similar size but higher quality.
Other players can handle WAV and AIFF (large uncompressed files for Windows and Mac, respectively), OGG Vorbis (a type of open-source, lossy compression specifically developed as a free alternative to MP3), and FLAC (a form of lossless compression used by, among others, Neil Young's Pono service).
Some digital music sites offer a choice of download formats, which are priced
differently to reflect the difference in sound quality.
So, for example, you might find the same album available
at one price for compressed, passable quality MP3, and a slightly higher
price for either uncompressed WAV or losslessly compressed FLAC.
Alternatives to iPods
Although I've talked a lot about iPods in this article, don't assume that the two are synonymous: you can play an
MP3 file on almost anything, from a desktop computer to some ebook readers. In other words, just because you want
to listen to digital music, it doesn't follow that you have to get an iPod. Virtually every modern smartphone
has a built-in music player that can handle MP3 and similar formats, though you will probably need to add a
32GB or 64GB SD card to give yourself enough memory to hold an entire music library. When my iPod Touch died after a surprisingly short life, I decided I'd had enough of Apple technology and, instead of replacing it with a newer model,
simply bought myself an Android phone. I can buy MP3s from all kinds of online stores, some of which will store
MP3s straight onto my phone. Alternatively, I can buy MP3 albums on my computer and copy them across with a USB
lead—just like I used to do with my iPods.
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...