[opus] [EXT] Re: Opus Tools -- low bitrates, new features in 1.5, "expect-loss"

Petr Pařízek petrparizek2000 at yahoo.com
Thu Aug 8 08:29:31 UTC 2024


 > As the thing is to encode for human ears (AFAIK), I'd say that 4kHz 
is already "quite high",
 > and I wonder who can actually hear pure 20kHz sine.

If you read the beginning of RFC 6716, you learn that Opus never encodes 
any frequencies that are higher than 20 kHz. So at some medium or high 
bitrates, anything above 20 kHz is filtered out, not because of the 
bitrate but just because the Opus format itself doesn't have "room" for 
describing such high-frequency content; it's a bit similar to the fact 
that fixed-point PCM audio is not able to describe any values greater 
than +1 or smaller than -1.

 > Also if you look at the samples for (e.g.) a 20kHz sine samples at 44kHz,
 > the samples hardly resemble a sine wave very mch, and seen reversely:
 > It's not obvious that it once was a pure sine wave.

Please remember that this is *not* how the sound is sent to your 
amplifier or loudspeaker when you press Play. If the DAC on your 
soundcard works properly, the signal is first lowpass-filtered so that 
it only contains frequencies that are lower than 1/2 of your sampling 
rate. If this is done, then the discontinuous steps are not present in 
the signal that comes out of your amplifier/loudspeaker. This is why a 
sample rate of 48 kHz is often more desirable than 44.1 kHz -- i.e. for 
48 kHz, your lowpass filter should keep 20 kHz at full volume and reject 
24 kHz completely, which means you have 4 kHz for the transition. OTOH, 
for 44.1 kHz, your filter should keep 20 kHz at full volume and reject 
22.05 kHz completely, which means you only have 2.05 kHz for the 
transition and the filter may introduce more time/phase distortion at 
high frequencies.

 > IMHO the high frequencies just "add some shine" to the sound;
 > maybe that's what Opus does with higher frequencies, but I don't 
really know.

I'm talking about something else. Opus combines two compression schemes; 
one is CELT, the other is a modified version of what was originally 
SILK. In certain specific situations (which are described in RFC 6716), 
all frequencies lower than 8 kHz are encoded with the modified SILK 
while the frequencies from 8 kHz upwards are encoded with CELT. If the 
bitrate is very low, it seems that Opusenc internally resamples the 
signal to 16 kHz and sends this resampled version to the modified SILK 
algorithm. But if the resampling procedure has a weak anti-aliasing 
filter, then the frequencies of 20-24 kHz turn into frequencies of 4-8 
kHz, which may actually sound annoying.

Petr





More information about the opus mailing list