IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
How to tell if WV is lossy or lossless?
slipkid
post May 12 2009, 06:57
Post #1





Group: Members
Posts: 5
Joined: 12-May 09
Member No.: 69713



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.
Go to the top of the page
+Quote Post
Seeking_Lossless
post May 12 2009, 07:26
Post #2





Group: Members
Posts: 100
Joined: 11-May 09
Member No.: 69698



QUOTE (slipkid @ May 12 2009, 13:57) *
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.
Go to the top of the page
+Quote Post
Liisachan
post May 12 2009, 09:06
Post #3





Group: Members (Donating)
Posts: 119
Joined: 9-July 04
Member No.: 15225



QUOTE (Seeking_Lossless @ May 12 2009, 06:26) *
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.


Go to the top of the page
+Quote Post
slipkid
post May 12 2009, 21:01
Post #4





Group: Members
Posts: 5
Joined: 12-May 09
Member No.: 69713



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).

Go to the top of the page
+Quote Post
Teknojnky
post May 12 2009, 21:11
Post #5





Group: Members
Posts: 335
Joined: 12-April 06
Member No.: 29453





QUOTE (slipkid @ May 12 2009, 15:01) *
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.


--------------------
Last.FM Nodes for your library @ http://build.last.fm/item/356
Go to the top of the page
+Quote Post
Liisachan
post May 12 2009, 23:48
Post #6





Group: Members (Donating)
Posts: 119
Joined: 9-July 04
Member No.: 15225



@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.

QUOTE (Teknojnky @ May 12 2009, 20:11) *
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?
Go to the top of the page
+Quote Post
slipkid
post May 13 2009, 02:05
Post #7





Group: Members
Posts: 5
Joined: 12-May 09
Member No.: 69713



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.
Go to the top of the page
+Quote Post
Daffy
post May 13 2009, 03:44
Post #8





Group: Members
Posts: 189
Joined: 30-September 01
From: North Carolina
Member No.: 114



QUOTE (slipkid @ May 12 2009, 21:05) *
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?
Go to the top of the page
+Quote Post
lvqcl
post May 13 2009, 12:53
Post #9





Group: Developer
Posts: 3399
Joined: 2-December 07
Member No.: 49183



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.

This post has been edited by lvqcl: May 13 2009, 13:03
Go to the top of the page
+Quote Post
slipkid
post May 13 2009, 16:37
Post #10





Group: Members
Posts: 5
Joined: 12-May 09
Member No.: 69713



QUOTE (lvqcl @ May 13 2009, 06:53) *
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 :-)


Go to the top of the page
+Quote Post
Liisachan
post May 18 2009, 04:06
Post #11





Group: Members (Donating)
Posts: 119
Joined: 9-July 04
Member No.: 15225



@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
# 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

Go to the top of the page
+Quote Post
slipkid
post May 18 2009, 17:51
Post #12





Group: Members
Posts: 5
Joined: 12-May 09
Member No.: 69713



QUOTE (Liisachan @ May 17 2009, 22:06) *
@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.
Go to the top of the page
+Quote Post
Liisachan
post May 20 2009, 02:55
Post #13





Group: Members (Donating)
Posts: 119
Joined: 9-July 04
Member No.: 15225



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 smile.gif 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!
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 30th September 2014 - 23:02