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