codecs.conf.sample 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  1. [speex]
  2. ; CBR encoding quality [0..10]
  3. ; used only when vbr = false
  4. quality => 3
  5. ; codec complexity [0..10]
  6. ; tradeoff between cpu/quality
  7. complexity => 2
  8. ; perceptual enhancement [true / false]
  9. ; improves clarity of decoded speech
  10. enhancement => true
  11. ; voice activity detection [true / false]
  12. ; reduces bitrate when no voice detected, used only for CBR
  13. ; (implicit in VBR/ABR)
  14. vad => true
  15. ; variable bit rate [true / false]
  16. ; uses bit rate proportionate to voice complexity
  17. vbr => true
  18. ; available bit rate [bps, 0 = off]
  19. ; encoding quality modulated to match this target bit rate
  20. ; not recommended with dtx or pp_vad - may cause bandwidth spikes
  21. abr => 0
  22. ; VBR encoding quality [0-10]
  23. ; floating-point values allowed
  24. vbr_quality => 4
  25. ; discontinuous transmission [true / false]
  26. ; stops transmitting completely when silence is detected
  27. ; pp_vad is far more effective but more CPU intensive
  28. dtx => false
  29. ; preprocessor configuration
  30. ; these options only affect Speex v1.1.8 or newer
  31. ; enable preprocessor [true / false]
  32. ; allows dsp functionality below but incurs CPU overhead
  33. preprocess => false
  34. ; preproc voice activity detection [true / false]
  35. ; more advanced equivalent of DTX, based on voice frequencies
  36. pp_vad => false
  37. ; preproc automatic gain control [true / false]
  38. pp_agc => false
  39. pp_agc_level => 8000
  40. ; preproc denoiser [true / false]
  41. pp_denoise => false
  42. ; preproc dereverb [true / false]
  43. pp_dereverb => false
  44. pp_dereverb_decay => 0.4
  45. pp_dereverb_level => 0.3
  46. [plc]
  47. ; for all codecs which do not support native PLC
  48. ; this determines whether to perform generic PLC
  49. ; there is a minor performance penalty for this.
  50. ; By default plc is applied only when the 2 codecs
  51. ; in a channel are different.
  52. genericplc => true
  53. ; Apply generic plc to channels even if the 2 codecs
  54. ; are the same. This forces transcoding via slin so
  55. ; the performance impact should be considered.
  56. ; Ignored if genericplc is not also enabled.
  57. genericplc_on_equal_codecs => false
  58. ; Generate custom formats for formats requiring attributes.
  59. ; After defining the custom format, the name used in defining
  60. ; the format can be used throughout Asterisk in the format 'allow'
  61. ; and 'disallow' options.
  62. ;
  63. ; Example: silk8 is a predefined custom format in this config file.
  64. ; Once this config file is loaded, silk8 can be used anywhere a
  65. ; peer's codec capabilities are defined.
  66. ;
  67. ; In sip.conf 'silk8' can be defined as a capability for a peer.
  68. ; [peer1]
  69. ; type=peer
  70. ; host=dynamic
  71. ; disallow=all
  72. ; allow=silk8 ;custom codec defined in codecs.conf
  73. ;
  74. ; LIMITATIONS
  75. ; Custom formats can only be defined at startup. Any changes to this
  76. ; file made after startup will not take into effect until after Asterisk
  77. ; is restarted.
  78. ;
  79. ; Default Custom SILK format definitions, only one custom SILK format per
  80. ; sample rate is allowed.
  81. [silk8]
  82. type=silk
  83. samprate=8000
  84. fec=true ; turn on or off encoding with forward error correction.
  85. ; On recommended, off by default.
  86. packetloss_percentage=10 ; Estimated packet loss percentage in uplink direction. This
  87. ; affects how much redundancy is built in when using fec.
  88. ; The higher the percentage, the larger amount of bandwidth is
  89. ; used. Default is 0%, 10% is recommended when fec is in use.
  90. maxbitrate=10000 ; Use the table below to make sure a useful bitrate is choosen
  91. ; for maxbitrate. If not set or value is not within the bounds
  92. ; of the encoder, a default value is chosen.
  93. ;
  94. ; sample rate | bitrate range
  95. ; 8khz | 5000 - 20000 bps
  96. ; 12khz | 7000 - 25000 bps
  97. ; 16khz | 8000 - 30000 bps
  98. ; 24khz | 20000- 40000 bps
  99. ;
  100. ;dtx=true ; Encode using discontinuous transmission mode or not. Turning this
  101. ; on will save bandwidth during periods of silence at the cost of
  102. ; increased computational complexity. Off by default.
  103. [silk12]
  104. type=silk
  105. samprate=12000
  106. maxbitrate=12000
  107. fec=true
  108. packetloss_percentage=10;
  109. [silk16]
  110. type=silk
  111. samprate=16000
  112. maxbitrate=20000
  113. fec=true
  114. packetloss_percentage=10;
  115. [silk24]
  116. type=silk
  117. samprate=24000
  118. maxbitrate=30000
  119. fec=true
  120. packetloss_percentage=10;
  121. ; Default custom CELT codec definitions. Only one custom CELT definition is allowed
  122. ; per a sample rate.
  123. ;[celt44]
  124. ;type=celt
  125. ;samprate=44100 ; The samplerate in hz. This option is required.
  126. ;framesize=480 ; The framesize option represents the duration of each frame in samples.
  127. ; This must be a factor of 2. This option is only advertised in an SDP
  128. ; when it is set. Otherwise a default of framesize of 480 is assumed
  129. ; internally
  130. ;[celt48]
  131. ;type=celt
  132. ;samprate=48000
  133. ;[celt32]
  134. ;type=celt
  135. ;samprate=32000
  136. ;============================ OPUS Section Options ============================
  137. ;
  138. ; NOTE: Accurate documentation corresponding to your downloaded version of
  139. ; codec_opus is available from Asterisk's CLI:
  140. ;
  141. ; *CLI> config show help codec_opus opus
  142. ;
  143. ;[opus]
  144. ;type= ; Must be of type "opus" (default: "")
  145. ;packet_loss= ; Encoder's packet loss percentage. Can be any number between 0
  146. ; and 100, inclusive. A higher value results in more loss
  147. ; resistance. (default: 0)
  148. ;complexity= ; Encoder's computational complexity. Can be any number between 0
  149. ; and 10, inclusive. Note, 10 equals the highest complexity.
  150. ; (default: 10)
  151. ;max_bandwidth= ; Encoder's maximum bandwidth allowed. Sets an upper bandwidth
  152. ; bound on the encoder. Can be any of the following: narrow,
  153. ; medium, wide, super_wide, full. (default: full)
  154. ;signal= ; Encoder's signal type. Aids in mode selection on the encoder: Can
  155. ; be any of the following: auto, voice, music. (default: auto)
  156. ;application= ; Encoder's application type. Can be any of the following: voip,
  157. ; audio, low_delay. (default: voip)
  158. ;max_playback_rate= ; Override the maximum playback rate in the offer's SDP.
  159. ; Any value between 8000 and 48000 (inclusive) is valid,
  160. ; however typically it should match one of the usual opus
  161. ; bandwidths. (default: 48000)
  162. ;bitrate= ; Override the maximum average bitrate in the offer's SDP. Any value
  163. ; between 500 and 512000 is valid. The following values are also
  164. ; allowed: auto, max. (default: auto)
  165. ;cbr= ; Override the constant bit rate parameter in the offer's SDP. A value of
  166. ; 0/false/no represents a variable bit rate whereas 1/true/yes represents
  167. ; a constant bit rate. (default: no)
  168. ;fec= ; Override the use inband fec parameter in the offer's SDP. A value of
  169. ; 0/false/no represents disabled whereas 1/true/yes represents enabled.
  170. ; (default: yes)
  171. ;dtx= ; Override the use dtx parameter in the offer's SDP. A value of 0/false/no
  172. ; represents disabled whereas 1/true/yes represents enabled. (default: no)
  173. ;=============================== OPUS Examples ================================
  174. ;
  175. ;[opus]
  176. ;type=opus
  177. ;max_playback_rate=8000 ; Limit the maximum playback rate on the encoder
  178. ;fec=no ; No inband fec
  179. ;[myopus]
  180. ;type=opus
  181. ;max_bandwidth=wide ; Maximum encoded bandwidth set to wide band (0-8000 Hz
  182. ; ; audio bandwidth at 16Khz sample rate)
  183. ;cbr=yes ; Negotiate a constant bit rate