Skip to main content
Topic: Something really terrible is happening when encoding 20Hz sine wave (Read 15200 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: Something really terrible is happening when encoding 20Hz sine wave

Reply #25
@Nichttaub: which encoding settings are you using for AAC? Because when I convert it to 128k VBR (Q64 - in Foobar) I get a 16kbps file that can be easily ABXed. It's not as bad as the Opus one, but still pretty bad.

The only choice I make is the bitrate and VBR;  I don't turn on any of the other options like HE/AAC because they're really not pertinent to what I need.

Re: Something really terrible is happening when encoding 20Hz sine wave

Reply #26
Every proper mixing should have highpass with very aggresive slope somewhere between 14-40Hz.
1) Newsflash for you: we aren't anymore mastering exclusively for vinyl.
2) Again, even if you were right and everything below ... WTF 40? should be removed, then it is nonsense for a VBR lossy codec to spend so much space on it.
3) You are certainly wrong. It is well-established that the true hearing range goes way below 20 Hz (even with headphones) and there is a lot of useful content below 40 Hz. For one thing, movies have sound too.
But even if you insist that movie soundtracks are worthless and audio codecs should only work on audio-only: Here, the first half of Mount Fuji Doomjazz Corporation: "Space". In my room with my speakers, the 19 Hz drone from 3:23 to 5:03 requires a bit of volume, but the short sweep to 22 Hz and back at 5:03 to 5:05 is there at low listening levels (like, ten dB below my usual, which due to neighbors isn't that loud).
High Voltage socket-nose-avatar

Re: Something really terrible is happening when encoding 20Hz sine wave

Reply #27
52 kbps is a believable value to switch to hybrid mode, which would confirm that the bloating occurs in the CELT layer.  Did you listen to the sub-52 version?  I wonder whether the encoder thinks it is speech or music?

Here you have both attached. No need to ABX ...

Further curiosity checks:
* reducing from 24 bits to 16 bits. Opus @ target 128 also chopped off a third.
* slowed it down to 45 seconds (changing pitch with it). Opus approximately kept size (bitrate went down ... something FLAC wasn't that good at).
* other lossless codecs! OptimFrog "best" halves the FLAC filesize. WavPack suffers from that old near-mono-suboptimality and does worse than FLAC, TAK is evidently not good at 24/48.
High Voltage socket-nose-avatar

Re: Something really terrible is happening when encoding 20Hz sine wave

Reply #28
I'd rather see it tested with all kinds of material, to be honest.

> proper tool like Ultra High Resolution Spectrum Analyzer
would something like iZotope RX Audio Editor be a proper tool? it supports huge window sizes as well.

Sonic Mayhem - "Quake 3 Arena: Noise" - track 03 "Violator"
there's no highpass filtering whatsoever, and near the end there are loud blasts in ~35..10 Hz range
there's also no highpass through the entire album (almost), and the 5th track from it also has tonal sounds going down to ~17 Hz as one of the primary elements. most other tracks from this album also have something happening near 20 Hz too.

OK, but this is "industrial" & "soundtrack", so as some would say, not real music, so let's look at something else...
Manowar - [The Triumph of Steel #07] "The Demon's Whip": the intro sound effects have quite a lot of energy near 20 Hz.
Manowar - "Warriors of the World" (the entire album) - not a whole lot of loud sounds specifically in that range, but the highpass, if any, seems to be not higher than at ~7 Hz.
Dire Straits - "Brothers In Arms" (the entire album) - highpass only at ~20 Hz, some tracks have tonal features going down to ~26 Hz.

I didn't go through all my files, there's probably more examples of "insufficient" highpass and low frequency effects in music.
Also I was not very accurate when saying "almost none from my library have that", but point still holds, it happens and it'd be not very wise to ignore it.

Re: Something really terrible is happening when encoding 20Hz sine wave

Reply #29
listened to the "20hz 30 seconds target 52.opus", I expected that it'd be free from this issue if it switched to different mode, but no... it's actually so bad, lol

Re: Something really terrible is happening when encoding 20Hz sine wave

Reply #30
@porcus: as soon as you actually understand what I wrote there's not much more for me to reply.
1) Newsflash for you: we aren't anymore mastering exclusively for vinyl.
2) Again, even if you were right and everything below ... WTF 40? should be removed, then it is nonsense for a VBR lossy codec to spend so much space on it.
3) You are certainly wrong. It is well-established that the true hearing range goes way below 20 Hz (even with headphones) and there is a lot of useful content below 40 Hz. For one thing, movies have sound too.
But even if you insist that movie soundtracks are worthless and audio codecs should only work on audio-only: Here, the first half of Mount Fuji Doomjazz Corporation: "Space". In my room with my speakers, the 19 Hz drone from 3:23 to 5:03 requires a bit of volume, but the short sweep to 22 Hz and back at 5:03 to 5:05 is there at low listening levels (like, ten dB below my usual, which due to neighbors isn't that loud).
I already addressed all your points, try to catch the whole image instead of nitpicking the details. Please come back with ABX of that doomjazz corporation encoded with Opus@128kbps, that will be interesting.

Re: Something really terrible is happening when encoding 20Hz sine wave

Reply #31
I'd rather see it tested with all kinds of material, to be honest.

> proper tool like Ultra High Resolution Spectrum Analyzer
would something like iZotope RX Audio Editor be a proper tool? it supports huge window sizes as well.

Sonic Mayhem - "Quake 3 Arena: Noise" - track 03 "Violator"
there's no highpass filtering whatsoever, and near the end there are loud blasts in ~35..10 Hz range
there's also no highpass through the entire album (almost), and the 5th track from it also has tonal sounds going down to ~17 Hz as one of the primary elements. most other tracks from this album also have something happening near 20 Hz too.

OK, but this is "industrial" & "soundtrack", so as some would say, not real music, so let's look at something else...
Manowar - [The Triumph of Steel #07] "The Demon's Whip": the intro sound effects have quite a lot of energy near 20 Hz.
Manowar - "Warriors of the World" (the entire album) - not a whole lot of loud sounds specifically in that range, but the highpass, if any, seems to be not higher than at ~7 Hz.
Dire Straits - "Brothers In Arms" (the entire album) - highpass only at ~20 Hz, some tracks have tonal features going down to ~26 Hz.

I didn't go through all my files, there's probably more examples of "insufficient" highpass and low frequency effects in music.
Also I was not very accurate when saying "almost none from my library have that", but point still holds, it happens and it'd be not very wise to ignore it.
I don't know how it is with iZotope, I just checked 3 songs from my library, Madonna from 90s doesn't seem to be highpassed, Bauhaus track with one of the strongest bass I have in my library has clear rolloff at 50Hz, the 3rd track is a couple years old it has visible rolloff at 33Hz.

Anyway we are missing the point. Mixing a bit of music into your sine made the bloat problem disappear. When such infrasonics are on sane level in real material perhaps they're not ABX-able. Please test with real stuff.

Re: Something really terrible is happening when encoding 20Hz sine wave

Reply #32
The only choice I make is the bitrate and VBR;  I don't turn on any of the other options like HE/AAC because they're really not pertinent to what I need.
Do you use Foobar or something else?
I downloaded the latest iTunes and qaac, but I still get the same bad sounding 16k file when I use 128k VBR.
Attaching the settings screenshot and the resulting file, just in case (if I switch to Custom the command line shows --ignorelength -s --no-optimize -V 64 -o %d -).

And FDK AAC is clearly not transparent either (at VBR 4, 128k). Attaching that too.

So to me it looks like Opus, AAC, MP3 and Vorbis all fail at this, at settings where they are usually transparent.

Re: Something really terrible is happening when encoding 20Hz sine wave

Reply #33
For 48KHz, 20 hertz has a wavelength of 2,000, which is a bit large for psychoacoustic codecs, and Opus was created partly for low delay frames. It could be an improper band-pass problem, but the frames line up, and the wave starts at 0. It's suggested that the encoder is underestimating the necessary bits to encode infrasonic bands without a normal signal, but I tested 1KHz on top of 20 and 10Hz, and I still got harmonic distortion in the lower bands. Maybe it's trying to compensate for transient false positives.

The Apple encoder seems to implement a good approach for the primer, producing less distortion in the first cycle of the sine wave than FDK.

Re: Something really terrible is happening when encoding 20Hz sine wave

Reply #34
20 Hz is not an infrasonic band yet. Infrasonic, by definition, is something that cannot be heard because it's lower than lowest human hearable frequency.
Anyway, the issue reproduces up to 27.5 Hz, the latter is a legit musical note.

Re: Something really terrible is happening when encoding 20Hz sine wave

Reply #35
20 Hz is often cited as upper limit of infrasounds. I personally hear down to 14Hz but most often I highpass my music - on non bass(drum) or sfx tracks I often put highpass as high as possible without altering main content, and there's often highpass on master track with quite aggresive slope around 30-50Hz, to keep things clear and under control - unexpected/unwanted content muddies the track and may lead to a number of technical issues with phasing etc.
This thread is not very different from 17kHz sine which most people can hear but would be completely lowpassed by most lossy encodes.
From technical point of view this issue is interesting, but in practice it's irrelevant until something real is found to be ABXable.
Did you try to encode that sine from 16bit source and at much lower levels?

Re: Something really terrible is happening when encoding 20Hz sine wave

Reply #36
Define "something real" first

Re: Something really terrible is happening when encoding 20Hz sine wave

Reply #37
Some music or soundtrack actually released, even synthesized but anyhow mastered for general playback. Of course we can torment psychoacoustic encoders with artificial, extreme, near clipping sines, sawtooths and square waves, but as well we could judge them purely by spectrograms etc...

Re: Something really terrible is happening when encoding 20Hz sine wave

Reply #38
Quote
anyhow mastered for general playback
artificial
extreme
these are highly subjective.

Quote
as well we could judge them purely by spectrograms
no. it's either ABX-able or not, it's that simple.
judging by spectrograms doesn't work, hope I don't need to explain why.

Re: Something really terrible is happening when encoding 20Hz sine wave

Reply #39
Using Porcus' language - newsflash for you: all codecs are tuned towards something, in case of lossy audio codecs they're best tuned for highly subjective "everyday audio", where 24bit mono 30s nearly clipping 20Hz pure sine doesn't even stand close.
I have a bunch of artificial music from old 8/16-bit computers - PWM sounds, 100% stereo separation, full scale amplitudes, extreme transients, DC offsets, pure sinus, triangle, sawtooth, square waves and white noise - all lossy (in terms of quality) and lossless (in terms of size) audio codecs fail spectacularly. Unexpected?

That being said, I'm interested what actually causes the issue too. And even more - does it affect several real soundtracks mentioned in this thread.

Re: Something really terrible is happening when encoding 20Hz sine wave

Reply #40
This issue with the encoder is certainly ABX'able because I can hear the harmonic distortion when 20Hz alone without having to increase the volume any further; 20Hz by itself is not easy to hear at any volume. It will affect real soundtracks that have these low frequencies, the question is how much will they be affected until this issue is fixed.

Also, correction from earlier: at 48K, 20Hz has a wavelength of 2,400. That's nearly the size of the largest block possible with Opus — 2,880. And half of 2,880 as a wavelength would make 33⅓Hz, close to 27.5 and where this problem doesn't occur at all. So I'm thinking this has something to do with the blocking scheme, maybe the limits of a discrete transform somewhere. All of the mentioned lossy codecs that can't properly handle this low band range have had to deal with (pre)echo to get them as good as they are. The 3Hz highpass shouldn't affect 20Hz if it's done properly, but it may affect the starting phase.

Re: Something really terrible is happening when encoding 20Hz sine wave

Reply #41
Instead of theorising lets make another funny test:
Here is mentioned Madonna piece which originally is not highpassed. I lowpassed it so top content is up to 27,5Hz. Unfortunately the content being at natural levels was inaudible (you know the ATH curves for these frequencies right?), so I brought it to insane levels we are dealing with in this thread, by normalising it to -1dB so it is audible.
Please report problems.

Re: Something really terrible is happening when encoding 20Hz sine wave

Reply #42
First clip (the low frequencies of the song) sounds like a night club from outside. The latter sounds like a jetliner is also passing by in the sky.

Opus 1.3 is just not very accurate outside of the 33-17KHz range. In other tests I've performed, frequencies above 17KHz can be significantly messier than the input. So Opus is good for the most audible range of human hearing, and AAC is better at full range encoding.

 

Re: Something really terrible is happening when encoding 20Hz sine wave

Reply #43
Quote
anyhow mastered for general playback
artificial
extreme
these are highly subjective.

Quote
as well we could judge them purely by spectrograms
no. it's either ABX-able or not, it's that simple.

People usually expect ABX tests to be performed with real audio.  Using synthetic test signals, all manner of things can be ABXed, but if they don't matter then the test is less interesting. 

It sounds like here either there is some bug in the encoder, or if it is fundamental in how the frequency analysis works, they should just raise the high pass filter cut off a little. 

Re: Something really terrible is happening when encoding 20Hz sine wave

Reply #44
not just a little, but all the way up to 30 Hz, it seems.

Re: Something really terrible is happening when encoding 20Hz sine wave

Reply #45
So I had a look at this to see what's going on. Long story short, the problem isn't really what's in the file (20-Hz tone) as what isn't (anything other than the tone). If I remove the DC rejection filter (which isn't the problem here, it just makes debugging harder), then the decoded file has an SNR around 48 dB -- way more than typically required for transparency in a lossy codec because of the masking. The problem here is that the tone is nearly inaudible, so it cases almost no masking of the residual noise. If there were other content in the file, then that content would easily mask the noise. As far as I can tell, there's no easy fix for that (CELT cannot allocate more than 8 bits/sample, or 48 dB band SNR). Fortunately, it's rather rare to encounter a full-scale 20 Hz-tone with no other content present at the same time.

Re: Something really terrible is happening when encoding 20Hz sine wave

Reply #46
@jmvalin it reproduces also with 27.5 Hz and also if I add quite a lot of white noise on top (which would be loud enough to hear it too). If you want, I can upload a sample.

 
SimplePortal 1.0.0 RC1 © 2008-2019