Free Republic
Browse · Search
General/Chat
Topics · Post Article

Skip to comments.

Audio format guide: MP3, M4A, AAC, FLAC, and more
Android Authority ^ | 28 July 2022 | Zak Khan

Posted on 07/29/2022 11:03:20 AM PDT by ShadowAce

When the MP3 player took off in the late 1990s, the format itself entered the public consciousness in a way not many others have — with perhaps the Word document being an exception. But what is an audio format, anyway, and why should you care?

This guide will cover some of the most popular formats used by audio streaming services today and explain their differences.

What is an audio file format?

A chart depicting a sign wave and the corresponding PCM representation of that wave below it.

A digital audio file is how recorded content gets saved on a computer, media player, smartphone, or other device. Digital audio is, at its most basic level, a series of numbers that a device can use to recreate sound waves. There are various ways to accomplish this and then compress (or not) the resulting data. We know that by sampling a sound wave in the process from analog to digital conversion with at least 16-bits at 44.1kHz that we can perfectly reproduce the captured signal again later on. This is thanks to some math called the Nyquist-Shannon sampling theorem. We can achieve higher bitrates and frequency ranges, but whether anyone can hear a difference — even though the best headphones — is debatable at best.

If we just save that data as is (known as pulse code modulation or PCM), the file takes a large amount of space. That’s why both lossy and lossless forms of audio compression have been developed. Lossy audio throws out audio frequencies that our ears cannot hear while lossless preserves them all. Lossy audio formats can also use other tricks to compress audio even further, which we’ll cover a little later.

Because most people these days access their music via streaming services, compressed, lossy file formats are the predominant way content gets distributed. That’s fine if you’re casually listening, but some people demand the utmost in quality. As a result, an increasing number of high-quality and even lossless streaming options are now available. But there’s no getting around the fact that lossy formats take up less space and eat up less mobile data, as the chart below makes clear.

Stereo file sizes (16-bit 44.1kHZ)WAVAIFFFLAC (typical)MP3 (320Kbps)MP3 (192Kbps)
Stereo file sizes (16-bit 44.1kHZ)
1 min
WAV
10.6 MB
AIFF
10.6 MB
FLAC (typical)
6.4 MB
MP3 (320Kbps)
2.4 MB
MP3 (192Kbps)
1.4 MB
Stereo file sizes (16-bit 44.1kHZ)
4 mins
WAV
41.6 MB
AIFF
41.6 MB
FLAC (typical)
24.9 MB
MP3 (320Kbps)
9.6 MB
MP3 (192Kbps)
5.6 MB
Stereo file sizes (16-bit 44.1kHZ)
1 hour
WAV
635 MB
AIFF
635 MB
FLAC (typical)
381 MB
MP3 (320Kbps)
144 MB
MP3 (192Kbps)
84 MB

MP3

best mp3 player cover image

The MP3 audio file format once reigned supreme when it came to downloading music. In fact, the format is so synonymous with mobile music solutions that “MP3 player” is now generic for an audio playing device. However, these days it’s less prominent for a variety of reasons. It’s still hanging on, though. Understanding MP3 files can help us understand other formats more easily as well, so we’ll start here.

An MP3 file is a lossy audio file, meaning it discards data our ears cannot hear. Almost every human has a hearing range somewhere in the range of 2oHz to 20kHz. The upper limit actually decreases with age, but in general that’s the range within every noise you’ll ever hear lies. Because we know other frequencies are therefore superfluous, MP3 discards all frequencies outside this range.

In order to further save some space, MP3 files use even more tricks. Audio engineers use noise shaping algorithms based on psychoacoustic effects of the human ear and brain to remove parts of music that we shouldn’t be able to hear. For example, the brain can’t differentiate between two frequencies that are right next to each other. Furthermore, the adult human ear struggles to identify the direction of high frequency sounds. It also begins to lose sensitivity above 16kHz. Plus, loud sounds can mask quieter ones. All these can be removed with little to no noticeable difference to the end listener.

Basically, MP3 files remove frequencies we cannot hear and frequencies we could hear in isolation, but cannot because of the way they're combined in a particular song.

An MP3 splits up a track up into 576 sample frames, and Fast Fourier Transforms (FFT) are used to obtain frequency data from these frames. The frequency data is then analyzed to see if any opportunities exist to apply the compression rules based on human hearing as described above. If so, these portions are rounded down (quantized) to lower bitrates, which helps save space. Data regarding how to restore each frame to its full sound wave representation gets saved to a 32-bit header.

The bitrate determines the maximum allowed file size for each frame. The more aggressive the compression, the more likely the algorithm is to remove something that is audible. Furthermore, this type of filtering and cutting isn’t perfect and the quantization can leave behind artifacts that some people can hear. This lossy psychoacoustic compression is then followed up by a lossless Huffman coding compression that is similar to .zip file to save more space.

If that sounds too complicated, the takeaway is that MP3 files remove frequencies we cannot hear and ones we theoretically could hear in isolation, but cannot in a particular song due to auditory masking. This can lead to quite small file sizes. If it is done too aggressively or with a bitrate that is too low, though, quality can suffer. As a result, MP3 isn’t all too popular anymore for streaming.

AAC, M4A, and OGG Vorbis audio formats

A screenshot of the macOS Apple Music app.

Audio compression can take many forms, and other formats have been developed. These use slightly different algorithms and techniques to accomplish the task, so we can’t compare them based on bitrate alone.

OGG Vorbis is an open-source alternative to MP3. It still uses FFT and similar methods to analyze and quantize mask-able frequency information but employs a different algorithm. Vorbis also takes the noise floor into account to improve low bitrate performance. Spotify uses this format at 320kbps.

There’s also AAC, which is used by Apple Music, Tidal, Pandora, and YouTube Music. It’s an evolution of the MPEG (MP3) format and allows for higher sample rates up to 96kHz. Plus, it can dynamically switch frame lengths between 1024/960 or 128/120 samples for better resolution when required. It performs better at lower file sizes than MP3s, to boot.

Another file type you might encounter is the M4A file. These files are encoded using the AAC format, and then stored in an MPEG-4 container, hence the file extension .m4a. Apple created this type as a response to MP3. While not quite as universally supported, it isn’t rare by any means.

For these reasons, you can’t directly compare bitrates and claim a higher bitrate would be a better-sounding file between AAC and MP3, for instance. Lower bitrate AAC and M4A files can still sound good while taking up less space.

That makes formats like OGG Vorbis and AAC appealing for streaming services. They can deliver higher-quality sound while consuming less of your mobile data.

FLAC

Deezer Android app

If you don’t want to throw out any frequencies but still want a file that’s smaller than raw data, that’s where FLAC comes in. FLAC does not discard any part of a recording, and therefore it’s called lossless. Apple’s version of a lossless codec is called ALAC. Both of these codecs function rather like a .zip file. If you’ve ever zipped and then unzipped a collection of files, you’ll understand the basic idea. Nothing gets removed, the FLAC file just looks for ways to consolidate repeating patterns and data and those are then reconstructed upon playback.

Still, FLAC files will never be as small as MP3 or AAC files. But as bandwidth gets cheaper and more accessible, an increasing number of streaming services offer the ability to stream using FLAC. These are often “HD,” “Ultra HD,” or “HiFi” subscriptions. Amazon Music Unlimited, Tidal HiFi and HiFi Plus, Deezer Premium, and Qobuz all offer FLAC streaming.

Be aware that FLAC files are larger than lossy formats and can eat up a lot of your data. If you save them to a device, they’ll also start taking up storage space pretty quickly.

WAV and AIFF audio formats

Trimming Audio on Audacity 2

Audio recordings can be just pure PCM saved to a device, which is essentially what WAV (on Windows) and AIFF (on Mac) are. They represent some of the earliest forms of storing digital music. These files have no compression or anything else applied to them. In fact, you can find out their file size pretty easily with the following equation:

PCM Size = sample rate X (bits per sample /8) X time in seconds X number of channels

As a result, these formats can lead to incredibly large file sizes. That means they’re rather rare for streaming and downloading, although services like HDtracks do offer them. What these files are really useful for is in audio mixing and editing. Because no conversion, compression, or anything else has taken place, it’s easy and quick to edit tracks, save them, and then edit them again as required.



TOPICS: Computers/Internet
KEYWORDS: audio; computers; digital; mp3; music
Navigation: use the links below to view more comments.
first previous 1-2021-29 last
To: zeugma

“though I use a stupid bitrate”

Are you talking 128kbit mp3 ? Started with that in 1998. Almost everything I have heard is fine at that rate.


21 posted on 07/29/2022 1:48:01 PM PDT by George from New England
[ Post Reply | Private Reply | To 16 | View Replies]

To: ShadowAce

I am sure that you are shocked to hear that iPhones can’t use those small, convenient SD cards for internal storage.

I do have a memory stick that uses the lightning adapter but its not what I am looking for.

Searching thru Apple support docs seems to point in the direction of my using a DRM-less encoding solution.


Way back in the 80’s I worked on a piece of software that would play back MP3s on the TI 99/4a. Discovered that Forth and Assembler could certainly do the trick, if I was patient enough. I wasn’t.


22 posted on 07/29/2022 2:08:48 PM PDT by texas booster (Join FreeRepublic's Folding@Home team (Team # 36120) Cure Alzheimer's!)
[ Post Reply | Private Reply | To 19 | View Replies]

To: George from New England
Are you talking 128kbit mp3 ? Started with that in 1998. Almost everything I have heard is fine at that rate.

No. Most are @384 or so. Granted, when I'm on my motorcycle, or in my car, the higher bitrate doesn't matter much. You can hear the artifacts on the 128k files through the stereo at home though.

23 posted on 07/29/2022 3:05:08 PM PDT by zeugma (Stop deluding yourself that America is still a free country.)
[ Post Reply | Private Reply | To 21 | View Replies]

To: zeugma

So what I am saying is in 1998. My DJ company was one of the first to play mp3 files from a p.c. Had to use 128k at that time. Only really had a 8 gig drive to work with. Each song was like 4 to 5 meg.
So 24 years later, sound is still fine. The original encoders might have been better with 128k than the current ones. I remember the name Fraunhofer-Gesellschaft (c) 1996-1997.


24 posted on 07/29/2022 6:11:38 PM PDT by George from New England
[ Post Reply | Private Reply | To 23 | View Replies]

To: George from New England

Up til then we were playing the CD-R discs that we recorded ourselves. Those first CD-R discs don’t play anymore as they have come apart on the surface.


25 posted on 07/29/2022 6:13:11 PM PDT by George from New England
[ Post Reply | Private Reply | To 24 | View Replies]

To: texas booster

Look into Audacity software to convert the files into something you can use. It’s free open source software.

I’m using it to digitize all my albums (over 1000). Well made application.


26 posted on 07/29/2022 6:50:22 PM PDT by BraveMan
[ Post Reply | Private Reply | To 22 | View Replies]

To: TexasGator

“PCM is pulse-code modulation, not pulse-width modulation”

You are correct.


27 posted on 07/29/2022 7:04:54 PM PDT by cymbeline
[ Post Reply | Private Reply | To 14 | View Replies]

To: George from New England

“. Each song was like 4 to 5 meg.
So 24 years later, sound is still fine. The original encoders might have been better with 128k than the current ones. “

Your hearing is gone!

MP3 encoding is MUCH better now than in 1998.


28 posted on 07/29/2022 7:15:07 PM PDT by TexasGator (UF)
[ Post Reply | Private Reply | To 24 | View Replies]

To: ShadowAce

I work for a radio company and see the challenges involved in getting the best audio possible. Rarely do new releases come from CD. Most are d/l links from the labels or services like Play MPE or Promo Only. Legally we cannot use consumer download sites as those have personal use license vs a broadcast performance one.

The waveforms on nearly all files serviced have no dynamic range. The wav displays resemble two bricks. We generally drop these over 10db to get to -18/0 on a Dorrough meter. We always check the files in a spectrum analyzer and find many so called wav files are up converted from a lesser source.

It’s not the labels, but the producers and even artists. One major British act sent their label the wavs for a premiere, all rolled off in the same frequecy range as an Mp3. Throw in the digital codecs used stl to transmitter sites along with streaming codecs and you get can tell an mp3 source versus a true linear.

For older music we use cd but many time defaulted to the original releases due to the over processing of the remastered. It was more fun getting vinyl in the 70s at the stations.


29 posted on 07/29/2022 8:56:00 PM PDT by bleach (If I agreed with you, we would both be wrong.)
[ Post Reply | Private Reply | To 1 | View Replies]


Navigation: use the links below to view more comments.
first previous 1-2021-29 last

Disclaimer: Opinions posted on Free Republic are those of the individual posters and do not necessarily represent the opinion of Free Republic or its management. All materials posted herein are protected by copyright law and the exemption for fair use of copyrighted works.

Free Republic
Browse · Search
General/Chat
Topics · Post Article

FreeRepublic, LLC, PO BOX 9771, FRESNO, CA 93794
FreeRepublic.com is powered by software copyright 2000-2008 John Robinson