HydrogenAudio

Lossy Audio Compression => AAC => AAC - General => Topic started by: Engelsstaub on 2012-05-14 02:39:39

Title: iTunes Encodes vs. Amazon (Spectrograms)
Post by: Engelsstaub on 2012-05-14 02:39:39
A spectral comparison of an iTunes file and its counterpart from Amazon:

Fear Factory - Recharger (Single) iTunes/m4a

(http://img341.imageshack.us/img341/5314/01rechargerm4a.png)


Fear Factory - Recharger (Single) Amazon/mp3

(http://img29.imageshack.us/img29/3585/01rechargermp3.png)

I understand a spectrogram tells us pretty close to nothing about how a music file actually sounds to the listener. I still challenge anyone to find results that are reversed. I never have. (I get "credits," like many others, for Amazon mp3s. I download the iTunes versions as an iTunes Match subscriber.)

At this bitrate I personally doubt listeners will discern between the two. Does this discount the validity of saying one encode is of a "higher quality" or that it is "better" in that it retains more of the source? These graphs can still tell us "what is missing" and what the respective encoders saw fit to lose in lossy encoding.

Thoughts...
Title: iTunes Encodes vs. Amazon (Spectrograms)
Post by: Gentoo64 on 2012-05-14 03:01:29
I think anyone would prefer a higher bitrate purely for peace of mind, weather you think you can hear a difference or not.
On my computer I only listen to FLAC, but I can't hear a difference between that and a high bitrate MP3 afaik but it's good to know that you're not losing any quality.

For a portable device if you're going to be out and about I guess it wouldn't matter as much. I personally don't use a portable player but if I did I wouldn't bee too fussy, but sitting at home listening I would want the best specced music so I know I'm not missing out on anything.

But if the music is more full in the spectrogram and closer to the original piece than another version, then it is higher quality.
Title: iTunes Encodes vs. Amazon (Spectrograms)
Post by: onkl on 2012-05-14 04:10:56
First of all, if you can't hear tones above 20khz, then this would be "useless" information to begin with. Second, removing this and using the bitrate purely for the "usefull" information seems to be more efficient.

I don't know how AAC works in this regard, but I guess the resulting file could be slightly smaller with the high frequencies removed, so a lowpass would be desirable for maximum efficiency. For MP3 this could potentially improve the quality when close to the maximum frame size (320kbit + bit reservoir (http://www.hydrogenaudio.org/forums/index.php?showtopic=79647&st=0&p=695344&#entry695344)), IIRC there has been someone posting an ABX proving this in a previous discussion about worst case scenarios. (Here it is (http://www.hydrogenaudio.org/forums/index.php?showtopic=79593&st=25&p=695400&#entry695400), was about maximizing frame sizes to improve quality. Reducing the actual information that has to fit into a single frame could lead to the same improvement.)
Title: iTunes Encodes vs. Amazon (Spectrograms)
Post by: saratoga on 2012-05-14 04:12:38
Does this discount the validity of saying one encode is of a "higher quality" or that it is "better" in that it retains more of the source?


Yes, its still a meaningless test.

These graphs can still tell us "what is missing"


No.  All they show you is what the lowpass filter used to preprocess the PCM was set to.

Thoughts...


Don't we have a FAQ entry for this kind of thing?  I feel like we must its asked constantly.

Edit:  Yes, took me a minute to find it though.  See the entry here and the links:

http://wiki.hydrogenaudio.org/index.php?ti...dio_Compression (http://wiki.hydrogenaudio.org/index.php?title=FAQ#General_Audio_Compression)
Title: iTunes Encodes vs. Amazon (Spectrograms)
Post by: greynol on 2012-05-14 04:48:31
But if the music is more full in the spectrogram and closer to the original piece than another version, then it is higher quality.

One only needs to play with the blade encoder (http://www2.arnes.si/~mmilut/BladeEnc.html) in order to dismiss the idea that a full spectrum means higher quality as rubbish and nonsense.  In terms of "closer to the original" you need to define it, at which point the best you can possibly do is a truism which isn't very interesting.
Title: iTunes Encodes vs. Amazon (Spectrograms)
Post by: Engelsstaub on 2012-05-14 05:01:32
Thoughts...


Don't we have a FAQ entry for this kind of thing?  I feel like we must its asked constantly.

Edit:  Yes, took me a minute to find it though.  See the entry here and the links:

http://wiki.hydrogenaudio.org/index.php?ti...dio_Compression (http://wiki.hydrogenaudio.org/index.php?title=FAQ#General_Audio_Compression)


If you don't want to participate in a discussion, feel free not to.
Title: iTunes Encodes vs. Amazon (Spectrograms)
Post by: Engelsstaub on 2012-05-14 05:06:25
First of all, if you can't hear tones above 20khz, then this would be "useless" information to begin with.


That's a good point, Onkl. I'm no expert, but I'm seeing frequencies below this being cut off. The average bitrate for the Amazon encode is seemingly higher.

FWIW I've seen similar results from CBR MP3s @320 Kbps from Zune Marketplace.

Title: iTunes Encodes vs. Amazon (Spectrograms)
Post by: eahm on 2012-05-14 05:19:31
First of all, if you can't hear tones above 20khz

OT: Actually both my brothers can up to 23khz, don't know how but they can.
Title: iTunes Encodes vs. Amazon (Spectrograms)
Post by: saratoga on 2012-05-14 05:21:13
Thoughts...


Don't we have a FAQ entry for this kind of thing?  I feel like we must its asked constantly.

Edit:  Yes, took me a minute to find it though.  See the entry here and the links:

http://wiki.hydrogenaudio.org/index.php?ti...dio_Compression (http://wiki.hydrogenaudio.org/index.php?title=FAQ#General_Audio_Compression)


If you don't want to participate in a discussion, feel free not to.


You should begin by reading that link.  Then if you still have questions, ask here. 

But no sense explaining something here that's already explained better elsewhere. 

Title: iTunes Encodes vs. Amazon (Spectrograms)
Post by: Engelsstaub on 2012-05-14 05:43:15
Okay, Saratoga. I said: "These graphs can still tell us "what is missing" and you said: "No. (Emphasis mine.) All they show you is what the lowpass filter used to preprocess the PCM was set to."

I'm seeing that one encode is missing nearly everything above 19 kHz. That sure seems to demonstrate that the spectrogram is showing me something that is missing.

(...and I never said I was "hearing" it.) What exactly do I need to read that refutes this?

Even if I drill down to this link HA (http://wiki.hydrogenaudio.org/index.php?title=Lossy) I'm beginning with reading this: "Lossy compression is a form of compression that significantly reduce multimedia file size by throwing away information imperceptible to humans." If this is true than I believe Amazon's encoder is taking some extreme liberties with what it "thinks" is imperceptible to humans. eahm's brothers aside, it doesn't take some extraordinary ear to hear frequencies that were discarded in the mp3.

Edit: improper wording.
Title: iTunes Encodes vs. Amazon (Spectrograms)
Post by: saratoga on 2012-05-14 06:00:45
Okay, Saratoga. I said: "These graphs can still tell us "what is missing" and you said: "No. (Emphasis mine.) All they show you is what the lowpass filter used to preprocess the PCM was set to."

I'm seeing that one encode is missing nearly everything above 19 kHz. That sure seems to demonstrate that the spectrogram is showing me something that is missing.


If they could tell you what was missing, then you would probably conclude your AAC file is lossless.  Not so, much that is missing is not shown.

Instead, what they show is what the lowpass filter setting was that was used to preprocess the signal before it was encoded. 

Even if I drill down to this link HA (http://wiki.hydrogenaudio.org/index.php?title=Lossy) I'm beginning with reading this: "Lossy compression is a form of compression that significantly reduce multimedia file size by throwing away information imperceptible to humans."


Keep reading past the first link

If this is true than I believe Amazon's encoder is taking some extreme liberties with what it "thinks" is imperceptible to humans. eahm's brothers aside, it doesn't take some extraordinary ear to hear frequencies that were discarded in the mp3.


Hearing music -40dB below peak at 19kHz would in fact be quite extraordinary!  I think even a pure tone would be extremely impressive, and certainly beyond my hearing.
Title: iTunes Encodes vs. Amazon (Spectrograms)
Post by: ExUser on 2012-05-14 06:30:07
eahm's brothers aside, it doesn't take some extraordinary ear to hear frequencies that were discarded in the mp3.
According to the Terms of Service, to continue this discussion, you must provide scientific evidence that you do, indeed, hear said difference if you wish to claim that you can. It may seem counterintuitive that something you can see is not necessarily something you can hear, but that is pure illusion.

saratoga's position mirrors that of mine as a moderator.
Title: iTunes Encodes vs. Amazon (Spectrograms)
Post by: onkl on 2012-05-14 06:40:03
First of all, if you can't hear tones above 20khz, then this would be "useless" information to begin with.


That's a good point, Onkl. I'm no expert, but I'm seeing frequencies below this being cut off. The average bitrate for the Amazon encode is seemingly higher.

The difference in bitrate is due to completly different formats/encoders. If you were to encode the same file with everything but the lowpass being identical, you would see a decrease in bitrate OR an increase in quality for hard to encode passages hitting the frame limit OR in case of exceptional hearing capabilites you might notice the absence of higher frequencies.

Try this test (http://www.hydrogenaudio.org/forums/index.php?showtopic=93733&hl=) and then redo it with music playing in the background. You might be supprised how hard it is to hear anything above 16khz.
Title: iTunes Encodes vs. Amazon (Spectrograms)
Post by: saratoga on 2012-05-14 07:29:52
Someone should add a feature to LAME that subtracts the input and lowpass PCM samples, and then uses the difference to guide the quantizer such that it adds noise with vaguely similar power spectrum to bands above the lowpass cut off (but of course chooses the signal such that it is compressible with little bitrate overhead).

Would be very useful for companies like amazon that sell MP3s to people
Title: iTunes Encodes vs. Amazon (Spectrograms)
Post by: Engelsstaub on 2012-05-14 07:51:16
Canar: I never claimed anything regarding my personal hearing. In fact if you read the entire thread I state more than once that I'm not personally claiming to hear any difference in these files at this bitrate. I said that which Amazon's encoder saw fit to throw out was within the range of human hearing. I see things below that 20 kHz getting completely thrown out. If I worded something poorly then please try to see it in the context of that which I've stated again and again.

I'm basically trying to figure out how to interpret spectrograms. If those frequencies are still there and my program is "lying" to me, then I'd really like to know.

Saratoga: is there any particular reason I have to read everything on HA and you can't just give me a direct link to something that tells me why your answer would be no to "these graphs can still tell us what is missing?" You want me to "keep reading past that link." Read what? What am I missing here that you can't be bothered to reiterate?

Just asking simple questions. If you don't want to discuss it then don't. Give me a specific link to what you'd like me to consider or let someone else discuss it with me.

Onkl: I see what you're saying. I know I can't hear the stuff that was cut off of in the mp3 file. My point is only that it is gone and I am just wondering if that was more significant than whatever lossy reduction the iTunes encoder performed? Or maybe: "which file theoretically would better represent the source to all humans?"
Title: iTunes Encodes vs. Amazon (Spectrograms)
Post by: Engelsstaub on 2012-05-14 07:56:03
Someone should add a feature to LAME that subtracts the input and lowpass PCM samples, and then uses the difference to guide the quantizer such that it adds noise with vaguely similar power spectrum to bands above the lowpass cut off (but of course chooses the signal such that it is compressible with little bitrate overhead).

Would be very useful for companies like amazon that sell MP3s to people


Oh, now you're funny too. I can get that this discussion is too far beneath you because you're a dev or whatever. Why do you still bother to dignify people with less knowledge than you about certain subjects?

Just close the thread if you want, Canar. There's just way too many flaming dickheads on here to have a constructive conversation at my level. I should have known better.
Title: iTunes Encodes vs. Amazon (Spectrograms)
Post by: saratoga on 2012-05-14 08:09:36
Oh, now you're funny too. I can get that this discussion is too far beneath you because you're a dev or whatever. Why do you still bother to dignify people with less knowledge than you about certain subjects?


I'll try this one more time.  The answer to this question:

I'm basically trying to figure out how to interpret spectrograms.


Is this:

All they show you is what the lowpass filter used to preprocess the PCM was set to.


or this:

Quote
Nothing can be said about quality or audible difference by looking at pictures


You should look at those graphs and be able to read the low pass settings used to preprocess the PCM.  Also, maybe guess the sampling rate, but that should be obvious I think.  There is nothing else to interpret.  Nothing else is contained in those pictures.

Quote from:  link=msg=795463 date=0
There's just way too many flaming dickheads on here to have a constructive conversation at my level. I should have known better.


Don't insult me for because you didn't get the answer you wanted.  I only offered you an honest answer.  If you're not interested in learning new things, you should not be asking questions.
Title: iTunes Encodes vs. Amazon (Spectrograms)
Post by: db1989 on 2012-05-14 08:49:47
Canar: I never claimed anything regarding my personal hearing. In fact if you read the entire thread I state more than once that I'm not personally claiming to hear any difference in these files at this bitrate. I said that which Amazon's encoder saw fit to throw out was within the range of human hearing. I see things below that 20 kHz getting completely thrown out.
OK, so the lowpass is at 19 kHz rather than 20 kHz. What now? The point is still that most people will not hear any such frequencies at anything near a ‘normal’ SPL, even as a pure tone—and especially not as part of complex music with content that runs the gamut of all lower frequencies.

Quote
I'm basically trying to figure out how to interpret spectrograms. If those frequencies are still there and my program is "lying" to me, then I'd really like to know.
No, they’re not there. Why would a program lie? But again: Chances are you and almost every other human in the world cannot hear them, so removing them might actually improve perceptual quality (or, at higher bitrates, the theoretical probability thereof, since both lowpassed and non-lowpassed encodes might be transparent and thus indistinguishable) by sparing bits for lower and more probably audible frequencies, rather than reducing it as you appear to be inferring from a simplistic visual summary.

Quote
Onkl: I see what you're saying. I know I can't hear the stuff that was cut off of in the mp3 file. My point is only that it is gone and I am just wondering if that was more significant than whatever lossy reduction the iTunes encoder performed? Or maybe: "which file theoretically would better represent the source to all humans?"
Whilst I cannot presume to speak for “all humans”, perceptual technologies such as lossy audio compression are not aimed at that amorphous group. They’re aimed at most humans. Otherwise, nothing would ever advance due to encoders being too nervous to excise anything for fear of that one mythical golden-eared sage.
Title: iTunes Encodes vs. Amazon (Spectrograms)
Post by: Porcus on 2012-05-14 09:17:26
Is this low-pass thing an AAC vs MP3 difference, rather than 'iTunes' vs 'Amazon'?
Title: iTunes Encodes vs. Amazon (Spectrograms)
Post by: LithosZA on 2012-05-14 09:41:20
Encoding stuff above 20Khz is dumb especially for lossy encodings. You are wasting good bits that are better used for stuff you can hear instead.
The lossy encoding will sound better if you do a lowpass at 20Khz or slightly higher/lower.

For lossless I would say keep whatever frequencies you want even if you can't hear them for peace of mind.
Title: iTunes Encodes vs. Amazon (Spectrograms)
Post by: db1989 on 2012-05-14 09:50:24
For lossless I would say keep whatever frequencies you want even if you can't hear them for peace of mind.
I’d say “Well, of course!”, but then there are tools like lossyWAV et al., which some users like to apply before ‘lossless’ compression; lowpassing beforehand doesn’t seem so different. I would do neither, but that’s me being a literalist when it comes to lossless-ness.
Title: iTunes Encodes vs. Amazon (Spectrograms)
Post by: onkl on 2012-05-14 10:11:02
The lossy encoding will sound better if you do a lowpass at 20Khz or slightly higher/lower.

Well that would be a too bold generalization of a rather theoretically worst case scenario. I'm not even sure these frame size limitations apply to AAC aswell. But it would certainly lower the required bitrate and thus increase efficiency.

that one mythical golden-eared sage.

Title: iTunes Encodes vs. Amazon (Spectrograms)
Post by: pdq on 2012-05-14 11:54:14
All right, let me try my hand at an analogy.

Two patrons walk into a restaurant. Patron A is known to be a very generous tipper, while patron B is just an average tipper. They both sit down and order a meal, but both patrons have exactly the same amount to spend.

Patron A orders a hamburger and a coke, leaving enough to cover a very generous tip. Patron B, however, orders a steak and a glass of wine.

After they leave, someone wonders who had the higher quality meal. Looking only at the size of the tip, he concludes that patron A must have had the better meal.

The bottom line is, you can choose any metric you like for judging quality, but if you choose the wrong metric then you may not get the answer you want.
Title: iTunes Encodes vs. Amazon (Spectrograms)
Post by: Porcus on 2012-05-14 11:58:21
Encoding stuff above 20Khz is dumb especially for lossy encodings. You are wasting good bits that are better used for stuff you can hear instead.


Just because there are high frequencies, it does not mean that they are the same as in the original. At least theoretically, it could simply be that one of the basis vectors decodes to a signal with high frequency content. Not faithful in the sense that it is precisely the same high-frequency content as the original signal, but at least those listeners (if any) which can hear that high, will get a comparable tonal balance. Or whatever. As long as it isn't too loud, it probably isn't worse than silence, and it wouldn't cost any bits. (Too dumb example: if you choose a square wave as basis rather than a sine wave, you will automatically get high frequency content.)


Old days' organ makers employed a few tricks up in the treble, for e.g. 'reed' type sound. To make the sound somewhat brighter, you would use a pipe for the overtones. Of course in the far treble end, you would have to make a pipe for a hardly-audible frequency. IIRC, there are quite some where they would save on the number of 'overtone' pipes at the extreme of the range. They would strictly speaking be disharmonic, but on the other hand, leaving them out would yield a sudden discontinuity in the tonal balance, and (by the organ maker's ear) that was more important – the disharmony was hardly anything the listeners would care about.
Title: iTunes Encodes vs. Amazon (Spectrograms)
Post by: 2Bdecided on 2012-05-14 11:58:30
I'm basically trying to figure out how to interpret spectrograms.
One has a ~19kHz low passs filter, the other doesn't.

You can't read much else useful from these pictures...

The temporal resolution of those pictures is about half a second (1 pixel = 400ms). The temporal resolution of the human ear is about 5ms at best due to temporal masking, and 0.011ms at best when detecting interaural time delays. So most of the interesting, audible and relevant details are lost in those pictures.

The amplitude resolution of those pictures is something like 10dB - at least my eyes struggle to see a change any smaller than about 10dB on the colour scale. Whereas human ears can, at best, detect a 1dB change. So again, most audible changes are basically invisible in those pictures.

A to-the-nearest-10dB snapshot of the spectrum, taken only twice each second - it still tells you a lot of course, but it also tells you nothing useful when comparing two almost identical files. In fact, it can perfectly hide many extremely audible differences. While clearly showing you some inaudible ones!

Cheers,
David.
Title: iTunes Encodes vs. Amazon (Spectrograms)
Post by: dhromed on 2012-05-14 12:22:51
I said that which Amazon's encoder saw fit to throw out was within the range of human hearing.

It's not quite a clear-cut as that. It's not comparable to a cropped image.

I know I can't hear the stuff that was cut off of in the mp3 file.


Would you also say that ultraviolet and infrared are "missing" from paintings and photographs?

Or maybe: "which file theoretically would better represent the source to all humans?"

The one without the high frquences, most likely.
Title: iTunes Encodes vs. Amazon (Spectrograms)
Post by: Engelsstaub on 2012-05-14 15:34:44
I really wasn't clear as to how these spectrographs weren't somehow helpful in comparing encodes.

Nearly every reply has been helpful (to me) since my last. Thanks. I felt 2Bdecided's explanation pretty much convinced me that I shouldn't be looking at these graphs and expecting as much as I was by way of meaningful comparison.

I apologize for not being on the same page as most of you. Hopefully now I am. (This really isn't worth me getting upset over and it wasn't my intention.)
Title: iTunes Encodes vs. Amazon (Spectrograms)
Post by: dhromed on 2012-05-14 21:43:08
This really isn't worth me getting upset over


Title: iTunes Encodes vs. Amazon (Spectrograms)
Post by: ExUser on 2012-05-14 22:18:29
I apologize for not being on the same page as most of you. Hopefully now I am.
There is no need to apologize, though the sentiment is welcome. Helping people understand this stuff is one of the main points of this forum. I'm glad to see you're starting to understand.
Title: iTunes Encodes vs. Amazon (Spectrograms)
Post by: mjb2006 on 2012-05-15 01:16:33
Just because there are high frequencies, it does not mean that they are the same as in the original.

I believe this is especially true for the AAC(-LC) file. It probably uses Perceptual Noise Substitution (PNS) (http://wiki.hydrogenaudio.org/index.php?title=Perceptual_Noise_Substitution) to generate noise at decoding time. I wouldn't be surprised if most of those uppermost frequencies are from this effect. Maybe someone with knowledge of Apple's encoder can confirm?
Title: iTunes Encodes vs. Amazon (Spectrograms)
Post by: lvqcl on 2012-05-15 19:04:02
Given the cons of using these tools (read: iPod can't decode it properly) it is probably not a good idea to enable them.


So at least in 2007 Apple encoder didn't use PNS