Skip to main content

Topic: Does mp3 convert to WAV losslessly? (Read 4983 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • Gainless
  • [*][*][*]
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?

  • pdq
  • [*][*][*][*][*]
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.

  • saratoga
  • [*][*][*][*][*]
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.

  • stephan_g
  • [*][*][*][*]
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.
  • Last Edit: 05 April, 2012, 11:58:42 AM by stephan_g
My little "blogalike":
http://stephan.win31.de/music.htm

  • mjb2006
  • [*][*][*][*][*]
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?

  • Gainless
  • [*][*][*]
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...

  • saratoga
  • [*][*][*][*][*]
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.

  • frenzic
  • [*]
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
  • Last Edit: 07 April, 2012, 10:41:29 PM by frenzic

  • lvqcl
  • [*][*][*][*][*]
  • Developer
Does mp3 convert to WAV losslessly?
Reply #8
Can you losslessly convert sqrt(2) to a real number?