summaryrefslogtreecommitdiff
path: root/configs/samples/codecs.conf.sample
blob: 8c9ce66313126e450d6744d21b59bbb5bed04872 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
[speex]
; CBR encoding quality [0..10]
; used only when vbr = false
quality => 3

; codec complexity [0..10]
; tradeoff between cpu/quality
complexity => 2

; perceptual enhancement [true / false]
; improves clarity of decoded speech
enhancement => true

; voice activity detection [true / false]
; reduces bitrate when no voice detected, used only for CBR
; (implicit in VBR/ABR)
vad => true

; variable bit rate [true / false]
; uses bit rate proportionate to voice complexity
vbr => true

; available bit rate [bps, 0 = off]
; encoding quality modulated to match this target bit rate
; not recommended with dtx or pp_vad - may cause bandwidth spikes
abr => 0

; VBR encoding quality [0-10]
; floating-point values allowed
vbr_quality => 4

; discontinuous transmission [true / false]
; stops transmitting completely when silence is detected
; pp_vad is far more effective but more CPU intensive
dtx => false

; preprocessor configuration
; these options only affect Speex v1.1.8 or newer

; enable preprocessor [true / false]
; allows dsp functionality below but incurs CPU overhead
preprocess => false

; preproc voice activity detection [true / false]
; more advanced equivalent of DTX, based on voice frequencies
pp_vad => false

; preproc automatic gain control [true / false]
pp_agc => false
pp_agc_level => 8000

; preproc denoiser [true / false]
pp_denoise => false

; preproc dereverb [true / false]
pp_dereverb => false
pp_dereverb_decay => 0.4
pp_dereverb_level => 0.3

; experimental bitrate changes depending on RTCP feedback [true / false]
experimental_rtcp_feedback => false


[plc]
; for all codecs which do not support native PLC
; this determines whether to perform generic PLC
; there is a minor performance penalty for this.
; By default plc is applied only when the 2 codecs
; in a channel are different.
genericplc => true
; Apply generic plc to channels even if the 2 codecs
; are the same.  This forces transcoding via slin so
; the performance impact should be considered.
; Ignored if genericplc is not also enabled.
genericplc_on_equal_codecs => false

; Generate custom formats for formats requiring attributes.
; After defining the custom format, the name used in defining
; the format can be used throughout Asterisk in the format 'allow'
; and 'disallow' options.
;
; Example: silk8 is a predefined custom format in this config file.
; Once this config file is loaded, silk8 can be used anywhere a
; peer's codec capabilities are defined.
;
; In sip.conf 'silk8' can be defined as a capability for a peer.
; [peer1]
; type=peer
; host=dynamic
; disallow=all
; allow=silk8 ;custom codec defined in codecs.conf
;
; LIMITATIONS
; Custom formats can only be defined at startup.  Any changes to this
; file made after startup will not take into effect until after Asterisk
; is restarted.
;

; Default Custom SILK format definitions, only one custom SILK format per
; sample rate is allowed.
[silk8]
type=silk
samprate=8000
fec=true           ; turn on or off encoding with forward error correction.
                   ; On recommended, off by default.
packetloss_percentage=10   ; Estimated packet loss percentage in uplink direction.  This
                           ; affects how much redundancy is built in when using fec.
                           ; The higher the percentage, the larger amount of bandwidth is
                           ; used. Default is 0%, 10% is recommended when fec is in use.

maxbitrate=10000    ; Use the table below to make sure a useful bitrate is choosen
                    ; for maxbitrate.  If not set or value is not within the bounds
                    ; of the encoder, a default value is chosen.
                    ;
                    ;  sample rate | bitrate range
                    ;  8khz        | 5000 - 20000 bps
                    ;  12khz       | 7000 - 25000 bps
                    ;  16khz       | 8000 - 30000 bps
                    ;  24khz       | 20000- 40000 bps
                    ;
;dtx=true       ; Encode using discontinuous transmission mode or not. Turning this
                ; on will save bandwidth during periods of silence at the cost of
                ; increased computational complexity.  Off by default.

[silk12]
type=silk
samprate=12000
maxbitrate=12000
fec=true
packetloss_percentage=10;

[silk16]
type=silk
samprate=16000
maxbitrate=20000
fec=true
packetloss_percentage=10;

[silk24]
type=silk
samprate=24000
maxbitrate=30000
fec=true
packetloss_percentage=10;


; Default custom CELT codec definitions. Only one custom CELT definition is allowed
; per a sample rate.
;[celt44]
;type=celt
;samprate=44100  ; The samplerate in hz. This option is required.
;framesize=480   ; The framesize option represents the duration of each frame in samples.
                 ; This must be a factor of 2.  This option is only advertised in an SDP
                 ; when it is set.  Otherwise a default of framesize of 480 is assumed
                 ; internally

;[celt48]
;type=celt
;samprate=48000

;[celt32]
;type=celt
;samprate=32000

;============================ OPUS Section Options ============================
;
;[opus]
;type= ; Must be of type "opus" (default: "")
;packet_loss= ; Encoder's packet loss percentage. Can be any number between 0
              ; and 100, inclusive. A higher value results in more loss
              ; resistance. (default: 0)
;complexity= ; Encoder's computational complexity. Can be any number between 0
             ; and 10, inclusive. Note, 10 equals the highest complexity.
             ; (default: 10)
;max_bandwidth= ; Encoder's maximum bandwidth allowed. Sets an upper bandwidth
                ; bound on the encoder. Can be any of the following: narrow,
                ; medium, wide, super_wide, full. (default: full)
;signal= ; Encoder's signal type. Aids in mode selection on the encoder: Can
         ; be any of the following: auto, voice, music. (default: auto)
;application= ; Encoder's application type. Can be any of the following: voip,
              ; audio, low_delay. (default: voip)
;max_playback_rate= ; Override the maximum playback rate in the offer's SDP.
                    ; Any value between 8000 and 48000 (inclusive) is valid,
                    ; however typically it should match one of the usual opus
                    ; bandwidths. A value of "sdp" is also allowed. When set
                    ; to "sdp" then the value from the offer's SDP is used.
                    ; (default: "sdp")
;bitrate= ; Override the maximum average bitrate in the offer's SDP. Any value
          ; between 500 and 512000 is valid. The following values are also
          ; allowed: auto, max, sdp. When set to "sdp" then the value from
          ; the offer's sdp is used. (default: "sdp")
;cbr= ; Override the constant bit rate parameter in the offer's SDP. A value of
      ; 0/false/no represents a variable bit rate whereas 1/true/yes represents
      ; a constant bit rate. A value of "sdp" is also allowed. When set to "sdp"
      ; then the value from the offer's sdp is used. (default: "sdp")
;fec= ; Override the use inband fec parameter in the offer's SDP. A value of
      ; 0/false/no represents disabled whereas 1/true/yes represents enabled.
      ; A value of "sdp" is also allowed. When set to "sdp" then the value from
      ; the offer's sdp is used. (default: "sdp")
;dtx= ; Override the use dtx parameter in the offer's SDP. A value of 0/false/no
      ; represents disabled whereas 1/true/yes represents enabled. A value of
      ; "sdp" is also allowed. When set to "sdp" then the value from the offer's
      ; sdp is used. (default: "sdp")

;=============================== OPUS Examples ================================
;
;[opus]
;type=opus
;max_playback_rate=8000 ; Limit the maximum playback rate on the encoder
;fec=no ; Force no inband fec on the encoder (i.e don't use what's on the SDP)

;[myopus]
;type=opus
;max_bandwidth=wide ; Maximum encoded bandwidth set to wide band (0-8000 Hz
;                   ; audio bandwidth at 16Khz sample rate)
;cbr=yes ; Force a constant bit rate (i.e don't use what's on the SDP)