1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725
|
<pre>Network Working Group D. Singer
Request for Comments: 5484 Apple Computer Inc.
Category: Standards Track March 2009
<span class="h1">Associating Time-Codes with RTP Streams</span>
Status of This Memo
This document specifies an Internet standards track protocol for the
Internet community, and requests discussion and suggestions for
improvements. Please refer to the current edition of the "Internet
Official Protocol Standards" (STD 1) for the standardization state
and status of this protocol. Distribution of this memo is unlimited.
Copyright Notice
Copyright (c) 2009 IETF Trust and the persons identified as the
document authors. All rights reserved.
This document is subject to <a href="https://www.rfc-editor.org/bcp/bcp78">BCP 78</a> and the IETF Trust's Legal
Provisions Relating to IETF Documents in effect on the date of
publication of this document (<a href="http://trustee.ietf.org/license-info">http://trustee.ietf.org/license-info</a>).
Please review these documents carefully, as they describe your rights
and restrictions with respect to this document.
Abstract
This document describes a mechanism for associating time-codes, as
defined by the Society of Motion Picture and Television Engineers
(SMPTE), with media streams in a way that is independent of the RTP
payload format of the media stream itself.
<span class="grey">Singer Standards Track [Page 1]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-2" ></span>
<span class="grey"><a href="./rfc5484">RFC 5484</a> RTP SMPTE Time-Codes March 2009</span>
Table of Contents
<a href="#section-1">1</a>. Introduction ....................................................<a href="#page-2">2</a>
<a href="#section-2">2</a>. Requirements Notation ...........................................<a href="#page-3">3</a>
<a href="#section-3">3</a>. Design Goals ....................................................<a href="#page-3">3</a>
<a href="#section-4">4</a>. Requirements and Constraints ....................................<a href="#page-4">4</a>
<a href="#section-5">5</a>. Signaling Information ...........................................<a href="#page-4">4</a>
<a href="#section-6">6</a>. In-Stream Information ...........................................<a href="#page-6">6</a>
<a href="#section-6.1">6.1</a>. Compact Format of the Time-Code ............................<a href="#page-6">6</a>
<a href="#section-6.2">6.2</a>. Full Format of the Time-Code ...............................<a href="#page-7">7</a>
<a href="#section-6.3">6.3</a>. Associations in RTCP .......................................<a href="#page-8">8</a>
<a href="#section-6.4">6.4</a>. Associations in RTP ........................................<a href="#page-9">9</a>
<a href="#section-7">7</a>. Implementation Note (Informative) ..............................<a href="#page-10">10</a>
<a href="#section-8">8</a>. Discussion (Informative) .......................................<a href="#page-10">10</a>
<a href="#section-9">9</a>. Security Considerations ........................................<a href="#page-11">11</a>
<a href="#section-10">10</a>. IANA Considerations ...........................................<a href="#page-11">11</a>
<a href="#section-11">11</a>. Acknowledgments ...............................................<a href="#page-12">12</a>
<a href="#section-12">12</a>. References ....................................................<a href="#page-12">12</a>
<a href="#section-12.1">12.1</a>. Normative References .....................................<a href="#page-12">12</a>
<a href="#section-12.2">12.2</a>. Informative References ...................................<a href="#page-12">12</a>
<span class="h2"><a class="selflink" id="section-1" href="#section-1">1</a>. Introduction</span>
First a brief background on time-codes [<a href="#ref-SMPTE-12M" title=""SMPTE Standard for Television -- Time and Control Code"">SMPTE-12M</a>].
The time-code system in common use is defined by the Society of
Motion Picture and Television Engineers (SMPTE); in it, time-codes
count frames. A common form of the display looks like a normal clock
value (hh:mm:ss.frame). When the frame rate is truly integral, then
this can be a normal clock value, in that seconds tick by at the same
rate as the seconds we know and love.
However, NTSC video infamously runs slightly slower than 30 frames
per second (fps). Some people call it 29.97, which isn't quite
right; to be accurate, a frame takes 1001 ticks of a 30000 tick/
second clock. Be that as it may, SMPTE time-codes count 30 of these
frames and deem that to make a second.
This causes an SMPTE time-code display to 'run slow' compared to
real-time. To ameliorate this, sometimes a format called drop-frame
is used. Some of the frame numbers are skipped, so that the counter
periodically 'catches up' (so some time-code seconds actually only
have 28 frames in them).
<span class="grey">Singer Standards Track [Page 2]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-3" ></span>
<span class="grey"><a href="./rfc5484">RFC 5484</a> RTP SMPTE Time-Codes March 2009</span>
It is worth noting that in neither case is the SMPTE time-code an
accurate clock; in the first case, it runs slow, and in the second,
the adjustments are abrupt and periodic -- and still not quite
accurate. Hence the rest of this document tries to be clear when
referring to a second in a time-code as a 'time-code second'.
However, SMPTE time-codes do run in real-time when used with systems
with integral fps (e.g., film content at 24 fps or PAL video).
This specification defines how to carry time-codes in RTP and RTCP
(RTP Control Protocol), associate them with a media stream, and
synchronize them with the RTP timestamps. It uses the general RTP
header extension mechanism [<a href="./rfc5285" title=""A General Mechanism for RTP Header Extensions"">RFC5285</a>].
<span class="h2"><a class="selflink" id="section-2" href="#section-2">2</a>. Requirements Notation</span>
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in [<a href="./rfc2119" title=""Key words for use in RFCs to Indicate Requirement Levels"">RFC2119</a>].
<span class="h2"><a class="selflink" id="section-3" href="#section-3">3</a>. Design Goals</span>
What we desire is a system that allows us to associate an SMPTE time-
code with some media in an RTP [<a href="./rfc3550" title=""RTP: A Transport Protocol for Real-Time Applications"">RFC3550</a>] stream. Since in RTP all
media has a clock already, we can often leverage that fact. If we
treat the media as having 'segments' of time in which the time-code
is simply counting up, then the time-code anywhere within a segment
can be calculated if you know:
o the RTP timestamp of the start of the segment;
o the time-code of the start of the segment;
o the counting rate and other parameters of the time-code;
o the RTP timestamp where you want to know the time-code.
There are two cases to consider:
1. the time-codes are piece-wise continuous with only occasional
discontinuities;
2. the continuity of the time-codes is not certain (or not known).
The first can be handled by providing details of the time-code axis
and an initial mapping from RTP time to time-code time as well as
periodic mappings in RTCP packets. This is defined in <a href="#section-6.3">Section 6.3</a>.
<span class="grey">Singer Standards Track [Page 3]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-4" ></span>
<span class="grey"><a href="./rfc5484">RFC 5484</a> RTP SMPTE Time-Codes March 2009</span>
The second requires in-band signaling within the RTP packets
themselves. This is defined in <a href="#section-6.4">Section 6.4</a>.
There are applications where the transport of all 8 bytes of the
SMPTE 12M time-code are important (e.g., when the date of the time-
code must be known or when the RTP transport is used as a transparent
pipe). On the other hand, there are cases (e.g., when time-codes are
used with compressed audio) when bandwidth is also important. To
support both use cases, provision is made for both compact and full
forms of the time-code.
<span class="h2"><a class="selflink" id="section-4" href="#section-4">4</a>. Requirements and Constraints</span>
Receivers MUST support time-codes in both RTCP and RTP as well as
both forms (compact and full) of the time-code. Senders, of course,
are free to choose.
Note that the compact form allows frame numbers greater than the full
form (a field of 6 bits vs. a full binary-coded decimal (BCD) digit
and a 2-bit BCD digit, which gives a maximum transmitted value of
29). In some cases, the color frame flag (bit 11) is used to
'extend' the "tens of frames" field from 2 to 3 bits; however, such
practices are outside the scope of this specification.
In the case that a presentation contains more than one stream,
senders MUST continue to send the standard RTP synchronization
information in RTCP, even if the streams carry SMPTE time-codes that
could be used for synchronization. In fact, when time-codes are
carried by more than one stream, this document does not constrain the
time-codes: at a given point in time, they may be the same, or they
may differ (e.g., if they carry the original time-codes of different
source material that was edited together).
<span class="h2"><a class="selflink" id="section-5" href="#section-5">5</a>. Signaling Information</span>
If the recipient must ever calculate time-codes based on the RTP
times, then some setup information is needed. This MUST be sent out-
of-band -- for example, in a SIP offer/answer exchange [<a href="./rfc3264" title=""An Offer/Answer Model with Session Description Protocol (SDP)"">RFC3264</a>].
Since this specification is a general header extension [<a href="./rfc5285" title=""A General Mechanism for RTP Header Extensions"">RFC5285</a>],
when the Session Description Protocol (SDP) is used, the 'extmap'
attribute defined by the extension mechanism is also used.
The setup information should include:
1. the duration, in the RTP timescale, of a single frame-count in
the 'frames' portion of the time-code (frame_duration)
<span class="grey">Singer Standards Track [Page 4]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-5" ></span>
<span class="grey"><a href="./rfc5484">RFC 5484</a> RTP SMPTE Time-Codes March 2009</span>
2. the number of those frames that make a time-code second
(frames_per_tc_second); framecounter values may be between 0 and
(frames_per_tc_second - 1)
3. the drop-frame indication, is-NTSC-drop-frame, which indicates
whether the usual drop-frame behavior should be applied or not
Note that other information we need to do the calculation (e.g., the
clock rate of the RTP timestamp) is supplied already and assumed to
be available.
For example, if associated with a video stream with the common time-
scale of 90000 ticks per second, then a frame_duration of 3003 and
frames-per-tc-second of 30 would yield a 'normal' SMPTE time-code for
NTSC video. Similarly, values of 3750 and 24 yield a time-code for
24 fps film content, and so on.
Note also that we supply explicitly the frame duration and fps, even
though they are obviously closely related. This removes any
ambiguity of what the counter values should be in the case of drop-
frame counting. These three values MUST correspond with each other.
When the SDP is used, these three parameters are transmitted as
extensionattributes, as defined in the header extension specification
[<a href="./rfc5285" title=""A General Mechanism for RTP Header Extensions"">RFC5285</a>], with the following ABNF syntax [<a href="./rfc5234" title=""Augmented BNF for Syntax Specifications: ABNF"">RFC5234</a>]. The form of the
extension attributes is 'owned' by the extension name. These
parameters to the extension do not need registration action beyond
their documentation here. Note that the parameters are supplied as
extension attributes, suitable for in-line use in RTP, even if in a
given stream only the RTCP mapping is used.
digit = "0"/"1"/"2"/"3"/"4"/"5"/"6"/"7"/"8"/"9"
integer = 1*digit
frame-duration-length = integer
timestamp-rate = integer
frame-duration = frame-duration-length "@" timestamp-rate
frames-per-tc-second = integer
drop = "/drop"
extensionattributes = frame-duration "/" frames-per-tc-second [drop]
<span class="grey">Singer Standards Track [Page 5]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-6" ></span>
<span class="grey"><a href="./rfc5484">RFC 5484</a> RTP SMPTE Time-Codes March 2009</span>
The frame duration is specified as a count of ticks of a clock that
has timestamp-rate ticks per second. It is recommended that the
timestamp-rate be the same as the clock rate of the RTP stream in
which the extension is embedded, to avoid the loss of accuracy in
conversion of timestamps. If the payload type changes during a
stream, especially between payloads with different clock rates, it is
strongly recommended that the header extension be included on the
first packet(s) of the new payload, to set the mapping for the new
clock rate explicitly.
If '/drop' is specified, then the first two frame numbers are omitted
from the count of each minute, except for minutes 00, 10, 20, 30, 40,
and 50, as documented in <a href="#section-4.2.2">Section 4.2.2</a> of SMPTE specification
[<a href="#ref-SMPTE-12M" title=""SMPTE Standard for Television -- Time and Control Code"">SMPTE-12M</a>]. (Note that this usually only applies to NTSC video.)
The URI used for the signaling is
"urn:ietf:params:rtp-hdrext:smpte-tc".
This URI signals the possible presence of associations in RTCP or
RTP, as defined below.
An example in the SDP, for film material, on a stream with a
timescale of 600, might be:
a=extmap:4 urn:ietf:params:rtp-hdrext:smpte-tc 25@600/24
Another example, for drop-frame NTSC, on a stream with a timescale of
600, might be:
a=extmap:4 urn:ietf:params:rtp-hdrext:smpte-tc 20@600/30/drop
<span class="h2"><a class="selflink" id="section-6" href="#section-6">6</a>. In-Stream Information</span>
<span class="h3"><a class="selflink" id="section-6.1" href="#section-6.1">6.1</a>. Compact Format of the Time-Code</span>
A compact binary SMPTE time-code in this design occupies 24 bits. It
is NOT formatted in the BCD system, but uses binary fixed-width
fields. It has the following structure:
sign(1) -- 1 for negative, 0 for positive
hours (5 bits) -- 0 to 23; the values 24-31 are reserved
minutes (6 bits) -- 0 to 59; 60-63 are reserved
<span class="grey">Singer Standards Track [Page 6]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-7" ></span>
<span class="grey"><a href="./rfc5484">RFC 5484</a> RTP SMPTE Time-Codes March 2009</span>
seconds (6 bits) -- 0 to 59; 60-63 are reserved
frames(6 bits) -- 0 to (frames-per-tc-second - 1)
Note that these fields are larger than the provision in SMPTE 12M,
where BCD (binary-coded decimal) is used (and notably, where only two
bits are provided for the tens digit of the frame-count, so frame
numbers above 39 cannot be represented).
<span class="h3"><a class="selflink" id="section-6.2" href="#section-6.2">6.2</a>. Full Format of the Time-Code</span>
A full SMPTE time-code occupies 64 bits. It is formatted exactly as
defined in Sections <a href="#section-7">7</a> and <a href="#section-8">8</a> of SMPTE 12M [<a href="#ref-SMPTE-12M" title=""SMPTE Standard for Television -- Time and Control Code"">SMPTE-12M</a>], without the
16-bit syncword. The value of the "drop frame flag" MUST agree with
the use of the "drop" indicator in the signaling.
Here are the bit assignments from SMPTE 12M, for information:
0--3 Units of frames
4--7 First binary group
8--9 Tens of frames
10 Drop frame flag
11 Color frame flag
12--15 Second binary group
16--19 Units of seconds
20--23 Third binary group
24--26 Tens of seconds
27 Polarity correction
28--31 Fourth binary group
32--35 Units of minutes
36--39 Fifth binary group
40--42 Tens of minutes
43 Binary group flag BGF0
<span class="grey">Singer Standards Track [Page 7]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-8" ></span>
<span class="grey"><a href="./rfc5484">RFC 5484</a> RTP SMPTE Time-Codes March 2009</span>
44--47 Sixth binary group
48--51 Units of hours
52--55 Seventh binary group
56--57 Tens of hours
58 Binary group flag BGF1
59 Binary group flag BGF2
60--63 Eighth binary group
<span class="h3"><a class="selflink" id="section-6.3" href="#section-6.3">6.3</a>. Associations in RTCP</span>
When the time-codes are piece-wise continuous, we then supply in RTCP
packets an RTP timestamp and an SMPTE time-code for the start of each
run of calculable time-codes. This establishes the time-code for all
RTP times greater than or equal to the one given, until a subsequent
RTCP packet reestablishes the mapping.
Note that the RTP timestamp in the RTCP mapping may not match the
timestamp of any frame in the media stream. For video, it normally
would; but a timestamp transition may happen part-way through a
decoded audio frame. Since they share the same clock, the timing of
that transition and the timing of the audio stream itself have the
same accuracy.
The RTCP packets need not use the same RTP timestamp as the sender
report (or transmission time) in the same RTCP packet. They can be
sent 'ahead of need' if possible (e.g., for stored content, when the
server can look ahead) or 'just-in-time'. For example, packets sent
'just-in-time' may be sent as early feedback packets, following the
rules in [<a href="./rfc4585" title=""Extended RTP Profile for Real-time Transport Control Protocol (RTCP)-Based Feedback (RTP/AVPF)"">RFC4585</a>], after a discontinuity in the time-code is
detected. Such packets allow media-buffering in the client the
chance to 'catch' the RTCP before the matching RTP packet is
processed and displayed.
The association is a new RTCP Control Packet Type, using the value
194 (see <a href="#section-10">Section 10</a>). This control packet has one of the two
following forms, differentiated by its length.
<span class="grey">Singer Standards Track [Page 8]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-9" ></span>
<span class="grey"><a href="./rfc5484">RFC 5484</a> RTP SMPTE Time-Codes March 2009</span>
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|V=2|P| SC |PT=SMPTETC=194 | length=3 |
+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
| SSRC of packet sender |
+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
| RTP timestamp |
+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
|S| hours | minutes | seconds | frames | reserved=0 |
+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
Figure 1: RTCP Short Form Packet
The fields S (sign), hours, minutes, seconds, and frames are defined
in <a href="#section-6.1">Section 6.1</a>.
For this short form, the length takes the fixed value 3, indicating a
control packet of 4 32-bit words.
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|V=2|P| SC |PT=SMPTETC=194 | length=4 |
+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
| SSRC of packet sender |
+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
| RTP timestamp |
+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
| Full 8-byte |
| SMPTE 12M time-code |
+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
Figure 2: RTCP Full Form Packet
For this full time-code (long form), the length takes the fixed value
4, indicating a control packet of 5 32-bit words.
<span class="h3"><a class="selflink" id="section-6.4" href="#section-6.4">6.4</a>. Associations in RTP</span>
When the time-codes are not known to be piece-wise continuous, or
absolute surety of mapping is desired, then the mapping can be placed
into some or all of the RTP packets. This is a less desirable route;
it uses the RTP header extension [<a href="./rfc5285" title=""A General Mechanism for RTP Header Extensions"">RFC5285</a>], which some terminals may
find problematic. And clearly placing mapping information in every
packet uses more bandwidth.
<span class="grey">Singer Standards Track [Page 9]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-10" ></span>
<span class="grey"><a href="./rfc5484">RFC 5484</a> RTP SMPTE Time-Codes March 2009</span>
In as many RTP packets as needed (possibly all), an RTP header
extension is used [<a href="./rfc5285" title=""A General Mechanism for RTP Header Extensions"">RFC5285</a>] to associate an RTP time to an SMPTE
time-code.
There are two forms of this header extension, again differentiated by
their length. The short form associates a compact time-code with the
RTP timestamp of the packet. The long form allows associates a full
time-code with a timestamp offset from the RTP timestamp of the
packet.
The short form has a length of 3 bytes (24 bits). The long form has
a length of 12 bytes (96 bits) and consists of a full SMPTE 12M time-
code, followed by a signed 32-bit offset D from the RTP timestamp.
If the packet has timestamp T, this establishes an RTP to time-code
association for the RTP time T+D.
<span class="h2"><a class="selflink" id="section-7" href="#section-7">7</a>. Implementation Note (Informative)</span>
This section contains a suggestion on how to calculate both a time-
code for a time T2, given an initial code at time T1, and the frame
duration.
It might seem that when drop-frame is used, there is a 'fence post'
problem: how many minutes in which frame-numbers are dropped have
passed since the initial time-code? However, this can be avoided if
all calculations are 'zero-based'; then the number of 'fence posts'
is known.
framesSinceTCzero := TimeCodeToFrameCount( initialTimeCode );
framesSinceMapping := floor( (T2-T1)/frameDuration );
totalFrames := framesSinceTCzero + framesSinceMapping;
timeCode := FrameCountToTimeCode( totalFrames );
The SMPTE engineering guideline [<a href="#ref-SMPTE-EG40" title=""Conversion of Time Values Between SMPTE 12M Time Code, MPEG-2 PCR Time Base and Absolute Time"">SMPTE-EG40</a>] contains all the
appropriate equations, constants, etc. for performing these and other
conversions.
<span class="h2"><a class="selflink" id="section-8" href="#section-8">8</a>. Discussion (Informative)</span>
This design has the advantage of not requiring the introduction of
new IP packets into the sessions or new data into the main data
channel by using low-bandwidth (vanishingly low in the case of
streams with no discontinuities), and it is independent of the design
of the RTP packets themselves: the RTP profile (including possibly
encryption) and the RTP payload format. SMPTE time-codes can be
associated with any RTP stream, including those with existing payload
formats.
<span class="grey">Singer Standards Track [Page 10]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-11" ></span>
<span class="grey"><a href="./rfc5484">RFC 5484</a> RTP SMPTE Time-Codes March 2009</span>
It might be argued that we could set the initial mapping also in the
SDP, since RTCP packets might get lost. But this means that the SDP
now has to have knowledge of the RTP random offset, which is nasty;
also, if one puts this RTCP packet into all sender reports, that's
probably good enough. Then if you don't have time-codes, you don't
have audio-video-sync either.
This specification associates the time-code with a particular media
stream. An alternative would be to make it an RTP stream in its own
right; however, the data rate is so low, this seems egregious. By
packing it inline, we can do this backwards-compatible for gateways,
etc., that already handle dual-stream.
There is no way described in this document to detect that an RTCP
packet has been lost and that a mapping may be being used outside its
intended range.
The design assumes that clients will hold mappings until they are
superseded, and that a client may need to buffer some number of
upcoming mappings.
<span class="h2"><a class="selflink" id="section-9" href="#section-9">9</a>. Security Considerations</span>
SMPTE time-codes are only informative and there are no known security
considerations from associating them with media streams.
<span class="h2"><a class="selflink" id="section-10" href="#section-10">10</a>. IANA Considerations</span>
The RTCP packet type used for SMPTE time-codes has been registered,
in accordance with <a href="./rfc3550#section-15">Section 15 of [RFC3550]</a>. IANA has added a new
value to the RTCP Control Packet types sub-registry of the Real-Time
Transport Protocol (RTP) Parameters registry, according to the
following data:
abbrev. name value Reference
--------- ----------------------- ------ ---------
SMPTETC SMPTE time-code mapping 194 <a href="./rfc5484">RFC 5484</a>
Additionally, IANA has registered a new extension URI to the RTP
Compact Header Extensions sub-registry of the Real-Time Transport
Protocol (RTP) Parameters registry, according to the following data:
Extension URI: urn:ietf:params:rtp-hdrext:smpte-tc
Description: SMPTE time-code mapping
Contact: singer@apple.com
Reference: <a href="./rfc5484">RFC 5484</a>
<span class="grey">Singer Standards Track [Page 11]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-12" ></span>
<span class="grey"><a href="./rfc5484">RFC 5484</a> RTP SMPTE Time-Codes March 2009</span>
<span class="h2"><a class="selflink" id="section-11" href="#section-11">11</a>. Acknowledgments</span>
Both Brian Link and John Lazzaro provided helpful comments on an
initial draft. Colin Perkins was helpful in reviewing and dealing
with the details. Ladan Gharai provided a thoughtful final review.
<span class="h2"><a class="selflink" id="section-12" href="#section-12">12</a>. References</span>
<span class="h3"><a class="selflink" id="section-12.1" href="#section-12.1">12.1</a>. Normative References</span>
[<a id="ref-RFC2119">RFC2119</a>] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", <a href="https://www.rfc-editor.org/bcp/bcp14">BCP 14</a>, <a href="./rfc2119">RFC 2119</a>, March 1997.
[<a id="ref-RFC3264">RFC3264</a>] Rosenberg, J. and H. Schulzrinne, "An Offer/Answer
Model with Session Description Protocol (SDP)",
<a href="./rfc3264">RFC 3264</a>, June 2002.
[<a id="ref-RFC3550">RFC3550</a>] Schulzrinne, H., Casner, S., Frederick, R., and V.
Jacobson, "RTP: A Transport Protocol for Real-Time
Applications", STD 64, <a href="./rfc3550">RFC 3550</a>, July 2003.
[<a id="ref-RFC4585">RFC4585</a>] Ott, J., Wenger, S., Sato, N., Burmeister, C., and J.
Rey, "Extended RTP Profile for Real-time Transport
Control Protocol (RTCP)-Based Feedback (RTP/AVPF)",
<a href="./rfc4585">RFC 4585</a>, July 2006.
[<a id="ref-RFC5234">RFC5234</a>] Crocker, D. and P. Overell, "Augmented BNF for Syntax
Specifications: ABNF", STD 68, <a href="./rfc5234">RFC 5234</a>, January 2008.
[<a id="ref-RFC5285">RFC5285</a>] Singer, D. and H. Desineni, "A General Mechanism for
RTP Header Extensions", <a href="./rfc5285">RFC 5285</a>, July 2008.
<span class="h3"><a class="selflink" id="section-12.2" href="#section-12.2">12.2</a>. Informative References</span>
[<a id="ref-SMPTE-12M">SMPTE-12M</a>] Society of Motion Picture and Television Engineers,
"SMPTE Standard for Television -- Time and Control
Code", SMPTE 12M-1-2008.
[<a id="ref-SMPTE-EG40">SMPTE-EG40</a>] SMPTE, "Conversion of Time Values Between SMPTE 12M
Time Code, MPEG-2 PCR Time Base and Absolute Time",
SMPTE EG40-2002, August 2002.
<span class="grey">Singer Standards Track [Page 12]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-13" ></span>
<span class="grey"><a href="./rfc5484">RFC 5484</a> RTP SMPTE Time-Codes March 2009</span>
Author's Address
David Singer
Apple Computer Inc.
1 Infinite Loop
Cupertino, CA 95014
US
Phone: +1 408 996 1010
EMail: singer@apple.com
Singer Standards Track [Page 13]
</pre>
|