1 / 79

RTP

RTP. RTP. “Real-Time Transport Protocol” (not really a transport protocol) Provides source identification sequence number time stamping payload identification. RTP Packet Format. RTP Header. RTP Payload Header. RTP Payload. RTP Header. payload type : 7 bits

tekla
Download Presentation

RTP

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. RTP

  2. RTP • “Real-Time Transport Protocol” (not really a transport protocol) • Provides • source identification • sequence number • time stamping • payload identification

  3. RTP Packet Format RTP Header RTP Payload Header RTP Payload

  4. RTP Header • payload type: 7 bits • identify content (mp3? MPEG-1?)

  5. RTP Header • sequence number: 16 bits • packet sequence number

  6. RTP Header • media timestamp: 32 bits • the instant the first byte in this packet is captured

  7. RTP Header • SSRC: 32 bits • random, unique in a session • identify a source (not host!)

  8. RTP Header • marker bit: • depends on payload • e.g. beginning of frame

  9. On Receiving RTP packet • check SSRC • new source? • existing source? which one? • check payload type • has format been changed? • which decoder should I use?

  10. SSRC Attack! • Send gazillion packets, each with different SSRC • Remedy: • consider as new source only after K packets • soft-states related keywords from last lecture security robustness soft-states

  11. RTCP

  12. RTCP • Real-Time Control Protocol • Provides • receiver’s feedback • network conditions • time synchronization • receiver’s description

  13. RTCP Packet Types • Sender’s Report (SR) • Receiver’s Report (RR) • Source Description (SDES) • Application Specific (APP) • BYE

  14. Fields in SR • NTP and RTP Timestamp • relate media timestamp to real time • Sender’s stats • byte count, packet count

  15. Fields in SR + RR • Reception Report • Number of lost packets • % of lost packets • Inter-arrival jitter • Timestamp of last SR • Delay since last SR

  16. Fields in SDES • Name, e-mail, phone, tool, location, notes etc. • CNAME: unique and constant in a session

  17. Deducing Network Conditions • Packet Loss Rate • Interarrival Jitter • Round Trip Time

  18. Calculating Packet Loss Ratio • for each source, keep • first sequence number S0 • last sequence number Slast • Expected packets = Slast – S0 • Count how many received packets

  19. Calculating Interarrival Jitter • Variance in packet spacing • Define: • Pi.arrival_time • Pi.media_timestamp • Pi.transit_time

  20. Calculating Interarrival Jitter • Pi.transit_time = Pi.arrival_time - Pi.media_timestamp • Difference in transit time for two consecutive packets = |Pi.transit_time – Pi-1.transit_time|

  21. Calculating Interarrival Jitter • Jitter after packet i = Ji • Ji = (1-a) Ji-1 + a D(i,i-1)

  22. Calculating RTT • T.lsr = • timestamp in last received SR • T.dlsr = • delay since last SR is received

  23. Calculating RTT • RTT = Tcurr – Tlsr - Tdlsr Tlsr Tcurr S R Tdlsr

  24. Calculating ??? • Pi.sender_byte_count • Pi.sender_packet_count

  25. RTCP Scaling • B: Fix RTCP bandwidth • N: Number of participants • S: Mean RTCP packet size Sending interval = NS/B

  26. RTP Mixers and Translators

  27. Translators SSRC: 1000 PT: 32 SSRC: 1000 PT: 46

  28. Mixers SSRC: 1000 PT: 32 TS: 4000 SSRC: 4654 PT: 32 CSRC: 1000 CSRC: 3388 TS: 8000 SSRC: 3388 PT: 32 TS: 4000

  29. Example Translator Tunnel through Firewall

  30. Example Translator 128Kbps 10Mbs

  31. Example Mixer

  32. Good Exam Question • How should a translator/mixer process RTCP packets?

  33. Application-Level Framing

  34. How to send/recv? Let the application decide, not protocol stacks. Tennenhouse + Clark

  35. Application knows best. • How to reorder packets • How to ignore loss • How to retransmit

  36. Application Data Unit (ADU) • can be processed individually • If 1 packet = 1 ADU then • each packet can be processed immediately

  37. How to chop data into packets? • Every received packet should be useful (Even in very lossy environment)

  38. Chopping MPEG into Packets • Try to fit a slice into one packet. • Try to make beginning of payload either the start of GOP or Picture or Slice

  39. RTP Payload Header RTP Header RTP Payload Header RTP Payload • MPEG-1? 2? • Temporal Reference • I? P? B? • Begin of Slice? End of Slice?

  40. Possible Survey and Project Topics

  41. Extensions to RTP • SRTP : Secure RTP • RTP Header Compression • Header Size: 40 bytes • Payload Size: 20ms, 8Kbps audio

  42. Rate Adaptations

  43. Encoder Decoder Middlebox Receiver Sender Network You are Here

  44. How to Send? open socket while not done read data add RTP header send

  45. What’s Wrong? • Send more than network can handle • May cause TCP to reduce congestion window • No reaction to packet loss? • Are all packets equally important? • Burst of packets

  46. Today’s Topic • How to adapt sending rate to network conditions

  47. Rate Adaptations

  48. Idea • When the network is congested, reduce rate.

  49. How to reduce rate? • Send slower

  50. How to reduce rate? • Reduce encoding bit-rate • Increase quantization factor • Reduce frame resolution • Reduce frame rate

More Related