opus icon indicating copy to clipboard operation
opus copied to clipboard

Support sampling rates beyond 48 kHz

Open HT-7 opened this issue 1 year ago • 3 comments

If the predecessor Vorbis supports up to 200 kHz, why doesn't Opus?

Even if 48 kHz sampling is more than enough for human hearing, higher frequencies could be useful for things like dog whistles.

Also, 96 kHz might improve the clarity of high tones since there are more samples available per tone.

HT-7 avatar Oct 18 '24 17:10 HT-7

Because there's a vast well of scientific literature that 24kHz is already well above the threshold of hearing even in the most sensitive people, as is the default 20kHz lowpass. Not just published papers, but large public testing by standards committees, codec makers, and enthusiast sites like Hydrogen Audio, which far outweighs some vague worry that maybe something is being lost. This question has been asked and answered thousands of times. Most of us actually only hear quite a ways below that; mine maxes out around 17kHz these days.

If you want to make music for dogs, or just experiment with testing for your own ears, Opus does support any custom sampling rate you want. You just lose a lot of the unique tuning that makes Opus as good as it is when you go way outside the norm.

silverbacknet avatar Oct 18 '24 22:10 silverbacknet

Also, 96 kHz might improve the clarity of high tones since there are more samples available per tone.

That statement strongly suggests you are unaware of the Nyquist–Shannon sampling theorem. I suggest you start from that page, or have a look at Monty excellent video on the topic.

jmvalin avatar Oct 19 '24 02:10 jmvalin

Because there's a vast well of scientific literature that 24kHz is already well above the threshold of hearing even in the most sensitive people, as is the default 20kHz lowpass. Not just published papers, but large public testing by standards committees, codec makers, and enthusiast sites like Hydrogen Audio, which far outweighs some vague worry that maybe something is being lost. This question has been asked and answered thousands of times. Most of us actually only hear quite a ways below that; mine maxes out around 17kHz these days.

If you want to make music for dogs, or just experiment with testing for your own ears, Opus does support any custom sampling rate you want. You just lose a lot of the unique tuning that makes Opus as good as it is when you go way outside the norm.

Can I decode the audio with default opus build in most players when I encode with custom band matrix? Or is the frequency larger than 20khz can only be seen by libraries with custom band settings?

eebssk1 avatar Apr 05 '25 16:04 eebssk1