draft-ietf-payload-rtp-opus-04.txt   draft-ietf-payload-rtp-opus-05.txt 
Network Working Group J. Spittka Network Working Group J. Spittka
Internet-Draft Internet-Draft
Intended status: Standards Track K. Vos Intended status: Standards Track K. Vos
Expires: May 17, 2015 vocTone Expires: June 10, 2015 vocTone
JM. Valin JM. Valin
Mozilla Mozilla
November 13, 2014 December 7, 2014
RTP Payload Format for Opus Speech and Audio Codec RTP Payload Format for Opus Speech and Audio Codec
draft-ietf-payload-rtp-opus-04 draft-ietf-payload-rtp-opus-05
Abstract Abstract
This document defines the Real-time Transport Protocol (RTP) payload This document defines the Real-time Transport Protocol (RTP) payload
format for packetization of Opus encoded speech and audio data format for packetization of Opus encoded speech and audio data
necessary to integrate the codec in the most compatible way. necessary to integrate the codec in the most compatible way.
Further, it describes media type registrations for the RTP payload Further, it describes media type registrations for the RTP payload
format. format.
Status of This Memo Status of This Memo
skipping to change at page 1, line 37 skipping to change at page 1, line 37
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/. Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on May 17, 2015. This Internet-Draft will expire on June 10, 2015.
Copyright Notice Copyright Notice
Copyright (c) 2014 IETF Trust and the persons identified as the Copyright (c) 2014 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of (http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License. described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2
2. Conventions, Definitions and Acronyms used in this document . 3 2. Conventions, Definitions and Acronyms used in this document . 3
2.1. Audio Bandwidth . . . . . . . . . . . . . . . . . . . . . 3
3. Opus Codec . . . . . . . . . . . . . . . . . . . . . . . . . 3 3. Opus Codec . . . . . . . . . . . . . . . . . . . . . . . . . 3
3.1. Network Bandwidth . . . . . . . . . . . . . . . . . . . . 4 3.1. Network Bandwidth . . . . . . . . . . . . . . . . . . . . 4
3.1.1. Recommended Bitrate . . . . . . . . . . . . . . . . . 4 3.1.1. Recommended Bitrate . . . . . . . . . . . . . . . . . 4
3.1.2. Variable versus Constant Bitrate . . . . . . . . . . 4 3.1.2. Variable versus Constant Bitrate . . . . . . . . . . 4
3.1.3. Discontinuous Transmission (DTX) . . . . . . . . . . 4 3.1.3. Discontinuous Transmission (DTX) . . . . . . . . . . 4
3.2. Complexity . . . . . . . . . . . . . . . . . . . . . . . 5 3.2. Complexity . . . . . . . . . . . . . . . . . . . . . . . 5
3.3. Forward Error Correction (FEC) . . . . . . . . . . . . . 5 3.3. Forward Error Correction (FEC) . . . . . . . . . . . . . 5
3.4. Stereo Operation . . . . . . . . . . . . . . . . . . . . 6 3.4. Stereo Operation . . . . . . . . . . . . . . . . . . . . 6
4. Opus RTP Payload Format . . . . . . . . . . . . . . . . . . . 6 4. Opus RTP Payload Format . . . . . . . . . . . . . . . . . . . 6
4.1. RTP Header Usage . . . . . . . . . . . . . . . . . . . . 6 4.1. RTP Header Usage . . . . . . . . . . . . . . . . . . . . 6
4.2. Payload Structure . . . . . . . . . . . . . . . . . . . . 7 4.2. Payload Structure . . . . . . . . . . . . . . . . . . . . 7
5. Congestion Control . . . . . . . . . . . . . . . . . . . . . 8 5. Congestion Control . . . . . . . . . . . . . . . . . . . . . 8
6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 8 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 8
6.1. Opus Media Type Registration . . . . . . . . . . . . . . 9 6.1. Opus Media Type Registration . . . . . . . . . . . . . . 8
6.2. Mapping to SDP Parameters . . . . . . . . . . . . . . . . 12 6.2. Mapping to SDP Parameters . . . . . . . . . . . . . . . . 11
6.2.1. Offer-Answer Model Considerations for Opus . . . . . 14 6.2.1. Offer-Answer Model Considerations for Opus . . . . . 13
6.2.2. Declarative SDP Considerations for Opus . . . . . . . 15 6.2.2. Declarative SDP Considerations for Opus . . . . . . . 14
7. Security Considerations . . . . . . . . . . . . . . . . . . . 16 7. Security Considerations . . . . . . . . . . . . . . . . . . . 14
8. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 16 8. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 15
9. References . . . . . . . . . . . . . . . . . . . . . . . . . 16 9. References . . . . . . . . . . . . . . . . . . . . . . . . . 15
9.1. Normative References . . . . . . . . . . . . . . . . . . 16 9.1. Normative References . . . . . . . . . . . . . . . . . . 15
9.2. Informative References . . . . . . . . . . . . . . . . . 17 9.2. Informative References . . . . . . . . . . . . . . . . . 16
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 17 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 16
1. Introduction 1. Introduction
The Opus codec is a speech and audio codec developed within the IETF The Opus codec is a speech and audio codec developed within the IETF
Internet Wideband Audio Codec working group. The codec has a very Internet Wideband Audio Codec working group. The codec has a very
low algorithmic delay and it is highly scalable in terms of audio low algorithmic delay and it is highly scalable in terms of audio
bandwidth, bitrate, and complexity. Further, it provides different bandwidth, bitrate, and complexity. Further, it provides different
modes to efficiently encode speech signals as well as music signals, modes to efficiently encode speech signals as well as music signals,
thus making it the codec of choice for various applications using the thus making it the codec of choice for various applications using the
Internet or similar networks. Internet or similar networks.
skipping to change at page 3, line 13 skipping to change at page 3, line 11
compatible way. Further, it describes media type registrations for compatible way. Further, it describes media type registrations for
the RTP payload format. More information on the Opus codec can be the RTP payload format. More information on the Opus codec can be
obtained from [RFC6716]. obtained from [RFC6716].
2. Conventions, Definitions and Acronyms used in this document 2. Conventions, Definitions and Acronyms used in this document
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in [RFC2119]. document are to be interpreted as described in [RFC2119].
audio bandwidth: The range of audio frequecies being coded
CBR: Constant bitrate CBR: Constant bitrate
CPU: Central Processing Unit CPU: Central Processing Unit
DTX: Discontinuous transmission DTX: Discontinuous transmission
FEC: Forward error correction FEC: Forward error correction
IP: Internet Protocol IP: Internet Protocol
samples: Speech or audio samples (per channel) samples: Speech or audio samples (per channel)
SDP: Session Description Protocol SDP: Session Description Protocol
VBR: Variable bitrate VBR: Variable bitrate
2.1. Audio Bandwidth
Throughout this document, we refer to the following definitions: Throughout this document, we refer to the following definitions:
+--------------+----------------+-----------------+-----------------+ +--------------+----------------+-----------------+-----------------+
| Abbreviation | Name | Audio Bandwidth | Sampling Rate | | Abbreviation | Name | Audio Bandwidth | Sampling Rate |
| | | (Hz) | (Hz) | | | | (Hz) | (Hz) |
+--------------+----------------+-----------------+-----------------+ +--------------+----------------+-----------------+-----------------+
| NB | Narrowband | 0 - 4000 | 8000 | | NB | Narrowband | 0 - 4000 | 8000 |
| | | | | | | | | |
| MB | Mediumband | 0 - 6000 | 12000 | | MB | Mediumband | 0 - 6000 | 12000 |
| | | | | | | | | |
skipping to change at page 4, line 15 skipping to change at page 4, line 11
The voice mode allows efficient encoding of voice signals at lower The voice mode allows efficient encoding of voice signals at lower
bit rates while the audio mode is optimized for general audio signals bit rates while the audio mode is optimized for general audio signals
at medium and higher bitrates. at medium and higher bitrates.
The Opus speech and audio codec is highly scalable in terms of audio The Opus speech and audio codec is highly scalable in terms of audio
bandwidth, bitrate, and complexity. Further, Opus allows bandwidth, bitrate, and complexity. Further, Opus allows
transmitting stereo signals. transmitting stereo signals.
3.1. Network Bandwidth 3.1. Network Bandwidth
Opus supports all bitrates from 6 kb/s to 510 kb/s. The bitrate can Opus supports bitrates from 6 kb/s to 510 kb/s. The bitrate can be
be changed dynamically within that range. All other parameters being changed dynamically within that range. All other parameters being
equal, higher bitrates result in higher quality. equal, higher bitrates result in higher quality.
3.1.1. Recommended Bitrate 3.1.1. Recommended Bitrate
For a frame size of 20 ms, these are the bitrate "sweet spots" for For a frame size of 20 ms, these are the bitrate "sweet spots" for
Opus in various configurations: Opus in various configurations:
o 8-12 kb/s for NB speech, o 8-12 kb/s for NB speech,
o 16-20 kb/s for WB speech, o 16-20 kb/s for WB speech,
o 28-40 kb/s for FB speech, o 28-40 kb/s for FB speech,
skipping to change at page 5, line 36 skipping to change at page 5, line 32
RTP timestamps differ by a multiple of 120 and to allow the receiver RTP timestamps differ by a multiple of 120 and to allow the receiver
to use whole frames for concealment. to use whole frames for concealment.
DTX can be used with both variable and constant bitrate. It will DTX can be used with both variable and constant bitrate. It will
have a slightly lower speech or audio quality than continuous have a slightly lower speech or audio quality than continuous
transmission. Therefore, using continuous transmission is transmission. Therefore, using continuous transmission is
RECOMMENDED unless restraints on network capacity are severe. RECOMMENDED unless restraints on network capacity are severe.
3.2. Complexity 3.2. Complexity
Complexity can be scaled to optimize for CPU resources in real-time, Complexity of the encoder can be scaled to optimize for CPU resources
mostly as a trade-off between audio quality and bitrate. Also, in real-time, mostly as a trade-off between audio quality and
different modes of Opus have different complexity. bitrate. Also, different modes of Opus have different complexity.
3.3. Forward Error Correction (FEC) 3.3. Forward Error Correction (FEC)
The voice mode of Opus allows for embedding "in-band" forward error The voice mode of Opus allows for embedding "in-band" forward error
correction (FEC) data into the Opus bit stream. This FEC scheme adds correction (FEC) data into the Opus bit stream. This FEC scheme adds
redundant information about the previous packet (N-1) to the current redundant information about the previous packet (N-1) to the current
output packet N. For each frame, the encoder decides whether to use output packet N. For each frame, the encoder decides whether to use
FEC based on (1) an externally-provided estimate of the channel's FEC based on (1) an externally-provided estimate of the channel's
packet loss rate; (2) an externally-provided estimate of the packet loss rate; (2) an externally-provided estimate of the
channel's capacity; (3) the sensitivity of the audio or speech signal channel's capacity; (3) the sensitivity of the audio or speech signal
to packet loss; (4) whether the receiving decoder has indicated it to packet loss; (4) whether the receiving decoder has indicated it
can take advantage of "in-band" FEC information. The decision to can take advantage of "in-band" FEC information. The decision to
send "in-band" FEC information is entirely controlled by the encoder send "in-band" FEC information is entirely controlled by the encoder
and therefore no special precautions for the payload have to be and therefore no special precautions for the payload have to be
taken. taken.
On the receiving side, the decoder can take advantage of this On the receiving side, the decoder can take advantage of this
additional information when it loses a packet and the next packet is additional information when it loses a packet and the next packet is
available. In order to use the FEC data, the jitter buffer needs to available. In order to use the FEC data, the jitter buffer needs to
provide access to payloads with the FEC data. The receiver can then provide access to payloads with the FEC data. Instead of performing
configure its decoder to decode the FEC data from the packet rather loss concealment for a missing packet, the receiver can then
than the regular audio data. If no FEC data is available for the configure its decoder to decode the FEC data from the next packet.
current frame, the decoder will consider the frame lost and invoke
frame loss concealment.
If the FEC scheme is not implemented on the receiving side, FEC Any compliant Opus decoder is capable of ignoring FEC information
SHOULD NOT be used, as it leads to an inefficient usage of network when it is not needed, so encoding with FEC cannot cause
resources. Decoder support for FEC SHOULD be indicated at the time a interoperability problems. However, if FEC cannot be used on the
session is set up. receiving side, then FEC SHOULD NOT be used, as it leads to an
inefficient usage of network resources. Decoder support for FEC
SHOULD be indicated at the time a session is set up.
3.4. Stereo Operation 3.4. Stereo Operation
Opus allows for transmission of stereo audio signals. This operation Opus allows for transmission of stereo audio signals. This operation
is signaled in-band in the Opus payload and no special arrangement is is signaled in-band in the Opus payload and no special arrangement is
needed in the payload format. Any implementation of the Opus decoder needed in the payload format. An Opus decoder is capable of handling
MUST be capable of receiving stereo signals, although it MAY decode a stereo encoding, but an application might only be capable of
those signals as mono. consuming a single audio channel.
If a decoder can not take advantage of the benefits of a stereo If a decoder cannot take advantage of the benefits of a stereo signal
signal this SHOULD be indicated at the time a session is set up. In this SHOULD be indicated at the time a session is set up. In that
that case the sending side SHOULD NOT send stereo signals as it leads case the sending side SHOULD NOT send stereo signals as it leads to
to an inefficient usage of network resources. an inefficient usage of network resources.
4. Opus RTP Payload Format 4. Opus RTP Payload Format
The payload format for Opus consists of the RTP header and Opus The payload format for Opus consists of the RTP header and Opus
payload data. payload data.
4.1. RTP Header Usage 4.1. RTP Header Usage
The format of the RTP header is specified in [RFC3550]. The use of The format of the RTP header is specified in [RFC3550]. The use of
the fields of the RTP header by the Opus payload format is consistent the fields of the RTP header by the Opus payload format is consistent
with that specification. with that specification.
The payload length of Opus is an integer number of octets and The payload length of Opus is an integer number of octets and
therefore no padding is necessary. The payload MAY be padded by an therefore no padding is necessary. The payload MAY be padded by an
integer number of octets according to [RFC3550]. integer number of octets according to [RFC3550], although the Opus
internal padding is preferred.
The timestamp, sequence number, and marker bit (M) of the RTP header The timestamp, sequence number, and marker bit (M) of the RTP header
are used in accordance with Section 4.1 of [RFC3551]. are used in accordance with Section 4.1 of [RFC3551].
The RTP payload type for Opus has not been assigned statically and is The RTP payload type for Opus is to be assigned dynamically.
expected to be assigned dynamically.
The receiving side MUST be prepared to receive duplicate RTP packets. The receiving side MUST be prepared to receive duplicate RTP packets.
The receiver MUST provide at most one of those payloads to the Opus The receiver MUST provide at most one of those payloads to the Opus
decoder for decoding, and MUST discard the others. decoder for decoding, and MUST discard the others.
Opus supports 5 different audio bandwidths, which can be adjusted Opus supports 5 different audio bandwidths, which can be adjusted
during a call. The RTP timestamp is incremented with a 48000 Hz during a call. The RTP timestamp is incremented with a 48000 Hz
clock rate for all modes of Opus and all sampling rates. The unit clock rate for all modes of Opus and all sampling rates. The unit
for the timestamp is samples per single (mono) channel. The RTP for the timestamp is samples per single (mono) channel. The RTP
timestamp corresponds to the sample time of the first encoded sample timestamp corresponds to the sample time of the first encoded sample
in the encoded frame. For data encoded with sampling rates other in the encoded frame. For data encoded with sampling rates other
than 48000 Hz, the sampling rate has to be adjusted to 48000 Hz using than 48000 Hz, the sampling rate has to be adjusted to 48000 Hz.
the corresponding multiplier in Table 2.
+--------------------+------------+
| Sampling Rate (Hz) | Multiplier |
+--------------------+------------+
| 8000 | 6 |
| | |
| 12000 | 4 |
| | |
| 16000 | 3 |
| | |
| 24000 | 2 |
| | |
| 48000 | 1 |
+--------------------+------------+
Table 2: Timestamp multiplier
4.2. Payload Structure 4.2. Payload Structure
The Opus encoder can output encoded frames representing 2.5, 5, 10, The Opus encoder can output encoded frames representing 2.5, 5, 10,
20, 40, or 60 ms of speech or audio data. Further, an arbitrary 20, 40, or 60 ms of speech or audio data. Further, an arbitrary
number of frames can be combined into a packet, up to a maximum number of frames can be combined into a packet, up to a maximum
packet duration representing 120 ms of speech or audio data. The packet duration representing 120 ms of speech or audio data. The
grouping of one or more Opus frames into a single Opus packet is grouping of one or more Opus frames into a single Opus packet is
defined in Section 3 of [RFC6716]. An RTP payload MUST contain defined in Section 3 of [RFC6716]. An RTP payload MUST contain
exactly one Opus packet as defined by that document. exactly one Opus packet as defined by that document.
Figure 1 shows the structure combined with the RTP header. Figure 1 shows the structure combined with the RTP header.
+----------+--------------+ +----------+--------------+
|RTP Header| Opus Payload | |RTP Header| Opus Payload |
+----------+--------------+ +----------+--------------+
Figure 1: Payload Structure with RTP header Figure 1: Packet structure with RTP header
Table 3 shows supported frame sizes in milliseconds of encoded speech Table 2 shows supported frame sizes in milliseconds of encoded speech
or audio data for the speech and audio modes (Mode) and sampling or audio data for the speech and audio modes (Mode) and sampling
rates (fs) of Opus and shows how the timestamp is incremented for rates (fs) of Opus and shows how the timestamp is incremented for
packetization (ts incr). If the Opus encoder outputs multiple packetization (ts incr). If the Opus encoder outputs multiple
encoded frames into a single packet, the timestamp increment is the encoded frames into a single packet, the timestamp increment is the
sum of the increments for the individual frames. sum of the increments for the individual frames.
+---------+-----------------+-----+-----+-----+-----+------+------+ +---------+-----------------+-----+-----+-----+-----+------+------+
| Mode | fs | 2.5 | 5 | 10 | 20 | 40 | 60 | | Mode | fs | 2.5 | 5 | 10 | 20 | 40 | 60 |
+---------+-----------------+-----+-----+-----+-----+------+------+ +---------+-----------------+-----+-----+-----+-----+------+------+
| ts incr | all | 120 | 240 | 480 | 960 | 1920 | 2880 | | ts incr | all | 120 | 240 | 480 | 960 | 1920 | 2880 |
| | | | | | | | | | | | | | | | | |
| voice | NB/MB/WB/SWB/FB | | | x | x | x | x | | voice | NB/MB/WB/SWB/FB | | | x | x | x | x |
| | | | | | | | | | | | | | | | | |
| audio | NB/WB/SWB/FB | x | x | x | x | | | | audio | NB/WB/SWB/FB | x | x | x | x | | |
+---------+-----------------+-----+-----+-----+-----+------+------+ +---------+-----------------+-----+-----+-----+-----+------+------+
Table 3: Supported Opus frame sizes and timestamp increments Table 2: Supported Opus frame sizes and timestamp increments
5. Congestion Control 5. Congestion Control
The target bitrate of Opus can be adjusted at any point in time, thus The target bitrate of Opus can be adjusted at any point in time, thus
allowing efficient congestion control. Furthermore, the amount of allowing efficient congestion control. Furthermore, the amount of
encoded speech or audio data encoded in a single packet can be used encoded speech or audio data encoded in a single packet can be used
for congestion control, since the transmission rate is inversely for congestion control, since the transmission rate is inversely
proportional to the packet duration. A lower packet transmission proportional to the packet duration. A lower packet transmission
rate reduces the amount of header overhead, but at the same time rate reduces the amount of header overhead, but at the same time
increases latency and loss sensitivity, so it ought to be used with increases latency and loss sensitivity, so it ought to be used with
skipping to change at page 9, line 18 skipping to change at page 8, line 49
Type name: audio Type name: audio
Subtype name: opus Subtype name: opus
Required parameters: Required parameters:
rate: the RTP timestamp is incremented with a 48000 Hz clock rate rate: the RTP timestamp is incremented with a 48000 Hz clock rate
for all modes of Opus and all sampling rates. For data encoded for all modes of Opus and all sampling rates. For data encoded
with sampling rates other than 48000 Hz, the sampling rate has to with sampling rates other than 48000 Hz, the sampling rate has to
be adjusted to 48000 Hz using the corresponding multiplier in be adjusted to 48000 Hz.
Table 2.
Optional parameters: Optional parameters:
maxplaybackrate: a hint about the maximum output sampling rate that maxplaybackrate: a hint about the maximum output sampling rate that
the receiver is capable of rendering in Hz. The decoder MUST be the receiver is capable of rendering in Hz. The decoder MUST be
capable of decoding any audio bandwidth but due to hardware capable of decoding any audio bandwidth but due to hardware
limitations only signals up to the specified sampling rate can be limitations only signals up to the specified sampling rate can be
played back. Sending signals with higher audio bandwidth results played back. Sending signals with higher audio bandwidth results
in higher than necessary network usage and encoding complexity, so in higher than necessary network usage and encoding complexity, so
an encoder SHOULD NOT encode frequencies above the audio bandwidth an encoder SHOULD NOT encode frequencies above the audio bandwidth
skipping to change at page 10, line 11 skipping to change at page 9, line 38
commonly the value will match one of the Opus bandwidths commonly the value will match one of the Opus bandwidths
(Table 1). By default, the sender is assumed to have no (Table 1). By default, the sender is assumed to have no
limitations, i.e. 48000. limitations, i.e. 48000.
maxptime: the maximum duration of media represented by a packet maxptime: the maximum duration of media represented by a packet
(according to Section 6 of [RFC4566]) that a decoder wants to (according to Section 6 of [RFC4566]) that a decoder wants to
receive, in milliseconds rounded up to the next full integer receive, in milliseconds rounded up to the next full integer
value. Possible values are 3, 5, 10, 20, 40, 60, or an arbitrary value. Possible values are 3, 5, 10, 20, 40, 60, or an arbitrary
multiple of an Opus frame size rounded up to the next full integer multiple of an Opus frame size rounded up to the next full integer
value, up to a maximum value of 120, as defined in Section 4. If value, up to a maximum value of 120, as defined in Section 4. If
no value is specified, the default is 120. This value is a no value is specified, the default is 120.
recommendation by the decoding side to ensure the best performance
for the decoder. The decoder MUST be capable of accepting any
allowed packet sizes to ensure maximum compatibility.
ptime: the preferred duration of media represented by a packet ptime: the preferred duration of media represented by a packet
(according to Section 6 of [RFC4566]) that a decoder wants to (according to Section 6 of [RFC4566]) that a decoder wants to
receive, in milliseconds rounded up to the next full integer receive, in milliseconds rounded up to the next full integer
value. Possible values are 3, 5, 10, 20, 40, 60, or an arbitrary value. Possible values are 3, 5, 10, 20, 40, 60, or an arbitrary
multiple of an Opus frame size rounded up to the next full integer multiple of an Opus frame size rounded up to the next full integer
value, up to a maximum value of 120, as defined in Section 4. If value, up to a maximum value of 120, as defined in Section 4. If
no value is specified, the default is 20. If ptime is greater no value is specified, the default is 20.
than maxptime, ptime MUST be ignored. This parameter MAY be
changed during a session. This value is a recommendation by the
decoding side to ensure the best performance for the decoder. The
decoder MUST be capable of accepting any allowed packet sizes to
ensure maximum compatibility.
minptime: the minimum duration of media represented by a packet
(according to Section 6 of [RFC4566]) that SHOULD be encapsulated
in a received packet, in milliseconds rounded up to the next full
integer value. Possible values are 3, 5, 10, 20, 40, and 60 or an
arbitrary multiple of Opus frame sizes rounded up to the next full
integer value up to a maximum value of 120 as defined in
Section 4. If no value is specified, the default is 3. This
value is a recommendation by the decoding side to ensure the best
performance for the decoder. The decoder MUST be capable to
accept any allowed packet sizes to ensure maximum compatibility.
maxaveragebitrate: specifies the maximum average receive bitrate of
a session in bits per second (b/s). The actual value of the
bitrate can vary, as it is dependent on the characteristics of the
media in a packet. Note that the maximum average bitrate MAY be
modified dynamically during a session. Any positive integer is
allowed, but values outside the range 6000 to 510000 SHOULD be
ignored. If no value is specified, the maximum value specified in
Section 3.1.1 for the corresponding mode of Opus and corresponding
maxplaybackrate is the default.
stereo: specifies whether the decoder prefers receiving stereo or stereo: specifies whether the decoder prefers receiving stereo or
mono signals. Possible values are 1 and 0 where 1 specifies that mono signals. Possible values are 1 and 0 where 1 specifies that
stereo signals are preferred, and 0 specifies that only mono stereo signals are preferred, and 0 specifies that only mono
signals are preferred. Independent of the stereo parameter every signals are preferred. Independent of the stereo parameter every
receiver MUST be able to receive and decode stereo signals but receiver MUST be able to receive and decode stereo signals but
sending stereo signals to a receiver that signaled a preference sending stereo signals to a receiver that signaled a preference
for mono signals may result in higher than necessary network for mono signals may result in higher than necessary network
utilization and encoding complexity. If no value is specified, utilization and encoding complexity. If no value is specified,
the default is 0 (mono). the default is 0 (mono).
skipping to change at page 13, line 11 skipping to change at page 12, line 11
as follows: as follows:
o The media type ("audio") goes in SDP "m=" as the media name. o The media type ("audio") goes in SDP "m=" as the media name.
o The media subtype ("opus") goes in SDP "a=rtpmap" as the encoding o The media subtype ("opus") goes in SDP "a=rtpmap" as the encoding
name. The RTP clock rate in "a=rtpmap" MUST be 48000 and the name. The RTP clock rate in "a=rtpmap" MUST be 48000 and the
number of channels MUST be 2. number of channels MUST be 2.
o The OPTIONAL media type parameters "ptime" and "maxptime" are o The OPTIONAL media type parameters "ptime" and "maxptime" are
mapped to "a=ptime" and "a=maxptime" attributes, respectively, in mapped to "a=ptime" and "a=maxptime" attributes, respectively, in
the SDP. the SDP.
o The OPTIONAL media type parameters "maxaveragebitrate", o The OPTIONAL media type parameters "maxplaybackrate", "stereo",
"maxplaybackrate", "minptime", "stereo", "cbr", "useinbandfec", "cbr", "useinbandfec", and "usedtx", when present, MUST be
and "usedtx", when present, MUST be included in the "a=fmtp" included in the "a=fmtp" attribute in the SDP, expressed as a
attribute in the SDP, expressed as a media type string in the form media type string in the form of a semicolon-separated list of
of a semicolon-separated list of parameter=value pairs (e.g., parameter=value pairs (e.g., maxplaybackrate=48000). They MUST
maxaveragebitrate=20000). They MUST NOT be specified in an SSRC- NOT be specified in an SSRC-specific "fmtp" source-level attribute
specific "fmtp" source-level attribute (as defined in Section 6.3 (as defined in Section 6.3 of [RFC5576]).
of [RFC5576]).
o The OPTIONAL media type parameters "sprop-maxcapturerate", and o The OPTIONAL media type parameters "sprop-maxcapturerate", and
"sprop-stereo" MAY be mapped to the "a=fmtp" SDP attribute by "sprop-stereo" MAY be mapped to the "a=fmtp" SDP attribute by
copying them directly from the media type parameter string as part copying them directly from the media type parameter string as part
of the semicolon-separated list of parameter=value pairs (e.g., of the semicolon-separated list of parameter=value pairs (e.g.,
sprop-stereo=1). These same OPTIONAL media type parameters MAY sprop-stereo=1). These same OPTIONAL media type parameters MAY
also be specified using an SSRC-specific "fmtp" source-level also be specified using an SSRC-specific "fmtp" source-level
attribute as described in Section 6.3 of [RFC5576]. They MAY be attribute as described in Section 6.3 of [RFC5576]. They MAY be
specified in both places, in which case the parameter in the specified in both places, in which case the parameter in the
source-level attribute overrides the one found on the "a=fmtp" source-level attribute overrides the one found on the "a=fmtp"
line. The value of any parameter which is not specified in a line. The value of any parameter which is not specified in a
skipping to change at page 14, line 4 skipping to change at page 12, line 42
Example 1: Standard mono session with 48000 Hz clock rate Example 1: Standard mono session with 48000 Hz clock rate
m=audio 54312 RTP/AVP 101 m=audio 54312 RTP/AVP 101
a=rtpmap:101 opus/48000/2 a=rtpmap:101 opus/48000/2
Example 2: 16000 Hz clock rate, maximum packet size of 40 ms, Example 2: 16000 Hz clock rate, maximum packet size of 40 ms,
recommended packet size of 40 ms, maximum average bitrate of 20000 recommended packet size of 40 ms, maximum average bitrate of 20000
bps, prefers to receive stereo but only plans to send mono, FEC is bps, prefers to receive stereo but only plans to send mono, FEC is
desired, DTX is not desired desired, DTX is not desired
m=audio 54312 RTP/AVP 101 m=audio 54312 RTP/AVP 101
a=rtpmap:101 opus/48000/2 a=rtpmap:101 opus/48000/2
a=fmtp:101 maxplaybackrate=16000; sprop-maxcapturerate=16000; a=fmtp:101 maxplaybackrate=16000; sprop-maxcapturerate=16000;
maxaveragebitrate=20000; stereo=1; useinbandfec=1; usedtx=0 b=AS:20; stereo=1; useinbandfec=1; usedtx=0
a=ptime:40 a=ptime:40
a=maxptime:40 a=maxptime:40
Example 3: Two-way full-band stereo preferred Example 3: Two-way full-band stereo preferred
m=audio 54312 RTP/AVP 101 m=audio 54312 RTP/AVP 101
a=rtpmap:101 opus/48000/2 a=rtpmap:101 opus/48000/2
a=fmtp:101 stereo=1; sprop-stereo=1 a=fmtp:101 stereo=1; sprop-stereo=1
6.2.1. Offer-Answer Model Considerations for Opus 6.2.1. Offer-Answer Model Considerations for Opus
skipping to change at page 14, line 38 skipping to change at page 13, line 32
m=audio 54312 RTP/AVP 100 m=audio 54312 RTP/AVP 100
a=rtpmap:100 opus/48000/2 a=rtpmap:100 opus/48000/2
o The "ptime" and "maxptime" parameters are unidirectional receive- o The "ptime" and "maxptime" parameters are unidirectional receive-
only parameters and typically will not compromise only parameters and typically will not compromise
interoperability; however, some values might cause application interoperability; however, some values might cause application
performance to suffer. [RFC3264] defines the SDP offer-answer performance to suffer. [RFC3264] defines the SDP offer-answer
handling of the "ptime" parameter. The "maxptime" parameter MUST handling of the "ptime" parameter. The "maxptime" parameter MUST
be handled in the same way. be handled in the same way.
o The "minptime" parameter is a unidirectional receive-only
parameters and typically will not compromise interoperability;
however, some values might cause application performance to suffer
and ought to be used with care.
o The "maxplaybackrate" parameter is a unidirectional receive-only o The "maxplaybackrate" parameter is a unidirectional receive-only
parameter that reflects limitations of the local receiver. When parameter that reflects limitations of the local receiver. When
sending to a single destination, a sender MUST NOT use an audio sending to a single destination, a sender MUST NOT use an audio
bandwidth higher than necessary to make full use of audio sampled bandwidth higher than necessary to make full use of audio sampled
at a sampling rate of "maxplaybackrate". Gateways or senders that at a sampling rate of "maxplaybackrate". Gateways or senders that
are sending the same encoded audio to multiple destinations SHOULD are sending the same encoded audio to multiple destinations SHOULD
NOT use an audio bandwidth higher than necessary to represent NOT use an audio bandwidth higher than necessary to represent
audio sampled at "maxplaybackrate", as this would lead to audio sampled at "maxplaybackrate", as this would lead to
inefficient use of network resources. The "maxplaybackrate" inefficient use of network resources. The "maxplaybackrate"
parameter does not affect interoperability. Also, this parameter parameter does not affect interoperability. Also, this parameter
SHOULD NOT be used to adjust the audio bandwidth as a function of SHOULD NOT be used to adjust the audio bandwidth as a function of
the bitrate, as this is the responsibility of the Opus encoder the bitrate, as this is the responsibility of the Opus encoder
implementation. implementation.
o The "maxaveragebitrate" parameter is a unidirectional receive-only
parameter that reflects limitations of the local receiver. The
sender of the other side MUST NOT send with an average bitrate
higher than "maxaveragebitrate" as it might overload the network
and/or receiver. The "maxaveragebitrate" parameter typically will
not compromise interoperability; however, some values might cause
application performance to suffer, and ought to be set with care.
o The "sprop-maxcapturerate" and "sprop-stereo" parameters are o The "sprop-maxcapturerate" and "sprop-stereo" parameters are
unidirectional sender-only parameters that reflect limitations of unidirectional sender-only parameters that reflect limitations of
the sender side. They allow the receiver to set up a reduced- the sender side. They allow the receiver to set up a reduced-
complexity audio processing pipeline if the sender is not planning complexity audio processing pipeline if the sender is not planning
to use the full range of Opus's capabilities. Neither "sprop- to use the full range of Opus's capabilities. Neither "sprop-
maxcapturerate" nor "sprop-stereo" affect interoperability and the maxcapturerate" nor "sprop-stereo" affect interoperability and the
receiver MUST be capable of receiving any signal. receiver MUST be capable of receiving any signal.
o The "stereo" parameter is a unidirectional receive-only parameter. o The "stereo" parameter is a unidirectional receive-only parameter.
When sending to a single destination, a sender MUST NOT use stereo When sending to a single destination, a sender MUST NOT use stereo
when "stereo" is 0. Gateways or senders that are sending the same when "stereo" is 0. Gateways or senders that are sending the same
skipping to change at page 15, line 45 skipping to change at page 14, line 26
o The "usedtx" parameter is a unidirectional receive-only parameter. o The "usedtx" parameter is a unidirectional receive-only parameter.
o Any unknown parameter in an offer MUST be ignored by the receiver o Any unknown parameter in an offer MUST be ignored by the receiver
and MUST be removed from the answer. and MUST be removed from the answer.
6.2.2. Declarative SDP Considerations for Opus 6.2.2. Declarative SDP Considerations for Opus
For declarative use of SDP such as in Session Announcement Protocol For declarative use of SDP such as in Session Announcement Protocol
(SAP), [RFC2974], and RTSP, [RFC2326], for Opus, the following needs (SAP), [RFC2974], and RTSP, [RFC2326], for Opus, the following needs
to be considered: to be considered:
o The values for "maxptime", "ptime", "minptime", "maxplaybackrate", o The values for "maxptime", "ptime", "maxplaybackrate", and ought
and "maxaveragebitrate" ought to be selected carefully to ensure to be selected carefully to ensure that a reasonable performance
that a reasonable performance can be achieved for the participants can be achieved for the participants of a session.
of a session. o The values for "maxptime", "ptime", and of the payload format
o The values for "maxptime", "ptime", and "minptime" of the payload configuration are recommendations by the decoding side to ensure
format configuration are recommendations by the decoding side to the best performance for the decoder.
ensure the best performance for the decoder. The decoder MUST be
capable of accepting any allowed packet sizes to ensure maximum
compatibility.
o All other parameters of the payload format configuration are o All other parameters of the payload format configuration are
declarative and a participant MUST use the configurations that are declarative and a participant MUST use the configurations that are
provided for the session. More than one configuration can be provided for the session. More than one configuration can be
provided if necessary by declaring multiple RTP payload types; provided if necessary by declaring multiple RTP payload types;
however, the number of types ought to be kept small. however, the number of types ought to be kept small.
7. Security Considerations 7. Security Considerations
All RTP packets using the payload format defined in this All RTP packets using the payload format defined in this
specification are subject to the general security considerations specification are subject to the general security considerations
discussed in the RTP specification [RFC3550] and any profile from, discussed in the RTP specification [RFC3550] and any profile from,
e.g., [RFC3711] or [RFC3551]. e.g., [RFC3711] or [RFC3551].
This payload format transports Opus encoded speech or audio data. This payload format transports Opus encoded speech or audio data.
Hence, security issues include confidentiality, integrity protection, Hence, security issues include confidentiality, integrity protection,
and authentication of the speech or audio itself. The Opus payload and authentication of the speech or audio itself. Opus does not
format does not have any built-in security mechanisms. Any suitable provide any confidentiality or integrity protection. Any suitable
external mechanisms, such as SRTP [RFC3711], MAY be used. external mechanisms, such as SRTP [RFC3711], MAY be used.
This payload format and the Opus encoding do not exhibit any This payload format and the Opus encoding do not exhibit any
significant non-uniformity in the receiver-end computational load and significant non-uniformity in the receiver-end computational load and
thus are unlikely to pose a denial-of-service threat due to the thus are unlikely to pose a denial-of-service threat due to the
receipt of pathological datagrams. receipt of pathological datagrams.
8. Acknowledgements 8. Acknowledgements
TBD Many people have made useful comments and suggestions contributing to
this document. In particular, we would like to thank Tina le Grand,
Cullen Jennings, Jonathan Lennox, Gregory Maxwell, Colin Perkins, Jan
Skoglund, Timothy B. Terriberry, Martin Thompson, Justin Uberti,
Magnus Westerlund, and Mo Zanaty.
9. References 9. References
9.1. Normative References 9.1. Normative References
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, March 1997. Requirement Levels", BCP 14, RFC 2119, March 1997.
[RFC2326] Schulzrinne, H., Rao, A., and R. Lanphier, "Real Time [RFC2326] Schulzrinne, H., Rao, A., and R. Lanphier, "Real Time
Streaming Protocol (RTSP)", RFC 2326, April 1998. Streaming Protocol (RTSP)", RFC 2326, April 1998.
 End of changes. 31 change blocks. 
127 lines changed or deleted 68 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/