Changes between Initial Version and Version 2 of Ticket #1904

Feb 4, 2016 6:28:48 AM (7 years ago)


  • Ticket #1904

    • Property Status changed from new to closed
    • Property Resolution changed from to fixed
  • Ticket #1904 – Description

    initial v2  
    11Opus is a totally open, royalty-free, highly versatile audio codec. Opus is unmatched for interactive speech and music transmission over the Internet, but is also intended for storage and streaming applications. It is standardized by the Internet Engineering Task Force (IETF) as RFC 6716 which incorporated technology from Skype's SILK codec and Xiph.Org's CELT codec. (From 
    3 How to use: 
     3'''How to use:''' 
    441. Download Opus source code from [ here] (latest stable release 1.1.2 or above is recommended). For iOS, you can get the build script [ here] or [ here]. For Android, you can get the Android makefile [ here]. 
    551. Run PJSIP's {{{configure}}} script with the option {{{--with-opus=your_opus_installation_dir}}} 
     7'''Opus Codec Settings''' 
     10When 2.5 is released, provide a link to the doxygen doc instead: [] 
     13General codec settings for this codec such as VAD and PLC can be  
     14manipulated through the setting field in #pjmedia_codec_param 
     15(see the documentation of #pjmedia_codec_param for more info). 
     17For Opus codec specific settings, such as sample rate, 
     18channel count, bit rate, complexity, and CBR, can be configured 
     19in #pjmedia_codec_opus_config. 
     20The default setting of sample rate is specified in  
     21#PJMEDIA_CODEC_OPUS_DEFAULT_SAMPLE_RATE. The default setting of 
     22bitrate is specified in #PJMEDIA_CODEC_OPUS_DEFAULT_BIT_RATE. 
     23And the default setting of complexity is specified in 
     26After modifying any of these settings, application needs to call 
     27#pjmedia_codec_opus_set_default_param(), which will generate the 
     28appropriate decoding fmtp attributes. 
     30Here is an example of modifying the codec settings: 
     31 {{{ 
     32    pjmedia_codec_param param; 
     33    pjmedia_codec_opus_config opus_cfg; 
     35    pjmedia_codec_mgr_get_default_param(.., &param); 
     36    pjmedia_codec_opus_get_config(&opus_cfg); 
     37    ... 
     38    // Set VAD 
     39    param.setting.vad = 1; 
     40    // Set PLC 
     41    param.setting.vad = 1; 
     42    // Set sample rate 
     43    opus_cfg.sample_rate = 16000; 
     44    // Set channel count 
     45    opus_cfg.channel_cnt = 2; 
     46    // Set bit rate 
     47    opus_cfg.bit_rate = 20000; 
     48    ... 
     49    pjmedia_codec_opus_set_default_param(&opus_cfg, &param); 
     50 }}}