UDP


What is it?

  1. Connectionless, best-effort. No handshake, no retransmit, no built-in ordering or congestion control.
  2. Great for real-time media where timeliness beats perfection (live video/audio, 2110/RTP, MPEG-TS).
  3. Reliability/timing are achieved by the application layer (RTP timestamps, FEC, redundancy) and the network (QoS, multicast).

“UDP profile”        Example UDP Setup

  1. Destination & addressing
    1. Unicast: dst_ip:port (e.g., 203.0.113.10:5000).
    2. Multicast: group_ip:port (e.g., 239.1.2.3:5000) + TTL and IGMP mode at the receiver.
    3. SSM vs ASM (for multicast):
      1. SSM (232/8): source-specific join (S,G) → cleaner, more secure.
      2. ASM (239/8): any-source ( *,G ).
      More on these in Day 4

  2. Transport framing
    1. Raw UDP, RTP/UDP, or MPEG-TS/UDP.
    2. Common MPEG-TS over UDP practice: 7×188-byte TS packets per UDP payload = 1316 bytes (fits under 1500-B MTU with IP/UDP headers).
    3. For SMPTE 2110: RTP over UDP with precise packet pacing and timestamps (e.g., 2110-20 video, 2110-30 audio).

  3. Bitrate & pacing
    1. CBR target (e.g., 20.0 Mbps) and packetization interval (packets per second).
    2. Pacing/shaping so packets are evenly spaced (prevents microbursts and switch buffer drops).
    3. On 2110, pacing follows ST 2110-21 sender models (narrow/wide), ensuring receivers’ buffers aren’t overrun.

  4. Protection options
    1. FEC (Pro-MPEG COP#3 / SMPTE 2022-1): L×D matrix (e.g., 10×20) adds parity streams you can reconstruct losses from.
    2. Seamless hitless switching (SMPTE 2022-7): send two identical streams over disjoint paths; receiver merges them loss-free.
    3. RTP sequence/marker/timestamps: detect loss, maintain playout clock.

  5. QoS / network knobs
    1. DSCP (e.g., EF=46 for audio, AF41/42 for video) for priority queuing.
    2. TTL hop limit (e.g., 64 for WAN, small for local subnets).
    3. Source port range (firewall friendliness), TOS, VLAN/CoS if tagging at L2.

  6. Multicast control (receivers)
    1. IGMP version (v2/v3) and join/leave behavior; IGMP Snooping on switches to prune non-listeners.
    2. Optional IGMP Querier on the VLAN if no L3 multicast router exists.

  7. Buffers & latency
    1. Sender queue and receiver jitter buffer (e.g., 50–250 ms) to absorb burst loss/jitter.
    2. For contribution, choose jitter buffer size to match circuit variability; too small → drops, too big → latency.

  8. Monitoring/telemetry
    1. Continuity counter (MPEG-TS), PCR accuracy/jitter, RTP seq gaps, packet loss %, bitrate.
    2. Alarms on FEC correction rate, late/early packets, out-of-order thresholds.


UDP Stream Flow

  1. Encoder uses your UDP profile → packetizes (RTP or TS in UDP), shapes pacing, applies DSCP/FEC/2022-7 as configured.
  2. Network carries it: switches honor DSCP (more on this here) , IGMP Snooping keeps multicast local to interested ports, routers forward per QoS.
  3. Receiver/IRD joins (IGMP for multicast), de-jitters, checks sequence/PCR, applies FEC or 2022-7 merge, decodes/render.


Practical defaults

  1. MPEG-TS/UDP: 7×188=1316-B payload, 20–50 ms encoder buffer, DSCP AF41, TTL 64.
  2. RTP/UDP (2110): compliant 2110-21 pacing, DSCP CS5/AF41 (video) & EF (46) for PTP/audio, 2022-7 if you have dual paths.
  3. Multicast: prefer SSM (232/8); enable IGMPv3 on receivers; ensure IGMP Snooping + Querier in the VLAN.
  4. FEC: start modest (e.g., 8×4) on noisy links; increase for lossy WANs; disable on pristine LANs to save overhead.
  5. NAT/Firewall: for unicast through firewalls, pin source/dest ports and open statically; multicast typically stays inside domains.

Human readable UDP Profile
  Name: PLAYOUT-HD-01
  Mode: RTP over UDP (2110-20)
  Dest: 232.10.20.30:50000 (SSM, Source=198.18.1.10)
  DSCP: AF41 (video), EF for PTP on separate VLAN
  Pacing: 2110-21 Narrow Sender, 1080i/59.94
  Redundancy: SMPTE 2022-7 (Path A & Path B)
  FEC: Off (LAN)
  TTL: 32
  Notes: Receiver jitter buffer 120 ms; IGMPv3 join (S,G); switch snooping enabled


Why Video Uses UDP (Not TCP)

UDP is fast and lightweight, and it is connectionless. No handshake, no retransmission, no congestion window. Packets are just sent. The receiver either gets them or doesn’t. So it has Low overhead, and latency.

Perfect for real-time media like: Live video (SMPTE 2110, SRT, RTP), voice (VoIP), games or live telemetry. TCP tries too hard to be “perfect,” as it guarantees reliability and order. Lost packets are retransmitted. Packets are delivered in order. TCP uses a congestion window that throttles speed when loss occurs.


That’s great for files and web pages, but a disaster for live streams. Retransmitting a lost video frame after 300 ms is pointless, the event has already moved on. When TCP detects loss, it slows down, causing freezes or buffering. The result: jerky playback, increased latency, buffering “spikes.” UDP simply discards lost packets and moves on, so your stream stays smooth even if you lose some packets.

UDP lets the application manage timing. Video applications (e.g., RTP or MPEG-TS over UDP) add their own timing logic:

  1. Timestamps in RTP or PCRs in MPEG-TS maintain playback order.
  2. FEC (Forward Error Correction) or redundant paths (SMPTE 2022-7) handle loss proactively.
  3. Jitter buffers absorb small variations in packet arrival.

This gives designers control over latency and quality, instead of TCP’s “one-size-fits-all” recovery. Multicast (one sender/many receivers) is only supported with UDP. TCP is strictly one-to-one (unicast).

Broadcasters can use IGMP joins to deliver the same live feed efficiently to hundreds of endpoints. Example: 239.1.1.1:5000 - one UDP stream received by multiple decoders.




UDP vs TCP

Feature UDP TCP
Connection Connectionless Connection-oriented
Reliability None – best effort Guaranteed – retransmits lost packets
Ordering None Ensures correct order
Overhead Very low (8-byte header) Higher (20–60 byte header, handshake, ACKs)
Latency Very low Variable / higher
Multicast Support Yes No
Use Case Live video/voice, gaming, real-time telemetry File transfer, web, email, data sync
Reaction to Packet Loss Ignores, continues Retransmits, slows down
Error Recovery Handled by application (e.g., FEC) Built into the protocol
Example Protocols RTP, MPEG-TS, ST 2110, SRT, RIST HTTP, FTP, SSH, Telnet

UDP trades reliability for timeliness.
TCP trades timeliness for reliability.

For live video, timeliness wins — you’d rather drop a few packets than freeze the screen waiting for them.

UPDATED
2/21/26
V260221-1.0