[Freeswitch-dev] Recompile mod_opus for 8KHz sampling rate

Calvin Walton calvin.walton at kepstin.ca
Mon Aug 5 20:46:04 MSD 2013

On Mon, 2013-08-05 at 16:59 +0200, Tamas Jalsovszky wrote:
> Is there any info how much  bandwidth is required for 48kHz audio? How CPU
> hungry is downsampling to 8kHz G711?
> According to opus-codec.org, opus can use sampling rates from 8kHz, not
> just 48kHz. In cases when the call ends in PSTN, won't be appropriate to
> support 8kHz sampling rate in FS too?

As in all things in life - it's complicated :)

Opus is actually two codecs combined together - CELT, which always uses
48kHz (but can apply a bandpass to improve efficiency at low rates), and
SILK, which runs at 8, 12, or 16kHz. The encoder dynamically selects
between them (and can even use both in parallel in hybrid mode) based on
the selected bitrate, the chosen voice/music mode, and analysis of the
audio. The sampling rate selected can change within the stream as the
audio changes.
The end result is that the Opus codec actually has an internal
resampler, and it cannot be disabled.

However, the libopus API interface can allow the input/output audio to
be any of 8, 12, 16, 24, or 48kHz. This sets the mode of the
internal resampler used by Opus to a different value. It might be
interesting to try adding support for selecting the API interface rate
in freeswitch, as this could avoid running a *second* resample step when
you are transcoding into a different format.

Calvin Walton <calvin.walton at kepstin.ca>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 4027 bytes
Desc: not available
Url : http://lists.freeswitch.org/pipermail/freeswitch-dev/attachments/20130805/c185f377/attachment-0001.bin 

Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-dev mailing list