7

A .wav file created from a .mp3 file has the same frequency domain plot as the mp3 file itself.

However, the .wav file created from .mp3 file has larger file size. According the post https://stackoverflow.com/questions/15593806/why-is-a-wav-file-created-from-a-mp3-file-much-larger-in-size, this is because wav file is storing much more data than the mp3 file is.

Now, is there any difference in the quality between the .wav file and .mp3 file?

Does the quality of .wav file sound better since it has more data stored?

New contributor
Cyan is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
  • 5
    Does the converter magically create extra quality? – Mast Dec 3 at 14:08
  • 3
    Draw a circle using 100 dots, then connect the lines. Now draw the same circle, but using 10000 dots. It's still the same circle. Now you know why the file is bigger, and that you don't gain any quality. – MechMK1 Dec 4 at 7:19
  • @MechMK1 In your example, it's only the same APPROXIMATION of a circle, if you draw the additional dots on the interconnecting lines. If you draw those dots actually in a circle, you have the equivalent of a new recording from original sound. – Marcel Dec 4 at 9:49
  • @Marcel An example exists to illustrate the point, not to be a perfect 1:1 mapping of events. – MechMK1 Dec 4 at 9:50
  • @MechMK But your example doesn't illustrate the point, for the reason Marcel gave. – Lightness Races with Monica Dec 4 at 11:39
22

A WAV file has the potential to hold "more" or "better" data than an mp3. WAVs employ no compression, no loss; they are as close to an exact replica as it is possible to get.

An mp3 employs lossy compression to achieve the smaller data size.
Lossy compression means that information is actually just thrown away if the algorithm decides no-one would be able to hear the difference… it's a guess - a good enough guess for most consumer uses, but still throws away some data.

If you decompress an mp3 you cannot recover the information that has been discarded - so your WAV file from that mp3 is now an exact copy of the unpacked mp3, including [or should I say excluding] the missing bits.
In effect, all it is now is… bigger.

  • Yea @Tetsujin. If so, what is the purpose of mp3 decoder since nowadays many devices do support mp3 format? – Cyan Dec 2 at 9:17
  • same as having a WAV decoder… you gotta have something to turn all that data into audio. You can't really edit mp3 because to change any aspect you have to unpack it & repack it, causing more loss each time. If you convert to WAV, at least you've limited your loss to that first conversion. – Tetsujin Dec 2 at 9:18
  • 5
    @Cyan an mp3 decoder is the thing that lets a device support mp3 format. – hobbs Dec 2 at 16:14
  • It might be more accurate to say lossy compression tries to throw away as much data as possible (or up to a certain amount) while having the smallest effect on what humans can notice or will be bothered by. I wouldn't say it guesses (any given compression may be based on a lot of science) and the creator of the algorithm, tool or file may have decided it's worth throwing some data away despite knowing very well (some?) people will hear the difference, because they decided the smaller file size (or simplicity, speed or something else) is more important. – NotThatGuy Dec 3 at 2:08
  • @Tetsujin It would be good to clarify that you mean PCM, not strictly a WAV file. While WAV and PCM are most commonly used with each other, WAV files can contain streams done with other codecs (including MP3!). – Brad Dec 3 at 21:22
6

No. When you convert a file from .mp3 to .wav, no new information is added: there is no way to regenerate the information that was lost when you created the mp3. All the extra data in the .wav file is redundant.

  • I see. If so, what is the purpose of mp3 decoder since nowadays many devices do support mp3 format? – Cyan Dec 2 at 9:13
  • An mp3 decoder can be used e.g. to edit an mp3 file in an audio editor. You can use them to build your own mp3 player. etc. – Hobbes Dec 2 at 9:17
4

MP3 is the 'colloquial' name for "MPEG 1 Layer 3" audio encoding. The purpose of mp3 encoding is to reduce the overall size of an audio data stream whilst maintaining an acceptable level of listening quality.

It is implemented using a "codec", meaning that you need an "Encoding" function and a "Decoding" function in order to listen to the audio. The Encoding device might be hardware or software and the decoding function the same - it might be software or a hardware device.

The entire implementation methodology of mp3 is as a 'lossy' encoding format. "lossy" means that the encoder will remove audio data that it determines is not necessary for that "acceptable quality" level to be maintained. The emphasis here is on "lossy". You lose data when encoding to mp3.

When you decode from mp3 back to a PCM format (such as WAV), that data is gone. It is never coming back.

mp3 can be encoded to a chosen bitrate. The higher the bitrate, the better the overall quality. Also, different types of music behave differently under mp3. Rock music or EDM can be encoded to low bitrates with subjectively lower quality loss than classical music. The waveform generated by a strings instrument is of such complexity that it is very hard to encode with mp3 without significant loss of quality, therefore classical music requires higher bitrates in order to encode the audio without significant quality loss.

Note again that once encoded into mp3 format, the original waveform will change. It may retain a resemblance to the original frequency spectrum and the original waveform, but it is not the same. Again, once you encode, you lose data and you're not getting that data back, unless you go back to the original PCM WAV.

Data storage is cheap these days and the only reason you would use mp3 is for a particular device support.

There are much better codecs out there now since mp3 was developed. Opus is arguably the best overall codec followed closely by AAC variants.

3

In order to make sound, your computer must drive the speaker with a time-varying voltage. In order to create the time-varying voltage, the computer must send a sequence of numbers to a Digital-to-Analog Converter (DAC).

The simplest .wav file just contains a sequence of numbers that are ready to send to the DAC.

An .mp3 file is a much more sophisticated thing--a mathematical model of a sound, that takes into account the physiology of human hearing. In order to play an .mp3, it must first be "decoded" (i.e., converted into a sequence of numbers to be sent to the DAC.) That is exactly the same sequence of numbers that you would store into the .wav file if, instead of playing the .mp3, you wanted to convert it to .wav format.

So, it's impossible that the sound in a .wav file that was created from an .mp3 is being different in any way from the sound in the .mp3 from which it was created. Playing either one will result in exactly the same sequence of numbers being sent to the DAC, the same time-varying voltage sent to the speaker, the same sound out of the speaker.


P.S., It's a whole different question if you turn it around and create an .mp3 file from an original .wav recording.

New contributor
Solomon Slow is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
  • Is this actually true? I can imagine that a better decoder could understand more of how huma hearing works and based on that understanding interpret the model stored in the mp3 file with more precision and hence produce a "better sounding" wav file. The more information can come from the decoder instead of the mp3 file. – user230910 Dec 4 at 2:03
  • 1
    @user230910, I'm trying to stick to the spirit of the OP's question. I'm guessing that the OP heard somewhere that ".wav files are better quality than .mp3" meaning, of course, those .wav files containing audio that never was "compressed" into .mp3 form. I'm just trying to show why "uncompressing" an .mp3 to yield a .wav file will not bring back information that was lost when the signal was encoded in .mp3 form. – Solomon Slow Dec 4 at 3:31
  • Fair enough! The way you worded it just lead to a whole sequence of thoughts in my head, and I wanted a second opinion :) It is true that lost information of the original WAV could never be recovered, but I think that various "guesses" could have more or less success at resurrecting plausible approximations of it – user230910 Dec 4 at 3:45
1

You cannot get detail from nothing

Even though WAV files can hold more detailed sound, that doesn't mean they always do. Converting from MP3 to WAV would be one such scenario, the converter cannot just make up the extra added details to add to the WAV files. It can only remove existing details when compressing.

Convert a decent audio file to 16kbps MP3 and convert that to WAV and you'll get the same rubbish audio as the 16kbps MP3, perhaps worse.

The reason your WAV file is bigger is simply because the converter is putting in multiple copies of the same samples as per the rules of WAV rather than say, referring the machine to the one sample every time that sample needs to be played, as per the rules of MP3.

New contributor
520 is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
1

Arguably yes ;)

This is the sneaky clickbait answer, but:

If you run some sort of filter/processing (noise reduction etc.) using the MP3 as source, saving the result as WAV* can yield better quality than if you were to re-encode it as MP3, especially if it were re-encoded at the same quality settings.

This is both because some of the (desired) changes would be lost again, and also because lossy compression is like cutting something down with scissors; you will always accidentally cut off extra bits here and there, but in different places each time.

* (or more accurately, PCM)

New contributor
Artelius is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
  • 1
    sorry, but this is nonsense. – Mark Dec 4 at 10:17
  • It's not nonsense but it's moving the goalposts to another playing field – Lightness Races with Monica Dec 4 at 11:40
  • part of the problem are the filter-functions used in mp3 encoding and decoding ... some (especially blind) people say they hear the filter influence - Extracting back to PCM / WAV takes away the filtering on play.. so it MIGHT improve quality slightly .but only to sensitive people – eagle275 Dec 4 at 14:11
  • You're answering a different question to what was asked. Of course, re-coding an MP3 from an MP3 source will result in worse quality than just leaving it as decoded audio. – Dan Dec 4 at 15:18
0

Nope. Data (waveform) and Encoding (.mp3 / .wav) are things independent of each other.

The same waveform encoded in both mp3 and wav, will produce a different decoded waveform when run thru the proper decoders.

As far as format conversion goes...

Wav data encoded to mp3 will lose waveform details

Mp3 data encoded to wav will not lose waveform details

New contributor
Goose is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
0

No. This is about data resolution.

  • Converting WAV to MP3 gets your data compressed, with loss.
  • Converting MP3 to WAV gets your data expanded, without loss (But the loss presumably already has taken place beforehand, so you gain no additional resolution.
New contributor
Marcel is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
0

Here's a representation of the path a particle might take, annotated with points at which we might take a sample:

Real-life path

Now here's a "compressed" representation of that path, based only on the samples we took:

Compressed version

It's "good enough", though it has lost some detail. It requires only 13 pieces of information to reconstruct (our number of samples).

Now here's an upsampled representation, with 26 samples:

Upsampled compressed version

We didn't get any of the original detail back, even though we have twice as much data. In fact, if anything, this version is worse, because it makes us think that the representation is more faithful than it actually is — in reality, the new sample points are just made up and do not reflect any real-world observation.

This is a very broad analogy, but hopefully you can see that increasing the "detail" after-the-fact results in "larger information" (a bigger file) without actually giving you "more information" (more faithful representation).

So:

Does the quality of .wav file sound better since it has more data stored?

No.

Does the .wav file created from a .mp3 file have better quality than the .mp3 file itself?

That depends on what you mean by "quality".

New contributor
Lightness Races with Monica is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

Your Answer

Cyan is a new contributor. Be nice, and check out our Code of Conduct.

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.