You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/Configuration/Codec-Opus.md
+19-36Lines changed: 19 additions & 36 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,35 +8,21 @@ Configuration Options
8
8
9
9
The Opus codec for Asterisk exposes a few configuration options that allow adjustments to be made to the encoder. The following options can be used to define custom format types within the *codecs.conf* file. These custom format types can then be specified in the "allow" line of an endpoint.
10
10
11
-
12
-
13
-
14
-
15
11
| Option Name | Description | Default |
16
12
| --- | --- | --- |
17
-
| type | Must be of type "opus". | "" (empty string) |
18
-
| packet_loss | Encoder's packet loss percentage. Can be any number between *0* and *100*, inclusive. A higher value results in more loss resistance. | 0 |
19
-
| complexity | Encoder's computational complexity. Can be any number between *0* and *10*, inclusive. Note, 10 equals the highest complexity. | 10 |
20
-
| signal | Encoder's signal type. Aids in mode selection on the encoder: Can be any of the following: *auto*, *voice*, *music*. | auto |
21
-
| application | Encoder's application type. Can be any of the following: *voip*, *audio*, *low_delay*. | voip |
22
-
| max_playback_rate\* | Sets the "maxplaybackrate” format parameter on the SDP and also limits the bandwidth on the encoder. Any value between *8000* and *48000* (inclusive) is valid, however typically it should match one of the usual opus bandwidths. Below is a mapping of values to bandwidth:
23
-
24
-
|||
25
-
| --- | --- |
26
-
| 8000 | Narrow Band |
27
-
| 8001 – 16000 | Medium Band |
28
-
| 16001 – 24000 | Wide Band |
29
-
| 24001 – 32000 | Super Wide Band |
30
-
| 32001 – 48000 | Full Band |
31
-
32
-
| 48000 |
33
-
| max_bandwidth | Sets an upper bandwidth bound on the encoder. Can be any of the following: narrow, medium, wide, super_wide, full. | full |
34
-
| bitrate\*| Specify the maximum average bitrate (sdp parameter "maxaveragebitrate"). Any value between 500 and 512000 is valid. The following values are also allowed: *auto*, *max*. | auto |
35
-
| cbr\*| Sets the "cbr" (constant bit rate) format parameter on SDP. Also tells the encoder to use a constant bit rate. A value of *no (*0** or **false** also work) represents a variable bit rate whereas *yes* (*1* or *true* also work) represents a constant bit rate. | 0 |
36
-
| fec\*| Sets the "useinbandfec" format parameter on the SDP. If set, and applicable, the encoder will add in-band forward error correction data. A value of *no (*0** or **false** also work) represents disabled whereas *yes* (*1* or *true* also work) represents enabled. | 0 |
37
-
| dtx\*| Sets the "usedtx" format on the SDP. A value of *no (*0** or **false** also work) represents disabled whereas *yes* (*1* or *true* also work) represents enabled (usedtx). | 0 |
38
-
39
-
\*If the format parameter is set to its default it will not show up in the fmtp attribute line.
13
+
|`type`| Must be of type "opus". | "" (empty string) |
14
+
|`packet_loss`| Encoder's packet loss percentage. Can be any number between *0* and *100*, inclusive. A higher value results in more loss resistance. | 0 |
15
+
|`complexity`| Encoder's computational complexity. Can be any number between *0* and *10*, inclusive. Note, 10 equals the highest complexity. | 10 |
16
+
|`signal`| Encoder's signal type. Aids in mode selection on the encoder: Can be any of the following: *auto*, *voice*, *music*. | auto |
17
+
|`application`| Encoder's application type. Can be any of the following: *voip*, *audio*, *low_delay*. | voip |
18
+
|`max_playback_rate`\*| Sets the "maxplaybackrate” format parameter on the SDP and also limits the bandwidth on the encoder. Any value between *8000* and *48000* (inclusive) is valid, however typically it should match one of the usual opus bandwidths. Below is a mapping of values to bandwidth: <table><thead><tr><th>Rate</th><th>Bandwidth</th></tr></thead><tbody><tr><td>8000</td><td>Narrow Band</td></tr><tr><td>8001 – 16000</td><td>Medium Band</td></tr><tr><td>16001 – 24000</td><td>Wide Band</td></tr><tr><td>24001 – 32000</td><td>Super Wide Band</td></tr><tr><td>32001 – 48000</td><td>Full Band</td></tr><tbody></table> | 48000 |
19
+
|`max_bandwidth`| Sets an upper bandwidth bound on the encoder. Can be any of the following: narrow, medium, wide, super_wide, full. | full |
20
+
|`bitrate`\*| Specify the maximum average bitrate (sdp parameter "maxaveragebitrate"). Any value between 500 and 512000 is valid. The following values are also allowed: *auto*, *max*. | auto |
21
+
|`cbr`\*| Sets the "cbr" (constant bit rate) format parameter on SDP. Also tells the encoder to use a constant bit rate. A value of *no (*0** or **false** also work) represents a variable bit rate whereas *yes* (*1* or *true* also work) represents a constant bit rate. | 0 |
22
+
|`fec`\*| Sets the "useinbandfec" format parameter on the SDP. If set, and applicable, the encoder will add in-band forward error correction data. A value of *no (*0** or **false** also work) represents disabled whereas *yes* (*1* or *true* also work) represents enabled. | 0 |
23
+
|`dtx`\*| Sets the "usedtx" format on the SDP. A value of *no (*0** or **false** also work) represents disabled whereas *yes* (*1* or *true* also work) represents enabled (usedtx). | 0 |
24
+
25
+
\* If the format parameter is set to its default it will not show up in the fmtp attribute line.
40
26
41
27
Examples
42
28
--------
@@ -45,19 +31,16 @@ Limit the maximum playback rate of any endpoint that allow "opus" and don't incl
45
31
46
32
```
47
33
[opus]
48
-
type=opus
49
-
max_playback_rate=8000 ; Limit the bandwidth on the encoder to narrow band
50
-
fec=no ; Do not include in-band forward error correction data
51
-
34
+
type = opus
35
+
max_playback_rate = 8000 ; Limit the bandwidth on the encoder to narrow band
36
+
fec = no ; Do not include in-band forward error correction data
52
37
```
53
38
54
39
Limit endpoints that allow "myopus" to wide band and use a constant bit rate:
55
40
56
41
```
57
42
[myopus]
58
-
type=opus
59
-
bitrate=16000 ; Maximum encoded bit rate used
60
-
cbr=yes ; The encoder will use a constant bit rate
61
-
43
+
type = opus
44
+
bitrate = 16000 ; Maximum encoded bit rate used
45
+
cbr = yes ; The encoder will use a constant bit rate
0 commit comments