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

Anthony Minessale anthony.minessale at gmail.com
Thu Aug 1 23:18:30 MSD 2013


Opus always uses 48khz
On Aug 1, 2013 2:15 PM, "Dimosthenis Arkoudeas" <dimosthenis at arkoudeas.com>
wrote:

>  Hi all,****
>
> ** **
>
> Playing with mod_opus came up with the following.****
>
> I am trying to recompile the codec with 8Khz and 40ms ptime. I am not
> familiar with the codec internals and not really sure what parameters
> should I change…****
>
> ** **
>
> In mod_opus.c :****
>
> ** **
>
> ** **
>
> Line 59:****
>
> int bitrate_bps = codec->implementation->bits_per_second;****
>
>                 int use_vbr = 1;****
>
>                 int complexity = 10;****
>
>                 int use_inbandfec = 1;****
>
>                 int use_dtx = 1;****
>
>                 int bandwidth = OPUS_BANDWIDTH_FULLBAND;****
>
>                 int err;****
>
> ** **
>
> I suppose that the bandwidth must be changed to OPUS_BANDWIDTH_NARROWBAND
> and use_vbr=0 and I haven’t found yet whether the FEC parameter is passed
> to opus encoder.****
>
> ** **
>
> And in Line 184 , I think the following parameters must be changed****
>
> ** **
>
>  switch_codec_interface_t *codec_interface;****
>
>         int samples = 480;****
>
>         int bytes = 960;****
>
>         int mss = 10000;****
>
>         int x = 0;****
>
>         int rate = 48000;****
>
>         int bits = 32000;****
>
> ** **
>
> ** **
>
> Can you propose any values about these parameters to achieve 8khz with
> 40ms packet time? ****
>
> ** **
>
> ** **
>
> Thanks for any help,****
>
> ** **
>
> Dimosthenis****
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> 
> 
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-dev mailing list
> FreeSWITCH-dev at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
> http://www.freeswitch.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-dev/attachments/20130801/69910c50/attachment.html 


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