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: audio quality compare utility (Read 10920 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

audio quality compare utility

Reply #25
My only understanding of psychoaccustics is: "I like it my way and you like it your way".


Well if you don't even understand what the word psychoacoustics means, and the success of a lossy codecs is based on psychoacoustics, then you're either going to have to reinvent the wheel by trying figure out what decades of careful research into human hearing has revealed, or you will fail.

My suggestion is to stop what you're doing for now and instead do some reading to get a better perspective on how and why a lossy codec chooses what it should throw away and what it should keep.



Thank you for your suggestion drewfx, education (usually) does not hurt, except in case of Marie Curie, and many others.
You could say that I do not know how to spell the word properly, but I see no reason why you said that I do not know what the meaning of psychoacoustics. ( spelling in Polish is a bit different, and often it is not an easiest thing to "translate", or properly spell... btw. it is psychoakustyka.
The success of lossy codecs is maybe based on psychoacoustics, but how tones and sounds influence humans, (and not only), but understanding why people react differently on certain sound frequencies is also part of psychoacoustics, why they like or hate certain sounds... so, if you did not know about this, maybe a small lesson will benefit you as well.

Thanks drewfx,

mike

audio quality compare utility

Reply #26
Quote
sample1: out160LAME.mp3 - 440 KB
sample2: out160SHINE.mp3 - 392 KB

### BLACK BALANCE ###
Frequency range: ≤ 21kHz
sample1: 20596
sample2: 49138
sample2 higher Q by: 138.500%

### WHITE BALANCE ###
Frequency range: ≤ 21kHz
sample1: 1347075
sample2: 1275237
sample2 higher Q by: 5.600%

### KURTOSIS ###
Frequency range: ≤ 21kHz
sample1: 63.7291
sample2: 20.9067
sample2 higher Q by: 67.195%


sample2 sounds worse

audio quality compare utility

Reply #27
...
The success of lossy codecs is maybe based on psychoacoustics, but how tones and sounds influence humans, (and not only), but understanding why people react differently on certain sound frequencies is also part of psychoacoustics, why they like or hate certain sounds...

But lossy codecs use psychoacoustics to eliminate frequencies that cannot be heard because of masking. If they cannot be heard how can anyone like or hate them?

audio quality compare utility

Reply #28
I understand, I will do some reading about psychoacoustics, I also know that this is not only about masking.. and not only about how sound influences living creatures... I agree with  you 100%....


In the meantime

this version is starts at 10kHz...  analyzes much wider spectrum, it might also provide more clues to the AAC m4a example.

http://alturl.com/x8am6





audio quality compare utility

Reply #29
In the meantime

this version is starts at 10kHz...  analyzes much wider spectrum, it might also provide more clues to the AAC m4a example.


I don't really see how this addresses the fundamental problem with your approach, which is that the spectrum has nothing to do with the actual audio quality.  Essentially you're just measuring the cut off of the lowpass filter. 

audio quality compare utility

Reply #30
But lossy codecs use psychoacoustics to eliminate frequencies that cannot be heard because of masking. If they cannot be heard how can anyone like or hate them?


lossy codecs use psychoacoustics? codecs' design might be influenced by results of psychoacoustics study... great post man.

audio quality compare utility

Reply #31
But lossy codecs use psychoacoustics to eliminate frequencies that cannot be heard because of masking. If they cannot be heard how can anyone like or hate them?


lossy codecs use psychoacoustics? codecs' design might be influenced by results of psychoacoustics study... great post man.

Just trying to simplify for you.

audio quality compare utility

Reply #32
In the meantime

this version is starts at 10kHz...  analyzes much wider spectrum, it might also provide more clues to the AAC m4a example.


I don't really see how this addresses the fundamental problem with your approach, which is that the spectrum has nothing to do with the actual audio quality.  Essentially you're just measuring the cut off of the lowpass filter.


I do not agree, I am trying to measure the loss of a lossy codec.

How otherwise I am going to answer question: how much do I loose when I encode at 128kb/s CBR compared to the original?
Or what codec or profile loses less than than that 128 CBR...  and if 128VBR is better, I would like to SEE it, by putting on the scale and "MEASURE THE DIFFERENCE"

The amount of data  has direct influence on audio quality -

( think spectrogram )
less data = s*** sound
more data = better sound
lossless codec = most data

good lossy codec with >> almost << no loss & good compression = heaven on earth



audio quality compare utility

Reply #33
...
The amount of data  has direct influence on audio quality -

( think spectrogram )
less data = s*** sound
more data = better sound
lossless codec = most data

good lossy codec with >> almost << no loss & good compression = heaven on earth

The relationship between "data loss" and "sound quality loss" is not direct. It is possible to lose a lot of data with no perceivable loss of sound quality. This is sort of the point with lossy codecs. Just because some data has been lost does not mean any audio quality has been lost, if by audio quality you actually mean what it is supposed to mean; i.e., how does it sound.

audio quality compare utility

Reply #34
How otherwise I am going to answer question: how much do I loose when I encode at 128kb/s CBR compared to the original?
Or what codec or profile loses less than than that 128 CBR...  and if 128VBR is better, I would like to SEE it, by putting on the scale and "MEASURE THE DIFFERENCE"

The amount of data  has direct influence on audio quality -

( think spectrogram )
less data = s*** sound
more data = better sound
lossless codec = most data

good lossy codec with >> almost << no loss & good compression = heaven on earth


The point about psychoacoustics is that if the same data being thrown away by the codec is going to be thrown away by the ear/brain anyway (before it can be perceived) you then lose nothing by throwing it away.

The problems with a codec occur when the codec throws away things that are not psychoacoustically masked.

So to meaningfully evaluate the subjective quality of a psychoacoustic lossy codec you need to only measure the part that's left after the masking occurs.

audio quality compare utility

Reply #35
In the meantime

this version is starts at 10kHz...  analyzes much wider spectrum, it might also provide more clues to the AAC m4a example.


I don't really see how this addresses the fundamental problem with your approach, which is that the spectrum has nothing to do with the actual audio quality.  Essentially you're just measuring the cut off of the lowpass filter.


I do not agree, I am trying to measure the loss of a lossy codec.


You cannot do this with a spectrogram. 

How otherwise I am going to answer question: how much do I loose when I encode at 128kb/s CBR compared to the original?


There is a lot of research in this area which you can find on google scholar, but basically you need to do either a double blinded listening test, or else use software which models the properties of the human auditory system.  Generally the latter approach is not entirely effective though.


The amount of data  has direct influence on audio quality -


But the power spectral density (which is what you are comparing) has no relation to the amount of data.

audio quality compare utility

Reply #36
FAQ > General Audio Compression > Why not using graphs to compare codecs ?

Cheers,
David.

audio quality compare utility

Reply #37
"But the power spectral density (which is what you are comparing) has no relation to the amount of data."

It is measuring the power spectral density, plus the occurrence, by using kurtosis, it calculates variance for a specific title - the higher variance, means to me that the codec, for one or another reason discarded, properly or improperly masked,
If the most used, and chosen to create backups for libraries codecs would only properly do the psychoacoustic masking, and would not do anything else, then it would not matter what codec is being used... all three or four of them would provide the exact same listening experience, and everything we talk about today would be a true waste of time... am I wrong here as well?

But lossy codecs do more than just doing a good job in "masking" at best. I do not understand why "psychoacoustic masking" is so friggin important when talking about quality? If significance "psychoacoustic masking" would affect sound quality, like 'rick.hughes' said earlier: "But lossy codecs use psychoacoustics to eliminate frequencies that cannot be heard because of masking. If they cannot be heard how can anyone like or hate them?" - if that's the case, no one should really care about that topic, since it does not need to be considered as anything significant, since no human can hear this anyway ( no person can see behind a non-transparent object, the "data" behind that object does not exist ).
But if that's the case, something else is causing the audio sound like s***, at lower bitrates ( 128-256 ), there has to be another "filter" that says "f*** this tone, and yank the other one as well". Such behavior is making people to say that the quality is LOW, because there is inefficient amount of "proper" audio data, to satisfy a human ear, or rather brain.
At the end, the data, that is being discarded, and not "psychoacoustically masked" is much more important then the bloody masking, which is great, but should not make music sound like a 2 cycle engine.

A mp3 that is ONLY "psychoacoustically masked" should sound 100% than FLAC, existance of FLAC would not make any sense? or am I wrong again?

Please explain,

Mike


audio quality compare utility

Reply #38
"psychoacoustics" - it is a combination of physics an psychology. Since every person is not exact same, but only similar, can a single rule apply to all?
Not only physically ears are built "almost" the same, but also the brain processes sound differently - is there anything like "best for all?" - I think such thing is present only in North Korea - I hope I am not wrong.

edit: fixed bolded

audio quality compare utility

Reply #39
this is a bit confusing about the psychoacoustic deal...

I got lame 3.99.5, in one of the earlier versions, the online documentation says that >> -f << disables psychoacoustic filter.
I encoded to two samples ( -V0 ) , with -f and without.
The speed of encoding with "-f" :  92.045x
The speed without -f:  48.906x  ( twice slower )
The file size after encoding (-f): 10658848
The file size after encoding without: 10658848

when I ran the compare utility:

====================
sample1: 1.flac.wav.V0.NOpsycho.mp3 - 10412 KB
sample2: 1.flac.wav.NOpsycho.mp3 - 10412 KB

### BLACK BALANCE ###
sample1: 131154
sample2: 131154
both samples seem to have the same Q


### WHITE BALANCE ###
sample1: 1073592
sample2: 1073592
looks like the same file? or a lossless copy?

### KURTOSIS ###
sample1: 2.12676
sample2: 2.12676
both samples are same Q
=========================

cmd line for both:
$ lame -V0 -f 1.flac.wav 1.flac.wav.V0.NOpsycho.mp3
$ lame -V0 1.flac.wav 1.flac.wav.V0.psychoON.mp3

I do not get it.... twice faster encoding, no other advantage, no difference in size? I say: wtf ?
or am I doing something wrong? again?

EDIT:

(-f) = fast mode
http://ecmc.rochester.edu/ecmc/docs/lame3.98a2/history.html


UPDATE

I MADE A MISTAKE but the results are even less explainable....

-rw-r--r-- 1 root root 10658848 Aug 27 19:30 1.flac.wav.V0.NOpsycho.mp3
-rw-r--r-- 1 root root 12340407 Aug 27 19:30 1.flac.wav.V0.psychoON.mp3


#############################################

sample1: 1.flac.wav.V0.NOpsycho.mp3 - 10412 KB
sample2: 1.flac.wav.V0.psychoON.mp3 - 12052 KB

### BLACK BALANCE ###
sample1: 131154
sample2: 128560
sample1 higher Q by: 2.000%

### WHITE BALANCE ###
sample1: 1073592
sample2: 1078899
sample1 higher Q by: .400%

### KURTOSIS ###
sample1: 2.12676
sample2: 2.27697
sample1 higher Q by: 6.597%
########################################

removing the "psycho" filter should increase the file size, right? well, it decreased it...
it also shows the NOpsycho file as being higher quality ( expected )
the encoding of the smaller, better, NOpsycho file is twice as fast....


Mike

audio quality compare utility

Reply #40
It is measuring the power spectral density, plus the occurrence, by using kurtosis, it calculates variance for a specific title - the higher variance, means to me that the codec, for one or another reason discarded, properly or improperly masked,


The core problem here is that this is not a measure that is correlated with what you are interested in.  Yes you compute the kurtosis of an irrelevant number.  That value is also irrelevant.  You can't create meaning by running stats on bad data.

If the most used, and chosen to create backups for libraries codecs would only properly do the psychoacoustic masking, and would not do anything else, then it would not matter what codec is being used...


This makes no sense but its not important.  People aren't telling you that masking is the only thing that matters, just that its a pretty damn good reason why linear time invariant systems approaches to signal quantification will fail here, since masking is not a linear time invariant process.  I would suggest reading up on how it works, that'll give you somewhere to start thinking about this problem.

But if that's the case, something else is causing the audio sound like s***, at lower bitrates ( 128-256 ),


128-256kbps audio sounds like shit?  Have you listened to any modern formats?  Most of the tests run here struggle to detect a difference between formats at a lower bitrate than that.  I think you vastly underestimate how good modern compression is.

A mp3 that is ONLY "psychoacoustically masked" should sound 100% than FLAC, existance of FLAC would not make any sense? or am I wrong again?


Most newer codecs rarely sound different than flac, yes. 

is there anything like "best for all?"


Yes obviously there must be, because the perceived error has to asymptotically decrease as you approach zero mathematical error.  Hence, while there can be differences between people, those differences are strictly bounded.

audio quality compare utility

Reply #41
it's LAME v3.99.5 not 0.99.5

'saratoga', I see you as a PRO, but something that proved to me to have some level of logic, and made me satisfied ( with some exceptions ) with a number of test runs, confirming most that I know about distinguishing sound quality coming out of a speaker or headphone set, you call it as being meaningless numbers and bad data... well, if you are 100% right, it only means that I got really poorly equipped with my hearing devices.
I am not trying in any way to discredit anyone's opinion, knowledge or theories, but the utility that I messed with for quite some time, statistically provided me with a proper information that I did not want to "blindly" accept and agree, but tried to find exceptions, or even prove that it is worth nothing. I cannot say that it is in any way a great tool, other then my "attempt", but it is able to do things I was not able to do before - that's why I came here, shared, and asked to leave an opinion, whatever it might be.
On the other hand you might be 100% right, I probably do not have enough knowledge to prove your words to myself, maybe one day I will notice that, maybe never...

In any case, thank you for your input and comments 'saratoga',

Mike

audio quality compare utility

Reply #42
If you haven't already done so, take a look at the top of the page for the FAQ and Wiki links. Spend a little time exploring them. You will find that many of these ideas have been discussed quite a lot here over the years. One thing that has not been really discussed a lot here in this thread (yet) is double blind listening tests. Many people who think they can hear differences between lossy encodes and lossless are often surprised when they actually try to do so without knowing which is which.


audio quality compare utility

Reply #44
Doesn't seem like this experiment is working.

If you really want to create software to determine the quality of audio then this would be a step in the right direction:
http://en.wikipedia.org/wiki/PEAQ

audio quality compare utility

Reply #45
But lossy codecs do more than just doing a good job in "masking" at best. I do not understand why "psychoacoustic masking" is so friggin important when talking about quality?

Do you understand that successful lossy compression is not abritrary in the way your posts suggest?

Quote
A mp3 that is ONLY "psychoacoustically masked" should sound 100% than FLAC, existance of FLAC would not make any sense? or am I wrong again?


I haven't tried it, I don't know if you have, but there seem to be plenty of tests that show that people have not been able to distinguish between high-bit-rate MP3 and FLAC.


"psychoacoustics" - it is a combination of physics an psychology.


I'm not sure if 'psychology' is exactly the right word here, but understanding of how the brain processes and translates what we hear is what good lossy compression is about. I don't claim understanding of the mechanisms, but I have learnt this from the writings of JJ and others here and elsewhere. One by-product of this is an enormously increased respect for lossy codecs and their creators, because the mathematical data-compression encoding is the simple part for those guys. They have to understand how and why we hear what hear, and I guess that the word for that is psychoacoustics

None of that means that, by choice, I will listen to a lossy codec if lossless is available. That is my personal prejudice, preference and choice.
The most important audio cables are the ones in the brain

audio quality compare utility

Reply #46
I did not think I will be writing a similar message today...

I was convinced about something, that as many said, is done wrong from the beginning.
It is impossible to compare quality of lossy codecs using my "idea", and "doesn't seem like the experiment is working" is a polite way of saying what I think at this moment.
Few hours made me change the way I look at many things - this was a good lesson, and the truth is bitter to me, and it should be.

you made me think - thank you for your time, and understanding.


Mike

ps:  This thread is going to hunt me for a quite long time...  how about deleting it?

audio quality compare utility

Reply #47
I did not think I will be writing a similar message today...

I was convinced about something, that as many said, is done wrong from the beginning.
It is impossible to compare quality of lossy codecs using my "idea", and "doesn't seem like the experiment is working" is a polite way of saying what I think at this moment.
Few hours made me change the way I look at many things - this was a good lesson, and the truth is bitter to me, and it should be.

you made me think - thank you for your time, and understanding.


Mike

ps:  This thread is going to hunt me for a quite long time...  how about deleting it?

Congrats! It is very seldom someone gives in that he learned something over here and this because of thinking about it after getting good advices. Often enough people only get pis*** and blame the Hydrogen crowd to be a bunch of wackos
This does not have to hunt you at all, more the opposite. Alone telling it to us the way you did makes you a welcome member at least that is how i see it!
Is troll-adiposity coming from feederism?
With 24bit music you can listen to silence much louder!

audio quality compare utility

Reply #48
paracent, you're smart, interested in audio technology and a programmer (which is more than I can say!). There are so many audio related projects where you could use your talents and I would advise you to not give up using those talents in the audio domain. (Just not for this specific tool as I agree with many others here that it's a dead end)

Have a look around on HydrogenAudio and its Wiki to gain some insight into techniques, challenges and where there's room for improvement. Have a look on bugtrackers for big project such as FFMPEG, FLAC, Opus, FDK-AAC and many others. Who knows where you can help out and perhaps one day have your code on millions of people's machines...
Every night with my star friends / We eat caviar and drink champagne
Sniffing in the VIP area / We talk about Frank Sinatra
Do you know Frank Sinatra? / He's dead

audio quality compare utility

Reply #49
Mmm... this thread made me think... Do we know of an existing artifact training page somewhere, like there one ff123 used to have?