How to tell if WV is lossy or lossless?
Reply #10 – 2009-05-18 04:06:52
@slipkid First, I'm sorry for not understanding what you wanted to ask correctly. The short, correct answer to your question is "No, you can't do that. Wavpack, FLAC, APE... no lossless audio compression can tell you that." Please try to understand this: 1. When wvunpack -s says "This is Lossless" or when flac -V says "Verified OK", it means "What you will get when OUTPUT is decoded is exactly equal to INPUT." (In short, it's lossless.) Just like you zip a big text file into a small.zip. If you unzip small.zip you'll get the original big text file, right? Or if you zip huge.bmp into cute.zip, and if you unzip cute.zip you get the same huge.bmp, right? 2. Okay, so imagine... what would happen if you zip Poor_Quality.jpg into image.zip and if you unzip image.zip? You'll get the original, same Poor_Quality.jpg--perfectly bit identical. So ZIP is a LOSSLESS compression, but unlike PNG, JPEG is lossy, right? So you just recovered a lossy JPEG file losslessly from ZIP. 3. Similarly, a poor quality lossy audio file can be losslessly re-compressed. Let me show you an example. I'd suggest you actually do what I'll tell you as a test, step by step, using your Original.wav, whatever you directly ripped from your CD in a right way, and check the results using your own ears in each step... First, try this.lame --preset cbr 80 --resample 44100 Original.wav poor_quality.mp3 Now you have a poor_quality.mp3, 80 kbps. Let's decode it back to WAV.lame --decode poor_quality.mp3 Dishonest.wav Dishonest.wav is a big WAV file like a normal WAV file, but it's quality is really bad, because it's just that you decoded a poor quality MP3. So, what will happen if you do this now?wavpack Dishonest.wav You get Doshonest.wv, where Dishonest.wav is losslessly compressed, but since the source is poor-quality, even if you compress it losslessly, the resuslt is still poor-quality. Right? Try this:wvunpack -s dishonest.wv It says: file name: dishonest.wv source: 16-bit ints at 44100 Hz channels: 2 (stereo) modalities: lossless Are you happy to see it says lossless? That's what *might* happen if the source is unknown, like when you're downloading things from the internet. It is NOT a problem of Wavpack. Wavpack is NOT wrong. It is NOT even a problem of lossless audio compression at all. It is a problem of the person(s) who might (intentionally or accidentally) fool you. Differently said, the question is, whether or not you can trust the person who gives you the file. That's it. ------ The following is not related to your original question, but let me add another thought-provoking example here.# Lossless in Hybrid mode G:\My Music>wavpack -b2000 tricky.wav created tricky.wv in 3.08 secs (lossless, 39.30%) # But it says Lossy G:\My Music>wvunpack -s tricky.wv file name: tricky.wv modalities: hybrid lossy, dns