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: How to tell if WV is lossy or lossless? (Read 15976 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

How to tell if WV is lossy or lossless?

I'm new to WV files and am a bit confused.

I understand that WAVEPACK supports both lossy and lossless compression.

Is there any simple way to know if a WV file that I downloaded was compressed originally as lossy or lossless??????  I mean other than my trying to examine/analyze the decoded WAV myself manually or something like that.  Is there a way that WAVEPACK can tell me without my having to figure it out?

THANKS for any helpful hints.

How to tell if WV is lossy or lossless?

Reply #1
I'm new to WV files and am a bit confused.

I understand that WAVEPACK supports both lossy and lossless compression.

Is there any simple way to know if a WV file that I downloaded was compressed originally as lossy or lossless??????  I mean other than my trying to examine/analyze the decoded WAV myself manually or something like that.  Is there a way that WAVEPACK can tell me without my having to figure it out?

THANKS for any helpful hints.

If you use the hybrid command then you'll probably get lossy. You can check with Foobar whether your's are lossless or lossy, the birate and size also can tell you it's lossless or lossy.

How to tell if WV is lossy or lossless?

Reply #2
If you use the hybrid command then you'll probably get lossy. You can check with Foobar whether your's are lossless or lossy, the birate and size also can tell you it's lossless or lossy.

In normal situations, whether or not the file is lossy or lossless is obvious. Usually you can tell that by just checking the file size. Or of course foobar2000's "Properties" menu will give you detailed information. So there's nothing to worry about in a practical sense.

However, though I may be wrong, I think this is very difficult in theory. That is, if you do something unusual such as wavpack -b2000 when even the lossless doesn't need 1000 kbps, wavpack runs in the hybrid mode, setting the 4th bit of WavpackHeader::flags, but the final output may be mathematically lossless (this fact itself is not surprising). In such a case foobar2000 would report it as hybrid (lossy) even if it's mathematically lossless. Telling such a file from an almost-lossless-but-lossy WV (like -bn800 -bn1000 for example) should be quite difficult. On the other hand, again in theory, one might cheat foobar2000 other way around and let it report lossy WV as lossless if they do weird things such as concatenating Lossless WV samples and Lossy ones.

fb2k is like speed-optimized for practical purposes and not always theoretically reliable if input is eccentric. For example, it can't tell VBR MP3 from CBR MP3 in a general case--telling that is impossible unless you parse every single sample, so it's not like fb2k is bad. In this case, when fb2k says the WV is in the hybrid mode, what it says is probably true: the problem is, there can be a mathematically-lossless WV file compressed in the hybrid mode. Then again, such a thing doesn't normally exist, so you don't really have to fret.



How to tell if WV is lossy or lossless?

Reply #3
Thanks for the comments folks!

So it sounds like you can't  know for sure if what you are downloading came from a truly lossless source (?).  Yeah, you can try to look at the decoded WAV, analyze it different ways like in a waveeditor in spectral view, etc etc etc but WAVPACK doesn't appear able to tell you how the WV file was created in the first place (right?). 

Unless I'm still misunderstanding something?  I confess to not understanding exactly what this means - "If you use the hybrid command then you'll probably get lossy."    Isn't the "hybrid" command something to do with how the WV was created in the first place, rather than how you decode it to WAV later?  Because I have no idea how the file was actually created (hybrid command or not), I only have the WV file itself and instructions to decode it with "wvunpack" (with no command line options).


How to tell if WV is lossy or lossless?

Reply #4


So it sounds like you can't  know for sure if what you are downloading came from a truly lossless source (?).


The only true way to know, is to rip it yourself. If your downloading anything off the internet, caveat emptor.


Quote
Yeah, you can try to look at the decoded WAV, analyze it different ways like in a waveeditor in spectral view, etc etc etc but WAVPACK doesn't appear able to tell you how the WV file was created in the first place (right?). 

Unless I'm still misunderstanding something?  I confess to not understanding exactly what this means - "If you use the hybrid command then you'll probably get lossy."    Isn't the "hybrid" command something to do with how the WV was created in the first place, rather than how you decode it to WAV later?  Because I have no idea how the file was actually created (hybrid command or not), I only have the WV file itself and instructions to decode it with "wvunpack" (with no command line options).


There are 2 different questions:

Was the source lossy?

Is the WV lossy?

It should be easy to determine if the WV encoding is, via foobar or probably other tools.

They won't tell you what the source was, it could have been a lossless wave of a lossy 128k mp3.

How to tell if WV is lossy or lossless?

Reply #5
@slipkid
I guess I said something too theoretical and scared you. Let me repeat this. In a normal situation, you can tell that by just checking the bit rate. Typically, a Lossy WV has 200–300 kbps while a Lossless WV has 800–1000 kbps, like 3–4 times different,  so you can tell that easily, right?

Lossy WV is in the hybrid mode: Lossy WV could be decoded losslessly if you have another file called WVC, while it is decoded lossily without WVC. So-called Lossy WV is actually Lossy/Lossless hybrid (this is very handy for some purposes)—but if you're downloading things you don't get WVC, so simply put Lossy and Hybrid mean the same thing for you.

There are 2 different questions:

Was the source lossy?

Is the WV lossy?


Or are you more like asking the 2nd question? Are you looking for a tool like Tau Analyzer?

How to tell if WV is lossy or lossless?

Reply #6
THanks again.

I'm only asking the 2nd question.  I want to know if the WV file which was created from a WAV that previously had no lossy lineage was created by WAVPACK as LOSSY or LOSSLESS, and specifically I want to know if the WAVPACK program itself can tell me that without me having to do the detective work myself with foobar, traderslittlehelper, looking at the decoded WAV in an editor in spectral view, etc etc etc.

I am used to working with FLACs where I know that the encoding process produced a lossless file in comparison to its input, but now I have a WV file which from what I understand could be either lossy or lossless as a function of how it was created by WAVPACK, and I am unclear as to what was done with this specific file.  I'm asking if there is some way for WAVPACK to tell me how the WV was made after the fact - lossy or lossless?

Again, I am brand new to WAVPACK and up until yesterday I've never even heard of it or WV files.  In my total ignorance for all I know the program can tell you what settings were used in WV files that it already made via some header info or something.

Hope this makes sense, and thanks for trying to answer my question y'all.

How to tell if WV is lossy or lossless?

Reply #7
I am used to working with FLACs where I know that the encoding process produced a lossless file in comparison to its input...

Unless you created the FLAC from your own source, how do you know this?

 

How to tell if WV is lossy or lossless?

Reply #8
Quote
I'm only asking the 2nd question. I want to know if the WV file which was created from a WAV that previously had no lossy lineage was created by WAVPACK as LOSSY or LOSSLESS


1) wvunpack -s filename.wv can tell you if WV file is lossless or hybrid (lossy)
2) Winamp - View file info...
2) Foobar2000 - Properties. Or you can create another column in playlist that shows %codec_profile%.



Quote
looking at the decoded WAV in an editor in spectral view

I don't think you can tell lossless WV from hybrid WV using spectrogram image.

How to tell if WV is lossy or lossless?

Reply #9
Quote
I'm only asking the 2nd question. I want to know if the WV file which was created from a WAV that previously had no lossy lineage was created by WAVPACK as LOSSY or LOSSLESS


1) wvunpack -s filename.wv can tell you if WV file is lossless or hybrid (lossy)
2) Winamp - View file info...
2) Foobar2000 - Properties. Or you can create another column in playlist that shows %codec_profile%.



EXCELLENT lvqcl, I thank you so much for answering my question!!  #1 above is exactly what I was trying to figure out.

I really appreciate your straightforward answer and the other suggestions as well  :-)



How to tell if WV is lossy or lossless?

Reply #10
@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.
Code: [Select]
# 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


How to tell if WV is lossy or lossless?

Reply #11
@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."

<snip>


Yes I understand all that , and appreciate your taking more time to try to explain all this, I really do.

But all I wanted to know was if I could tell easily via WAVPACK if the WV created from WAVPACK was created as "lossless" IN THAT STEP alone.  That is all I need to know in this case. 

And I got my answer :-)

The lineage of the file that went into WAVPACK is an entirely different issue and NOT what I was asking about.

How to tell if WV is lossy or lossless?

Reply #12
I just didn't feel ok to stop this thread at that point though you looked satisfied already.
Just disregard it if you're not interested in that part  It's ok. Other people might read your question in a different way anyway.
Your question helped me to realize several subtle problems, even though you didn't mean it that way. Thanks for asking!