No. MP3 encoding is a lossy process. The WAV that was decoded from the MP3 will only have the information that was present in the MP3. It doesn't magically "expand" to the original state, like i.e. a ZIP file. So a WAV decoded from a 128 kbit Xing MP3 will sound just as bad as that MP3.

To be more specific: Encoding the file again will of course result in another quality loss.

Well the first conversion from wav to mp3 removes inaudible information.Then convert that mp3 to wav, which is basically loss less, right?Now the second conversion to mp3 should try to remove the same inaudible information we already removed the first time and no more, therefore the second mp3 should be bit for bit the same, right?

Well the first conversion from wav to mp3 removes inaudible information.Then convert that mp3 to wav, which is basically loss less, right?Now the second conversion to mp3 should try to remove the same inaudible information we already removed the first time and no more, therefore the second mp3 should be bit for bit the same, right?

Well the first conversion from wav to mp3 removes inaudible information.Then convert that mp3 to wav, which is basically loss less, right?Now the second conversion to mp3 should try to remove the same inaudible information we already removed the first time and no more, therefore the second mp3 should be bit for bit the same, right?

theoretically this could work this way. (second encode will try to "remove already removed information", just like attempt to delete file twice doesn't result in deleting 2 files). but practically, none lossy codec I know works this way. reencoding/transcoding always results in quality loss, because psychoacoustic masking "isn't perfect" and will cause more and more degradations. this is the whole point of using lossless codecs for archiving.

theoretically this could work this way. (second encode will try to "remove already removed information", just like attempt to delete file twice doesn't result in deleting 2 files). but practically, none lossy codec I know works this way. reencoding/transcoding always results in quality loss, because psychoacoustic masking "isn't perfect" and will cause more and more degradations. this is the whole point of using lossless codecs for archiving.

I think you understand what I am thinking.Now, I agree the psycho acoustic masking isn't perfect, but it doesn't have to be perfect, just consistant, and we should get the same mp3 in the end.

Thank you.What search words will find the topic?mp3?Codec?rounding?lossy?I assumed it had been discussed.But, I can't find it, and have no idea what search terms will bring it up.If anyone has a link, that would be helpful.

I'll chip in because it took me a few goes of reading debates in the past to get a grip on it

You get your original wav off a cd and encode it to mp3, and some of the data gets thrown away and replaced by garbage. It still sounds pretty good because the psychoacoustics only threw away things you couldn't hear. Decode that to wav and you'll still have the same information, only taking up more space.

Run that new wav through the encoder again... but this time the encoder is trying it's hardest to sound like that wav, not the original one. It can discard more data and still sound pretty similar to your wav, but it won't sound perfectly like it - meaning it will sound worse than the last time.

Codec does not remove anything. It rounds some values to be able to store them in less bits then original ones.

Of course the psychacoustic model removes a lot!

QUOTE

How can the codec remove what has already been removed?

It doesn't care if the WAV was previously MP3 encoded. It's like JPEG-compression: You can save a JPG as a BMP, but it will only have the quality of the original JPG. Compress the BMP as JPG again, and you get worse quality than the original JPG. There is no way of cutting a WAV (ex-MP3) down to ~1/10th of the original bitrate without applying the same methods of data-reduction as usual.

In the jpeg analogy, lets say we can only see 100 colors.We reduce the picture down to the 100 we can see. (like wav to mp3)Then we convert it back to full color (like mp3 to wav)Then we go back to the 100 colors (like wav back to mp3)In theory it would be the exact same as the first reduction to 100 colors.

Codec does not remove anything. It rounds some values to be able to store them in less bits then original ones.

Of course the psychacoustic model removes a lot!

I know

Just wanted to move focus from "removing" to "rounding" (quantisation). Before someone understands this concept, is usually trapped in thinking like: "the unnecessary information is already removed so next reencoding shouldn't do anything at all, just 'rebuild' compressed file", and it's hard to drop this argument without knowing that essential process in lossy compression is adding (quantisation noise) not removing...

There's a simple way to test this. Encode a .wav to .mp3 (preferably use a value like 128k CBR to more easily hear artifacts), then decode it back to .wav. Now, repeat the encode/decode process about 10 or 20 times. If it sounds the same after 10-20 encodes/decodes/reencodes as it did originally, then you'll know the answer (hint - it won't).

Nothing better than experiments to prove the truth or falsehood of something.

If you record a CD into a cassette tape, then use the tape to master a new CD, does it sound the same as the original? If you later copy this second CD to a new tape, does it sound the same as the first tape? Same answer.

Thats why we call those "Lossy". Same happens when you do VHS copy from a VHS source. VHS stores in much lower bandwidth than that used in the external transport cables (made to connect to a TV, which needs the higher bandwidth).

The problem is that a decoded mp3 is not longer the same as the original wav, it is a degraded file you want to encode again, so the result, is obviously even more degradation.

If you record a CD into a cassette tape, then use the tape to master a new CD, does it sound the same as the original? If you later copy this second CD to a new tape, does it sound the same as the first tape? Same answer.

Thats why we call those "Lossy". Same happens when you do VHS copy from a VHS source. VHS stores in much lower bandwidth than that used in the external transport cables (made to connect to a TV, which needs the higher bandwidth).

True, but an invalid analogy to mp3s.

See my post on the jpeg analogy.That shows how in theory lossy compression can avoid becoming progressivelyworse.However, that is not how mp3 lossy compression works.

In the jpeg analogy, lets say we can only see 100 colors.We reduce the picture down to the 100 we can see. (like wav to mp3)Then we convert it back to full color (like mp3 to wav)Then we go back to the 100 colors (like wav back to mp3)In theory it would be the exact same as the first reduction to 100 colors.

But reducing the amount of colors is only ONE of the JPEG artifacts

There's also smoothing, detail loss, blockiness...

Same thing is for audio. It's not only reducing the amount of "sounds". It reduces details, introduces pre-echo and other artifacts...

--------------------

Get up-to-date binaries of Lame, AAC, Vorbis and much more at RareWares:http://www.rarewares.org

It is to show how a lossy format can possbily not get progressivly worse upon repeated encodings and decoding.

Well, it can get no perceptually worse if you use very high bitrates on good encoders for each new reencoding cycle.

But it's unavoidable. It gets worse.

Codecs like AAC, MP3 and Vorbis have an added issue, that is the MDCT. The more cosine transforms you apply to a signal, the worse it gets, no matter the bitrate you use. MPC, in this case, has the advantage of being a subband codec, and therefore, doesn't degrade that much with repeated reencodings.

JPEG uses DCT as well, btw.

--------------------

Get up-to-date binaries of Lame, AAC, Vorbis and much more at RareWares:http://www.rarewares.org

I think we can all agree that there is some loss when encoding from Wave to MP3 but it's not all bad, take for instance the ongoing debate about CD and the good old plastic disc, Some people won't listen to anything else but LP'S saying Compact disc lacks the emotion of a good LP based system and cd's are to clinical, having listened to both i think there is a very good point to the argument, for the same reason MP3's could even sound better than the origin CD...The following review although for the Airhead headphone amp is very intresting....

"MP3s. Sure, my computer’s hard drive is loaded with time-shifted copies of music that I have previously purchased (ahem), but I never regarded them as anything approaching hi-fi, especially when listening via my Rio player or my laptop’s speakers. I mentioned something to that effect to Tyl Hertzens of HeadRoom, and he replied that I shouldn’t jump to such hasty conclusions. He told me that MP3 decoding is a completely different process than WAV (CD-ROM) or Redbook (CD music) decoding, which results in a more "organic" sound. He went on to say that MP3s with sampling rates in the 300+ kbps range can sound better than CD. Tyl is onto something. I am not about to say that MP3s played back through a hi-fi rig compares with CD, but I agree that MP3’s strengths and weaknesses mesh well with headphone playback. For example, with the high resolution capabilities of the TAH and Sennheiser or Grado, I heard further into many recordings than I could with my home rig. I perceived the decay of plucked notes on an acoustic guitar and the startling snap of snare drum shots, and could even distinguish among the drums used. And there was no harshness whatsoever. (I typically listen at a sampling rate of 128 kbps, which is a pretty good comprise between compression and not). In terms of its smoothness, it made me think I was listening to quality tube gear. That is a tough feat to pull off: "smooth detail." Furthermore, I was starting to eat my words regarding soundstaging. MP3 is a reflection of CD in the sense that some recordings are imbued with much more ambiance and dimensionality than others. On some MP3s, I could actually hear beyond the soundstage and into the ambiance of the recording venue, which, as I said, is my hi-fi Holy Grail. Admittedly, the soundstage was still not in the shape or position that I prefer, and yet I was amazed that I was getting that kind of sound from an MP3. Other hi-fi attributes were also present on MP3 via the HeadRoom: dynamic punch when called for, and a tight bass perhaps in the 30-hz range from a particular synth-based recording. I have no basis to compare what TAH is doing for MP3s relative to other headphone amps, but I can tell you that MP3s lost much of their magic without the amp. I never thought I would use "MP3" and "magic" in the same sentence"

I perceived the decay of plucked notes on an acoustic guitar and the startling snap of snare drum shots, and could even distinguish among the drums used. And there was no harshness whatsoever. (I typically listen at a sampling rate of 128 kbps, which is a pretty good comprise between compression and not).

Gee, when I hear something that wasn't there before, I call it an artifact.

QUOTE

In terms of its smoothness, it made me think I was listening to quality tube gear. That is a tough feat to pull off: "smooth detail."

Repeat with me now, "distortion"

--------------------

"You can fight without ever winning, but never win without a fight." Neil Peart 'Resist'