home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1997 December / Internet_Info_CD-ROM_Walnut_Creek_December_1997.iso / drafts / draft_n_r / draft-perkins-rtp-redundancy-04.txt < prev    next >
Text File  |  1997-06-24  |  24KB  |  572 lines

  1.  
  2. INTERNET-DRAFT                               16 June 1997
  3.  
  4.  
  5.                                               Colin Perkins
  6.                                             Isidor Kouvelas
  7.                                                Orion Hodson
  8.                                               Vicky Hardman
  9.                                   University College London
  10.  
  11.                                                Mark Handley
  12.                                                         ISI
  13.  
  14.                                      Jean-Chrysostome Bolot
  15.                                          Andres Vega-Garcia
  16.                                         Sacha Fosse-Parisis
  17.                                      INRIA Sophia Antipolis
  18.  
  19.  
  20.  
  21.             RTP Payload for Redundant Audio Data
  22.              draft-perkins-rtp-redundancy-04.txt
  23.  
  24.  
  25. Status of this Memo
  26.  
  27.  
  28. This document is an Internet-Draft. Internet-Drafts are working documents
  29. of the Internet Engineering Task Force (IETF), its areas, and its working
  30. groups.  Note that other groups may also distribute working documents as
  31. Internet-Drafts.
  32.  
  33. Internet-Drafts are draft documents valid for a maximum of six months and
  34. may be updated, replaced, or obsoleted by other documents at any time. It
  35. is inappropriate to use Internet-Drafts as reference material or to cite
  36. them other than as ``work in progress''.  To learn the current status of
  37. any Internet-Draft, please check the ``1id-abstracts.txt'' listing
  38. contained in the Internet-Drafts Shadow Directories on ftp.is.co.za
  39. (Africa), nic.nordu.net (Europe), munnari.oz.au (Pacific Rim),
  40. ds.internic.net (US East Coast), or ftp.isi.edu (US West Coast).
  41.  
  42. Distribution of this document is unlimited.
  43.  
  44. Comments are solicited and should be addressed to the authors and/or
  45. the AVT working group's mailing list at rem-conf@es.net.
  46.  
  47.                          Abstract
  48.  
  49.     This document describes a payload format for use with the
  50.     real-time transport protocol (RTP), version 2, for encoding
  51.     redundant audio data.  The primary motivation for the scheme
  52.     described herein is the development of audio conferencing
  53.     tools for use with lossy packet networks such as the Internet
  54.     Mbone, although this scheme is not limited to such applications.
  55.  
  56. Perkins et al                                      Page 1
  57.  
  58.  
  59. INTERNET-DRAFT                               16 June 1997
  60.  
  61.  
  62. 1  Introduction
  63.  
  64. If multimedia conferencing is to become widely used by the Internet Mbone
  65. community, users must perceive the quality to be sufficiently good for most
  66. applications.  We have identified a number of problems which impair the
  67. quality of conferences, the most significant of which is packet loss.  This
  68. is a persistent problem, particularly given the increasing popularity, and
  69. therefore increasing load, of the Internet.  The disruption of speech
  70. intelligibility even at low loss rates which is currently experienced may
  71. convince a whole generation of users that multimedia conferencing over the
  72. Internet is not viable.  The addition of redundancy to the data stream is
  73. offered as a solution [1]. If a packet is lost then the missing information
  74. may be reconstructed at the receiver from the redundant data that arrives
  75. in the following packet(s), provided that the average number of
  76. consecutively lost packets is small.  Recent work [4,5] shows that packet
  77. loss patterns in the Internet are such that this scheme typically functions
  78. well.
  79.  
  80. This document describes an RTP payload format for the transmission
  81. of audio data encoded in such a redundant fashion.  Section 2 presents
  82. the requirements and motivation leading to the definition of this
  83. payload format, and does not form part of the payload format definition.
  84. Sections 3 onwards define the RTP payload format for redundant audio
  85. data.
  86.  
  87.  
  88. 2  Requirements/Motivation
  89.  
  90. The requirements for a redundant encoding scheme under RTP are as
  91. follows:
  92.  
  93.   o Packets have to carry a primary encoding and one or more redundant
  94.     encodings.
  95.  
  96.   o As a multitude of encodings may be used for redundant information,
  97.     each block of redundant encoding has to have an encoding type
  98.     identifier.
  99.  
  100.   o As the use of variable size encodings is desirable, each encoded
  101.     block in the packet has to have a length indicator.
  102.  
  103.   o The RTP header provides a timestamp field that corresponds to
  104.     the time of creation of the encoded data. When redundant encodings
  105.     are used this timestamp field can refer to the time of creation
  106.     of the primary encoding data.  Redundant blocks of data will
  107.     correspond to different time intervals than the primary data,
  108.     and hence each block of redundant encoding will require its own
  109.     timestamp.  To reduce the number of bytes needed to carry the
  110.     timestamp, it can be encoded as the difference of the timestamp
  111.     for the redundant encoding and the timestamp of the primary.
  112.  
  113. Perkins et al                                      Page 2
  114.  
  115.  
  116. INTERNET-DRAFT                               16 June 1997
  117.  
  118.  
  119. There are two essential means by which redundant audio may be added
  120. to the standard RTP specification:  a header extension may hold the
  121. redundancy, or one, or more, additional payload types may be defined.
  122.  
  123. Including all the redundancy information for a packet in a header extension
  124. would make it easy for applications that do not implement redundancy to
  125. discard it and just process the primary encoding data.  There are, however,
  126. a number of disadvantages with this scheme:
  127.  
  128.   o There is a large overhead from the number of bytes needed for
  129.     the extension header (4) and the possible padding that is needed
  130.     at the end of the extension to round up to a four byte  boundary
  131.     (up to 3 bytes).  For many applications this overhead is unacceptable.
  132.  
  133.   o Use of the header extension limits applications to a single redundant
  134.     encoding, unless further structure is introduced into the extension.
  135.     This would result in further overhead.
  136.  
  137. For these reasons, the use of RTP header extension to hold redundant
  138. audio encodings is disregarded.
  139.  
  140. The RTP profile for audio and video conferences [3] lists a set of
  141. payload types and provides for a dynamic range of 32 encodings that
  142. may be defined through a conference control protocol.  This leads
  143. to two possible schemes for assigning additional RTP payload types
  144. for redundant audio applications:
  145.  
  146.   1. A dynamic encoding scheme may be defined, for each combination
  147.      of primary/redundant payload types, using the RTP dynamic payload
  148.      type range.
  149.  
  150.   2. A single fixed payload type may be defined to represent a packet
  151.      with redundancy.  This may then be assigned to either a static
  152.      RTP payload type, or the payload type for this may be assigned
  153.      dynamically.
  154.  
  155. It is possible to define a set of payload types that signify a particular
  156. combination of primary and secondary encodings for each of the 32 dynamic
  157. payload types provided.  This would be a slightly restrictive yet feasible
  158. solution for packets with a single block of redundancy as the number of
  159. possible combinations is not too large.  However the need for multiple
  160. blocks of redundancy greatly increases the number of encoding combinations
  161. and makes this solution not viable.
  162.  
  163. A modified version of the above solution could be to decide prior
  164. to the beginning of a conference on a set a 32 encoding combinations
  165. that will be used for the duration of the conference.  All tools
  166. in the conference can be initialized with this working set of encoding
  167. combinations.  Communication of the working set could be made through
  168. the use of an external, out of band, mechanism.  Setup is complicated
  169.  
  170. Perkins et al                                      Page 3
  171.  
  172.  
  173. INTERNET-DRAFT                               16 June 1997
  174.  
  175.  
  176. as great care needs to be taken in starting tools with identical
  177. parameters.  This scheme is more efficient as only one byte is used
  178. to identify combinations of encodings.
  179.  
  180. It is felt that the complication inherent in distributing the mapping of
  181. payload types onto combinations of redundant data preclude the use of this
  182. mechanism.
  183.  
  184. A more flexible solution is to have a single payload type which signifies a
  185. packet with redundancy. That packet then becomes a container, encapsulating 
  186. multiple payloads into a single RTP packet.  Such a scheme is flexible,
  187. since any amount of redundancy may be encapsulated within a single packet.
  188. There is, however, a small overhead since each encapsulated payload must be
  189. preceded by a header indicating the type of data enclosed.  This is the
  190. preferred solution, since it is both flexible, extensible, and has a
  191. relatively low overhead.  The remainder of this document describes this
  192. solution.
  193.  
  194.  
  195. 3  Payload Format Specification
  196.  
  197.  
  198. The assignment of an RTP payload type for this new packet format is outside
  199. the scope of this document, and will not be specified here.  It is expected
  200. that the RTP profile for a particular class of applications will assign a
  201. payload type for this encoding, or if that is not done then a payload type
  202. in the dynamic range shall be chosen.
  203.  
  204. An RTP packet containing redundant data shall have a standard RTP header,
  205. with payload type indicating redundancy.  The other fields of the RTP
  206. header relate to the primary data block of the redundant data.
  207.  
  208. Following the RTP header are a number of additional headers, defined in the
  209. figure below, which specify the contents of each of the encodings carried
  210. by the packet.  Following these additional headers are a number of data
  211. blocks, which contain the standard RTP payload data for these encodings.
  212. It is noted that all the headers are aligned to a 32 bit boundary, but that
  213. the payload data will typically not be aligned.  If multiple redundant
  214. encodings are carried in a packet, they should correspond to different time
  215. intervals:  there is no reason to include multiple copies of data for a
  216. single time interval within a packet.
  217.  
  218.  0                    1                   2                    3
  219.  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
  220. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  221. |F|   block PT  |  timestamp offset         |   block length    |
  222. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  223.  
  224.  
  225.  
  226. Perkins et al                                      Page 4
  227.  
  228.  
  229. INTERNET-DRAFT                               16 June 1997
  230.  
  231.  
  232. The bits in the header are specified as follows:
  233.  
  234. F: 1 bit First bit in header indicates whether another header block
  235.     follows.  If 1 further header blocks follow, if 0 this is the
  236.     last header block.
  237.  
  238. block PT: 7 bits RTP payload type for this block.
  239.  
  240. timestamp offset:  14 bits Unsigned offset of timestamp of this block
  241.     relative to timestamp given in RTP header.  The use of an unsigned
  242.     offset implies that redundant data must be sent after the primary
  243.     data, and is hence a time to be subtracted from the current
  244.     timestamp to determine the timestamp of the data for which this
  245.     block is the redundancy.
  246.  
  247. block length:  10 bits Length in bytes of the corresponding data
  248.     block excluding header.
  249.  
  250. It is noted that the use of an unsigned timestamp offset limits the use of
  251. redundant data slightly:  it is not possible to send redundancy before the
  252. primary encoding.  This may affect schemes where a low bandwidth coding
  253. suitable for redundancy is produced early in the encoding process, and
  254. hence could feasibly be transmitted early.  However, the addition of a sign
  255. bit would unacceptably reduce the range of the timestamp offset, and
  256. increasing the size of the field above 14 bits limits the block length
  257. field.  It seems that limiting redundancy to be transmitted after the
  258. primary will cause fewer problems than limiting the size of the other
  259. fields.
  260.  
  261. The timestamp offset for a redundant block is measured in the same units as
  262. the timestamp of the primary encoding (ie:  audio samples, with the same
  263. clock rate as the primary).  The implication of this is that the redundant
  264. encoding MUST be sampled at the same rate as the primary.
  265.  
  266. It is further noted that the block length and timestamp offset are 10 bits,
  267. and 14 bits respectively; rather than the more obvious 8 and 16 bits.
  268. Whilst such an encoding complicates parsing the header information
  269. slightly, and adds some additional processing overhead, there are a number
  270. of problems involved with the more obvious choice: An 8 bit block length
  271. field is sufficient for most, but not all, possible encodings:  for example
  272. 80ms PCM and DVI audio packets comprise more than 256 bytes, and cannot be
  273. encoded with a single byte length field.  It is possible to impose
  274. additional structure on the block length field (for example the high bit
  275. set could imply the lower 7 bits code a length in words, rather than
  276. bytes), however such schemes are complex.  The use of a 10 bit block length
  277. field retains simplicity and provides an enlarged range, at the expense of
  278. a reduced range of timestamp values.
  279.  
  280. The primary encoding block header is placed last in the packet.  It
  281. is therefore possible to omit the timestamp and block-length fields
  282.  
  283. Perkins et al                                      Page 5
  284.  
  285.  
  286. INTERNET-DRAFT                               16 June 1997
  287.  
  288.  
  289. from the header of this block, since they may be determined from
  290. the RTP header and overall packet length.  The header for the primary
  291. (final) block comprises only a zero F bit, and the block payload
  292. type information, a total of 8 bits.  This is illustrated in the
  293. figure below:
  294.  
  295.  0 1 2 3 4 5 6 7
  296. +-+-+-+-+-+-+-+-+
  297. |0|   Block PT  |
  298. +-+-+-+-+-+-+-+-+
  299.  
  300. The final header is followed, immediately, by the data blocks, stored in
  301. the same order as the headers.  There is no padding or other delimiter
  302. between the data blocks, and they are typically not 32 bit aligned.  Again,
  303. this choice was made to reduce bandwidth overheads, at the expense of
  304. additional decoding time.
  305.  
  306. The choice of encodings used should reflect the bandwidth requirements of
  307. those encodings.  It is expected that the redundant encoding shall use
  308. significantly less bandwidth that the primary encoding:  the exception
  309. being the case where the primary is very low-bandwidth and has high
  310. processing requirement, in which case a copy of the primary MAY be used as
  311. the redundancy.  The redundant encoding MUST NOT be higher bandwidth than
  312. the primary.
  313.  
  314. The use of multiple levels of redundancy is rarely necessary.  However, in
  315. those cases which require it, the bandwidth required by each level of
  316. redundancy is expected to be significantly less than that of the previous
  317. level.
  318.  
  319.  
  320. 4  Limitations
  321.  
  322. The RTP marker bit is not preserved for redundant data blocks.  Hence
  323. if the primary (containing this marker) is lost, the marker is lost.
  324. It is believed that this will not cause undue problems:  even if
  325. the marker bit was transmitted with the redundant information, there
  326. would still be the possibility of its loss, so applications would
  327. still have to be written with this in mind.
  328.  
  329. In addition, CSRC information is not preserved for redundant data.
  330. The CSRC data in the RTP header of a redundant audio packet relates
  331. to the primary only.  Since CSRC data in an audio stream is expected
  332. to change relatively infrequently, it is recommended that applications
  333. which require this information assume that the CSRC data in the RTP
  334. header may be applied to the reconstructed redundant data.
  335.  
  336.  
  337.  
  338.  
  339.  
  340.  
  341.  
  342. Perkins et al                                      Page 6
  343.  
  344.  
  345. INTERNET-DRAFT                               16 June 1997
  346.  
  347.  
  348. 5  Relation to SDP
  349.  
  350. When a redundant payload is used, it may need to be bound to an RTP dynamic
  351. payload type.  This may be achieved through any out-of-band mechanism, but
  352. one common way is to communicate this binding using the Session Description
  353. Protocol (SDP) [6].  SDP has a mechanism for binding a dynamic payload
  354. types to particular codec, sample rate, and number of channels using the
  355. ``rtpmap'' attribute.  An example of its use (using the RTP audio/video
  356. profile [3]) is:
  357.  
  358.     m=audio 12345 RTP/AVP 121 0 5
  359.     a=rtpmap:121 red/8000/1
  360.  
  361. This specifies that an audio stream using RTP is using payload types 121 (a
  362. dynamic payload type), 0 (PCM u-law) and 5 (DVI). The ``rtpmap'' attribute
  363. is used to bind payload type 121 to codec ``red'' indicating this codec is
  364. actually a redundancy frame, 8KHz, and monaural.  When used with SDP, the
  365. term ``red'' is used to indicate the redundancy format discussed in this
  366. document.
  367.  
  368. In this case the additional formats of PCM and DVI are specified.  The
  369. receiver must therefore be prepared to use these formats.  Such a
  370. specification means the sender will send redundancy by default, but also
  371. may send PCM or DVI. However, with a redundant payload we additionally take
  372. this to mean that no codec other than PCM or DVI will be used in the
  373. redundant encodings.  Note that the additional payload formats defined in
  374. the ``m='' field may themselves be dynamic payload types, and if so a
  375. number of additional ``a='' attributes may be required to describe these
  376. dynamic payload types.
  377.  
  378. To receive a redundant stream, this is all that is required.  However to
  379. send a redundant stream, the sender needs to know which codecs are
  380. recommended for the primary and secondary (and tertiary, etc) encodings.
  381. This information is specific to the redundancy format, and is specified
  382. using an additional attribute ``fmtp'' which conveys format-specific
  383. information.  A session directory does not parse the values specified in an
  384. fmtp attribute but merely hands it to the media tool unchanged.  For
  385. redundancy, we define the format parameters to be a slash ``/'' separated
  386. list of RTP payload types.
  387.  
  388. Thus a complete example is:
  389.  
  390.     m=audio 12345 RTP/AVP 121 0 5
  391.     a=rtpmap:121 red/8000/1
  392.     a=fmtp:121 0/5
  393.  
  394. This specifies that the default format for senders is redundancy with PCM
  395. as the primary encoding and DVI as the secondary encoding.  Encodings
  396. cannot be specified in the fmtp attribute unless they are also specified as
  397. valid encodings on the media (``m='') line.
  398.  
  399. Perkins et al                                      Page 7
  400.  
  401.  
  402. INTERNET-DRAFT                               16 June 1997
  403.  
  404.  
  405. 6  Security Considerations
  406.  
  407. RTP packets containing redundant information are subject to the security
  408. considerations discussed in the RTP specification [2], and any appropriate
  409. RTP profile (for example [3]).  This implies that confidentiality of the
  410. media streams is achieved by encryption.  Encryption of a redundant data
  411. stream may occur in two ways:
  412.  
  413.  
  414.   1. The entire stream is to be secured, and all participants are
  415.      expected to have keys to decode the entire stream.  In this
  416.      case, nothing special need be done, and encryption is performed
  417.      in the usual manner.
  418.  
  419.   2. A portion of the stream is to be encrypted with a different
  420.      key to the remainder.  In this case a redundant copy of the
  421.      last packet of that portion cannot be sent, since there is no
  422.      following packet which is encrypted with the correct key in which
  423.      to send it.  Similar limitations may occur when enabling/disabling
  424.      encryption.
  425.  
  426. The choice between these two is a matter for the encoder only.  Decoders
  427. can decrypt either form without modification.
  428.  
  429. Whilst the addition of low-bandwidth redundancy to an audio stream is an
  430. effective means by which that stream may be protected against packet loss,
  431. application designers should be aware that the addition of large amounts of
  432. redundancy will increase network congestion, and hence packet loss, leading
  433. to a worsening of the problem which the use of redundancy was intended to
  434. solve.  At its worst, this can lead to excessive network congestion and may
  435. constitute a denial of service attack.
  436.  
  437.  
  438. 7  Example Packet
  439.  
  440.  
  441. An RTP audio data packet containing a DVI4 (8KHz) primary, and a
  442. single block of redundancy encoded using 8KHz LPC (both 20ms packets),
  443. as defined in the RTP audio/video profile [3] is illustrated:
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456. Perkins et al                                      Page 8
  457.  
  458.  
  459. INTERNET-DRAFT                               16 June 1997
  460.  
  461.  
  462.  0                   1                   2                   3
  463.  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
  464. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  465. |V=2|P|X| CC=0  |M|      PT     |   sequence number of primary  |
  466. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  467. |              timestamp  of primary encoding                   |
  468. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  469. |           synchronization source (SSRC) identifier            |
  470. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  471. |1| block PT=7  |  timestamp offset         |   block length    |
  472. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  473. |0| block PT=5  |                                               |
  474. +-+-+-+-+-+-+-+-+                                               +
  475. |                                                               |
  476. +                LPC encoded redundant data (PT=7)              +
  477. |                (14 bytes)                                     |
  478. +                                               +---------------+
  479. |                                               |               |
  480. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+               +
  481. |                                                               |
  482. +                                                               +
  483. |                                                               |
  484. +                                                               +
  485. |                                                               |
  486. +                                                               +
  487. |                DVI4 encoded primary data (PT=5)               |
  488. +                (84 bytes, not to scale)                       +
  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. Perkins et al                                      Page 9
  514.  
  515.  
  516. INTERNET-DRAFT                               16 June 1997
  517.  
  518.  
  519. 8  Author's Addresses
  520.  
  521. Colin Perkins/Isidor Kouvelas/Orion Hodson/Vicky Hardman
  522. Department of Computer Science
  523. University College London
  524. London WC1E 6BT
  525. United Kingdom
  526. Email:  {c.perkins|i.kouvelas|o.hodson|v.hardman}@cs.ucl.ac.uk
  527.  
  528. Mark Handley
  529. USC Information Sciences Institute
  530. c/o MIT Laboratory for Computer Science
  531. 545 Technology Square
  532. Cambridge, MA 02139, USA
  533. Email:  mjh@isi.edu
  534.  
  535. Jean-Chrysostome Bolot/Andres Vega-Garcia/Sacha Fosse-Parisis
  536. INRIA Sophia Antipolis
  537. 2004 Route des Lucioles, BP 93
  538. 06902 Sophia Antipolis
  539. France
  540. Email:  {bolot|avega|sfosse}@sophia.inria.fr
  541.  
  542.  
  543. 9  References
  544.  
  545. [1] V.J. Hardman, M.A. Sasse, M. Handley and A. Watson; Reliable
  546. Audio for Use over the Internet; Proceedings INET'95, Honalulu, Oahu,
  547. Hawaii, September 1995.  http://www.isoc.org/in95prc/
  548.  
  549. [2] H. Schulzrinne, S. Casner, R. Frederick and V. Jacobson; RTP:
  550. A Transport Protocol for Real-Time Applications; RFC 1889, January
  551. 1996
  552.  
  553. [3] H. Schulzrinne; RTP Profile for Audio and Video Conferences with
  554. Minimal Control; RFC 1890, January 1996
  555. [4] M. Yajnik, J. Kurose and D. Towsley; Packet loss correlation
  556. in the MBone multicast network; IEEE Globecom Internet workshop, London,
  557. November 1996
  558.  
  559. [5] J.-C. Bolot and A. Vega-Garcia; The case for FEC-based error
  560. control for packet audio in the Internet; ACM Multimedia Systems,
  561. 1997
  562.  
  563. [6] M. Handley and V. Jacobson; SDP: Session Description Protocol
  564. (draft 03.2) draft-ietf-mmusic-sdp-03.txt, November 1996
  565.  
  566.  
  567.  
  568.  
  569.  
  570. Perkins et al                                     Page 10
  571.  
  572.