Vol. I · No. 46The protocol sectionSat, 10 Oct 2026
Layer 7 · Media · audio and video, while it is happening

RTP

Real-time Transport Protocol

RTP carries media that is worth less the later it arrives. It rides on UDP and adds only what live audio and video need: a timestamp so playback can be paced, a sequence number so loss and reordering are visible, and a payload type saying which codec produced the bytes.

RTP adds timing and sequence to a UDP stream — enough to play media smoothly, and deliberately not enough to retransmit it.

Operates at
Layer 7
on UDP
Port
Negotiated
even ports, by SIP or SDP
Adds
Timing
timestamp + sequence
Paired with
RTCP
the quality reports

How it works

The three fields that make a stream playable
The RTP header — twelve bytes in front of the media
016 bits31
V·P·X·CC
M
Payload type
Sequence number
Timestamp
SSRC — which source this stream is
CSRC list, if a mixer combined several sources
The encoded audio or video frame

The sequence number shows what went missing and what arrived out of order; the timestamp says when it should be played, not when it turned up. A jitter buffer uses both to turn a bumpy network into steady playback.

The main points

What RTP does, step by step

1
Get a port from signalling

SIP or WebRTC negotiates the addresses, ports and codecs in SDP before any media flows.

2
Packetise the media

The encoder’s output is split into packets, each stamped with a sequence number and a media timestamp.

3
Send over UDP

Packets go out at the media’s own pace — a late packet is worse than a missing one, so nothing is retransmitted.

4
Buffer, reorder, conceal

The receiver holds a small jitter buffer, reorders by sequence, and conceals whatever never arrived.

The family around it
RTCP — loss, jitter and round-trip reports
SRTP — the encrypted profile
SDP — describes what the stream will be
SSRC — identifies each source in a session
Jitter buffer — trades latency for smoothness
FEC / NACK — recovery that beats retransmission

In cybersecurity

Plain RTP is an unencrypted, unauthenticated media stream — anyone on the path can record the call, or inject audio into it.

Use SRTP

The secure profile encrypts and authenticates each packet; WebRTC refuses to send anything else.

Eavesdropping

Captured RTP replays as audio with ordinary tools — no cryptanalysis involved.

Injection

Without authentication, a forged packet with a plausible sequence number is simply played.

Key exchange matters

SRTP is only as good as DTLS-SRTP or MIKEY delivering the keys; SDES in clear SDP is not enough.

Port range exposure

Media uses a wide dynamic UDP range — open it narrowly and pin it to the signalling.

Amplification risk

Open relays and turn servers left unauthenticated get used to bounce traffic at someone else.

Rides in the stack

IPUDPRTP

UDP is chosen deliberately: TCP’s retransmissions would deliver audio that is correct and far too late.

Works with

SIPWebRTCUDP

Header & companions

Key fields
Sequenceloss & order
Timestampplayback pace
SSRCwhich source
Payload typewhich codec
Alongside
RTCPquality reports
SRTPencryption
SDPthe offer
ICENAT traversal