Does mp3 convert to WAV losslessly?, Title is the question |
![]() ![]() |
Does mp3 convert to WAV losslessly?, Title is the question |
Mar 28 2012, 20:38
Post
#1
|
|
|
Group: Members Posts: 149 Joined: 28-October 11 Member No.: 94764 |
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?
|
|
|
|
Mar 28 2012, 20:49
Post
#2
|
|
|
Group: Members Posts: 3080 Joined: 1-September 05 From: SE Pennsylvania Member No.: 24233 |
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.
|
|
|
|
Mar 28 2012, 20:59
Post
#3
|
|
|
Group: Members Posts: 4131 Joined: 2-September 02 Member No.: 3264 |
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. |
|
|
|
Apr 5 2012, 16:56
Post
#4
|
|
![]() Group: Members Posts: 105 Joined: 6-June 10 From: Bavaria Member No.: 81240 |
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. This post has been edited by stephan_g: Apr 5 2012, 16:58 |
|
|
|
Apr 7 2012, 05:21
Post
#5
|
|
|
Group: Members Posts: 581 Joined: 12-May 06 From: Colorado, USA Member No.: 30694 |
Couldn't you just apply ReplayGain, using the minimum gain reduction needed to avoid clipping? What would be lost?
|
|
|
|
Apr 8 2012, 00:15
Post
#6
|
|
|
Group: Members Posts: 149 Joined: 28-October 11 Member No.: 94764 |
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... |
|
|
|
Apr 8 2012, 00:36
Post
#7
|
|
|
Group: Members Posts: 4131 Joined: 2-September 02 Member No.: 3264 |
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. |
|
|
|
Apr 8 2012, 03:35
Post
#8
|
|
|
Group: Members Posts: 4 Joined: 29-March 12 Member No.: 98191 |
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 This post has been edited by frenzic: Apr 8 2012, 03:41 |
|
|
|
Apr 8 2012, 09:47
Post
#9
|
|
![]() Group: Developer Posts: 2982 Joined: 2-December 07 Member No.: 49183 |
Can you losslessly convert sqrt(2) to a real number?
|
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 21st May 2013 - 18:32 |