draft-ietf-avtext-multiple-clock-rates-11.txt   rfc7160.txt 
Network Working Group M. Petit-Huguenin Internet Engineering Task Force (IETF) M. Petit-Huguenin
Internet-Draft Impedance Mismatch Request for Comments: 7160 Impedance Mismatch
Updates: 3550 (if approved) G. Zorn, Ed. Updates: 3550 G. Zorn, Ed.
Intended status: Standards Track Network Zen Category: Standards Track Network Zen
Expires: May 27, 2014 November 23, 2013 ISSN: 2070-1721 April 2014
Support for Multiple Clock Rates in an RTP Session Support for Multiple Clock Rates in an RTP Session
draft-ietf-avtext-multiple-clock-rates-11
Abstract Abstract
This document clarifies the RTP specification when different clock This document clarifies the RTP specification regarding the use of
rates are used in an RTP session. It also provides guidance on how different clock rates in an RTP session. It also provides guidance
to interoperate with legacy RTP implementations that use multiple on how legacy RTP implementations that use multiple clock rates can
clock rates. It updates RFC 3550. interoperate with RTP implementations that use the algorithm
described in this document. It updates RFC 3550.
Status of This Memo Status of This Memo
This Internet-Draft is submitted in full conformance with the This is an Internet Standards Track document.
provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months This document is a product of the Internet Engineering Task Force
and may be updated, replaced, or obsoleted by other documents at any (IETF). It represents the consensus of the IETF community. It has
time. It is inappropriate to use Internet-Drafts as reference received public review and has been approved for publication by the
material or to cite them other than as "work in progress." Internet Engineering Steering Group (IESG). Further information on
Internet Standards is available in Section 2 of RFC 5741.
This Internet-Draft will expire on May 27, 2014. Information about the current status of this document, any errata,
and how to provide feedback on it may be obtained at
http://www.rfc-editor.org/info/rfc7160.
Copyright Notice Copyright Notice
Copyright (c) 2013 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. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 4 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 4
3. Legacy RTP . . . . . . . . . . . . . . . . . . . . . . . . . 4 3. Legacy RTP . . . . . . . . . . . . . . . . . . . . . . . . . 4
3.1. Different SSRC . . . . . . . . . . . . . . . . . . . . . 4 3.1. Different SSRC . . . . . . . . . . . . . . . . . . . . . 4
3.2. Same SSRC . . . . . . . . . . . . . . . . . . . . . . . . 4 3.2. Same SSRC . . . . . . . . . . . . . . . . . . . . . . . . 5
3.2.1. Monotonic timestamps . . . . . . . . . . . . . . . . 5 3.2.1. Monotonic Timestamps . . . . . . . . . . . . . . . . 5
3.2.2. Non-monotonic timestamps . . . . . . . . . . . . . . 5 3.2.2. Non-monotonic Timestamps . . . . . . . . . . . . . . 6
4. Recommendations . . . . . . . . . . . . . . . . . . . . . . . 6 4. Recommendations . . . . . . . . . . . . . . . . . . . . . . . 6
4.1. RTP Sender (with RTCP) . . . . . . . . . . . . . . . . . 6 4.1. RTP Sender (with RTCP) . . . . . . . . . . . . . . . . . 6
4.2. RTP Sender (without RTCP) . . . . . . . . . . . . . . . . 6 4.2. RTP Sender (without RTCP) . . . . . . . . . . . . . . . . 6
4.3. RTP Receiver . . . . . . . . . . . . . . . . . . . . . . 7 4.3. RTP Receiver . . . . . . . . . . . . . . . . . . . . . . 7
5. Security Considerations . . . . . . . . . . . . . . . . . . . 7 5. Security Considerations . . . . . . . . . . . . . . . . . . . 7
6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 7 6. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 8
7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 7 7. References . . . . . . . . . . . . . . . . . . . . . . . . . 8
8. References . . . . . . . . . . . . . . . . . . . . . . . . . 8 7.1. Normative References . . . . . . . . . . . . . . . . . . 8
8.1. Normative References . . . . . . . . . . . . . . . . . . 8 7.2. Informative References . . . . . . . . . . . . . . . . . 8
8.2. Informative References . . . . . . . . . . . . . . . . . 8 Appendix A. Example Values . . . . . . . . . . . . . . . . . . . 10
Appendix A. Example Values . . . . . . . . . . . . . . . . . . . 9 Appendix B. Using a Fixed Clock Rate . . . . . . . . . . . . . . 12
Appendix B. Using a Fixed Clock Rate . . . . . . . . . . . . . . 11 Appendix C. Behavior of Legacy Implementations . . . . . . . . . 12
Appendix C. Behavior of Legacy Implementations . . . . . . . . . 11 C.1. libccrtp 2.0.2 . . . . . . . . . . . . . . . . . . . . . 12
C.1. libccrtp 2.0.2 . . . . . . . . . . . . . . . . . . . . . 11 C.2. libmediastreamer0 2.6.0 . . . . . . . . . . . . . . . . . 12
C.2. libmediastreamer0 2.6.0 . . . . . . . . . . . . . . . . . 11 C.3. libpjmedia 1.0 . . . . . . . . . . . . . . . . . . . . . 13
C.3. libpjmedia 1.0 . . . . . . . . . . . . . . . . . . . . . 12 C.4. Android RTP Stack 4.0.3 . . . . . . . . . . . . . . . . . 13
C.4. Android RTP stack 4.0.3 . . . . . . . . . . . . . . . . . 12
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 12
1. Introduction 1. Introduction
The clock rate is a parameter of the payload format as identified in The clock rate is a parameter of the payload format as identified in
RTP and RTCP by the payload type value. It is often defined as being RTP and RTCP (RTP Control Protocol) by the payload type value. It is
the same as the sampling rate but that is not always the case (see, often defined as being the same as the sampling rate but that is not
for example, the G722 and MPA audio codecs [RFC3551]). always the case (see, for example, the G722 and MPA audio codecs
[RFC3551]).
An RTP sender can switch between different payloads during the An RTP sender can switch between different payloads during the
lifetime of an RTP session and because clock rates are defined by lifetime of an RTP session and because clock rates are defined by
payload format, it is possible that the clock rate will also vary payload format, it is possible that the clock rate will also vary
during an RTP session. Schulzrinne, et al. [RFC3550] lists using during an RTP session. Schulzrinne, et al. [RFC3550] lists using
multiple clock rates as one of the reasons to not use different multiple clock rates as one of the reasons to not use different
payloads on the same Synchronization Source (SSRC). Unfortunately payloads on the same Synchronization Source (SSRC). Unfortunately,
this advice has not always been followed and some RTP implementations this advice has not always been followed and some RTP implementations
change the payload in the same SSRC even if the different payloads change the payload in the same SSRC, even if the different payloads
use different clock rates. use different clock rates.
This creates three problems: This creates three problems:
o The method used to calculate the RTP timestamp field in an RTP o The method used to calculate the RTP timestamp field in an RTP
packet is underspecified. packet is underspecified.
o When the same SSRC is used for different clock rates, it is o When the same SSRC is used for different clock rates, it is
difficult to know what clock rate was used for the RTP timestamp difficult to know what clock rate was used for the RTP timestamp
field in an RTCP Sender Report (SR) packet. field in an RTCP Sender Report (SR) packet.
o When the same SSRC is used for different clock rates, it is o When the same SSRC is used for different clock rates, it is
difficult to know what clock rate was used for the interarrival difficult to know what clock rate was used for the interarrival
jitter field in an RTCP Receiver Report (RR) packet. jitter field in an RTCP Receiver Report (RR) packet.
Table 1 contains a non-exhaustive list of fields in RTCP packets that Table 1 contains a non-exhaustive list of fields in RTCP packets that
uses a clock rate as unit: uses a clock rate as a unit:
+---------------------+------------------+------------+ +---------------------+------------------+------------+
| Field name | RTCP packet type | Reference | | Field name | RTCP packet type | Reference |
+---------------------+------------------+------------+ +---------------------+------------------+------------+
| RTP timestamp | SR | [RFC3550] | | RTP timestamp | SR | [RFC3550] |
| | | | | | | |
| Interarrival jitter | RR | [RFC3550] | | Interarrival jitter | RR | [RFC3550] |
| | | | | | | |
| min_jitter | XR Summary Block | [RFC3611] | | min_jitter | XR Summary Block | [RFC3611] |
| | | | | | | |
skipping to change at page 3, line 45 skipping to change at page 3, line 47
| | | | | | | |
| RTP timestamp | SMPTETC | [RFC5484] | | RTP timestamp | SMPTETC | [RFC5484] |
| | | | | | | |
| Jitter | RSI Jitter Block | [RFC5760] | | Jitter | RSI Jitter Block | [RFC5760] |
| | | | | | | |
| Median jitter | RSI Stats Block | [RFC5760] | | Median jitter | RSI Stats Block | [RFC5760] |
+---------------------+------------------+------------+ +---------------------+------------------+------------+
Table 1 Table 1
This document first tries to list in Section 3 and subsections all of Section 3 and its subsections try to list all of the algorithms known
the algorithms known to be used in existing RTP implementations at to be used in existing RTP implementations at the time of writing.
the time of writing. These sections are not normative. These sections are not normative.
Section 4 and subsections then recommend a unique algorithm that Section 4 and its subsections recommend a unique algorithm that
modifies RFC 3550. These sections are normative. modifies RFC 3550. These sections are normative.
2. Terminology 2. Terminology
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 RFC 2119 [RFC2119]. document are to be interpreted as described in RFC 2119 [RFC2119].
In addition, this document uses the following terms: In addition, this document uses the following terms:
Clock rate The multiplier used to convert from a wallclock value Clock rate The multiplier used to convert from a wallclock value
in seconds to an equivalent RTP timestamp value in seconds to an equivalent RTP timestamp value
(without the fixed random offset). Note that RFC 3550 (without the fixed random offset). Note that RFC 3550
uses various terms like "clock frequency", "media uses various terms like "clock frequency", "media
clock rate", "timestamp unit", "timestamp frequency", clock rate", "timestamp unit", "timestamp frequency",
and "RTP timestamp clock rate" as synonymous to clock and "RTP timestamp clock rate" as synonymous to clock
rate. rate.
skipping to change at page 4, line 30 skipping to change at page 4, line 31
RTP Sender A logical network element that sends RTP packets, RTP Sender A logical network element that sends RTP packets,
sends RTCP SR packets, and receives RTCP reception sends RTCP SR packets, and receives RTCP reception
report blocks. report blocks.
RTP Receiver A logical network element that receives RTP packets, RTP Receiver A logical network element that receives RTP packets,
receives RTCP SR packets, and sends RTCP reception receives RTCP SR packets, and sends RTCP reception
report blocks. report blocks.
3. Legacy RTP 3. Legacy RTP
The following sections describe the various ways legacy RTP The following sections describe the various ways in which legacy RTP
implementations behave when multiple clock rates are used. Legacy implementations behave when multiple clock rates are used. "Legacy
RTP refers to RFC 3550 without the modifications introduced by this RTP" refers to RFC 3550 without the modifications introduced by this
document. document.
3.1. Different SSRC 3.1. Different SSRC
One way of managing multiple clock rates is to use a different SSRC One way of managing multiple clock rates is to use a different SSRC
for each different clock rate, as in this case there is no ambiguity for each different clock rate, as in this case there is no ambiguity
on the clock rate used by fields in the RTCP packets. This method on the clock rate used by fields in the RTCP packets. This method
also seems to be the original intent of RTP as can be deduced from also seems to be the original intent of RTP as can be deduced from
points 2 and 3 of section 5.2 of RFC 3550. points 2 and 3 of Section 5.2 of RFC 3550.
On the other hand, changing the SSRC can be a problem for some On the other hand, changing the SSRC can be a problem for some
implementations designed to work only with unicast IP addresses, implementations designed to work only with unicast IP addresses,
where having multiple SSRCs is considered a corner case. Lip where having multiple SSRCs is considered a corner case. Lip
synchronization can also be a problem in the interval between the synchronization can also be a problem in the interval between the
beginning of the new stream and the first RTCP SR packet. beginning of the new stream and the first RTCP SR packet.
3.2. Same SSRC 3.2. Same SSRC
The simplest way of managing multiple clock rates is to use the same The simplest way to manage multiple clock rates is to use the same
SSRC for all the payload types regardless of the clock rates. SSRC for all of the payload types regardless of the clock rates.
Unfortunately there is no clear definition on how the RTP timestamp Unfortunately, there is no clear definition on how the RTP timestamp
should be calculated in this case. The following subsections present should be calculated in this case. The following subsections present
the algorithms used in the field. the algorithms currently in use.
3.2.1. Monotonic timestamps 3.2.1. Monotonic Timestamps
This method of calculating the RTP timestamp ensures that the value This method of calculating the RTP timestamp ensures that the value
increases monotonically. The formula used by this method is as increases monotonically. The formula used by this method is as
follows: follows:
timestamp = previous_timestamp timestamp = previous_timestamp
+ (current_capture_time - previous_capture_time) + (current_capture_time - previous_capture_time)
* current_clock_rate * current_clock_rate
The problem with this method is that the jitter calculation on the The problem with this method is that the jitter calculation on the
receiving side gives an invalid result during the transition between receiving side gives an invalid result during the transition between
two clock rates, as shown in Table 2 (Appendix A). The capture and two clock rates, as shown in Table 2 (Appendix A). The capture and
arrival time are in seconds, starting at the beginning of the capture arrival time are measured in seconds, starting at the beginning of
of the first packet; clock rate is in Hz; the RTP timestamp does not the capture of the first packet; clock rate is measured in Hz; the
include the random offset; the transit, jitter, and average jitter RTP timestamp does not include the random offset; and the transit,
use the clock rate as unit. jitter, and average jitter use the clock rate as a unit.
Calculating the correct transit time on the receiving side can be Calculating the correct transit time on the receiving side can be
done by using the following formulas: done by using the following formulas:
1. current_capture_time = (current_timestamp - previous_timestamp) / 1. current_capture_time = (current_timestamp - previous_timestamp) /
current_clock_rate + previous_capture_time current_clock_rate + previous_capture_time
2. transit = current_clock_rate * (arrival_time - 2. transit = current_clock_rate * (arrival_time -
current_capture_time) current_capture_time)
3. previous_capture_time = current_capture_time 3. previous_capture_time = current_capture_time
The main problem with this method, in addition to the fact that the The main problem with this method, in addition to the fact that the
jitter calculation described in RFC 3550 cannot be used, is that is jitter calculation described in RFC 3550 cannot be used, is that it
it dependent on the previous RTP packets, packets that can be is dependent on the previous RTP packets, which can be reordered or
reordered or lost in the network. lost in the network.
3.2.2. Non-monotonic timestamps 3.2.2. Non-monotonic Timestamps
An alternate way of generating the RTP timestamps is to use the An alternate way of generating the RTP timestamps is to use the
following formula: following formula:
timestamp = capture_time * clock_rate timestamp = capture_time * clock_rate
With this formula, the jitter calculation is correct but the RTP With this formula, the jitter calculation is correct but the RTP
timestamp values are no longer increasing monotonically as shown in timestamp values are no longer increasing monotonically as shown in
Table 3 (Appendix A). RFC 3550 states that "[t]he sampling instant Table 3 (Appendix A). RFC 3550 states that "[t]he sampling instant
MUST be derived from a clock that increments monotonically[...]" but MUST be derived from a clock that increments monotonically . . .",
nowhere says that the RTP timestamp must increment monotonically. but it does not say that the RTP timestamp must increment
monotonically.
The advantage with this method is that it works with the jitter The advantage with this method is that it works with the jitter
calculation described in RFC 3550, as long as the correct clock rates calculation described in RFC 3550, as long as the correct clock rates
are used. It seems that this is what most implementations are using are used. It seems that this is what most implementations are using
(based on a survey done at Sipit26 and on a survey of open source (based on a survey done at SIPit26 and on a survey of open source
implementations, see Appendix C). implementations, see Appendix C).
4. Recommendations 4. Recommendations
The following subsections describe behavioral recommendations for RTP The following subsections describe behavioral recommendations for RTP
senders (with and without RTCP) and RTP receivers. senders (with and without RTCP) and RTP receivers.
4.1. RTP Sender (with RTCP) 4.1. RTP Sender (with RTCP)
An RTP Sender with RTCP turned on MUST use a different SSRC for each An RTP Sender with RTCP turned on MUST use a different SSRC for each
different clock rate. An RTCP BYE MUST be sent and a new SSRC MUST different clock rate. An RTCP BYE MUST be sent and a new SSRC MUST
be used if the clock rate switches back to a value already seen in be used if the clock rate switches back to a value already seen in
the RTP stream. the RTP stream.
To accelerate lip synchronization, the next compound RTCP packet sent To accelerate lip synchronization, the next compound RTCP packet sent
by the RTP sender MUST contain multiple SR packets, the first one by the RTP sender MUST contain multiple SR packets, the first one
containing the mapping for the current clock rate and the subsequent containing the mapping for the current clock rate and the subsequent
SR packet(s) containing the mapping for the other clock rates seen SR packet(s) containing the mapping for the other clock rates seen
during the last period. during the last period.
The RTP extension defined in Perkins & Schierl [RFC6051] MAY be used The RTP extension defined by Perkins & Schierl [RFC6051] MAY be used
to accelerate the synchronization. to accelerate the synchronization.
4.2. RTP Sender (without RTCP) 4.2. RTP Sender (without RTCP)
An RTP Sender with RTCP turned off (i.e. having set the RS and RR An RTP Sender with RTCP turned off (i.e., having set the RTP Sender
bandwidth modifiers [RFC3556] to 0) SHOULD use a different SSRC for and RTP Receiver bandwidth modifiers [RFC3556] to 0) SHOULD use a
each different clock rate but MAY use different clock rates on the different SSRC for each different clock rate but MAY use different
same SSRC as long as the RTP timestamp is calculated as explained clock rates on the same SSRC as long as the RTP timestamp is
below: calculated as explained below:
Each time the clock rate changes, the start_offset and capture_start Each time the clock rate changes, the start_offset and capture_start
values are calculated with the following formulas: values are calculated with the following formulas:
start_offset += (capture_time - capture_start) * previous_clock_rate start_offset += (capture_time - capture_start) * previous_clock_rate
capture_start = capture_time capture_start = capture_time
For the first RTP packet, the values are initialized with the For the first RTP packet, the values are initialized with the
following values: following values:
start_offset = random_initial_offset start_offset = random_initial_offset
capture_start = capture_time capture_start = capture_time
After eventually updating these values, the RTP timestamp is After eventually updating these values, the RTP timestamp is
calculated with the following formula: calculated with the following formula:
timestamp = (capture_time - capture_start) * clock_rate timestamp = (capture_time - capture_start) * clock_rate
+ start_offset + start_offset
Note that in all the formulas, capture_start is the first instant Note that in all the formulas, capture_start is the first instant
that the new timestamp rate is used. The output of the above method that the new timestamp rate is used. The output of the above method
is exemplified in Table 4 (Appendix A). is exemplified in Table 4 (Appendix A).
4.3. RTP Receiver 4.3. RTP Receiver
An RTP Receiver MUST calculate the jitter using the following An RTP Receiver MUST calculate the jitter using the following
formula: formula:
D(i,j) = (arrival_time_j * clock_rate_i - timestamp_j) D(i,j) = (arrival_time_j * clock_rate_i - timestamp_j)
- (arrival_time_i * clock_rate_i - timestamp_i) - (arrival_time_i * clock_rate_i - timestamp_i)
An RTP Receiver MUST be able to handle a compound RTCP packet with An RTP Receiver MUST be able to handle a compound RTCP packet with
multiple SR packets. multiple SR packets.
5. Security Considerations 5. Security Considerations
When the algorithm described in Section 4.1 is used the security When the algorithm described in Section 4.1 is used, the security
considerations described in RFC 3550 apply. considerations described in RFC 3550 apply.
The algorithm described in Section 4.2 is new and so its security The algorithm described in Section 4.2 is new and so its security
properties were not considered in RFC 3550. Although the RTP properties were not considered in RFC 3550. Although the RTP
timestamp is initialized with a random value like before, the timestamp is initialized with a random value like before, the
timestamp value depends on the current and previous clock rates and timestamp value depends on the current and previous clock rates; this
this may or may not introduce a security vulnerability in the may or may not introduce a security vulnerability in the protocol.
protocol.
6. IANA Considerations
This document requires no IANA actions. 6. Acknowledgements
7. Acknowledgements
Thanks to Colin Perkins, Ali C. Begen, Harald Alvestrand, Qin Wu, Thanks to Colin Perkins, Ali C. Begen, Harald Alvestrand, Qin Wu,
Jonathan Lennox, Barry Leiba, David Harrington, Stephen Farrell, Jonathan Lennox, Barry Leiba, David Harrington, Stephen Farrell,
Spencer Dawkins, Wassim Haddad and Magnus Westerlund for comments, Spencer Dawkins, Wassim Haddad, and Magnus Westerlund for comments,
suggestions and questions that helped to improve this document. suggestions, and questions that helped to improve this document.
Thanks to Bo Burman (who provided the values in Table 4 of Thanks to Bo Burman, who provided the values in Table 4 of
Appendix A). Appendix A.
Thanks to Robert Sparks and the attendees of SIPit 26 for the survey Thanks to Robert Sparks and the attendees of SIPit 26 for the survey
on multiple clock rates interoperability. on multiple clock rates interoperability.
This document was written with the xml2rfc tool described in Rose 7. References
[RFC2629].
8. References
8.1. Normative References 7.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.
[RFC3550] Schulzrinne, H., Casner, S., Frederick, R., and V. [RFC3550] Schulzrinne, H., Casner, S., Frederick, R., and V.
Jacobson, "RTP: A Transport Protocol for Real-Time Jacobson, "RTP: A Transport Protocol for Real-Time
Applications", STD 64, RFC 3550, July 2003. Applications", STD 64, RFC 3550, July 2003.
8.2. Informative References 7.2. Informative References
[I-D.ietf-avt-variable-rate-audio] [AVT-VAR-RATE]
Wenger, S. and C. Perkins, "RTP Timestamp Frequency for Wenger, S. and C. Perkins, "RTP Timestamp Frequency for
Variable Rate Audio Codecs", draft-ietf-avt-variable-rate- Variable Rate Audio Codecs", Work in Progress, October
audio-00 (work in progress), October 2004. 2004.
[RFC2629] Rose, M.T., "Writing I-Ds and RFCs using XML", RFC 2629,
June 1999.
[RFC3551] Schulzrinne, H. and S. Casner, "RTP Profile for Audio and [RFC3551] Schulzrinne, H. and S. Casner, "RTP Profile for Audio and
Video Conferences with Minimal Control", STD 65, RFC 3551, Video Conferences with Minimal Control", STD 65, RFC 3551,
July 2003. July 2003.
[RFC3556] Casner, S., "Session Description Protocol (SDP) Bandwidth [RFC3556] Casner, S., "Session Description Protocol (SDP) Bandwidth
Modifiers for RTP Control Protocol (RTCP) Bandwidth", RFC Modifiers for RTP Control Protocol (RTCP) Bandwidth", RFC
3556, July 2003. 3556, July 2003.
[RFC3611] Friedman, T., Caceres, R., and A. Clark, "RTP Control [RFC3611] Friedman, T., Caceres, R., and A. Clark, "RTP Control
skipping to change at page 9, line 23 skipping to change at page 10, line 10
Sessions with Unicast Feedback", RFC 5760, February 2010. Sessions with Unicast Feedback", RFC 5760, February 2010.
[RFC6051] Perkins, C. and T. Schierl, "Rapid Synchronisation of RTP [RFC6051] Perkins, C. and T. Schierl, "Rapid Synchronisation of RTP
Flows", RFC 6051, November 2010. Flows", RFC 6051, November 2010.
Appendix A. Example Values Appendix A. Example Values
The following tables illustrate the timestamp and jitter values The following tables illustrate the timestamp and jitter values
produced when the various methods discussed in the text are used. produced when the various methods discussed in the text are used.
The values shown are purely exemplary, illustrative and non- The values shown are purely exemplary, illustrative, and non-
normative. normative.
+--------+-------+-----------+---------+---------+--------+---------+ +-------+-------+-----------+---------+---------+--------+----------+
| Capt. | Clock | RTP | Arrival | Transit | Jitter | Average | | Capt. | Clock | RTP | Arrival | Transit | Jitter | Average |
| time | rate | timestamp | time | | | jitter | | time | rate | timestamp | time | | | jitter |
+--------+-------+-----------+---------+---------+--------+---------+ +-------+-------+-----------+---------+---------+--------+----------+
| 0 | 8000 | 0 | 0.1 | 800 | | | | 0 | 8000 | 0 | 0.1 | 800 | | |
| | | | | | | | | | | | | | | |
| 0.02 | 8000 | 160 | 0.12 | 800 | 0 | 0 | | 0.02 | 8000 | 160 | 0.12 | 800 | 0 | 0 |
| | | | | | | | | | | | | | | |
| 0.04 | 8000 | 320 | 0.14 | 800 | 0 | 0 | | 0.04 | 8000 | 320 | 0.14 | 800 | 0 | 0 |
| | | | | | | | | | | | | | | |
| 0.06 | 8000 | 480 | 0.16 | 800 | 0 | 0 | | 0.06 | 8000 | 480 | 0.16 | 800 | 0 | 0 |
| | | | | | | | | | | | | | | |
| 0.08 | 16000 | 800 | 0.18 | 2080 | 480 | 30 | | 0.08 | 16000 | 800 | 0.18 | 2080 | 480 | 30 |
| | | | | | | | | | | | | | | |
| 0.1 | 16000 | 1120 | 0.2 | 2080 | 0 | 28 | | 0.1 | 16000 | 1120 | 0.2 | 2080 | 0 | 28 |
| | | | | | | | | | | | | | | |
| 0.12 | 16000 | 1440 | 0.22 | 2080 | 0 | 26 | | 0.12 | 16000 | 1440 | 0.22 | 2080 | 0 | 26 |
| | | | | | | | | | | | | | | |
| 0.14 | 8000 | 1600 | 0.24 | 320 | 720 | 70 | | 0.14 | 8000 | 1600 | 0.24 | 320 | 720 | 70 |
| | | | | | | | | | | | | | | |
| 0.16 | 8000 | 1760 | 0.26 | 320 | 0 | 65 | | 0.16 | 8000 | 1760 | 0.26 | 320 | 0 | 65 |
+--------+-------+-----------+---------+---------+--------+---------+ +-------+-------+-----------+---------+---------+--------+----------+
Table 2: Monotonic Timestamps Table 2: Monotonic Timestamps
+--------+-------+-----------+---------+---------+--------+---------+ +-------+-------+-----------+---------+---------+--------+----------+
| Capt. | Clock | RTP | Arrival | Transit | Jitter | Average | | Capt. | Clock | RTP | Arrival | Transit | Jitter | Average |
| time | rate | timestamp | time | | | jitter | | time | rate | timestamp | time | | | jitter |
+--------+-------+-----------+---------+---------+--------+---------+ +-------+-------+-----------+---------+---------+--------+----------+
| 0 | 8000 | 0 | 0.1 | 800 | | | | 0 | 8000 | 0 | 0.1 | 800 | | |
| | | | | | | | | | | | | | | |
| 0.02 | 8000 | 160 | 0.12 | 800 | 0 | 0 | | 0.02 | 8000 | 160 | 0.12 | 800 | 0 | 0 |
| | | | | | | | | | | | | | | |
| 0.04 | 8000 | 320 | 0.14 | 800 | 0 | 0 | | 0.04 | 8000 | 320 | 0.14 | 800 | 0 | 0 |
| | | | | | | | | | | | | | | |
| 0.06 | 8000 | 480 | 0.16 | 800 | 0 | 0 | | 0.06 | 8000 | 480 | 0.16 | 800 | 0 | 0 |
| | | | | | | | | | | | | | | |
| 0.08 | 16000 | 1280 | 0.18 | 1600 | 0 | 0 | | 0.08 | 16000 | 1280 | 0.18 | 1600 | 0 | 0 |
| | | | | | | | | | | | | | | |
| 0.1 | 16000 | 1600 | 0.2 | 1600 | 0 | 0 | | 0.1 | 16000 | 1600 | 0.2 | 1600 | 0 | 0 |
| | | | | | | | | | | | | | | |
| 0.12 | 16000 | 1920 | 0.22 | 1600 | 0 | 0 | | 0.12 | 16000 | 1920 | 0.22 | 1600 | 0 | 0 |
| | | | | | | | | | | | | | | |
| 0.14 | 8000 | 1120 | 0.24 | 800 | 0 | 0 | | 0.14 | 8000 | 1120 | 0.24 | 800 | 0 | 0 |
| | | | | | | | | | | | | | | |
| 0.16 | 8000 | 1280 | 0.26 | 800 | 0 | 0 | | 0.16 | 8000 | 1280 | 0.26 | 800 | 0 | 0 |
+--------+-------+-----------+---------+---------+--------+---------+ +-------+-------+-----------+---------+---------+--------+----------+
Table 3: Non-monotonic Timestamps Table 3: Non-monotonic Timestamps
+--------+-------+-----------+---------+---------+--------+---------+ +-------+-------+-----------+---------+---------+--------+----------+
| Capt. | Clock | RTP | Arrival | Transit | Jitter | Average | | Capt. | Clock | RTP | Arrival | Transit | Jitter | Average |
| time | rate | timestamp | time | | | jitter | | time | rate | timestamp | time | | | jitter |
+--------+-------+-----------+---------+---------+--------+---------+ +-------+-------+-----------+---------+---------+--------+----------+
| 0 | 8000 | 0 | 0.1 | 800 | | | | 0 | 8000 | 0 | 0.1 | 800 | | |
| | | | | | | | | | | | | | | |
| 0.02 | 8000 | 160 | 0.12 | 800 | 0 | 0 | | 0.02 | 8000 | 160 | 0.12 | 800 | 0 | 0 |
| | | | | | | | | | | | | | | |
| 0.04 | 8000 | 320 | 0.14 | 800 | 0 | 0 | | 0.04 | 8000 | 320 | 0.14 | 800 | 0 | 0 |
| | | | | | | | | | | | | | | |
| 0.06 | 8000 | 480 | 0.16 | 800 | 0 | 0 | | 0.06 | 8000 | 480 | 0.16 | 800 | 0 | 0 |
| | | | | | | | | | | | | | | |
| 0.08 | 16000 | 640 | 0.18 | 1600 | 0 | 0 | | 0.08 | 16000 | 640 | 0.18 | 1600 | 0 | 0 |
| | | | | | | | | | | | | | | |
| 0.1 | 16000 | 960 | 0.2 | 1600 | 0 | 0 | | 0.1 | 16000 | 960 | 0.2 | 1600 | 0 | 0 |
| | | | | | | | | | | | | | | |
| 0.12 | 16000 | 1280 | 0.22 | 1600 | 0 | 0 | | 0.12 | 16000 | 1280 | 0.22 | 1600 | 0 | 0 |
| | | | | | | | | | | | | | | |
| 0.14 | 8000 | 1600 | 0.24 | 320 | 0 | 0 | | 0.14 | 8000 | 1600 | 0.24 | 320 | 0 | 0 |
| | | | | | | | | | | | | | | |
| 0.16 | 8000 | 1760 | 0.26 | 320 | 0 | 0 | | 0.16 | 8000 | 1760 | 0.26 | 320 | 0 | 0 |
+--------+-------+-----------+---------+---------+--------+---------+ +-------+-------+-----------+---------+---------+--------+----------+
Table 4: Recommended Method for RTP Sender (without RTCP) Table 4: Recommended Method for RTP Sender (without RTCP)
Appendix B. Using a Fixed Clock Rate Appendix B. Using a Fixed Clock Rate
An alternate way of fixing the multiple clock rates issue was An alternate way of fixing the issue with using multiple clock rates
proposed by Wenger & Perkins [I-D.ietf-avt-variable-rate-audio]. was proposed by Wenger and Perkins [AVT-VAR-RATE]. This document
This document proposed to define a unified clock rate, but the proposed to define a unified clock rate, but the proposal was
proposal was rejected at IETF 61. rejected at IETF 61.
Appendix C. Behavior of Legacy Implementations Appendix C. Behavior of Legacy Implementations
C.1. libccrtp 2.0.2 C.1. libccrtp 2.0.2
This library uses the formula described in Section 3.2.2. This library uses the formula described in Section 3.2.2.
Note that this library uses gettimeofday(2) which is not guaranteed Note that this library uses gettimeofday(2) which is not guaranteed
to increment monotonically, like when the clock is adjusted by NTP. to increment monotonically (e.g., when the clock is adjusted by NTP).
C.2. libmediastreamer0 2.6.0 C.2. libmediastreamer0 2.6.0
This library (which uses the oRTP library) uses the formula described This library (which uses the oRTP library) uses the formula described
in Section 3.2.2. in Section 3.2.2.
Note that in some environments this library uses gettimeofday(2) Note that in some environments this library uses gettimeofday(2),
which is not guaranteed to increment monotonically. which is not guaranteed to increment monotonically.
C.3. libpjmedia 1.0 C.3. libpjmedia 1.0
This library uses the formula described in Section 3.2.2. This library uses the formula described in Section 3.2.2.
C.4. Android RTP stack 4.0.3 C.4. Android RTP Stack 4.0.3
This library changes the SSRC each time the format changes, as This library changes the SSRC each time the format changes, as
described in Section 3.1. described in Section 3.1.
Authors' Addresses Authors' Addresses
Marc Petit-Huguenin Marc Petit-Huguenin
Impedance Mismatch Impedance Mismatch
Email: petithug@acm.org EMail: petithug@acm.org
Glen Zorn (editor) Glen Zorn (editor)
Network Zen Network Zen
227/358 Thanon Sanphawut 227/358 Thanon Sanphawut
Bang Na, Bangkok 10260 Bang Na, Bangkok 10260
Thailand Thailand
Phone: +66 (0) 8-1000-4155 Phone: +66 (0) 8-1000-4155
Email: glenzorn@gmail.com EMail: glenzorn@gmail.com
 End of changes. 56 change blocks. 
184 lines changed or deleted 174 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/