Skip to content

Commit 4ebae0d

Browse files
seanbrightgtjoseph
authored andcommitted
Codec-Opus.md: Fix markdown formatting issues.
* Fix nested table based on @dgorski's suggestion. * Reduce some unnecessary whitespace. * Use monospaced fonts where appropriate. Fixes #61
1 parent 4a0d952 commit 4ebae0d

File tree

1 file changed

+19
-36
lines changed

1 file changed

+19
-36
lines changed

docs/Configuration/Codec-Opus.md

Lines changed: 19 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -8,35 +8,21 @@ Configuration Options
88

99
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.
1010

11-
12-
13-
14-
1511
| Option Name | Description | Default |
1612
| --- | --- | --- |
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.
4026

4127
Examples
4228
--------
@@ -45,19 +31,16 @@ Limit the maximum playback rate of any endpoint that allow "opus" and don't incl
4531

4632
```
4733
[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
5237
```
5338

5439
Limit endpoints that allow "myopus" to wide band and use a constant bit rate:
5540

5641
```
5742
[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
6246
```
63-

0 commit comments

Comments
 (0)