blob: 4a20748735ce2048f8ef980dc80125045c77c04f [file] [log] [blame]
Gregory Maxwell0c906072012-06-19 09:11:40 -04001<?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'>
Jean-Marc Valinf3d6c7a2014-06-30 14:13:46 -04004<!ENTITY rfc3389 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.3389.xml'>
Gregory Maxwell0c906072012-06-19 09:11:40 -04005<!ENTITY rfc3550 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.3550.xml'>
6<!ENTITY rfc3711 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.3711.xml'>
7<!ENTITY rfc3551 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.3551.xml'>
8<!ENTITY rfc4288 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.4288.xml'>
9<!ENTITY rfc4855 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.4855.xml'>
10<!ENTITY rfc4566 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.4566.xml'>
11<!ENTITY rfc3264 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.3264.xml'>
12<!ENTITY rfc2974 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.2974.xml'>
13<!ENTITY rfc2326 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.2326.xml'>
14<!ENTITY rfc3555 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.3555.xml'>
Timothy B. Terriberry239e9a32012-11-21 18:48:09 -080015<!ENTITY rfc5576 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.5576.xml'>
Gregory Maxwell0c906072012-06-19 09:11:40 -040016<!ENTITY rfc6562 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.6562.xml'>
Jean-Marc Valinacf06752012-11-22 17:10:50 -050017<!ENTITY rfc6716 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.6716.xml'>
Jean-Marc Valin5771b5a2013-08-02 12:04:50 -040018<!ENTITY nbsp "&#160;">
Gregory Maxwell0c906072012-06-19 09:11:40 -040019 ]>
20
Jean-Marc Valine0703002014-07-30 13:41:28 -040021 <rfc category="std" ipr="trust200902" docName="draft-ietf-payload-rtp-opus-03">
Gregory Maxwell0c906072012-06-19 09:11:40 -040022<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
23
24<?rfc strict="yes" ?>
25<?rfc toc="yes" ?>
26<?rfc tocdepth="3" ?>
27<?rfc tocappendix='no' ?>
28<?rfc tocindent='yes' ?>
29<?rfc symrefs="yes" ?>
30<?rfc sortrefs="yes" ?>
31<?rfc compact="no" ?>
32<?rfc subcompact="yes" ?>
33<?rfc iprnotified="yes" ?>
34
35 <front>
36 <title abbrev="RTP Payload Format for Opus Codec">
37 RTP Payload Format for Opus Speech and Audio Codec
38 </title>
39
40 <author fullname="Julian Spittka" initials="J." surname="Spittka">
Gregory Maxwell0c906072012-06-19 09:11:40 -040041 <address>
Jean-Marc Valinacf06752012-11-22 17:10:50 -050042 <email>jspittka@gmail.com</email>
Gregory Maxwell0c906072012-06-19 09:11:40 -040043 </address>
44 </author>
45
46 <author initials='K.' surname='Vos' fullname='Koen Vos'>
Jean-Marc Valin49e6c052014-01-17 14:05:37 -050047 <organization>vocTone</organization>
Gregory Maxwell0c906072012-06-19 09:11:40 -040048 <address>
49 <postal>
Jean-Marc Valin49e6c052014-01-17 14:05:37 -050050 <street></street>
51 <code></code>
52 <city></city>
53 <region></region>
54 <country></country>
Gregory Maxwell0c906072012-06-19 09:11:40 -040055 </postal>
Jean-Marc Valinacf06752012-11-22 17:10:50 -050056 <email>koenvos74@gmail.com</email>
Gregory Maxwell0c906072012-06-19 09:11:40 -040057 </address>
58 </author>
59
60 <author initials="JM" surname="Valin" fullname="Jean-Marc Valin">
61 <organization>Mozilla</organization>
62 <address>
63 <postal>
Jean-Marc Valine0703002014-07-30 13:41:28 -040064 <street>331 E. Evelyn Avenue</street>
Gregory Maxwell0c906072012-06-19 09:11:40 -040065 <city>Mountain View</city>
66 <region>CA</region>
67 <code>94041</code>
68 <country>USA</country>
69 </postal>
70 <email>jmvalin@jmvalin.ca</email>
71 </address>
72 </author>
73
Jean-Marc Valine0703002014-07-30 13:41:28 -040074 <date day='30' month='July' year='2014' />
Gregory Maxwell0c906072012-06-19 09:11:40 -040075
76 <abstract>
77 <t>
78 This document defines the Real-time Transport Protocol (RTP) payload
79 format for packetization of Opus encoded
Timothy B. Terriberryf7faa902014-07-25 21:45:46 -070080 speech and audio data necessary to integrate the codec in the
81 most compatible way. Further, it describes media type registrations
82 for the RTP payload format.
Gregory Maxwell0c906072012-06-19 09:11:40 -040083 </t>
84 </abstract>
85 </front>
86
87 <middle>
88 <section title='Introduction'>
89 <t>
90 The Opus codec is a speech and audio codec developed within the
Timothy B. Terriberryf7faa902014-07-25 21:45:46 -070091 IETF Internet Wideband Audio Codec working group. The codec
Jean-Marc Valin15f0f1f2012-11-29 09:24:54 -050092 has a very low algorithmic delay and it
Gregory Maxwell0c906072012-06-19 09:11:40 -040093 is highly scalable in terms of audio bandwidth, bitrate, and
94 complexity. Further, it provides different modes to efficiently encode speech signals
Timothy B. Terriberryf7faa902014-07-25 21:45:46 -070095 as well as music signals, thus making it the codec of choice for
Gregory Maxwell0c906072012-06-19 09:11:40 -040096 various applications using the Internet or similar networks.
97 </t>
98 <t>
99 This document defines the Real-time Transport Protocol (RTP)
100 <xref target="RFC3550"/> payload format for packetization
Timothy B. Terriberryf7faa902014-07-25 21:45:46 -0700101 of Opus encoded speech and audio data necessary to
Gregory Maxwell0c906072012-06-19 09:11:40 -0400102 integrate the Opus codec in the
Timothy B. Terriberryf7faa902014-07-25 21:45:46 -0700103 most compatible way. Further, it describes media type registrations for
Gregory Maxwell0c906072012-06-19 09:11:40 -0400104 the RTP payload format. More information on the Opus
Jean-Marc Valinacf06752012-11-22 17:10:50 -0500105 codec can be obtained from <xref target="RFC6716"/>.
Gregory Maxwell0c906072012-06-19 09:11:40 -0400106 </t>
107 </section>
108
109 <section title='Conventions, Definitions and Acronyms used in this document'>
110 <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
111 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
112 document are to be interpreted as described in <xref target="RFC2119"/>.</t>
113 <t>
114 <list style='hanging'>
Jean-Marc Valin15f0f1f2012-11-29 09:24:54 -0500115 <t hangText="CBR:"> Constant bitrate</t>
116 <t hangText="CPU:"> Central Processing Unit</t>
117 <t hangText="DTX:"> Discontinuous transmission</t>
118 <t hangText="FEC:"> Forward error correction</t>
Timothy B. Terriberryf7faa902014-07-25 21:45:46 -0700119 <t hangText="IP:"> Internet Protocol</t>
120 <t hangText="samples:"> Speech or audio samples (per channel)</t>
121 <t hangText="SDP:"> Session Description Protocol</t>
Jean-Marc Valin15f0f1f2012-11-29 09:24:54 -0500122 <t hangText="VBR:"> Variable bitrate</t>
Gregory Maxwell0c906072012-06-19 09:11:40 -0400123 </list>
124 </t>
125 <section title='Audio Bandwidth'>
Timothy B. Terriberryf7faa902014-07-25 21:45:46 -0700126 <t>
127 Throughout this document, we refer to the following definitions:
128 </t>
Gregory Maxwell0c906072012-06-19 09:11:40 -0400129 <texttable anchor='bandwidth_definitions'>
Timothy B. Terriberryf7faa902014-07-25 21:45:46 -0700130 <ttcol align='center'>Abbreviation</ttcol>
Gregory Maxwell0c906072012-06-19 09:11:40 -0400131 <ttcol align='center'>Name</ttcol>
Timothy B. Terriberryf7faa902014-07-25 21:45:46 -0700132 <ttcol align='center'>Audio Bandwidth (Hz)</ttcol>
133 <ttcol align='center'>Sampling Rate (Hz)</ttcol>
134 <c>NB</c>
Gregory Maxwell0c906072012-06-19 09:11:40 -0400135 <c>Narrowband</c>
136 <c>0 - 4000</c>
137 <c>8000</c>
138
Timothy B. Terriberryf7faa902014-07-25 21:45:46 -0700139 <c>MB</c>
Gregory Maxwell0c906072012-06-19 09:11:40 -0400140 <c>Mediumband</c>
141 <c>0 - 6000</c>
142 <c>12000</c>
143
Timothy B. Terriberryf7faa902014-07-25 21:45:46 -0700144 <c>WB</c>
Gregory Maxwell0c906072012-06-19 09:11:40 -0400145 <c>Wideband</c>
146 <c>0 - 8000</c>
147 <c>16000</c>
148
Timothy B. Terriberryf7faa902014-07-25 21:45:46 -0700149 <c>SWB</c>
Gregory Maxwell0c906072012-06-19 09:11:40 -0400150 <c>Super-wideband</c>
151 <c>0 - 12000</c>
152 <c>24000</c>
153
Timothy B. Terriberryf7faa902014-07-25 21:45:46 -0700154 <c>FB</c>
Gregory Maxwell0c906072012-06-19 09:11:40 -0400155 <c>Fullband</c>
156 <c>0 - 20000</c>
157 <c>48000</c>
158
159 <postamble>
160 Audio bandwidth naming
161 </postamble>
162 </texttable>
163 </section>
164 </section>
165
166 <section title='Opus Codec'>
167 <t>
Timothy B. Terriberryf7faa902014-07-25 21:45:46 -0700168 The Opus <xref target="RFC6716"/> codec encodes speech
169 signals as well as general audio signals. Two different modes can be
170 chosen, a voice mode or an audio mode, to allow the most efficient coding
171 depending on the type of the input signal, the sampling frequency of the
172 input signal, and the intended application.
Gregory Maxwell0c906072012-06-19 09:11:40 -0400173 </t>
174
175 <t>
Jean-Marc Valin57fa0562012-11-09 14:30:25 -0500176 The voice mode allows efficient encoding of voice signals at lower bit
Timothy B. Terriberryf7faa902014-07-25 21:45:46 -0700177 rates while the audio mode is optimized for general audio signals at medium and
Gregory Maxwell0c906072012-06-19 09:11:40 -0400178 higher bitrates.
179 </t>
180
181 <t>
182 The Opus speech and audio codec is highly scalable in terms of audio
Jean-Marc Valin57fa0562012-11-09 14:30:25 -0500183 bandwidth, bitrate, and complexity. Further, Opus allows
184 transmitting stereo signals.
Gregory Maxwell0c906072012-06-19 09:11:40 -0400185 </t>
186
187 <section title='Network Bandwidth'>
188 <t>
Timothy B. Terriberryf7faa902014-07-25 21:45:46 -0700189 Opus supports all bitrates from 6&nbsp;kb/s to 510&nbsp;kb/s.
190 The bitrate can be changed dynamically within that range.
191 All
192 other parameters being
193 equal, higher bitrates result in higher quality.
194 </t>
195 <section title='Recommended Bitrate' anchor='bitrate_by_bandwidth'>
196 <t>
197 For a frame size of
198 20&nbsp;ms, these
199 are the bitrate "sweet spots" for Opus in various configurations:
Gregory Maxwell0c906072012-06-19 09:11:40 -0400200
201 <list style="symbols">
Timothy B. Terriberryf7faa902014-07-25 21:45:46 -0700202 <t>8-12 kb/s for NB speech,</t>
203 <t>16-20 kb/s for WB speech,</t>
204 <t>28-40 kb/s for FB speech,</t>
205 <t>48-64 kb/s for FB mono music, and</t>
206 <t>64-128 kb/s for FB stereo music.</t>
207 </list>
208 </t>
Gregory Maxwell0c906072012-06-19 09:11:40 -0400209 </section>
Timothy B. Terriberryf7faa902014-07-25 21:45:46 -0700210 <section title='Variable versus Constant Bitrate' anchor='variable-vs-constant-bitrate'>
Gregory Maxwell0c906072012-06-19 09:11:40 -0400211 <t>
Timothy B. Terriberryf7faa902014-07-25 21:45:46 -0700212 For the same average bitrate, variable bitrate (VBR) can achieve higher quality
213 than constant bitrate (CBR). For the majority of voice transmission applications, VBR
214 is the best choice. One reason for choosing CBR is the potential
215 information leak that <spanx style='emph'>might</spanx> occur when encrypting the
216 compressed stream. See <xref target="RFC6562"/> for guidelines on when VBR is
217 appropriate for encrypted audio communications. In the case where an existing
218 VBR stream needs to be converted to CBR for security reasons, then the Opus padding
219 mechanism described in <xref target="RFC6716"/> is the RECOMMENDED way to achieve padding
220 because the RTP padding bit is unencrypted.</t>
Gregory Maxwell0c906072012-06-19 09:11:40 -0400221
Timothy B. Terriberryf7faa902014-07-25 21:45:46 -0700222 <t>
Gregory Maxwell0c906072012-06-19 09:11:40 -0400223 The bitrate can be adjusted at any point in time. To avoid congestion,
Timothy B. Terriberry1e87fea2014-07-25 22:33:55 -0700224 the average bitrate SHOULD NOT exceed the available
Jean-Marc Valinacf06752012-11-22 17:10:50 -0500225 network capacity. If no target bitrate is specified, the bitrates specified in
226 <xref target='bitrate_by_bandwidth'/> are RECOMMENDED.
Gregory Maxwell0c906072012-06-19 09:11:40 -0400227 </t>
228
229 </section>
230
231 <section title='Discontinuous Transmission (DTX)'>
232
233 <t>
Timothy B. Terriberryf7faa902014-07-25 21:45:46 -0700234 The Opus codec can, as described in <xref target='variable-vs-constant-bitrate'/>,
235 be operated with a variable bitrate. In that case, the encoder will
236 automatically reduce the bitrate for certain input signals, like periods
237 of silence. When using continuous transmission, it will reduce the
238 bitrate when the characteristics of the input signal permit, but
239 will never interrupt the transmission to the receiver. Therefore, the
Gregory Maxwell0c906072012-06-19 09:11:40 -0400240 received signal will maintain the same high level of quality over the
241 full duration of a transmission while minimizing the average bit
242 rate over time.
243 </t>
244
245 <t>
246 In cases where the bitrate of Opus needs to be reduced even
247 further or in cases where only constant bitrate is available,
Timothy B. Terriberryf7faa902014-07-25 21:45:46 -0700248 the Opus encoder can use discontinuous
Gregory Maxwell0c906072012-06-19 09:11:40 -0400249 transmission (DTX), where parts of the encoded signal that
250 correspond to periods of silence in the input speech or audio signal
Jean-Marc Valinf3d6c7a2014-06-30 14:13:46 -0400251 are not transmitted to the receiver. A receiver can distinguish
252 between DTX and packet loss by looking for gaps in the sequence
253 number, as described by Section 4.1
254 of&nbsp;<xref target="RFC3551"/>.
Gregory Maxwell0c906072012-06-19 09:11:40 -0400255 </t>
256
257 <t>
258 On the receiving side, the non-transmitted parts will be handled by a
259 frame loss concealment unit in the Opus decoder which generates a
260 comfort noise signal to replace the non transmitted parts of the
Jean-Marc Valinf3d6c7a2014-06-30 14:13:46 -0400261 speech or audio signal. Use of <xref target="RFC3389"/> Comfort
262 Noise (CN) with Opus is discouraged.
263 The transmitter MUST drop whole frames only,
264 based on the size of the last transmitted frame,
265 to ensure successive RTP timestamps differ by a multiple of 120 and
266 to allow the receiver to use whole frames for concealment.
Gregory Maxwell0c906072012-06-19 09:11:40 -0400267 </t>
268
269 <t>
Timothy B. Terriberryf7faa902014-07-25 21:45:46 -0700270 DTX can be used with both variable and constant bitrate.
271 It will have a slightly lower speech or audio
272 quality than continuous transmission. Therefore, using continuous
273 transmission is RECOMMENDED unless restraints on network capacity
274 are severe.
Gregory Maxwell0c906072012-06-19 09:11:40 -0400275 </t>
276
277 </section>
278
279 </section>
280
281 <section title='Complexity'>
282
283 <t>
284 Complexity can be scaled to optimize for CPU resources in real-time, mostly as
285 a trade-off between audio quality and bitrate. Also, different modes of Opus have different complexity.
286 </t>
287
288 </section>
289
290 <section title="Forward Error Correction (FEC)">
291
292 <t>
Timothy B. Terriberryf7faa902014-07-25 21:45:46 -0700293 The voice mode of Opus allows for embedding "in-band" forward error correction (FEC)
294 data into the Opus bit stream. This FEC scheme adds
295 redundant information about the previous packet (N-1) to the current
296 output packet N. For
Gregory Maxwell0c906072012-06-19 09:11:40 -0400297 each frame, the encoder decides whether to use FEC based on (1) an
298 externally-provided estimate of the channel's packet loss rate; (2) an
299 externally-provided estimate of the channel's capacity; (3) the
300 sensitivity of the audio or speech signal to packet loss; (4) whether
301 the receiving decoder has indicated it can take advantage of "in-band"
302 FEC information. The decision to send "in-band" FEC information is
303 entirely controlled by the encoder and therefore no special precautions
304 for the payload have to be taken.
305 </t>
306
307 <t>
308 On the receiving side, the decoder can take advantage of this
Timothy B. Terriberryf7faa902014-07-25 21:45:46 -0700309 additional information when it loses a packet and the next packet
Gregory Maxwell0c906072012-06-19 09:11:40 -0400310 is available. In order to use the FEC data, the jitter buffer needs
Timothy B. Terriberry1e87fea2014-07-25 22:33:55 -0700311 to provide access to payloads with the FEC data. The receiver can
312 then configure its decoder to decode the FEC data from the packet
313 rather than the regular audio data.
314 If no FEC data is available for the current frame, the decoder
Timothy B. Terriberryf7faa902014-07-25 21:45:46 -0700315 will consider the frame lost and invoke frame loss concealment.
Gregory Maxwell0c906072012-06-19 09:11:40 -0400316 </t>
317
318 <t>
319 If the FEC scheme is not implemented on the receiving side, FEC
320 SHOULD NOT be used, as it leads to an inefficient usage of network
321 resources. Decoder support for FEC SHOULD be indicated at the time a
322 session is set up.
323 </t>
324
325 </section>
326
327 <section title='Stereo Operation'>
328
329 <t>
330 Opus allows for transmission of stereo audio signals. This operation
331 is signaled in-band in the Opus payload and no special arrangement
Timothy B. Terriberryf7faa902014-07-25 21:45:46 -0700332 is needed in the payload format. Any implementation of the Opus
Jean-Marc Valin57fa0562012-11-09 14:30:25 -0500333 decoder MUST be capable of receiving stereo signals, although it MAY
Timothy B. Terriberryf7faa902014-07-25 21:45:46 -0700334 decode those signals as mono.
Gregory Maxwell0c906072012-06-19 09:11:40 -0400335 </t>
336 <t>
337 If a decoder can not take advantage of the benefits of a stereo signal
338 this SHOULD be indicated at the time a session is set up. In that case
339 the sending side SHOULD NOT send stereo signals as it leads to an
Timothy B. Terriberryf7faa902014-07-25 21:45:46 -0700340 inefficient usage of network resources.
Gregory Maxwell0c906072012-06-19 09:11:40 -0400341 </t>
342
343 </section>
344
345 </section>
346
347 <section title='Opus RTP Payload Format' anchor='opus-rtp-payload-format'>
348 <t>The payload format for Opus consists of the RTP header and Opus payload
349 data.</t>
350 <section title='RTP Header Usage'>
Timothy B. Terriberryf7faa902014-07-25 21:45:46 -0700351 <t>The format of the RTP header is specified in <xref target="RFC3550"/>.
352 The use of the fields of the RTP header by the Opus payload format is
353 consistent with that specification.</t>
Gregory Maxwell0c906072012-06-19 09:11:40 -0400354
Timothy B. Terriberryf7faa902014-07-25 21:45:46 -0700355 <t>The payload length of Opus is an integer number of octets and
356 therefore no padding is necessary. The payload MAY be padded by an
Gregory Maxwell0c906072012-06-19 09:11:40 -0400357 integer number of octets according to <xref target="RFC3550"/>.</t>
358
Jean-Marc Valinf3d6c7a2014-06-30 14:13:46 -0400359 <t>The timestamp, sequence number, and marker bit (M) of the RTP header
360 are used in accordance with Section 4.1
361 of&nbsp;<xref target="RFC3551"/>.</t>
Gregory Maxwell0c906072012-06-19 09:11:40 -0400362
363 <t>The RTP payload type for Opus has not been assigned statically and is
364 expected to be assigned dynamically.</t>
365
Timothy B. Terriberryf7faa902014-07-25 21:45:46 -0700366 <t>The receiving side MUST be prepared to receive duplicate RTP
Jean-Marc Valin741ced32014-07-30 14:54:59 -0400367 packets. The receiver MUST provide at most one of those payloads to the
Timothy B. Terriberryf7faa902014-07-25 21:45:46 -0700368 Opus decoder for decoding, and MUST discard the others.</t>
Gregory Maxwell0c906072012-06-19 09:11:40 -0400369
Timothy B. Terriberryf7faa902014-07-25 21:45:46 -0700370 <t>Opus supports 5 different audio bandwidths, which can be adjusted during
371 a call.
372 The RTP timestamp is incremented with a 48000 Hz clock rate
373 for all modes of Opus and all sampling rates.
374 The unit
Gregory Maxwell0c906072012-06-19 09:11:40 -0400375 for the timestamp is samples per single (mono) channel. The RTP timestamp corresponds to the
Timothy B. Terriberryf7faa902014-07-25 21:45:46 -0700376 sample time of the first encoded sample in the encoded frame.
377 For data encoded with sampling rates other than 48000 Hz,
378 the sampling rate has to be adjusted to 48000 Hz using the
379 corresponding multiplier in <xref target="fs-upsample-factors"/>.</t>
Gregory Maxwell0c906072012-06-19 09:11:40 -0400380
Jean-Marc Valin15f0f1f2012-11-29 09:24:54 -0500381 <texttable anchor='fs-upsample-factors' title="Timestamp multiplier">
Timothy B. Terriberryf7faa902014-07-25 21:45:46 -0700382 <ttcol align='center'>Sampling Rate (Hz)</ttcol>
Gregory Maxwell0c906072012-06-19 09:11:40 -0400383 <ttcol align='center'>Multiplier</ttcol>
384 <c>8000</c>
385 <c>6</c>
386 <c>12000</c>
387 <c>4</c>
388 <c>16000</c>
389 <c>3</c>
390 <c>24000</c>
391 <c>2</c>
392 <c>48000</c>
393 <c>1</c>
Gregory Maxwell0c906072012-06-19 09:11:40 -0400394 </texttable>
395 </section>
396
397 <section title='Payload Structure'>
398 <t>
Timothy B. Terriberryf7faa902014-07-25 21:45:46 -0700399 The Opus encoder can output encoded frames representing 2.5, 5, 10, 20,
400 40, or 60&nbsp;ms of speech or audio data. Further, an arbitrary number of frames can be
401 combined into a packet, up to a maximum packet duration representing
Timothy B. Terriberry1e87fea2014-07-25 22:33:55 -0700402 120&nbsp;ms of speech or audio data. The grouping of one or more Opus
403 frames into a single Opus packet is defined in Section&nbsp;3 of
404 <xref target="RFC6716"/>. An RTP payload MUST contain exactly one
405 Opus packet as defined by that document.
Gregory Maxwell0c906072012-06-19 09:11:40 -0400406 </t>
407
408 <t><xref target='payload-structure'/> shows the structure combined with the RTP header.</t>
409
410 <figure anchor="payload-structure"
411 title="Payload Structure with RTP header">
Timothy B. Terriberryf7faa902014-07-25 21:45:46 -0700412 <artwork align="center">
Gregory Maxwell0c906072012-06-19 09:11:40 -0400413 <![CDATA[
414+----------+--------------+
415|RTP Header| Opus Payload |
416+----------+--------------+
417 ]]>
418 </artwork>
419 </figure>
420
421 <t>
Timothy B. Terriberry554b3492014-10-03 21:49:57 -0700422 <xref target='opus-packetization'/> shows supported frame sizes in
Timothy B. Terriberryf7faa902014-07-25 21:45:46 -0700423 milliseconds of encoded speech or audio data for the speech and audio modes
424 (Mode) and sampling rates (fs) of Opus and shows how the timestamp is
425 incremented for packetization (ts incr). If the Opus encoder
426 outputs multiple encoded frames into a single packet, the timestamp
427 increment is the sum of the increments for the individual frames.
Gregory Maxwell0c906072012-06-19 09:11:40 -0400428 </t>
429
Timothy B. Terriberry554b3492014-10-03 21:49:57 -0700430 <texttable anchor='opus-packetization' title="Supported Opus frame
Julian Spittka03d5fec2012-11-30 03:12:59 -0500431 sizes and timestamp increments">
Gregory Maxwell0c906072012-06-19 09:11:40 -0400432 <ttcol align='center'>Mode</ttcol>
433 <ttcol align='center'>fs</ttcol>
434 <ttcol align='center'>2.5</ttcol>
435 <ttcol align='center'>5</ttcol>
436 <ttcol align='center'>10</ttcol>
437 <ttcol align='center'>20</ttcol>
438 <ttcol align='center'>40</ttcol>
439 <ttcol align='center'>60</ttcol>
440 <c>ts incr</c>
441 <c>all</c>
442 <c>120</c>
443 <c>240</c>
444 <c>480</c>
445 <c>960</c>
446 <c>1920</c>
447 <c>2880</c>
448 <c>voice</c>
Timothy B. Terriberryf7faa902014-07-25 21:45:46 -0700449 <c>NB/MB/WB/SWB/FB</c>
Gregory Maxwell0c906072012-06-19 09:11:40 -0400450 <c></c>
451 <c></c>
452 <c>x</c>
453 <c>x</c>
454 <c>x</c>
455 <c>x</c>
456 <c>audio</c>
Timothy B. Terriberryf7faa902014-07-25 21:45:46 -0700457 <c>NB/WB/SWB/FB</c>
Gregory Maxwell0c906072012-06-19 09:11:40 -0400458 <c>x</c>
459 <c>x</c>
460 <c>x</c>
461 <c>x</c>
462 <c></c>
463 <c></c>
Gregory Maxwell0c906072012-06-19 09:11:40 -0400464 </texttable>
465
466 </section>
467
468 </section>
469
470 <section title='Congestion Control'>
471
Timothy B. Terriberryf7faa902014-07-25 21:45:46 -0700472 <t>The target bitrate of Opus can be adjusted at any point in time, thus
473 allowing efficient congestion control. Furthermore, the amount
Gregory Maxwell0c906072012-06-19 09:11:40 -0400474 of encoded speech or audio data encoded in a
Timothy B. Terriberryf7faa902014-07-25 21:45:46 -0700475 single packet can be used for congestion control, since the transmission
476 rate is inversely proportional to the packet duration. A lower packet
477 transmission rate reduces the amount of header overhead, but at the same
478 time increases latency and loss sensitivity, so it ought to be used with
479 care.</t>
Gregory Maxwell0c906072012-06-19 09:11:40 -0400480
Timothy B. Terriberryf7faa902014-07-25 21:45:46 -0700481 <t>It is RECOMMENDED that senders of Opus encoded data apply congestion
482 control.</t>
Gregory Maxwell0c906072012-06-19 09:11:40 -0400483 </section>
484
485 <section title='IANA Considerations'>
486 <t>One media subtype (audio/opus) has been defined and registered as
487 described in the following section.</t>
488
489 <section title='Opus Media Type Registration'>
490 <t>Media type registration is done according to <xref
491 target="RFC4288"/> and <xref target="RFC4855"/>.<vspace
492 blankLines='1'/></t>
493
494 <t>Type name: audio<vspace blankLines='1'/></t>
495 <t>Subtype name: opus<vspace blankLines='1'/></t>
496
497 <t>Required parameters:</t>
498 <t><list style="hanging">
Timothy B. Terriberryf7faa902014-07-25 21:45:46 -0700499 <t hangText="rate:"> the RTP timestamp is incremented with a
Gregory Maxwell0c906072012-06-19 09:11:40 -0400500 48000 Hz clock rate for all modes of Opus and all sampling
Timothy B. Terriberryf7faa902014-07-25 21:45:46 -0700501 rates. For data encoded with sampling rates other than 48000 Hz,
502 the sampling rate has to be adjusted to 48000 Hz using the
503 corresponding multiplier in <xref target="fs-upsample-factors"/>.
Gregory Maxwell0c906072012-06-19 09:11:40 -0400504 </t>
505 </list></t>
506
507 <t>Optional parameters:</t>
508
509 <t><list style="hanging">
Jean-Marc Valinf22af9c2012-11-12 15:44:52 -0500510 <t hangText="maxplaybackrate:">
511 a hint about the maximum output sampling rate that the receiver is
Jean-Marc Valinacf06752012-11-22 17:10:50 -0500512 capable of rendering in Hz.
Jean-Marc Valinf22af9c2012-11-12 15:44:52 -0500513 The decoder MUST be capable of decoding
Gregory Maxwell0c906072012-06-19 09:11:40 -0400514 any audio bandwidth but due to hardware limitations only signals
Jean-Marc Valinf22af9c2012-11-12 15:44:52 -0500515 up to the specified sampling rate can be played back. Sending signals
Gregory Maxwell0c906072012-06-19 09:11:40 -0400516 with higher audio bandwidth results in higher than necessary network
517 usage and encoding complexity, so an encoder SHOULD NOT encode
Jean-Marc Valinf22af9c2012-11-12 15:44:52 -0500518 frequencies above the audio bandwidth specified by maxplaybackrate.
519 This parameter can take any value between 8000 and 48000, although
Timothy B. Terriberry554b3492014-10-03 21:49:57 -0700520 commonly the value will match one of the Opus bandwidths
Jean-Marc Valinf22af9c2012-11-12 15:44:52 -0500521 (<xref target="bandwidth_definitions"/>).
522 By default, the receiver is assumed to have no limitations, i.e. 48000.
Gregory Maxwell0c906072012-06-19 09:11:40 -0400523 <vspace blankLines='1'/>
524 </t>
525
Jean-Marc Valinf22af9c2012-11-12 15:44:52 -0500526 <t hangText="sprop-maxcapturerate:">
527 a hint about the maximum input sampling rate that the sender is likely to produce.
528 This is not a guarantee that the sender will never send any higher bandwidth
529 (e.g. it could send a pre-recorded prompt that uses a higher bandwidth), but it
530 indicates to the receiver that frequencies above this maximum can safely be discarded.
531 This parameter is useful to avoid wasting receiver resources by operating the audio
532 processing pipeline (e.g. echo cancellation) at a higher rate than necessary.
533 This parameter can take any value between 8000 and 48000, although
Timothy B. Terriberry554b3492014-10-03 21:49:57 -0700534 commonly the value will match one of the Opus bandwidths
Jean-Marc Valinf22af9c2012-11-12 15:44:52 -0500535 (<xref target="bandwidth_definitions"/>).
536 By default, the sender is assumed to have no limitations, i.e. 48000.
Jean-Marc Valin57fa0562012-11-09 14:30:25 -0500537 <vspace blankLines='1'/>
538 </t>
539
Timothy B. Terriberryf7faa902014-07-25 21:45:46 -0700540 <t hangText="maxptime:"> the maximum duration of media represented
541 by a packet (according to Section&nbsp;6 of
542 <xref target="RFC4566"/>) that a decoder wants to receive, in
543 milliseconds rounded up to the next full integer value.
544 Possible values are 3, 5, 10, 20, 40, 60, or an arbitrary
545 multiple of an Opus frame size rounded up to the next full integer
546 value, up to a maximum value of 120, as
Gregory Maxwell0c906072012-06-19 09:11:40 -0400547 defined in <xref target='opus-rtp-payload-format'/>. If no value is
Timothy B. Terriberryf7faa902014-07-25 21:45:46 -0700548 specified, the default is 120. This value is a recommendation
Gregory Maxwell0c906072012-06-19 09:11:40 -0400549 by the decoding side to ensure the best
550 performance for the decoder. The decoder MUST be
551 capable of accepting any allowed packet sizes to
552 ensure maximum compatibility.
553 <vspace blankLines='1'/></t>
554
Timothy B. Terriberryf7faa902014-07-25 21:45:46 -0700555 <t hangText="ptime:"> the preferred duration of media represented
556 by a packet (according to Section&nbsp;6 of
557 <xref target="RFC4566"/>) that a decoder wants to receive, in
558 milliseconds rounded up to the next full integer value.
559 Possible values are 3, 5, 10, 20, 40, 60, or an arbitrary
560 multiple of an Opus frame size rounded up to the next full integer
561 value, up to a maximum value of 120, as defined in <xref
Gregory Maxwell0c906072012-06-19 09:11:40 -0400562 target='opus-rtp-payload-format'/>. If no value is
Timothy B. Terriberryf7faa902014-07-25 21:45:46 -0700563 specified, the default is 20. If ptime is greater than
Gregory Maxwell0c906072012-06-19 09:11:40 -0400564 maxptime, ptime MUST be ignored. This parameter MAY be changed
565 during a session. This value is a recommendation by the decoding
566 side to ensure the best
567 performance for the decoder. The decoder MUST be
568 capable of accepting any allowed packet sizes to
569 ensure maximum compatibility.
570 <vspace blankLines='1'/></t>
571
Timothy B. Terriberryf7faa902014-07-25 21:45:46 -0700572 <t hangText="minptime:"> the minimum duration of media represented
573 by a packet (according to Section&nbsp;6 of
574 <xref target="RFC4566"/>) that SHOULD be encapsulated in a received
575 packet, in milliseconds rounded up to the next full integer value.
576 Possible values are 3, 5, 10, 20, 40, and 60
Gregory Maxwell0c906072012-06-19 09:11:40 -0400577 or an arbitrary multiple of Opus frame sizes rounded up to the next
578 full integer value up to a maximum value of 120
579 as defined in <xref target='opus-rtp-payload-format'/>. If no value is
Timothy B. Terriberryf7faa902014-07-25 21:45:46 -0700580 specified, the default is 3. This value is a recommendation
Gregory Maxwell0c906072012-06-19 09:11:40 -0400581 by the decoding side to ensure the best
582 performance for the decoder. The decoder MUST be
583 capable to accept any allowed packet sizes to
584 ensure maximum compatibility.
585 <vspace blankLines='1'/></t>
586
587 <t hangText="maxaveragebitrate:"> specifies the maximum average
Timothy B. Terriberryf7faa902014-07-25 21:45:46 -0700588 receive bitrate of a session in bits per second (b/s). The actual
589 value of the bitrate can vary, as it is dependent on the
Gregory Maxwell0c906072012-06-19 09:11:40 -0400590 characteristics of the media in a packet. Note that the maximum
591 average bitrate MAY be modified dynamically during a session. Any
Timothy B. Terriberryf7faa902014-07-25 21:45:46 -0700592 positive integer is allowed, but values outside the range
593 6000 to 510000 SHOULD be ignored. If no value is specified, the
Gregory Maxwell0c906072012-06-19 09:11:40 -0400594 maximum value specified in <xref target='bitrate_by_bandwidth'/>
Timothy B. Terriberryf7faa902014-07-25 21:45:46 -0700595 for the corresponding mode of Opus and corresponding maxplaybackrate
596 is the default.<vspace blankLines='1'/></t>
Gregory Maxwell0c906072012-06-19 09:11:40 -0400597
598 <t hangText="stereo:">
599 specifies whether the decoder prefers receiving stereo or mono signals.
Timothy B. Terriberryf7faa902014-07-25 21:45:46 -0700600 Possible values are 1 and 0 where 1 specifies that stereo signals are preferred,
Gregory Maxwell0c906072012-06-19 09:11:40 -0400601 and 0 specifies that only mono signals are preferred.
602 Independent of the stereo parameter every receiver MUST be able to receive and
603 decode stereo signals but sending stereo signals to a receiver that signaled a
604 preference for mono signals may result in higher than necessary network
Timothy B. Terriberryf7faa902014-07-25 21:45:46 -0700605 utilization and encoding complexity. If no value is specified,
606 the default is 0 (mono).<vspace blankLines='1'/>
Gregory Maxwell0c906072012-06-19 09:11:40 -0400607 </t>
608
Jean-Marc Valin57fa0562012-11-09 14:30:25 -0500609 <t hangText="sprop-stereo:">
610 specifies whether the sender is likely to produce stereo audio.
Timothy B. Terriberryf7faa902014-07-25 21:45:46 -0700611 Possible values are 1 and 0, where 1 specifies that stereo signals are likely to
612 be sent, and 0 specifies that the sender will likely only send mono.
613 This is not a guarantee that the sender will never send stereo audio
614 (e.g. it could send a pre-recorded prompt that uses stereo), but it
615 indicates to the receiver that the received signal can be safely downmixed to mono.
616 This parameter is useful to avoid wasting receiver resources by operating the audio
617 processing pipeline (e.g. echo cancellation) in stereo when not necessary.
618 If no value is specified, the default is 0
619 (mono).<vspace blankLines='1'/>
Jean-Marc Valin57fa0562012-11-09 14:30:25 -0500620 </t>
621
Gregory Maxwell0c906072012-06-19 09:11:40 -0400622 <t hangText="cbr:">
623 specifies if the decoder prefers the use of a constant bitrate versus
Timothy B. Terriberryf7faa902014-07-25 21:45:46 -0700624 variable bitrate. Possible values are 1 and 0, where 1 specifies constant
625 bitrate and 0 specifies variable bitrate. If no value is specified,
626 the default is 0 (vbr). When cbr is 1, the maximum average bitrate can still
627 change, e.g. to adapt to changing network conditions.<vspace blankLines='1'/>
Gregory Maxwell0c906072012-06-19 09:11:40 -0400628 </t>
629
Jean-Marc Valin15f0f1f2012-11-29 09:24:54 -0500630 <t hangText="useinbandfec:"> specifies that the decoder has the capability to
Timothy B. Terriberryf7faa902014-07-25 21:45:46 -0700631 take advantage of the Opus in-band FEC. Possible values are 1 and 0.
632 Providing 0 when FEC cannot be used on the receiving side is
633 RECOMMENDED. If no
Julian Spittka03d5fec2012-11-30 03:12:59 -0500634 value is specified, useinbandfec is assumed to be 0.
Jean-Marc Valin15f0f1f2012-11-29 09:24:54 -0500635 This parameter is only a preference and the receiver MUST be able to process
Julian Spittka03d5fec2012-11-30 03:12:59 -0500636 packets that include FEC information, even if it means the FEC part is discarded.
Jean-Marc Valin15f0f1f2012-11-29 09:24:54 -0500637 <vspace blankLines='1'/></t>
Gregory Maxwell0c906072012-06-19 09:11:40 -0400638
639 <t hangText="usedtx:"> specifies if the decoder prefers the use of
Timothy B. Terriberryf7faa902014-07-25 21:45:46 -0700640 DTX. Possible values are 1 and 0. If no value is specified, the
641 default is 0.<vspace blankLines='1'/></t>
Gregory Maxwell0c906072012-06-19 09:11:40 -0400642 </list></t>
643
644 <t>Encoding considerations:<vspace blankLines='1'/></t>
645 <t><list style="hanging">
Timothy B. Terriberryf7faa902014-07-25 21:45:46 -0700646 <t>The Opus media type is framed and consists of binary data according
647 to Section&nbsp;4.8 in <xref target="RFC4288"/>.</t>
Gregory Maxwell0c906072012-06-19 09:11:40 -0400648 </list></t>
649
650 <t>Security considerations: </t>
651 <t><list style="hanging">
652 <t>See <xref target='security-considerations'/> of this document.</t>
653 </list></t>
654
655 <t>Interoperability considerations: none<vspace blankLines='1'/></t>
656 <t>Published specification: none<vspace blankLines='1'/></t>
657
658 <t>Applications that use this media type: </t>
659 <t><list style="hanging">
660 <t>Any application that requires the transport of
Timothy B. Terriberryf7faa902014-07-25 21:45:46 -0700661 speech or audio data can use this media type. Some examples are,
Gregory Maxwell0c906072012-06-19 09:11:40 -0400662 but not limited to, audio and video conferencing, Voice over IP,
663 media streaming.</t>
664 </list></t>
665
Jean-Marc Valin5771b5a2013-08-02 12:04:50 -0400666 <t>Person &amp; email address to contact for further information:</t>
Gregory Maxwell0c906072012-06-19 09:11:40 -0400667 <t><list style="hanging">
668 <t>SILK Support silksupport@skype.net</t>
669 <t>Jean-Marc Valin jmvalin@jmvalin.ca</t>
670 </list></t>
671
672 <t>Intended usage: COMMON<vspace blankLines='1'/></t>
673
674 <t>Restrictions on usage:<vspace blankLines='1'/></t>
675
676 <t><list style="hanging">
677 <t>For transfer over RTP, the RTP payload format (<xref
678 target='opus-rtp-payload-format'/> of this document) SHALL be
679 used.</t>
680 </list></t>
681
682 <t>Author:</t>
683 <t><list style="hanging">
Julian Spittka03d5fec2012-11-30 03:12:59 -0500684 <t>Julian Spittka jspittka@gmail.com<vspace blankLines='1'/></t>
685 <t>Koen Vos koenvos74@gmail.com<vspace blankLines='1'/></t>
Gregory Maxwell0c906072012-06-19 09:11:40 -0400686 <t>Jean-Marc Valin jmvalin@jmvalin.ca<vspace blankLines='1'/></t>
687 </list></t>
688
689 <t> Change controller: TBD</t>
690 </section>
691
692 <section title='Mapping to SDP Parameters'>
693 <t>The information described in the media type specification has a
694 specific mapping to fields in the Session Description Protocol (SDP)
695 <xref target="RFC4566"/>, which is commonly used to describe RTP
696 sessions. When SDP is used to specify sessions employing the Opus codec,
697 the mapping is as follows:</t>
698
699 <t>
700 <list style="symbols">
701 <t>The media type ("audio") goes in SDP "m=" as the media name.</t>
702
703 <t>The media subtype ("opus") goes in SDP "a=rtpmap" as the encoding
Jean-Marc Valin57fa0562012-11-09 14:30:25 -0500704 name. The RTP clock rate in "a=rtpmap" MUST be 48000 and the number of
Timothy B. Terriberryf7faa902014-07-25 21:45:46 -0700705 channels MUST be 2.</t>
Gregory Maxwell0c906072012-06-19 09:11:40 -0400706
Timothy B. Terriberry239e9a32012-11-21 18:48:09 -0800707 <t>The OPTIONAL media type parameters "ptime" and "maxptime" are
Gregory Maxwell0c906072012-06-19 09:11:40 -0400708 mapped to "a=ptime" and "a=maxptime" attributes, respectively, in the
709 SDP.</t>
710
Timothy B. Terriberry554b3492014-10-03 21:49:57 -0700711 <t>The OPTIONAL media type parameters "maxaveragebitrate",
712 "maxplaybackrate", "minptime", "stereo", "cbr", "useinbandfec", and
713 "usedtx", when present, MUST be included in the "a=fmtp" attribute
Julian Spittka03d5fec2012-11-30 03:12:59 -0500714 in the SDP, expressed as a media type string in the form of a
Timothy B. Terriberry239e9a32012-11-21 18:48:09 -0800715 semicolon-separated list of parameter=value pairs (e.g.,
Timothy B. Terriberryf92c87a2012-11-22 04:38:35 -0800716 maxaveragebitrate=20000). They MUST NOT be specified in an
717 SSRC-specific "fmtp" source-level attribute (as defined in
718 Section&nbsp;6.3 of&nbsp;<xref target="RFC5576"/>).</t>
Timothy B. Terriberry239e9a32012-11-21 18:48:09 -0800719
720 <t>The OPTIONAL media type parameters "sprop-maxcapturerate",
721 and "sprop-stereo" MAY be mapped to the "a=fmtp" SDP attribute by
722 copying them directly from the media type parameter string as part
723 of the semicolon-separated list of parameter=value pairs (e.g.,
724 sprop-stereo=1). These same OPTIONAL media type parameters MAY also
Timothy B. Terriberryf92c87a2012-11-22 04:38:35 -0800725 be specified using an SSRC-specific "fmtp" source-level attribute
726 as described in Section&nbsp;6.3 of&nbsp;<xref target="RFC5576"/>.
727 They MAY be specified in both places, in which case the parameter
728 in the source-level attribute overrides the one found on the
729 "a=fmtp" line. The value of any parameter which is not specified in
730 a source-level source attribute MUST be taken from the "a=fmtp"
731 line, if it is present there.</t>
Timothy B. Terriberry239e9a32012-11-21 18:48:09 -0800732
Gregory Maxwell0c906072012-06-19 09:11:40 -0400733 </list>
734 </t>
735
736 <t>Below are some examples of SDP session descriptions for Opus:</t>
737
Jean-Marc Valinacf06752012-11-22 17:10:50 -0500738 <t>Example 1: Standard mono session with 48000 Hz clock rate</t>
Gregory Maxwell0c906072012-06-19 09:11:40 -0400739 <figure>
740 <artwork>
741 <![CDATA[
742 m=audio 54312 RTP/AVP 101
Jean-Marc Valin57fa0562012-11-09 14:30:25 -0500743 a=rtpmap:101 opus/48000/2
Gregory Maxwell0c906072012-06-19 09:11:40 -0400744 ]]>
745 </artwork>
746 </figure>
747
748
749 <t>Example 2: 16000 Hz clock rate, maximum packet size of 40 ms,
750 recommended packet size of 40 ms, maximum average bitrate of 20000 bps,
Jean-Marc Valine0703002014-07-30 13:41:28 -0400751 prefers to receive stereo but only plans to send mono, FEC is desired,
Jean-Marc Valin6b3d5c82014-06-30 17:13:16 -0400752 DTX is not desired</t>
Gregory Maxwell0c906072012-06-19 09:11:40 -0400753
754 <figure>
755 <artwork>
756 <![CDATA[
757 m=audio 54312 RTP/AVP 101
Jean-Marc Valin57fa0562012-11-09 14:30:25 -0500758 a=rtpmap:101 opus/48000/2
Jean-Marc Valinacf06752012-11-22 17:10:50 -0500759 a=fmtp:101 maxplaybackrate=16000; sprop-maxcapturerate=16000;
760 maxaveragebitrate=20000; stereo=1; useinbandfec=1; usedtx=0
Gregory Maxwell0c906072012-06-19 09:11:40 -0400761 a=ptime:40
762 a=maxptime:40
763 ]]>
764 </artwork>
765 </figure>
766
Jean-Marc Valinacf06752012-11-22 17:10:50 -0500767 <t>Example 3: Two-way full-band stereo preferred</t>
768
769 <figure>
770 <artwork>
771 <![CDATA[
772 m=audio 54312 RTP/AVP 101
773 a=rtpmap:101 opus/48000/2
774 a=fmtp:101 stereo=1; sprop-stereo=1
775 ]]>
776 </artwork>
777 </figure>
778
779
Gregory Maxwell0c906072012-06-19 09:11:40 -0400780 <section title='Offer-Answer Model Considerations for Opus'>
781
782 <t>When using the offer-answer procedure described in <xref
783 target="RFC3264"/> to negotiate the use of Opus, the following
784 considerations apply:</t>
785
786 <t><list style="symbols">
787
788 <t>Opus supports several clock rates. For signaling purposes only
789 the highest, i.e. 48000, is used. The actual clock rate of the
790 corresponding media is signaled inside the payload and is not
Timothy B. Terriberryf7faa902014-07-25 21:45:46 -0700791 restricted by this payload format description. The decoder MUST be
792 capable of decoding every received clock rate. An example
Gregory Maxwell0c906072012-06-19 09:11:40 -0400793 is shown below:
794
795 <figure>
796 <artwork>
797 <![CDATA[
Jean-Marc Valin57fa0562012-11-09 14:30:25 -0500798 m=audio 54312 RTP/AVP 100
799 a=rtpmap:100 opus/48000/2
Gregory Maxwell0c906072012-06-19 09:11:40 -0400800 ]]>
801 </artwork>
802 </figure>
803 </t>
804
Jean-Marc Valinacf06752012-11-22 17:10:50 -0500805 <t>The "ptime" and "maxptime" parameters are unidirectional
Gregory Maxwell0c906072012-06-19 09:11:40 -0400806 receive-only parameters and typically will not compromise
Timothy B. Terriberryf7faa902014-07-25 21:45:46 -0700807 interoperability; however, some values might cause application
808 performance to suffer. <xref
Gregory Maxwell0c906072012-06-19 09:11:40 -0400809 target="RFC3264"/> defines the SDP offer-answer handling of the
810 "ptime" parameter. The "maxptime" parameter MUST be handled in the
811 same way.</t>
812
813 <t>
Jean-Marc Valinacf06752012-11-22 17:10:50 -0500814 The "minptime" parameter is a unidirectional
Gregory Maxwell0c906072012-06-19 09:11:40 -0400815 receive-only parameters and typically will not compromise
Timothy B. Terriberryf7faa902014-07-25 21:45:46 -0700816 interoperability; however, some values might cause application
817 performance to suffer and ought to be used with care.
Gregory Maxwell0c906072012-06-19 09:11:40 -0400818 </t>
819
820 <t>
Jean-Marc Valinacf06752012-11-22 17:10:50 -0500821 The "maxplaybackrate" parameter is a unidirectional receive-only
Timothy B. Terriberry1e87fea2014-07-25 22:33:55 -0700822 parameter that reflects limitations of the local receiver. When
823 sending to a single destination, a sender MUST NOT use an audio
Jean-Marc Valin741ced32014-07-30 14:54:59 -0400824 bandwidth higher than necessary to make full use of audio sampled at
Timothy B. Terriberry1e87fea2014-07-25 22:33:55 -0700825 a sampling rate of "maxplaybackrate". Gateways or senders that
826 are sending the same encoded audio to multiple destinations
827 SHOULD NOT use an audio bandwidth higher than necessary to
828 represent audio sampled at "maxplaybackrate", as this would lead
829 to inefficient use of network resources.
Jean-Marc Valinf22af9c2012-11-12 15:44:52 -0500830 The "maxplaybackrate" parameter does not
Timothy B. Terriberryf7faa902014-07-25 21:45:46 -0700831 affect interoperability. Also, this parameter SHOULD NOT be used
832 to adjust the audio bandwidth as a function of the bitrate, as this
833 is the responsibility of the Opus encoder implementation.
Gregory Maxwell0c906072012-06-19 09:11:40 -0400834 </t>
835
Jean-Marc Valinacf06752012-11-22 17:10:50 -0500836 <t>The "maxaveragebitrate" parameter is a unidirectional receive-only
Gregory Maxwell0c906072012-06-19 09:11:40 -0400837 parameter that reflects limitations of the local receiver. The sender
838 of the other side MUST NOT send with an average bitrate higher than
839 "maxaveragebitrate" as it might overload the network and/or
Jean-Marc Valinacf06752012-11-22 17:10:50 -0500840 receiver. The "maxaveragebitrate" parameter typically will not
Timothy B. Terriberry554b3492014-10-03 21:49:57 -0700841 compromise interoperability; however, some values might cause
Timothy B. Terriberryf7faa902014-07-25 21:45:46 -0700842 application performance to suffer, and ought to be set with
843 care.</t>
Gregory Maxwell0c906072012-06-19 09:11:40 -0400844
Julian Spittka03d5fec2012-11-30 03:12:59 -0500845 <t>The "sprop-maxcapturerate" and "sprop-stereo" parameters are
Jean-Marc Valinacf06752012-11-22 17:10:50 -0500846 unidirectional sender-only parameters that reflect limitations of
847 the sender side.
Jean-Marc Valinb880e9b2012-11-22 17:25:22 -0500848 They allow the receiver to set up a reduced-complexity audio
849 processing pipeline if the sender is not planning to use the full
850 range of Opus's capabilities.
Julian Spittka03d5fec2012-11-30 03:12:59 -0500851 Neither "sprop-maxcapturerate" nor "sprop-stereo" affect
Jean-Marc Valinacf06752012-11-22 17:10:50 -0500852 interoperability and the receiver MUST be capable of receiving any signal.
853 </t>
Gregory Maxwell0c906072012-06-19 09:11:40 -0400854
855 <t>
Jean-Marc Valin57fa0562012-11-09 14:30:25 -0500856 The "stereo" parameter is a unidirectional receive-only
Timothy B. Terriberry1e87fea2014-07-25 22:33:55 -0700857 parameter. When sending to a single destination, a sender MUST
858 NOT use stereo when "stereo" is 0. Gateways or senders that are
859 sending the same encoded audio to multiple destinations SHOULD
860 NOT use stereo when "stereo" is 0, as this would lead to
861 inefficient use of network resources. The "stereo" parameter does
862 not affect interoperability.
Gregory Maxwell0c906072012-06-19 09:11:40 -0400863 </t>
864
865 <t>
Jean-Marc Valin57fa0562012-11-09 14:30:25 -0500866 The "cbr" parameter is a unidirectional receive-only
Gregory Maxwell0c906072012-06-19 09:11:40 -0400867 parameter.
868 </t>
869
Jean-Marc Valin57fa0562012-11-09 14:30:25 -0500870 <t>The "useinbandfec" parameter is a unidirectional receive-only
Gregory Maxwell0c906072012-06-19 09:11:40 -0400871 parameter.</t>
872
Jean-Marc Valin57fa0562012-11-09 14:30:25 -0500873 <t>The "usedtx" parameter is a unidirectional receive-only
Gregory Maxwell0c906072012-06-19 09:11:40 -0400874 parameter.</t>
875
876 <t>Any unknown parameter in an offer MUST be ignored by the receiver
877 and MUST be removed from the answer.</t>
878
879 </list></t>
880 </section>
881
882 <section title='Declarative SDP Considerations for Opus'>
883
884 <t>For declarative use of SDP such as in Session Announcement Protocol
885 (SAP), <xref target="RFC2974"/>, and RTSP, <xref target="RFC2326"/>, for
886 Opus, the following needs to be considered:</t>
887
888 <t><list style="symbols">
889
Jean-Marc Valinf22af9c2012-11-12 15:44:52 -0500890 <t>The values for "maxptime", "ptime", "minptime", "maxplaybackrate", and
Timothy B. Terriberryf7faa902014-07-25 21:45:46 -0700891 "maxaveragebitrate" ought to be selected carefully to ensure that a
Gregory Maxwell0c906072012-06-19 09:11:40 -0400892 reasonable performance can be achieved for the participants of a session.</t>
893
894 <t>
895 The values for "maxptime", "ptime", and "minptime" of the payload
896 format configuration are recommendations by the decoding side to ensure
897 the best performance for the decoder. The decoder MUST be
Timothy B. Terriberryf7faa902014-07-25 21:45:46 -0700898 capable of accepting any allowed packet sizes to
Gregory Maxwell0c906072012-06-19 09:11:40 -0400899 ensure maximum compatibility.
900 </t>
901
902 <t>All other parameters of the payload format configuration are declarative
903 and a participant MUST use the configurations that are provided for
Timothy B. Terriberryf7faa902014-07-25 21:45:46 -0700904 the session. More than one configuration can be provided if necessary
Gregory Maxwell0c906072012-06-19 09:11:40 -0400905 by declaring multiple RTP payload types; however, the number of types
Timothy B. Terriberryf7faa902014-07-25 21:45:46 -0700906 ought to be kept small.</t>
Gregory Maxwell0c906072012-06-19 09:11:40 -0400907 </list></t>
908 </section>
909 </section>
910 </section>
911
912 <section title='Security Considerations' anchor='security-considerations'>
913
914 <t>All RTP packets using the payload format defined in this specification
915 are subject to the general security considerations discussed in the RTP
Timothy B. Terriberryf7faa902014-07-25 21:45:46 -0700916 specification <xref target="RFC3550"/> and any profile from,
917 e.g., <xref target="RFC3711"/> or <xref target="RFC3551"/>.</t>
Gregory Maxwell0c906072012-06-19 09:11:40 -0400918
Timothy B. Terriberryf7faa902014-07-25 21:45:46 -0700919 <t>This payload format transports Opus encoded speech or audio data.
920 Hence, security issues include confidentiality, integrity protection, and
Gregory Maxwell0c906072012-06-19 09:11:40 -0400921 authentication of the speech or audio itself. The Opus payload format does
922 not have any built-in security mechanisms. Any suitable external
923 mechanisms, such as SRTP <xref target="RFC3711"/>, MAY be used.</t>
924
925 <t>This payload format and the Opus encoding do not exhibit any
926 significant non-uniformity in the receiver-end computational load and thus
927 are unlikely to pose a denial-of-service threat due to the receipt of
928 pathological datagrams.</t>
929 </section>
930
931 <section title='Acknowledgements'>
932 <t>TBD</t>
933 </section>
934 </middle>
935
936 <back>
937 <references title="Normative References">
938 &rfc2119;
Jean-Marc Valinf3d6c7a2014-06-30 14:13:46 -0400939 &rfc3389;
Gregory Maxwell0c906072012-06-19 09:11:40 -0400940 &rfc3550;
941 &rfc3711;
942 &rfc3551;
943 &rfc4288;
944 &rfc4855;
945 &rfc4566;
946 &rfc3264;
947 &rfc2974;
948 &rfc2326;
Timothy B. Terriberry239e9a32012-11-21 18:48:09 -0800949 &rfc5576;
Jean-Marc Valinbdf87402012-07-11 15:54:55 -0400950 &rfc6562;
Jean-Marc Valinacf06752012-11-22 17:10:50 -0500951 &rfc6716;
Gregory Maxwell0c906072012-06-19 09:11:40 -0400952 </references>
953
Gregory Maxwell0c906072012-06-19 09:11:40 -0400954 </back>
955</rfc>