Gregory Maxwell | 0c90607 | 2012-06-19 09:11:40 -0400 | [diff] [blame] | 1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | <!DOCTYPE rfc SYSTEM "rfc2629.dtd" [ |
| 3 | <!ENTITY rfc2119 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml'> |
| 4 | <!ENTITY rfc3550 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.3550.xml'> |
| 5 | <!ENTITY rfc3711 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.3711.xml'> |
| 6 | <!ENTITY rfc3551 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.3551.xml'> |
| 7 | <!ENTITY rfc4288 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.4288.xml'> |
| 8 | <!ENTITY rfc4855 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.4855.xml'> |
| 9 | <!ENTITY rfc4566 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.4566.xml'> |
| 10 | <!ENTITY rfc3264 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.3264.xml'> |
| 11 | <!ENTITY rfc2974 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.2974.xml'> |
| 12 | <!ENTITY rfc2326 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.2326.xml'> |
| 13 | <!ENTITY rfc3555 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.3555.xml'> |
Timothy B. Terriberry | 239e9a3 | 2012-11-21 18:48:09 -0800 | [diff] [blame] | 14 | <!ENTITY rfc5576 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.5576.xml'> |
Gregory Maxwell | 0c90607 | 2012-06-19 09:11:40 -0400 | [diff] [blame] | 15 | <!ENTITY rfc6562 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.6562.xml'> |
Jean-Marc Valin | acf0675 | 2012-11-22 17:10:50 -0500 | [diff] [blame] | 16 | <!ENTITY rfc6716 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.6716.xml'> |
Gregory Maxwell | 0c90607 | 2012-06-19 09:11:40 -0400 | [diff] [blame] | 17 | |
| 18 | ]> |
| 19 | |
Jean-Marc Valin | b880e9b | 2012-11-22 17:25:22 -0500 | [diff] [blame] | 20 | <rfc category="info" ipr="trust200902" docName="draft-spittka-payload-rtp-opus-02"> |
Gregory Maxwell | 0c90607 | 2012-06-19 09:11:40 -0400 | [diff] [blame] | 21 | <?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?> |
| 22 | |
| 23 | <?rfc strict="yes" ?> |
| 24 | <?rfc toc="yes" ?> |
| 25 | <?rfc tocdepth="3" ?> |
| 26 | <?rfc tocappendix='no' ?> |
| 27 | <?rfc tocindent='yes' ?> |
| 28 | <?rfc symrefs="yes" ?> |
| 29 | <?rfc sortrefs="yes" ?> |
| 30 | <?rfc compact="no" ?> |
| 31 | <?rfc subcompact="yes" ?> |
| 32 | <?rfc iprnotified="yes" ?> |
| 33 | |
| 34 | <front> |
| 35 | <title abbrev="RTP Payload Format for Opus Codec"> |
| 36 | RTP Payload Format for Opus Speech and Audio Codec |
| 37 | </title> |
| 38 | |
| 39 | <author fullname="Julian Spittka" initials="J." surname="Spittka"> |
Gregory Maxwell | 0c90607 | 2012-06-19 09:11:40 -0400 | [diff] [blame] | 40 | <address> |
Jean-Marc Valin | acf0675 | 2012-11-22 17:10:50 -0500 | [diff] [blame] | 41 | <email>jspittka@gmail.com</email> |
Gregory Maxwell | 0c90607 | 2012-06-19 09:11:40 -0400 | [diff] [blame] | 42 | </address> |
| 43 | </author> |
| 44 | |
| 45 | <author initials='K.' surname='Vos' fullname='Koen Vos'> |
| 46 | <organization>Skype Technologies S.A.</organization> |
| 47 | <address> |
| 48 | <postal> |
| 49 | <street>3210 Porter Drive</street> |
| 50 | <code>94304</code> |
| 51 | <city>Palo Alto</city> |
| 52 | <region>CA</region> |
| 53 | <country>USA</country> |
| 54 | </postal> |
Jean-Marc Valin | acf0675 | 2012-11-22 17:10:50 -0500 | [diff] [blame] | 55 | <email>koenvos74@gmail.com</email> |
Gregory Maxwell | 0c90607 | 2012-06-19 09:11:40 -0400 | [diff] [blame] | 56 | </address> |
| 57 | </author> |
| 58 | |
| 59 | <author initials="JM" surname="Valin" fullname="Jean-Marc Valin"> |
| 60 | <organization>Mozilla</organization> |
| 61 | <address> |
| 62 | <postal> |
| 63 | <street>650 Castro Street</street> |
| 64 | <city>Mountain View</city> |
| 65 | <region>CA</region> |
| 66 | <code>94041</code> |
| 67 | <country>USA</country> |
| 68 | </postal> |
| 69 | <email>jmvalin@jmvalin.ca</email> |
| 70 | </address> |
| 71 | </author> |
| 72 | |
Jean-Marc Valin | b880e9b | 2012-11-22 17:25:22 -0500 | [diff] [blame] | 73 | <date day='22' month='November' year='2012' /> |
Gregory Maxwell | 0c90607 | 2012-06-19 09:11:40 -0400 | [diff] [blame] | 74 | |
| 75 | <abstract> |
| 76 | <t> |
| 77 | This document defines the Real-time Transport Protocol (RTP) payload |
| 78 | format for packetization of Opus encoded |
| 79 | speech and audio data that is essential to integrate the codec in the |
| 80 | most compatible way. Further, media type registrations |
| 81 | are described for the RTP payload format. |
| 82 | </t> |
| 83 | </abstract> |
| 84 | </front> |
| 85 | |
| 86 | <middle> |
| 87 | <section title='Introduction'> |
| 88 | <t> |
| 89 | The Opus codec is a speech and audio codec developed within the |
Jean-Marc Valin | acf0675 | 2012-11-22 17:10:50 -0500 | [diff] [blame] | 90 | IETF Internet Wideband Audio Codec working group (codec). The codec |
Jean-Marc Valin | 15f0f1f | 2012-11-29 09:24:54 -0500 | [diff] [blame] | 91 | has a very low algorithmic delay and it |
Gregory Maxwell | 0c90607 | 2012-06-19 09:11:40 -0400 | [diff] [blame] | 92 | is highly scalable in terms of audio bandwidth, bitrate, and |
| 93 | complexity. Further, it provides different modes to efficiently encode speech signals |
| 94 | as well as music signals, thus, making it the codec of choice for |
| 95 | various applications using the Internet or similar networks. |
| 96 | </t> |
| 97 | <t> |
| 98 | This document defines the Real-time Transport Protocol (RTP) |
| 99 | <xref target="RFC3550"/> payload format for packetization |
| 100 | of Opus encoded speech and audio data that is essential to |
| 101 | integrate the Opus codec in the |
| 102 | most compatible way. Further, media type registrations are described for |
| 103 | the RTP payload format. More information on the Opus |
Jean-Marc Valin | acf0675 | 2012-11-22 17:10:50 -0500 | [diff] [blame] | 104 | codec can be obtained from <xref target="RFC6716"/>. |
Gregory Maxwell | 0c90607 | 2012-06-19 09:11:40 -0400 | [diff] [blame] | 105 | </t> |
| 106 | </section> |
| 107 | |
| 108 | <section title='Conventions, Definitions and Acronyms used in this document'> |
| 109 | <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", |
| 110 | "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this |
| 111 | document are to be interpreted as described in <xref target="RFC2119"/>.</t> |
| 112 | <t> |
| 113 | <list style='hanging'> |
Jean-Marc Valin | 15f0f1f | 2012-11-29 09:24:54 -0500 | [diff] [blame] | 114 | <t hangText="CBR:"> Constant bitrate</t> |
| 115 | <t hangText="CPU:"> Central Processing Unit</t> |
| 116 | <t hangText="DTX:"> Discontinuous transmission</t> |
| 117 | <t hangText="FEC:"> Forward error correction</t> |
Gregory Maxwell | 0c90607 | 2012-06-19 09:11:40 -0400 | [diff] [blame] | 118 | <t hangText="IP:"> Internet Protocol</t> |
Jean-Marc Valin | 15f0f1f | 2012-11-29 09:24:54 -0500 | [diff] [blame] | 119 | <t hangText="samples:"> Speech or audio samples (usually per channel)</t> |
Gregory Maxwell | 0c90607 | 2012-06-19 09:11:40 -0400 | [diff] [blame] | 120 | <t hangText="SDP:"> Session Description Protocol</t> |
Jean-Marc Valin | 15f0f1f | 2012-11-29 09:24:54 -0500 | [diff] [blame] | 121 | <t hangText="VBR:"> Variable bitrate</t> |
Gregory Maxwell | 0c90607 | 2012-06-19 09:11:40 -0400 | [diff] [blame] | 122 | </list> |
| 123 | </t> |
| 124 | <section title='Audio Bandwidth'> |
| 125 | <t> |
| 126 | Throughout this document, we refer to the following definitions: |
| 127 | </t> |
| 128 | <texttable anchor='bandwidth_definitions'> |
| 129 | <ttcol align='center'>Abbreviation</ttcol> |
| 130 | <ttcol align='center'>Name</ttcol> |
| 131 | <ttcol align='center'>Bandwidth</ttcol> |
| 132 | <ttcol align='center'>Sampling</ttcol> |
| 133 | <c>nb</c> |
| 134 | <c>Narrowband</c> |
| 135 | <c>0 - 4000</c> |
| 136 | <c>8000</c> |
| 137 | |
| 138 | <c>mb</c> |
| 139 | <c>Mediumband</c> |
| 140 | <c>0 - 6000</c> |
| 141 | <c>12000</c> |
| 142 | |
| 143 | <c>wb</c> |
| 144 | <c>Wideband</c> |
| 145 | <c>0 - 8000</c> |
| 146 | <c>16000</c> |
| 147 | |
| 148 | <c>swb</c> |
| 149 | <c>Super-wideband</c> |
| 150 | <c>0 - 12000</c> |
| 151 | <c>24000</c> |
| 152 | |
| 153 | <c>fb</c> |
| 154 | <c>Fullband</c> |
| 155 | <c>0 - 20000</c> |
| 156 | <c>48000</c> |
| 157 | |
| 158 | <postamble> |
| 159 | Audio bandwidth naming |
| 160 | </postamble> |
| 161 | </texttable> |
| 162 | </section> |
| 163 | </section> |
| 164 | |
| 165 | <section title='Opus Codec'> |
| 166 | <t> |
Jean-Marc Valin | acf0675 | 2012-11-22 17:10:50 -0500 | [diff] [blame] | 167 | The Opus <xref target="RFC6716"/> speech and audio codec has been developed to encode speech |
Gregory Maxwell | 0c90607 | 2012-06-19 09:11:40 -0400 | [diff] [blame] | 168 | signals as well as audio signals. Two different modes, a voice mode |
| 169 | or an audio mode, may be chosen to allow the most efficient coding |
| 170 | dependent on the type of input signal, the sampling frequency of the |
| 171 | input signal, and the specific application. |
| 172 | </t> |
| 173 | |
| 174 | <t> |
Jean-Marc Valin | 57fa056 | 2012-11-09 14:30:25 -0500 | [diff] [blame] | 175 | The voice mode allows efficient encoding of voice signals at lower bit |
Gregory Maxwell | 0c90607 | 2012-06-19 09:11:40 -0400 | [diff] [blame] | 176 | rates while the audio mode is optimized for audio signals at medium and |
| 177 | higher bitrates. |
| 178 | </t> |
| 179 | |
| 180 | <t> |
| 181 | The Opus speech and audio codec is highly scalable in terms of audio |
Jean-Marc Valin | 57fa056 | 2012-11-09 14:30:25 -0500 | [diff] [blame] | 182 | bandwidth, bitrate, and complexity. Further, Opus allows |
| 183 | transmitting stereo signals. |
Gregory Maxwell | 0c90607 | 2012-06-19 09:11:40 -0400 | [diff] [blame] | 184 | </t> |
| 185 | |
| 186 | <section title='Network Bandwidth'> |
| 187 | <t> |
| 188 | Opus supports all bitrates from 6 kb/s to 510 kb/s. |
| 189 | The bitrate can be changed dynamically within that range. |
| 190 | All |
| 191 | other parameters being |
| 192 | equal, higher bitrate results in higher quality. |
| 193 | </t> |
| 194 | <section title='Recommended Bitrate' anchor='bitrate_by_bandwidth'> |
| 195 | <t> |
| 196 | For a frame size of |
| 197 | 20 ms, these |
| 198 | are the bitrate "sweet spots" for Opus in various configurations: |
| 199 | |
| 200 | <list style="symbols"> |
| 201 | <t>8-12 kb/s for NB speech,</t> |
| 202 | <t>16-20 kb/s for WB speech,</t> |
| 203 | <t>28-40 kb/s for FB speech,</t> |
| 204 | <t>48-64 kb/s for FB mono music, and</t> |
| 205 | <t>64-128 kb/s for FB stereo music.</t> |
| 206 | </list> |
| 207 | </t> |
| 208 | </section> |
| 209 | <section title='Variable versus Constant Bit Rate' anchor='variable-vs-constant-bitrate'> |
| 210 | <t> |
| 211 | For the same average bitrate, variable bitrate (VBR) can achieve higher quality |
| 212 | than constant bitrate (CBR). For the majority of voice transmission application, VBR |
| 213 | is the best choice. One potential reason for choosing CBR is the potential |
| 214 | information leak that <spanx style='emph'>may</spanx> occur when encrypting the |
| 215 | compressed stream. See <xref target="RFC6562"/> for guidelines on when VBR is |
| 216 | appropriate for encrypted audio communications. In the case where an existing |
| 217 | VBR stream needs to be converted to CBR for security reasons, then the Opus padding |
Jean-Marc Valin | acf0675 | 2012-11-22 17:10:50 -0500 | [diff] [blame] | 218 | mechanism described in <xref target="RFC6716"/> is the RECOMMENDED way to achieve padding |
Gregory Maxwell | 0c90607 | 2012-06-19 09:11:40 -0400 | [diff] [blame] | 219 | because the RTP padding bit is unencrypted.</t> |
| 220 | |
| 221 | <t> |
| 222 | The bitrate can be adjusted at any point in time. To avoid congestion, |
| 223 | the average bitrate SHOULD be adjusted to the available |
Jean-Marc Valin | acf0675 | 2012-11-22 17:10:50 -0500 | [diff] [blame] | 224 | network capacity. If no target bitrate is specified, the bitrates specified in |
| 225 | <xref target='bitrate_by_bandwidth'/> are RECOMMENDED. |
Gregory Maxwell | 0c90607 | 2012-06-19 09:11:40 -0400 | [diff] [blame] | 226 | </t> |
| 227 | |
| 228 | </section> |
| 229 | |
| 230 | <section title='Discontinuous Transmission (DTX)'> |
| 231 | |
| 232 | <t> |
| 233 | The Opus codec may, as described in <xref target='variable-vs-constant-bitrate'/>, |
| 234 | be operated with an adaptive bitrate. In that case, the bitrate |
| 235 | will automatically be reduced for certain input signals like periods |
| 236 | of silence. During continuous transmission the bitrate will be |
| 237 | reduced, when the input signal allows to do so, but the transmission |
| 238 | to the receiver itself will never be interrupted. Therefore, the |
| 239 | received signal will maintain the same high level of quality over the |
| 240 | full duration of a transmission while minimizing the average bit |
| 241 | rate over time. |
| 242 | </t> |
| 243 | |
| 244 | <t> |
| 245 | In cases where the bitrate of Opus needs to be reduced even |
| 246 | further or in cases where only constant bitrate is available, |
| 247 | the Opus encoder may be set to use discontinuous |
| 248 | transmission (DTX), where parts of the encoded signal that |
| 249 | correspond to periods of silence in the input speech or audio signal |
| 250 | are not transmitted to the receiver. |
| 251 | </t> |
| 252 | |
| 253 | <t> |
| 254 | On the receiving side, the non-transmitted parts will be handled by a |
| 255 | frame loss concealment unit in the Opus decoder which generates a |
| 256 | comfort noise signal to replace the non transmitted parts of the |
| 257 | speech or audio signal. |
| 258 | </t> |
| 259 | |
| 260 | <t> |
| 261 | The DTX mode of Opus will have a slightly lower speech or audio |
| 262 | quality than the continuous mode. Therefore, it is RECOMMENDED to |
| 263 | use Opus in the continuous mode unless restraints on network |
| 264 | capacity are severe. The DTX mode can be engaged for operation |
| 265 | in both adaptive or constant bitrate. |
| 266 | </t> |
| 267 | |
| 268 | </section> |
| 269 | |
| 270 | </section> |
| 271 | |
| 272 | <section title='Complexity'> |
| 273 | |
| 274 | <t> |
| 275 | Complexity can be scaled to optimize for CPU resources in real-time, mostly as |
| 276 | a trade-off between audio quality and bitrate. Also, different modes of Opus have different complexity. |
| 277 | </t> |
| 278 | |
| 279 | </section> |
| 280 | |
| 281 | <section title="Forward Error Correction (FEC)"> |
| 282 | |
| 283 | <t> |
| 284 | The voice mode of Opus allows for "in-band" forward error correction (FEC) |
| 285 | data to be embedded into the bit stream of Opus. This FEC scheme adds |
| 286 | redundant information about the previous packet (n-1) to the current |
| 287 | output packet n. For |
| 288 | each frame, the encoder decides whether to use FEC based on (1) an |
| 289 | externally-provided estimate of the channel's packet loss rate; (2) an |
| 290 | externally-provided estimate of the channel's capacity; (3) the |
| 291 | sensitivity of the audio or speech signal to packet loss; (4) whether |
| 292 | the receiving decoder has indicated it can take advantage of "in-band" |
| 293 | FEC information. The decision to send "in-band" FEC information is |
| 294 | entirely controlled by the encoder and therefore no special precautions |
| 295 | for the payload have to be taken. |
| 296 | </t> |
| 297 | |
| 298 | <t> |
| 299 | On the receiving side, the decoder can take advantage of this |
| 300 | additional information when, in case of a packet loss, the next packet |
| 301 | is available. In order to use the FEC data, the jitter buffer needs |
| 302 | to provide access to payloads with the FEC data. The decoder API function |
| 303 | has a flag to indicate that a FEC frame rather than a regular frame should |
| 304 | be decoded. If no FEC data is available for the current frame, the decoder |
| 305 | will consider the frame lost and invokes the frame loss concealment. |
| 306 | </t> |
| 307 | |
| 308 | <t> |
| 309 | If the FEC scheme is not implemented on the receiving side, FEC |
| 310 | SHOULD NOT be used, as it leads to an inefficient usage of network |
| 311 | resources. Decoder support for FEC SHOULD be indicated at the time a |
| 312 | session is set up. |
| 313 | </t> |
| 314 | |
| 315 | </section> |
| 316 | |
| 317 | <section title='Stereo Operation'> |
| 318 | |
| 319 | <t> |
| 320 | Opus allows for transmission of stereo audio signals. This operation |
| 321 | is signaled in-band in the Opus payload and no special arrangement |
| 322 | is required in the payload format. Any implementation of the Opus |
Jean-Marc Valin | 57fa056 | 2012-11-09 14:30:25 -0500 | [diff] [blame] | 323 | decoder MUST be capable of receiving stereo signals, although it MAY |
| 324 | decode those signals as mono. |
Gregory Maxwell | 0c90607 | 2012-06-19 09:11:40 -0400 | [diff] [blame] | 325 | </t> |
| 326 | <t> |
| 327 | If a decoder can not take advantage of the benefits of a stereo signal |
| 328 | this SHOULD be indicated at the time a session is set up. In that case |
| 329 | the sending side SHOULD NOT send stereo signals as it leads to an |
| 330 | inefficient usage of the network. |
| 331 | </t> |
| 332 | |
| 333 | </section> |
| 334 | |
| 335 | </section> |
| 336 | |
| 337 | <section title='Opus RTP Payload Format' anchor='opus-rtp-payload-format'> |
| 338 | <t>The payload format for Opus consists of the RTP header and Opus payload |
| 339 | data.</t> |
| 340 | <section title='RTP Header Usage'> |
| 341 | <t>The format of the RTP header is specified in <xref target="RFC3550"/>. The Opus |
| 342 | payload format uses the fields of the RTP header consistent with this |
| 343 | specification.</t> |
| 344 | |
| 345 | <t>The payload length of Opus is a multiple number of octets and |
| 346 | therefore no padding is required. The payload MAY be padded by an |
| 347 | integer number of octets according to <xref target="RFC3550"/>.</t> |
| 348 | |
Jean-Marc Valin | 57fa056 | 2012-11-09 14:30:25 -0500 | [diff] [blame] | 349 | <t>The marker bit (M) of the RTP header is used in accordance with |
| 350 | Section 4.1 of <xref target="RFC3551"/>.</t> |
Gregory Maxwell | 0c90607 | 2012-06-19 09:11:40 -0400 | [diff] [blame] | 351 | |
| 352 | <t>The RTP payload type for Opus has not been assigned statically and is |
| 353 | expected to be assigned dynamically.</t> |
| 354 | |
| 355 | <t>The receiving side MUST be prepared to receive duplicates of RTP |
| 356 | packets. Only one of those payloads MUST be provided to the Opus decoder |
| 357 | for decoding and others MUST be discarded.</t> |
| 358 | |
| 359 | <t>Opus supports 5 different audio bandwidths which may be adjusted during |
| 360 | the duration of a call. The RTP timestamp clock frequency is defined as |
| 361 | the highest supported sampling frequency of Opus, i.e. 48000 Hz, for all |
| 362 | modes and sampling rates of Opus. The unit |
| 363 | for the timestamp is samples per single (mono) channel. The RTP timestamp corresponds to the |
| 364 | sample time of the first encoded sample in the encoded frame. For sampling |
| 365 | rates lower than 48000 Hz the number of samples has to be multiplied with |
| 366 | a multiplier according to <xref target="fs-upsample-factors"/> to determine |
| 367 | the RTP timestamp.</t> |
| 368 | |
Jean-Marc Valin | 15f0f1f | 2012-11-29 09:24:54 -0500 | [diff] [blame] | 369 | <texttable anchor='fs-upsample-factors' title="Timestamp multiplier"> |
Gregory Maxwell | 0c90607 | 2012-06-19 09:11:40 -0400 | [diff] [blame] | 370 | <ttcol align='center'>fs (Hz)</ttcol> |
| 371 | <ttcol align='center'>Multiplier</ttcol> |
| 372 | <c>8000</c> |
| 373 | <c>6</c> |
| 374 | <c>12000</c> |
| 375 | <c>4</c> |
| 376 | <c>16000</c> |
| 377 | <c>3</c> |
| 378 | <c>24000</c> |
| 379 | <c>2</c> |
| 380 | <c>48000</c> |
| 381 | <c>1</c> |
Gregory Maxwell | 0c90607 | 2012-06-19 09:11:40 -0400 | [diff] [blame] | 382 | </texttable> |
| 383 | </section> |
| 384 | |
| 385 | <section title='Payload Structure'> |
| 386 | <t> |
| 387 | The Opus encoder can be set to output encoded frames representing 2.5, 5, 10, 20, |
| 388 | 40, or 60 ms of speech or audio data. Further, an arbitrary number of frames can be |
| 389 | combined into a packet. The maximum packet length is limited to the amount of encoded |
| 390 | data representing 120 ms of speech or audio data. The packetization of encoded data |
| 391 | is purely done by the Opus encoder and therefore only one packet output from the Opus |
| 392 | encoder MUST be used as a payload. |
| 393 | </t> |
| 394 | |
| 395 | <t><xref target='payload-structure'/> shows the structure combined with the RTP header.</t> |
| 396 | |
| 397 | <figure anchor="payload-structure" |
| 398 | title="Payload Structure with RTP header"> |
| 399 | <artwork> |
| 400 | <![CDATA[ |
| 401 | +----------+--------------+ |
| 402 | |RTP Header| Opus Payload | |
| 403 | +----------+--------------+ |
| 404 | ]]> |
| 405 | </artwork> |
| 406 | </figure> |
| 407 | |
| 408 | <t> |
| 409 | <xref target='opus-packetization'/> shows supported frame sizes for different modes |
| 410 | and sampling rates of Opus and how the timestamp needs to be incremented for |
| 411 | packetization. |
| 412 | </t> |
| 413 | |
| 414 | <texttable anchor='opus-packetization'> |
| 415 | <ttcol align='center'>Mode</ttcol> |
| 416 | <ttcol align='center'>fs</ttcol> |
| 417 | <ttcol align='center'>2.5</ttcol> |
| 418 | <ttcol align='center'>5</ttcol> |
| 419 | <ttcol align='center'>10</ttcol> |
| 420 | <ttcol align='center'>20</ttcol> |
| 421 | <ttcol align='center'>40</ttcol> |
| 422 | <ttcol align='center'>60</ttcol> |
| 423 | <c>ts incr</c> |
| 424 | <c>all</c> |
| 425 | <c>120</c> |
| 426 | <c>240</c> |
| 427 | <c>480</c> |
| 428 | <c>960</c> |
| 429 | <c>1920</c> |
| 430 | <c>2880</c> |
| 431 | <c>voice</c> |
| 432 | <c>nb/mb/wb/swb/fb</c> |
| 433 | <c></c> |
| 434 | <c></c> |
| 435 | <c>x</c> |
| 436 | <c>x</c> |
| 437 | <c>x</c> |
| 438 | <c>x</c> |
| 439 | <c>audio</c> |
| 440 | <c>nb/wb/swb/fb</c> |
| 441 | <c>x</c> |
| 442 | <c>x</c> |
| 443 | <c>x</c> |
| 444 | <c>x</c> |
| 445 | <c></c> |
| 446 | <c></c> |
| 447 | <postamble> |
| 448 | Mode specifies the Opus mode of operation; fs specifies the audio sampling |
| 449 | frequency in Hertz (Hz); 2.5, 5, 10, 20, 40, and 60 represent the duration of |
| 450 | encoded speech or audio data in a packet; ts incr specifies the |
| 451 | value the timestamp needs to be incremented for the representing packet size. |
| 452 | For multiple frames in a packet these values have to be multiplied with the |
| 453 | respective number of frames. |
| 454 | </postamble> |
| 455 | </texttable> |
| 456 | |
| 457 | </section> |
| 458 | |
| 459 | </section> |
| 460 | |
| 461 | <section title='Congestion Control'> |
| 462 | |
| 463 | <t>The adaptive nature of the Opus codec allows for an efficient |
| 464 | congestion control.</t> |
| 465 | |
| 466 | <t>The target bitrate of Opus can be adjusted at any point in time and |
| 467 | thus allowing for an efficient congestion control. Furthermore, the amount |
| 468 | of encoded speech or audio data encoded in a |
| 469 | single packet can be used for congestion control since the transmission |
| 470 | rate is inversely proportional to these frame sizes. A lower packet |
| 471 | transmission rate reduces the amount of header overhead but at the same |
| 472 | time increases latency and error sensitivity and should be done with care.</t> |
| 473 | |
| 474 | <t>It is RECOMMENDED that congestion control is applied during the |
| 475 | transmission of Opus encoded data.</t> |
| 476 | </section> |
| 477 | |
| 478 | <section title='IANA Considerations'> |
| 479 | <t>One media subtype (audio/opus) has been defined and registered as |
| 480 | described in the following section.</t> |
| 481 | |
| 482 | <section title='Opus Media Type Registration'> |
| 483 | <t>Media type registration is done according to <xref |
| 484 | target="RFC4288"/> and <xref target="RFC4855"/>.<vspace |
| 485 | blankLines='1'/></t> |
| 486 | |
| 487 | <t>Type name: audio<vspace blankLines='1'/></t> |
| 488 | <t>Subtype name: opus<vspace blankLines='1'/></t> |
| 489 | |
| 490 | <t>Required parameters:</t> |
| 491 | <t><list style="hanging"> |
| 492 | <t hangText="rate:"> RTP timestamp clock rate is incremented with |
| 493 | 48000 Hz clock rate for all modes of Opus and all sampling |
| 494 | frequencies. For audio sampling rates other than 48000 Hz the rate |
| 495 | has to be adjusted to 48000 Hz according to <xref target="fs-upsample-factors"/>. |
| 496 | </t> |
| 497 | </list></t> |
| 498 | |
| 499 | <t>Optional parameters:</t> |
| 500 | |
| 501 | <t><list style="hanging"> |
Jean-Marc Valin | f22af9c | 2012-11-12 15:44:52 -0500 | [diff] [blame] | 502 | <t hangText="maxplaybackrate:"> |
| 503 | a hint about the maximum output sampling rate that the receiver is |
Jean-Marc Valin | acf0675 | 2012-11-22 17:10:50 -0500 | [diff] [blame] | 504 | capable of rendering in Hz. |
Jean-Marc Valin | f22af9c | 2012-11-12 15:44:52 -0500 | [diff] [blame] | 505 | The decoder MUST be capable of decoding |
Gregory Maxwell | 0c90607 | 2012-06-19 09:11:40 -0400 | [diff] [blame] | 506 | any audio bandwidth but due to hardware limitations only signals |
Jean-Marc Valin | f22af9c | 2012-11-12 15:44:52 -0500 | [diff] [blame] | 507 | up to the specified sampling rate can be played back. Sending signals |
Gregory Maxwell | 0c90607 | 2012-06-19 09:11:40 -0400 | [diff] [blame] | 508 | with higher audio bandwidth results in higher than necessary network |
| 509 | usage and encoding complexity, so an encoder SHOULD NOT encode |
Jean-Marc Valin | f22af9c | 2012-11-12 15:44:52 -0500 | [diff] [blame] | 510 | frequencies above the audio bandwidth specified by maxplaybackrate. |
| 511 | This parameter can take any value between 8000 and 48000, although |
| 512 | commonly the value will match one of the Opus bandwidths |
| 513 | (<xref target="bandwidth_definitions"/>). |
| 514 | By default, the receiver is assumed to have no limitations, i.e. 48000. |
Gregory Maxwell | 0c90607 | 2012-06-19 09:11:40 -0400 | [diff] [blame] | 515 | <vspace blankLines='1'/> |
| 516 | </t> |
| 517 | |
Jean-Marc Valin | f22af9c | 2012-11-12 15:44:52 -0500 | [diff] [blame] | 518 | <t hangText="sprop-maxcapturerate:"> |
| 519 | a hint about the maximum input sampling rate that the sender is likely to produce. |
| 520 | This is not a guarantee that the sender will never send any higher bandwidth |
| 521 | (e.g. it could send a pre-recorded prompt that uses a higher bandwidth), but it |
| 522 | indicates to the receiver that frequencies above this maximum can safely be discarded. |
| 523 | This parameter is useful to avoid wasting receiver resources by operating the audio |
| 524 | processing pipeline (e.g. echo cancellation) at a higher rate than necessary. |
| 525 | This parameter can take any value between 8000 and 48000, although |
| 526 | commonly the value will match one of the Opus bandwidths |
| 527 | (<xref target="bandwidth_definitions"/>). |
| 528 | By default, the sender is assumed to have no limitations, i.e. 48000. |
Jean-Marc Valin | 57fa056 | 2012-11-09 14:30:25 -0500 | [diff] [blame] | 529 | <vspace blankLines='1'/> |
| 530 | </t> |
| 531 | |
Gregory Maxwell | 0c90607 | 2012-06-19 09:11:40 -0400 | [diff] [blame] | 532 | <t hangText="maxptime:"> the decoder's maximum length of time in |
| 533 | milliseconds rounded up to the next full integer value represented |
| 534 | by the media in a packet that can be |
| 535 | encapsulated in a received packet according to Section 6 of |
| 536 | <xref target="RFC4566"/>. Possible values are 3, 5, 10, 20, 40, |
| 537 | and 60 or an arbitrary multiple of Opus frame sizes rounded up to |
| 538 | the next full integer value up to a maximum value of 120 as |
| 539 | defined in <xref target='opus-rtp-payload-format'/>. If no value is |
| 540 | specified, 120 is assumed as default. This value is a recommendation |
| 541 | by the decoding side to ensure the best |
| 542 | performance for the decoder. The decoder MUST be |
| 543 | capable of accepting any allowed packet sizes to |
| 544 | ensure maximum compatibility. |
| 545 | <vspace blankLines='1'/></t> |
| 546 | |
| 547 | <t hangText="ptime:"> the decoder's recommended length of time in |
| 548 | milliseconds rounded up to the next full integer value represented |
| 549 | by the media in a packet according to |
| 550 | Section 6 of <xref target="RFC4566"/>. Possible values are |
| 551 | 3, 5, 10, 20, 40, or 60 or an arbitrary multiple of Opus frame sizes |
| 552 | rounded up to the next full integer value up to a maximum |
| 553 | value of 120 as defined in <xref |
| 554 | target='opus-rtp-payload-format'/>. If no value is |
| 555 | specified, 20 is assumed as default. If ptime is greater than |
| 556 | maxptime, ptime MUST be ignored. This parameter MAY be changed |
| 557 | during a session. This value is a recommendation by the decoding |
| 558 | side to ensure the best |
| 559 | performance for the decoder. The decoder MUST be |
| 560 | capable of accepting any allowed packet sizes to |
| 561 | ensure maximum compatibility. |
| 562 | <vspace blankLines='1'/></t> |
| 563 | |
| 564 | <t hangText="minptime:"> the decoder's minimum length of time in |
| 565 | milliseconds rounded up to the next full integer value represented |
| 566 | by the media in a packet that SHOULD |
| 567 | be encapsulated in a received packet according to Section 6 of <xref |
| 568 | target="RFC4566"/>. Possible values are 3, 5, 10, 20, 40, and 60 |
| 569 | or an arbitrary multiple of Opus frame sizes rounded up to the next |
| 570 | full integer value up to a maximum value of 120 |
| 571 | as defined in <xref target='opus-rtp-payload-format'/>. If no value is |
| 572 | specified, 3 is assumed as default. This value is a recommendation |
| 573 | by the decoding side to ensure the best |
| 574 | performance for the decoder. The decoder MUST be |
| 575 | capable to accept any allowed packet sizes to |
| 576 | ensure maximum compatibility. |
| 577 | <vspace blankLines='1'/></t> |
| 578 | |
| 579 | <t hangText="maxaveragebitrate:"> specifies the maximum average |
| 580 | receive bitrate of a session in bits per second (b/s). The actual |
| 581 | value of the bitrate may vary as it is dependent on the |
| 582 | characteristics of the media in a packet. Note that the maximum |
| 583 | average bitrate MAY be modified dynamically during a session. Any |
| 584 | positive integer is allowed but values outside the range between |
| 585 | 6000 and 510000 SHOULD be ignored. If no value is specified, the |
| 586 | maximum value specified in <xref target='bitrate_by_bandwidth'/> |
Jean-Marc Valin | f22af9c | 2012-11-12 15:44:52 -0500 | [diff] [blame] | 587 | for the corresponding mode of Opus and corresponding maxplaybackrate: |
Gregory Maxwell | 0c90607 | 2012-06-19 09:11:40 -0400 | [diff] [blame] | 588 | will be the default.<vspace blankLines='1'/></t> |
| 589 | |
| 590 | <t hangText="stereo:"> |
| 591 | specifies whether the decoder prefers receiving stereo or mono signals. |
| 592 | Possible values are 1 and 0 where 1 specifies that stereo signals are preferred |
| 593 | and 0 specifies that only mono signals are preferred. |
| 594 | Independent of the stereo parameter every receiver MUST be able to receive and |
| 595 | decode stereo signals but sending stereo signals to a receiver that signaled a |
| 596 | preference for mono signals may result in higher than necessary network |
| 597 | utilisation and encoding complexity. If no value is specified, mono |
| 598 | is assumed (stereo=0).<vspace blankLines='1'/> |
| 599 | </t> |
| 600 | |
Jean-Marc Valin | 57fa056 | 2012-11-09 14:30:25 -0500 | [diff] [blame] | 601 | <t hangText="sprop-stereo:"> |
| 602 | specifies whether the sender is likely to produce stereo audio. |
| 603 | Possible values are 1 and 0 where 1 specifies that stereo signals are likely to |
| 604 | be sent, and 0 speficies that the sender will likely only send mono. |
| 605 | This is not a guarantee that the sender will never send stereo audio |
| 606 | (e.g. it could send a pre-recorded prompt that uses stereo), but it |
| 607 | indicates to the receiver that the received signal can be safely downmixed to mono. |
| 608 | This parameter is useful to avoid wasting receiver resources by operating the audio |
Jean-Marc Valin | f22af9c | 2012-11-12 15:44:52 -0500 | [diff] [blame] | 609 | processing pipeline (e.g. echo cancellation) in stereo when not necessary. |
Jean-Marc Valin | 57fa056 | 2012-11-09 14:30:25 -0500 | [diff] [blame] | 610 | If no value is specified, mono |
Jean-Marc Valin | acf0675 | 2012-11-22 17:10:50 -0500 | [diff] [blame] | 611 | is assumed (sprop-stereo=0).<vspace blankLines='1'/> |
Jean-Marc Valin | 57fa056 | 2012-11-09 14:30:25 -0500 | [diff] [blame] | 612 | </t> |
| 613 | |
Gregory Maxwell | 0c90607 | 2012-06-19 09:11:40 -0400 | [diff] [blame] | 614 | <t hangText="cbr:"> |
| 615 | specifies if the decoder prefers the use of a constant bitrate versus |
| 616 | variable bitrate. Possible values are 1 and 0 where 1 specifies constant |
| 617 | bitrate and 0 specifies variable bitrate. If no value is specified, cbr |
| 618 | is assumed to be 0. Note that the maximum average bitrate may still be |
| 619 | changed, e.g. to adapt to changing network conditions.<vspace blankLines='1'/> |
| 620 | </t> |
| 621 | |
Jean-Marc Valin | 15f0f1f | 2012-11-29 09:24:54 -0500 | [diff] [blame] | 622 | <t hangText="useinbandfec:"> specifies that the decoder has the capability to |
| 623 | use the Opus in-band FEC. Possible values are 1 and 0. It is RECOMMENDED to provide |
| 624 | 0 in case FEC cannot be used on the receiving side. If no |
| 625 | value is specified, useinbandfec is assumed to be 1. |
| 626 | This parameter is only a preference and the receiver MUST be able to process |
| 627 | packets that have FEC information, even if it means the FEC part is discarded. |
| 628 | <vspace blankLines='1'/></t> |
Gregory Maxwell | 0c90607 | 2012-06-19 09:11:40 -0400 | [diff] [blame] | 629 | |
| 630 | <t hangText="usedtx:"> specifies if the decoder prefers the use of |
| 631 | DTX. Possible values are 1 and 0. If no value is specified, usedtx |
| 632 | is assumed to be 0.<vspace blankLines='1'/></t> |
| 633 | </list></t> |
| 634 | |
| 635 | <t>Encoding considerations:<vspace blankLines='1'/></t> |
| 636 | <t><list style="hanging"> |
| 637 | <t>Opus media type is framed and consists of binary data according |
| 638 | to Section 4.8 in <xref target="RFC4288"/>.</t> |
| 639 | </list></t> |
| 640 | |
| 641 | <t>Security considerations: </t> |
| 642 | <t><list style="hanging"> |
| 643 | <t>See <xref target='security-considerations'/> of this document.</t> |
| 644 | </list></t> |
| 645 | |
| 646 | <t>Interoperability considerations: none<vspace blankLines='1'/></t> |
| 647 | <t>Published specification: none<vspace blankLines='1'/></t> |
| 648 | |
| 649 | <t>Applications that use this media type: </t> |
| 650 | <t><list style="hanging"> |
| 651 | <t>Any application that requires the transport of |
| 652 | speech or audio data may use this media type. Some examples are, |
| 653 | but not limited to, audio and video conferencing, Voice over IP, |
| 654 | media streaming.</t> |
| 655 | </list></t> |
| 656 | |
| 657 | <t>Person & email address to contact for further information:</t> |
| 658 | <t><list style="hanging"> |
| 659 | <t>SILK Support silksupport@skype.net</t> |
| 660 | <t>Jean-Marc Valin jmvalin@jmvalin.ca</t> |
| 661 | </list></t> |
| 662 | |
| 663 | <t>Intended usage: COMMON<vspace blankLines='1'/></t> |
| 664 | |
| 665 | <t>Restrictions on usage:<vspace blankLines='1'/></t> |
| 666 | |
| 667 | <t><list style="hanging"> |
| 668 | <t>For transfer over RTP, the RTP payload format (<xref |
| 669 | target='opus-rtp-payload-format'/> of this document) SHALL be |
| 670 | used.</t> |
| 671 | </list></t> |
| 672 | |
| 673 | <t>Author:</t> |
| 674 | <t><list style="hanging"> |
| 675 | <t>Julian Spittka julian.spittka@skype.net<vspace blankLines='1'/></t> |
| 676 | <t>Koen Vos koen.vos@skype.net<vspace blankLines='1'/></t> |
| 677 | <t>Jean-Marc Valin jmvalin@jmvalin.ca<vspace blankLines='1'/></t> |
| 678 | </list></t> |
| 679 | |
| 680 | <t> Change controller: TBD</t> |
| 681 | </section> |
| 682 | |
| 683 | <section title='Mapping to SDP Parameters'> |
| 684 | <t>The information described in the media type specification has a |
| 685 | specific mapping to fields in the Session Description Protocol (SDP) |
| 686 | <xref target="RFC4566"/>, which is commonly used to describe RTP |
| 687 | sessions. When SDP is used to specify sessions employing the Opus codec, |
| 688 | the mapping is as follows:</t> |
| 689 | |
| 690 | <t> |
| 691 | <list style="symbols"> |
| 692 | <t>The media type ("audio") goes in SDP "m=" as the media name.</t> |
| 693 | |
| 694 | <t>The media subtype ("opus") goes in SDP "a=rtpmap" as the encoding |
Jean-Marc Valin | 57fa056 | 2012-11-09 14:30:25 -0500 | [diff] [blame] | 695 | name. The RTP clock rate in "a=rtpmap" MUST be 48000 and the number of |
| 696 | channels MUST be 2.</t> |
Gregory Maxwell | 0c90607 | 2012-06-19 09:11:40 -0400 | [diff] [blame] | 697 | |
Timothy B. Terriberry | 239e9a3 | 2012-11-21 18:48:09 -0800 | [diff] [blame] | 698 | <t>The OPTIONAL media type parameters "ptime" and "maxptime" are |
Gregory Maxwell | 0c90607 | 2012-06-19 09:11:40 -0400 | [diff] [blame] | 699 | mapped to "a=ptime" and "a=maxptime" attributes, respectively, in the |
| 700 | SDP.</t> |
| 701 | |
Timothy B. Terriberry | 239e9a3 | 2012-11-21 18:48:09 -0800 | [diff] [blame] | 702 | <t>The OPTIONAL media type parameters "maxaveragebitrate", |
| 703 | "minptime", "stereo", "cbr", "useinbandfec", and "usedtx", when |
| 704 | present, MUST be included in the "a=fmtp" attribute in the SDP, |
| 705 | expressed as a media type string in the form of a |
| 706 | semicolon-separated list of parameter=value pairs (e.g., |
Timothy B. Terriberry | f92c87a | 2012-11-22 04:38:35 -0800 | [diff] [blame] | 707 | maxaveragebitrate=20000). They MUST NOT be specified in an |
| 708 | SSRC-specific "fmtp" source-level attribute (as defined in |
| 709 | Section 6.3 of <xref target="RFC5576"/>).</t> |
Timothy B. Terriberry | 239e9a3 | 2012-11-21 18:48:09 -0800 | [diff] [blame] | 710 | |
| 711 | <t>The OPTIONAL media type parameters "sprop-maxcapturerate", |
| 712 | and "sprop-stereo" MAY be mapped to the "a=fmtp" SDP attribute by |
| 713 | copying them directly from the media type parameter string as part |
| 714 | of the semicolon-separated list of parameter=value pairs (e.g., |
| 715 | sprop-stereo=1). These same OPTIONAL media type parameters MAY also |
Timothy B. Terriberry | f92c87a | 2012-11-22 04:38:35 -0800 | [diff] [blame] | 716 | be specified using an SSRC-specific "fmtp" source-level attribute |
| 717 | as described in Section 6.3 of <xref target="RFC5576"/>. |
| 718 | They MAY be specified in both places, in which case the parameter |
| 719 | in the source-level attribute overrides the one found on the |
| 720 | "a=fmtp" line. The value of any parameter which is not specified in |
| 721 | a source-level source attribute MUST be taken from the "a=fmtp" |
| 722 | line, if it is present there.</t> |
Timothy B. Terriberry | 239e9a3 | 2012-11-21 18:48:09 -0800 | [diff] [blame] | 723 | |
Gregory Maxwell | 0c90607 | 2012-06-19 09:11:40 -0400 | [diff] [blame] | 724 | </list> |
| 725 | </t> |
| 726 | |
| 727 | <t>Below are some examples of SDP session descriptions for Opus:</t> |
| 728 | |
Jean-Marc Valin | acf0675 | 2012-11-22 17:10:50 -0500 | [diff] [blame] | 729 | <t>Example 1: Standard mono session with 48000 Hz clock rate</t> |
Gregory Maxwell | 0c90607 | 2012-06-19 09:11:40 -0400 | [diff] [blame] | 730 | <figure> |
| 731 | <artwork> |
| 732 | <![CDATA[ |
| 733 | m=audio 54312 RTP/AVP 101 |
Jean-Marc Valin | 57fa056 | 2012-11-09 14:30:25 -0500 | [diff] [blame] | 734 | a=rtpmap:101 opus/48000/2 |
Gregory Maxwell | 0c90607 | 2012-06-19 09:11:40 -0400 | [diff] [blame] | 735 | ]]> |
| 736 | </artwork> |
| 737 | </figure> |
| 738 | |
| 739 | |
| 740 | <t>Example 2: 16000 Hz clock rate, maximum packet size of 40 ms, |
| 741 | recommended packet size of 40 ms, maximum average bitrate of 20000 bps, |
Jean-Marc Valin | b880e9b | 2012-11-22 17:25:22 -0500 | [diff] [blame] | 742 | prefers to receive stereo but only plans to send mono, FEC is allowed, |
Jean-Marc Valin | acf0675 | 2012-11-22 17:10:50 -0500 | [diff] [blame] | 743 | DTX is not allowed</t> |
Gregory Maxwell | 0c90607 | 2012-06-19 09:11:40 -0400 | [diff] [blame] | 744 | |
| 745 | <figure> |
| 746 | <artwork> |
| 747 | <![CDATA[ |
| 748 | m=audio 54312 RTP/AVP 101 |
Jean-Marc Valin | 57fa056 | 2012-11-09 14:30:25 -0500 | [diff] [blame] | 749 | a=rtpmap:101 opus/48000/2 |
Jean-Marc Valin | acf0675 | 2012-11-22 17:10:50 -0500 | [diff] [blame] | 750 | a=fmtp:101 maxplaybackrate=16000; sprop-maxcapturerate=16000; |
| 751 | maxaveragebitrate=20000; stereo=1; useinbandfec=1; usedtx=0 |
Gregory Maxwell | 0c90607 | 2012-06-19 09:11:40 -0400 | [diff] [blame] | 752 | a=ptime:40 |
| 753 | a=maxptime:40 |
| 754 | ]]> |
| 755 | </artwork> |
| 756 | </figure> |
| 757 | |
Jean-Marc Valin | acf0675 | 2012-11-22 17:10:50 -0500 | [diff] [blame] | 758 | <t>Example 3: Two-way full-band stereo preferred</t> |
| 759 | |
| 760 | <figure> |
| 761 | <artwork> |
| 762 | <![CDATA[ |
| 763 | m=audio 54312 RTP/AVP 101 |
| 764 | a=rtpmap:101 opus/48000/2 |
| 765 | a=fmtp:101 stereo=1; sprop-stereo=1 |
| 766 | ]]> |
| 767 | </artwork> |
| 768 | </figure> |
| 769 | |
| 770 | |
Gregory Maxwell | 0c90607 | 2012-06-19 09:11:40 -0400 | [diff] [blame] | 771 | <section title='Offer-Answer Model Considerations for Opus'> |
| 772 | |
| 773 | <t>When using the offer-answer procedure described in <xref |
| 774 | target="RFC3264"/> to negotiate the use of Opus, the following |
| 775 | considerations apply:</t> |
| 776 | |
| 777 | <t><list style="symbols"> |
| 778 | |
| 779 | <t>Opus supports several clock rates. For signaling purposes only |
| 780 | the highest, i.e. 48000, is used. The actual clock rate of the |
| 781 | corresponding media is signaled inside the payload and is not |
| 782 | subject to this payload format description. The decoder MUST be |
| 783 | capable to decode every received clock rate. An example |
| 784 | is shown below: |
| 785 | |
| 786 | <figure> |
| 787 | <artwork> |
| 788 | <![CDATA[ |
Jean-Marc Valin | 57fa056 | 2012-11-09 14:30:25 -0500 | [diff] [blame] | 789 | m=audio 54312 RTP/AVP 100 |
| 790 | a=rtpmap:100 opus/48000/2 |
Gregory Maxwell | 0c90607 | 2012-06-19 09:11:40 -0400 | [diff] [blame] | 791 | ]]> |
| 792 | </artwork> |
| 793 | </figure> |
| 794 | </t> |
| 795 | |
Jean-Marc Valin | acf0675 | 2012-11-22 17:10:50 -0500 | [diff] [blame] | 796 | <t>The "ptime" and "maxptime" parameters are unidirectional |
Gregory Maxwell | 0c90607 | 2012-06-19 09:11:40 -0400 | [diff] [blame] | 797 | receive-only parameters and typically will not compromise |
| 798 | interoperability; however, dependent on the set values of the |
| 799 | parameters the performance of the application may suffer. <xref |
| 800 | target="RFC3264"/> defines the SDP offer-answer handling of the |
| 801 | "ptime" parameter. The "maxptime" parameter MUST be handled in the |
| 802 | same way.</t> |
| 803 | |
| 804 | <t> |
Jean-Marc Valin | acf0675 | 2012-11-22 17:10:50 -0500 | [diff] [blame] | 805 | The "minptime" parameter is a unidirectional |
Gregory Maxwell | 0c90607 | 2012-06-19 09:11:40 -0400 | [diff] [blame] | 806 | receive-only parameters and typically will not compromise |
| 807 | interoperability; however, dependent on the set values of the |
| 808 | parameter the performance of the application may suffer and should be |
| 809 | set with care. |
| 810 | </t> |
| 811 | |
| 812 | <t> |
Jean-Marc Valin | acf0675 | 2012-11-22 17:10:50 -0500 | [diff] [blame] | 813 | The "maxplaybackrate" parameter is a unidirectional receive-only |
Gregory Maxwell | 0c90607 | 2012-06-19 09:11:40 -0400 | [diff] [blame] | 814 | parameter that reflects limitations of the local receiver. The sender |
| 815 | of the other side SHOULD NOT send with an audio bandwidth higher than |
Jean-Marc Valin | f22af9c | 2012-11-12 15:44:52 -0500 | [diff] [blame] | 816 | "maxplaybackrate" as this would lead to inefficient use of network resources. |
| 817 | The "maxplaybackrate" parameter does not |
Gregory Maxwell | 0c90607 | 2012-06-19 09:11:40 -0400 | [diff] [blame] | 818 | affect interoperability. Also, this parameter SHOULD NOT be used |
| 819 | to adjust the audio bandwidth as a function of the bitrates, as this |
Philip Jägenstedt | 6d9c16d | 2012-09-27 13:28:32 +0200 | [diff] [blame] | 820 | is the responsibility of the Opus encoder implementation. |
Gregory Maxwell | 0c90607 | 2012-06-19 09:11:40 -0400 | [diff] [blame] | 821 | </t> |
| 822 | |
Jean-Marc Valin | acf0675 | 2012-11-22 17:10:50 -0500 | [diff] [blame] | 823 | <t>The "maxaveragebitrate" parameter is a unidirectional receive-only |
Gregory Maxwell | 0c90607 | 2012-06-19 09:11:40 -0400 | [diff] [blame] | 824 | parameter that reflects limitations of the local receiver. The sender |
| 825 | of the other side MUST NOT send with an average bitrate higher than |
| 826 | "maxaveragebitrate" as it might overload the network and/or |
Jean-Marc Valin | acf0675 | 2012-11-22 17:10:50 -0500 | [diff] [blame] | 827 | receiver. The "maxaveragebitrate" parameter typically will not |
Gregory Maxwell | 0c90607 | 2012-06-19 09:11:40 -0400 | [diff] [blame] | 828 | compromise interoperability; however, dependent on the set value of |
| 829 | the parameter the performance of the application may suffer and should |
| 830 | be set with care.</t> |
| 831 | |
Jean-Marc Valin | b880e9b | 2012-11-22 17:25:22 -0500 | [diff] [blame] | 832 | <t>The "sprop-maxcaptureerate" and "sprop-stereo" parameters are |
Jean-Marc Valin | acf0675 | 2012-11-22 17:10:50 -0500 | [diff] [blame] | 833 | unidirectional sender-only parameters that reflect limitations of |
| 834 | the sender side. |
Jean-Marc Valin | b880e9b | 2012-11-22 17:25:22 -0500 | [diff] [blame] | 835 | They allow the receiver to set up a reduced-complexity audio |
| 836 | processing pipeline if the sender is not planning to use the full |
| 837 | range of Opus's capabilities. |
| 838 | Neither "sprop-maxcaptureerate" nor "sprop-stereo" affect |
Jean-Marc Valin | acf0675 | 2012-11-22 17:10:50 -0500 | [diff] [blame] | 839 | interoperability and the receiver MUST be capable of receiving any signal. |
| 840 | </t> |
Gregory Maxwell | 0c90607 | 2012-06-19 09:11:40 -0400 | [diff] [blame] | 841 | |
| 842 | <t> |
Jean-Marc Valin | 57fa056 | 2012-11-09 14:30:25 -0500 | [diff] [blame] | 843 | The "stereo" parameter is a unidirectional receive-only |
Gregory Maxwell | 0c90607 | 2012-06-19 09:11:40 -0400 | [diff] [blame] | 844 | parameter. |
| 845 | </t> |
| 846 | |
| 847 | <t> |
Jean-Marc Valin | 57fa056 | 2012-11-09 14:30:25 -0500 | [diff] [blame] | 848 | The "cbr" parameter is a unidirectional receive-only |
Gregory Maxwell | 0c90607 | 2012-06-19 09:11:40 -0400 | [diff] [blame] | 849 | parameter. |
| 850 | </t> |
| 851 | |
Jean-Marc Valin | 57fa056 | 2012-11-09 14:30:25 -0500 | [diff] [blame] | 852 | <t>The "useinbandfec" parameter is a unidirectional receive-only |
Gregory Maxwell | 0c90607 | 2012-06-19 09:11:40 -0400 | [diff] [blame] | 853 | parameter.</t> |
| 854 | |
Jean-Marc Valin | 57fa056 | 2012-11-09 14:30:25 -0500 | [diff] [blame] | 855 | <t>The "usedtx" parameter is a unidirectional receive-only |
Gregory Maxwell | 0c90607 | 2012-06-19 09:11:40 -0400 | [diff] [blame] | 856 | parameter.</t> |
| 857 | |
| 858 | <t>Any unknown parameter in an offer MUST be ignored by the receiver |
| 859 | and MUST be removed from the answer.</t> |
| 860 | |
| 861 | </list></t> |
| 862 | </section> |
| 863 | |
| 864 | <section title='Declarative SDP Considerations for Opus'> |
| 865 | |
| 866 | <t>For declarative use of SDP such as in Session Announcement Protocol |
| 867 | (SAP), <xref target="RFC2974"/>, and RTSP, <xref target="RFC2326"/>, for |
| 868 | Opus, the following needs to be considered:</t> |
| 869 | |
| 870 | <t><list style="symbols"> |
| 871 | |
Jean-Marc Valin | f22af9c | 2012-11-12 15:44:52 -0500 | [diff] [blame] | 872 | <t>The values for "maxptime", "ptime", "minptime", "maxplaybackrate", and |
Gregory Maxwell | 0c90607 | 2012-06-19 09:11:40 -0400 | [diff] [blame] | 873 | "maxaveragebitrate" should be selected carefully to ensure that a |
| 874 | reasonable performance can be achieved for the participants of a session.</t> |
| 875 | |
| 876 | <t> |
| 877 | The values for "maxptime", "ptime", and "minptime" of the payload |
| 878 | format configuration are recommendations by the decoding side to ensure |
| 879 | the best performance for the decoder. The decoder MUST be |
| 880 | capable to accept any allowed packet sizes to |
| 881 | ensure maximum compatibility. |
| 882 | </t> |
| 883 | |
| 884 | <t>All other parameters of the payload format configuration are declarative |
| 885 | and a participant MUST use the configurations that are provided for |
| 886 | the session. More than one configuration may be provided if necessary |
| 887 | by declaring multiple RTP payload types; however, the number of types |
| 888 | should be kept small.</t> |
| 889 | </list></t> |
| 890 | </section> |
| 891 | </section> |
| 892 | </section> |
| 893 | |
| 894 | <section title='Security Considerations' anchor='security-considerations'> |
| 895 | |
| 896 | <t>All RTP packets using the payload format defined in this specification |
| 897 | are subject to the general security considerations discussed in the RTP |
| 898 | specification <xref target="RFC3550"/> and any profile from |
| 899 | e.g. <xref target="RFC3711"/> or <xref target="RFC3551"/>.</t> |
| 900 | |
| 901 | <t>This payload format transports Opus encoded speech or audio data, |
| 902 | hence, security issues include confidentiality, integrity protection, and |
| 903 | authentication of the speech or audio itself. The Opus payload format does |
| 904 | not have any built-in security mechanisms. Any suitable external |
| 905 | mechanisms, such as SRTP <xref target="RFC3711"/>, MAY be used.</t> |
| 906 | |
| 907 | <t>This payload format and the Opus encoding do not exhibit any |
| 908 | significant non-uniformity in the receiver-end computational load and thus |
| 909 | are unlikely to pose a denial-of-service threat due to the receipt of |
| 910 | pathological datagrams.</t> |
| 911 | </section> |
| 912 | |
| 913 | <section title='Acknowledgements'> |
| 914 | <t>TBD</t> |
| 915 | </section> |
| 916 | </middle> |
| 917 | |
| 918 | <back> |
| 919 | <references title="Normative References"> |
| 920 | &rfc2119; |
| 921 | &rfc3550; |
| 922 | &rfc3711; |
| 923 | &rfc3551; |
| 924 | &rfc4288; |
| 925 | &rfc4855; |
| 926 | &rfc4566; |
| 927 | &rfc3264; |
| 928 | &rfc2974; |
| 929 | &rfc2326; |
Timothy B. Terriberry | 239e9a3 | 2012-11-21 18:48:09 -0800 | [diff] [blame] | 930 | &rfc5576; |
Jean-Marc Valin | bdf8740 | 2012-07-11 15:54:55 -0400 | [diff] [blame] | 931 | &rfc6562; |
Jean-Marc Valin | acf0675 | 2012-11-22 17:10:50 -0500 | [diff] [blame] | 932 | &rfc6716; |
Gregory Maxwell | 0c90607 | 2012-06-19 09:11:40 -0400 | [diff] [blame] | 933 | </references> |
| 934 | |
Gregory Maxwell | 0c90607 | 2012-06-19 09:11:40 -0400 | [diff] [blame] | 935 | </back> |
| 936 | </rfc> |