opus icon indicating copy to clipboard operation
opus copied to clipboard

opus encode 20-24khz audio

Open dragnDriver opened this issue 4 years ago • 1 comments

I find opus only encode 20khz audio. can i modify the array(static const opus_int16 eband5ms[]) to let opus can encode 20k-24khz audio. static const opus_int16 eband5ms[] = { /0 200 400 600 800 1k 1.2 1.4 1.6 2k 2.4 2.8 3.2 4k 4.8 5.6 6.8 8k 9.6 12k 15.6 20k 24k/
0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 24, 28, 34, 40, 48, 60, 78, 100,
}; when i change 100 to 120, The program crashed.

dragnDriver avatar Jun 16 '21 11:06 dragnDriver

The supported sample rates are relatively prime, so you can't just change the band size without redesigning everything else. Just resample your audio to the next-higher supported sample rate before encoding.

rillian avatar Jun 16 '21 16:06 rillian