Baud
All protocols

RTP

A 12-byte header that puts timing and order onto live audio and video.

Uncompressed video

The same header, now carrying raw pixels the way broadcast studios send them.

RTP carrying uncompressed video (RFC 4175 / SMPTE ST 2110-20)04812162024801000000060011000001B00011011590101100100000000001200010010D71101011170011100004C010011001F000111113A001110109210010010000000000000000000000000000000080000100000000000006401100100000000000000000000008010000000EB111010118010000000EB111010118010000000EB111010118010000000EB11101011Ve…CSRC c…Payload typeSequence numberTimestampSSRCExtended sequence numberSRD lengthLine numberPixel offsetPixels (YCbCr 4:2:2, 8-bit)Click a field to inspect it

Whole frame

Same 12-byte RTP header, then a tiny video header that says which line and where on the line the pixels go. Studios use this format to carry broadcast video over plain Ethernet.

FieldOffsetExample valueMeaning
VersionByte 0, bits 7–62Always 2 for the current RTP.
PaddingByte 0, bit 501 if the packet ends with padding bytes (needed by some ciphers). 0 here.
ExtensionByte 0, bit 401 if a header extension follows the fixed header.
CSRC countByte 0, bits 3–00How many contributing-source IDs follow the header. Non-zero only when a mixer combines several sources.
MarkerByte 1, bit 70Meaning depends on the payload. For video it is set on the last packet of a frame, so the receiver knows it can decode now without waiting for the next timestamp.
Payload typeByte 1, bits 6–096 (dynamic, H.264 per SDP)Which codec/format is inside. 0–95 are fixed assignments (0 = PCMU audio), 96–127 are dynamic: a session description (SDP) says what 96 means, here H.264.
Sequence numberByte 2–37001+1 for every packet sent. The receiver uses it to spot loss (a gap) and to put packets back in order. It starts at a random value.
TimestampByte 4–71234800 (13.720 s on the 90 kHz clock)The sampling instant of the media, in clock ticks (90,000 per second for video). All packets of one frame share the same timestamp; 25 fps adds 3,600 per frame. It is media time, not wall-clock time: it drives playback timing and lip-sync.
SSRCByte 8–110x4C1F3A92Synchronization source: a random ID of this stream. Audio and video from the same sender have different SSRCs; the receiver separates streams by it.
Extended sequence numberByte 12–130 (low 16 bits are in the RTP header)The high 16 bits of the sequence number. Uncompressed video sends so many packets per second that the normal 16-bit counter wraps in under a second; this extends it to 32 bits.
SRD lengthByte 14–158 bytesA packet carries one or more Sample Row Data segments, each with its own 6-byte header. This one's pixel data is 8 bytes.
F (field)Byte 16, bit 70Interlaced video: 0 = first field, 1 = second field. Progressive video always uses 0.
Line numberBytes 16–17100Which row of the picture this data belongs to, counted from 0 at the top.
C (continuation)Byte 18, bit 701 if another SRD header follows this one in the same packet. 0 = last.
Pixel offsetBytes 18–190 (start of the line)The horizontal position, in pixels, where this data starts within the line.
Pixels (YCbCr 4:2:2, 8-bit)Byte 20–274 white pixelsRaw pixels, four bytes per two pixels in the order Cb, Y0, Cr, Y1. 0x80 is neutral chroma and 0xEB (235) is video white, so these 4 pixels are white. A 1080-pixel-wide line is 3,840 bytes: the picture is not compressed at all.

Packets, a lost one, and a report

How sequence numbers and timestamps expose loss and frame boundaries.

EncoderRTP senderDecoderRTP receiverRTPseq=100 ts=3600RTPseq=101 ts=3600 M=1RTPseq=102 ts=7200RTPseq=103 ts=7200 M=1RTPseq=104 ts=10800RTCP RRlost=1 of 5bufferingframe 1 OKframe 2 damaged

Whole exchange

RTP numbers and timestamps media packets but does not guarantee delivery. Loss is detected, not repaired: repair is left to the application, or to protocols like SRT.

  1. 1First packet of frame 1

    A large frame is cut into packets that fit the network MTU. All of them carry the same timestamp (3,600) and consecutive sequence numbers.

  2. 2Last packet: marker set

    M=1 says this completes frame 1. The decoder can decode and show it without waiting for a packet with a newer timestamp.

  3. 3Frame 2 begins

    The timestamp jumps by 3,600 ticks = 40 ms at 90 kHz: 25 frames per second.

  4. 4A packet is lost

    UDP does not retransmit. The packet with seq=103 never arrives.

  5. 5The gap shows

    Sequence 104 follows 102: the receiver knows exactly one packet is missing, so frame 2 is damaged. It can conceal the error, show the previous frame, or ask for a new key frame.

  6. 6RTCP receiver report

    Alongside the media, RTCP carries statistics (here 1 packet in 5 lost, plus jitter). The sender can adapt: lower the bitrate, add error correction, or send a key frame.

Where you meet it

  • WebRTC video calls and conferencing
  • IP cameras and surveillance (usually set up by RTSP)
  • Broadcast and pro-AV over IP: SMPTE ST 2110, AES67, Dante-style audio

Watch out for

  • The timestamp unit depends on the payload: 90,000 per second for video, the sample rate for audio. Never compare them directly.
  • Packets bigger than the path MTU get fragmented by IP and lose together; keep them around 1,200–1,400 bytes.
  • Firewalls and NAT often block RTP because its ports are negotiated per session: that is what STUN/TURN/ICE solve.

Standards

  • RFC 3550: RTP
  • RFC 6184: RTP Payload Format for H.264
  • RFC 4175: RTP Payload Format for Uncompressed Video

Related protocols