Mp3 encoding how does it work




















In , a standard for audio and video encoding was devised known as MPEG Layers represent a family of coding algorithms. Layer 1 has the lowest complexity compared to the other layers.

Layer 2 requires a more complex encoder and decoder and is directed more towards different applications. Sadly, it also sums up most of the explanations out there. I bought an album online recently and it was delivered as a kbps file. I only noticed because the file size itself was much smaller than the uncompressed wave files I've created myself. What I didn't notice was any drop in quality.

Can you explain how this mp3 compression works, because obviously the compression algorithm is leaving out some data to make this happen, right? Mason, that's a great question. I can answer this plainly only thanks to having spent a lot of time worrying about how to distribute my own music across the internet, and of course after refreshing myself. It's been a good 15 years since I spent time thinking heavily on the topic. Nobody cared about this stuff when we were working in the analog field.

We had vinyl records, 8-tracks, cassette tapes, and compact discs these are digital but didn't need compression. MP3's became a "thing" after the explosion of the internet. A typical uncompressed wave file might be as big as 30 MB for a typical 3 minute song. But after being run through the MP3 compression algorithms that might drop down to 3 MB without any serious loss of quality.

This was preferable when our bandwidth speeds were extremely low on dial-up modems and we might of even had bandwidth caps for the month. Instead of waiting days to download a song, we could do it in a couple hours and in the present, a couple of seconds!

MP3's are maintaining their presence due to MP3 players like the iPod. They have limited hard drive or flash drive space, so with compression we can carry around a lot more music. Plus there's no need for full resolution files when we're doing yard work or at the gym using tiny sports earphones.

It's also a huge space and bandwidth saver for online streaming services. In fact, MP3's are just the 3rd layer set apart for audio on the video files.

It's all the same technology. Here's where it gets crazy. The people who designed these compression algorithms used our knowledge of psychoacoustics to manage the data bandwidth. Unlike other movements -- for example, the introduction of the cassette tape or the CD -- the MP3 movement started not with the industry itself but with a huge audience of music lovers on the Internet. The MP3 format for digital music has had, and will continue to have, a huge impact on how people collect, listen to and distribute music.

Not everyone is happy with the rise in popularity of the MP3 format. Some audio enthusiasts say that most MP3 files can't compare to a CD or vinyl album version of the same song. Others go so far as to claim that the way sound engineers mix music is changing because of MP3s, and not necessarily in a good way. If you have ever wondered how MP3 files work, or if you have heard about MP3 files and wondered how to use them yourself, then this article is for you!

In this article, you will learn about the MP3 file format and how you can start downloading, listening to and saving MP3 files onto CDs! A CD stores a song as digital information.

The data on a CD uses an uncompressed, high-resolution format. Here's what happens when a CD is created:. Let's break that down: 1. If an average song is three minutes long, then the average song on a CD consumes about 32 million bytes or 32 megabytes of space. Even with a high-speed cable or DSL modem, it can take several minutes to download just one song.

Over a 56K dial-up modem , it would take close to two hours. The MP3 format is a compression system for music. The goal of using MP3 is to compress a CD-quality song by a factor of 10 to 14 without noticeably affecting the CD-quality sound. This lets you download a song much more quickly, and store hundreds of songs on your computer's hard disk.

Is it possible to compress a song without hurting its quality? We use compression algorithms for images all the time. For example, a. So is a. We create. So we're familiar with compression algorithms for images and words and we know they work. To make a good compression algorithm for sound, a technique called perceptual noise shaping is used. It's "perceptual" partly because the MP3 format uses characteristics of the human ear to design the compression algorithm.

For example:. Using facts like these, certain parts of a song can be eliminated without significantly hurting the quality of the song for the listener. Compressing the rest of the song with well-known compression techniques shrinks the song considerably -- by a factor of 10 at least.

When you're done creating an MP3 file, what you have is a " near-CD-quality " song. The MP3 version of the song does not sound exactly the same as the original CD song because some of it has been removed.

Not all MP3 files are equal. Let's take a look at the different ends of the MP3 spectrum in the next section. The MP3 compression format creates files that don't sound exactly like the original recording -- it's a lossy format. In order to decrease the size of the file significantly, MP3 encoders have to lose audio information. Lossless compression formats don't sacrifice any audio information. But that also means that lossless compression files are larger than their lossy counterparts.

You can choose how much information an MP3 file will retain or lose during the encoding and compression process. It's possible to create two different MP3 files with different sound quality and file sizes from the same source of data. The key is the bit rate -- the number of bits per second encoded in the MP3 file.

Most MP3 encoding software allows the user to select the bit rate when converting files into the MP3 format. The lower the bit rate, the more information the encoder will discard when compressing the file. Bit rates range from 96 to kilobits per second Kbps. There are several psychoacoustic models used. For example, masking can occur as louder sounds end up being much more prevalent than quieter ones.

Our ears tend to do this anyway, which is why MP3 often gets away with it if you aren't carefully listening. Frames with transients are set to the lowest number of samples, and frames without them can be over a thousand samples. Less precision where it isn't needed. As far as which frequencies are thrown out, yes a wide bandpass filter is applied to the sound before encoding. Beyond that, the higher the bitrate generally, the better the frequency response.

That's why the bass looks so high, but you can definitely see the high-end falloff. The artifact in MP3 that bugs my ears the most is pre-echo, or transient smear. Basically, since the sample chunk is at its lowest, the sound of attacks on cymbals and such is all sorts of messed up.

Even at kbit, the smallest frame is samples. To me, it's what really makes the difference between the original and the encoded version. Most of the rest of the encoding loss, I can live with, at least at the higher bit rates. Also, many MP3 files are encoded in joint stereo. In this mode, most of the bands are in mono, and a handful are left for the left and right channels, where necessary. There are two ways this is done I hope this is helpful.

Please ask more questions if anything is unclear.



0コメント

  • 1000 / 1000