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: mp3 to wav to mp3 to wav same? (Read 76974 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

mp3 to wav to mp3 to wav same?

Reply #50
Quote
Cosine transformation is NOT LOSSY. After transofmation you just cut some frequences. If you have no information in cut out freequences you get NOT LOSSY compression. So if you cut something once you can't cut it second time. There is no "rounding" or something similar. For example you have sequence of bytes '15 35 156 204 32 0 14 87 5 9 45 34 35 147 21 224' let assume that after cosine transform you have '245 125 54 2 20 6 1 2 0 1 0 0 0 0 0 0'. In order to compress you just cut off last 6 bytes. After decoding you will get exactly the same wav file. So mpeg compressin NOT ALWAYS is lossy. In case of repeatedly compresing-decompresing the same file with the same parameters you will not loose anything.
And there is no need to use 192 or even 128 kbps if your sound source is radio quality. You won't get any better qualty. Imagine that instead last 6 zeroes you will cut only 3. You just have bigger files. Here helps much VBR because it will cut more or less depending on how much zeroes you have at the end of spectrum.

Some things of what you say seem right, but leed to at least questionable conclusions. What about this?
- The transform results are stored digitally - to compress the storage space is limited, so rounding/truncation errors happen
- Unless you try to compress artificial test signals there's always noise or noise-like content (at least dither), so there are hardly any "0"s after transform
- On reencoding the positions of transform windows are different than before because mp3 encoding/decoding adds samples in the beginning
- Even if the positions would be the same, the windows overlap, so when encoding again it's not possible to restore the windows from the encoding step before exactly as they've been.

Maybe I'm wrong. Why don't you provide an example for a file that doesn't change on multiple en-/decoding? (There's an upload forum...)
Let's suppose that rain washes out a picnic. Who is feeling negative? The rain? Or YOU? What's causing the negative feeling? The rain or your reaction? - Anthony De Mello

mp3 to wav to mp3 to wav same?

Reply #51
Quote
Cosine transformation is NOT LOSSY.

Not in and of themselves, no.

But when the the output is overlapped in the time and frequency domain, there's no way of going back.

Cheers,
David.

mp3 to wav to mp3 to wav same?

Reply #52
An analogy to JPEG lossy image compression was made above. I have a curious fact about it.

It is true that successive decompress-compress cycles on the same image each reduce its quality further. However, it turns out that (with JPEG) the biggest information loss occurs when the original lossless image is first compressed into JPEG. If you do successive decompress-compress cycles (at the same JPEG quality setting) and check the information loss at each cycle (which is easily done by subtracting one image from another pixel-by-pixel and presenting the subtraction result as an image), you'll see that the magnitude of artefacts introduced at the second compression is much smaller than that introduced at the initial compression. Firthermore, the magnitude of artefacts introduced at the third and following compressions is still smaller than that at the second compression. The artefacts still do build up and eventually trash the image completely, but not nearly as fast as if you'd expect if each next compression threw away as much information as the first one. JPEG has a limited robustness against stupid users doing image editing and recompression cycles.

Now, I don't know whether MP3 has the same robustness or not.

mp3 to wav to mp3 to wav same?

Reply #53
wow.. old post. ("holy thread resurrection, batman!!!!11!!1!1")

JPEG isn't the same as mp3, even though they use DCT and mDCT.

for starters, though the mDCT is perfectly reconstructible, the input filterbank of mp3 (where it splits into 32 subbands, mp2 style) is not perfectly reconstructible.  Jpeg goes straight for the DCT, and there's no overlapping.

also, JPEG uses a fixed quantizer and a fixed quant matrix for each block.  there's no encoder delay or overlapping blocks or anything like that.  theoretically you're only going to get rounding error from the repeated DCT and iDCT, and the conversion to 8 bits (even more loss if dither is used in the decoder).

the big, glaring difference, however, is that mp3 uses psychoacoustics and JPEG uses jack-all in the way of psychovisuals (the quant matrix could be seen as a primitive form if it).  assuming a perfect, transparent mp3 encode - what it's done is examined the source, and determined specific masking thresholds for the human auditory system.  imagine a spectrogram with a curved line under it.  the encoder will bring noise up to that line, but if it goes over it, it will be audible.

when you re-encode an mp3, the encoder has no knowledge of the masking decisions the previous encoder made.  so it'll draw a line of it's own, and add noise up to but not over it.  the big problem is that the total quantization noise in the resulting file is now up to twice the magnitude it was in the original mp3.  this guarantees there will be audible artefacts.

the above assumes a perfect psy-model, which of course mp3 doesn't have.  things get even worse when the original encode wasn't perfect.

basically, you can't make analogies between image and audio coding, because much of what goes in an audio encoder is completely meaningless in images - that's why we can't swap our eyes for ears and get the same use out of them.

mp3 to wav to mp3 to wav same?

Reply #54
I don't want to correct anything MugFunky or makarov wrote, only add something that may have seemed too obvious to them.

What they write confirms, but does not explicitly state, is that with JPEG or MPEG, audio or visual, no matter what, you can not regain the losses by applying a higher bit-rate.  The best you can achieve is limited by whatever was used with the original encode.  To achieve a better rip, you need to have the original.  In other words, you would only want to re-encode downward (such as for a thumbnail or image or a listening sample).  Otherwise, you're losing both disk space and quality for what might be best described as psycho-mentality.
"All I ask is that composers wash out their ears before they sit down to compose." - Morton Feldman