Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Does mp3 convert to WAV losslessly? (Read 6797 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Does mp3 convert to WAV losslessly?

I just wondered if this the case, because actually the Mp3 format is using a lot of of overdrives which is not possible in a WAV file. So if I e.g. make an audio CD with some Mp3's, will they remain exactly the same or will they differ from what an audio player would decode?

Does mp3 convert to WAV losslessly?

Reply #1
Different mp3 decoders, if they are working correctly, will produce nearly bit identical PCM data, whether you play it directly or first record it to a CD. It is possible, however, for a player to decode to something with a greater dynamic range than 16 bit audio and the rescale it to avoid clipping.

Does mp3 convert to WAV losslessly?

Reply #2
I just wondered if this the case, because actually the Mp3 format is using a lot of of overdrives which is not possible in a WAV file. So if I e.g. make an audio CD with some Mp3's, will they remain exactly the same or will they differ from what an audio player would decode?


The spec requires a specific accuracy from all decoders, but beyond that a small amount of error will be present since mp3 decoding is essentially an approximate process.  The spec ensures that the error added by the decoder is orders of magnitude smaller then the error added by the encoder, so in practice it doesn't matter unless the decoder is badly broken.

Does mp3 convert to WAV losslessly?

Reply #3
I think what the OP wanted to know was: If the MP3 decodes to something with higher-than-fullscale peak amplitudes, what happens?

Answer: If you decode straight into 16-bit PCM, anything beyond fullscale gets clipped.

If you want to avoid that, you'll need a decoder with the necessary headroom and some additional processing to reduce levels before converting into 16-bit PCM (with dithering, yadda yadda) - exactly like a "proper" playback chain. How you achieve that is up to you. I might use Foobar2000's converter with Replaygain mode set to either "prevent clipping" or "apply gain, prevent clipping", assuming the files in question are RG scanned.

Does mp3 convert to WAV losslessly?

Reply #4
Couldn't you just apply ReplayGain, using the minimum gain reduction needed to avoid clipping? What would be lost?

Does mp3 convert to WAV losslessly?

Reply #5
Well, to bring it to the point: Is it possible to do a bit-exact conversion of an mp3 to a WAV file?
If I understood the previous posters right it's not due to the high peaks of an mp3 file...

Does mp3 convert to WAV losslessly?

Reply #6
Well, to bring it to the point: Is it possible to do a bit-exact conversion of an mp3 to a WAV file?


As I said before, decoding is an approximate process.  There is nothing to be "bit-exact" in comparison to.

If I understood the previous posters right it's not due to the high peaks of an mp3 file...


Yes, peaks are not really related to MP3, they're more generally a question of how DSP operations are implemented on computers.  Any lossy process can introduce above full-scale peaks, and any well implemented DSP process can handle them by using proper precision and/or scaling.  MP3 is no different.  The player on your CD player could screw it up, or the player on your computer could screw it up.  If in doubt, you can always add a dB or two of EQ precut or use replaygain to avoid this whole problem.

Does mp3 convert to WAV losslessly?

Reply #7
to the op

the fraunhofer institute has something called mp3hd specs:

    * mp3HD is a lossless audio codec (100% bit-exact replica of CD tracks)
    * Backward compatible to mp3
    * File extension .mp3
    * Bitrates for music approximately 500 to 900 kbit/s rates (similar to other lossless codecs), depending on genre
    * Embedded mp3 track and the mp3HD file share the same id3 metadata

http://www.iis.fraunhofer.de/en/bf/amm/pro...iocodecs/mp3hd/

so yeah. Edit: But only if you use that particular fraunhofer codec.

You can get the tools here:
http://www.all4mp3.com/tools/mp3HD-tools.php

Does mp3 convert to WAV losslessly?

Reply #8
Can you losslessly convert sqrt(2) to a real number?