RTP Troubleshooting

Common RTP streaming problems and how to identify them with JitterTrap. Each section describes what to look for in the video/audio metrics and how to diagnose the root cause.

Contents


Packet Loss

Symptoms: Video artifacts (macroblocking, green/purple patches), audio clicks or dropouts. Stream may freeze briefly then recover.

What It Looks Like in JitterTrap

In the Video/Audio metrics (expand flow in Top Talkers):

  • Seq Loss counter increases
  • Loss may be steady (random) or bursty (congestion)

In the Packet Gap chart:

  • Gaps larger than expected frame interval
  • Bursty loss shows as clusters of large gaps

In the Top Talkers chart:

  • Throughput dips correlating with loss events

How to Diagnose

  1. Expand the video flow in Top Talkers to see Seq Loss
  2. Note if loss is steady (random, possibly link quality) or bursty (congestion)
  3. Check if loss correlates with throughput peaks from other flows
  4. Set a trap on packet gap to capture the loss event
  5. Analyze pcap in Wireshark to find where loss occurs

Causes:

  • Network congestion (queue overflow)
  • Wireless interference or poor signal
  • Switch/router buffer exhaustion
  • QoS misconfiguration (video not prioritized)
  • MTU issues causing fragmentation and loss

Solutions:

  • Enable QoS marking (DSCP) and ensure network honors it
  • Reduce bitrate to stay within available bandwidth
  • Use FEC (Forward Error Correction) if encoder supports it
  • Check for duplex mismatches or cable issues
  • Increase encoder keyframe frequency for faster recovery

References: RFC 3550 §6.4.1 (Sequence Number), RFC 5109 (RTP FEC)

High Jitter

Symptoms: Video stutters or freezes despite no packet loss. Audio may have periodic glitches. Playback is choppy even though data is arriving.

What It Looks Like in JitterTrap

In the Video/Audio metrics:

  • Jitter value elevated (>10ms for video, >20ms for audio is concerning)
  • Jitter fluctuates rather than being stable

In the Packet Gap chart:

  • Wide min/max spread (pink shading) around the mean
  • Irregular spacing rather than consistent intervals

How to Diagnose

  1. Check the Jitter metric in the expanded flow details
  2. Compare to expected packet interval (e.g., 33ms for 30fps video)
  3. Look for correlation with other traffic (competing flows causing queuing)
  4. Check if jitter is consistent or varies with time of day
  5. Use impairments to test receiver's jitter buffer tolerance

Causes:

  • Network queuing delays (bufferbloat)
  • Competing traffic causing variable delays
  • Wireless contention or retransmissions
  • Long network paths with variable routing
  • Encoder not pacing output smoothly

Solutions:

  • Increase receiver jitter buffer size (trades latency for smoothness)
  • Enable QoS to prioritize RTP traffic
  • Reduce network hops if possible
  • Check encoder settings for smooth output pacing
  • Use traffic shaping to smooth bursts

References: RFC 3550 §6.4.1 (Jitter Calculation), RFC 4585 (Extended RTP Profile)

Keyframe Starvation

Symptoms: Stream takes long time to start playing. After glitches, recovery takes several seconds. "Waiting for keyframe" message persists.

What It Looks Like in JitterTrap

In the Video metrics:

  • GOP value is high (>60 means >2 seconds between keyframes at 30fps)
  • Keyframes counter increments slowly
  • Video playback shows black screen waiting for keyframe

How to Diagnose

  1. Check the GOP metric in expanded flow details
  2. Calculate keyframe interval: GOP ÷ FPS = seconds between keyframes
  3. If GOP is 300 at 30fps, keyframes arrive only every 10 seconds
  4. For low-latency applications, GOP should be 15-60 (0.5-2 seconds)

Causes:

  • Encoder configured for bandwidth efficiency over latency
  • Broadcast-style encoding (long GOP for compression)
  • CDN or transcoder settings optimized for storage

Solutions:

  • Reduce GOP size in encoder settings (increases bitrate)
  • Request IDR frame via RTCP (if encoder supports it)
  • For live/interactive use, set GOP to 1-2 seconds maximum
  • Consider SVC (Scalable Video Coding) for adaptive streaming

References: RFC 6184 (H.264 RTP Payload), RFC 7798 (H.265 RTP Payload)

Bitrate Spikes

Symptoms: Periodic packet loss correlating with scene changes. Quality degrades when there's motion. Stream works fine on static scenes but fails on action.

What It Looks Like in JitterTrap

In the Video metrics:

  • Bitrate fluctuates significantly (e.g., 2-10 Mbps range)
  • Spikes correlate with scene complexity or motion

In the Top Talkers chart:

  • Video flow throughput shows large peaks
  • Peaks may exceed link capacity causing loss

In the Packet Gap chart:

  • Bursts of packets (small gaps) followed by larger gaps
  • Pattern correlates with video content

How to Diagnose

  1. Watch Bitrate metric while stream shows varying content
  2. Note the peak-to-average ratio (2:1 is normal, 5:1+ is concerning)
  3. Compare peak bitrate to available network bandwidth
  4. Check if Seq Loss increases during bitrate peaks
  5. Use impairments to test how receiver handles burst loss

Causes:

  • VBR (Variable Bitrate) encoding with high peaks
  • Scene changes triggering keyframes
  • High-motion content exceeding encoder's rate control
  • No traffic shaping smoothing bursts

Solutions:

  • Use CBR (Constant Bitrate) or capped VBR encoding
  • Enable VBV (Video Buffering Verifier) in encoder
  • Add network-level traffic shaping
  • Increase encoder buffer size for smoother output
  • Ensure adequate headroom in network capacity

References: RFC 6190 (RTP Payload for Scalable Video)

Decoder Stalls

Symptoms: Video freezes, then jumps forward (frames skipped). Audio may continue while video is frozen. Playback catches up in bursts.

What It Looks Like in JitterTrap

In the Video metrics:

  • Jitter elevated (jitter buffer can't compensate)
  • Seq Loss may or may not be present

In the Packet Gap chart:

  • Gaps exceeding the jitter buffer depth
  • Packets arriving too late for playout deadline

How to Diagnose

  1. Calculate if jitter exceeds receiver's buffer capacity
  2. Typical jitter buffers: 50-200ms for video, 20-80ms for audio
  3. If max jitter > buffer size, underruns will occur
  4. Check if stalls correlate with network congestion events
  5. Compare jitter to configured buffer size on receiver

Causes:

  • Jitter buffer too small for network conditions
  • Network jitter exceeds receiver's tolerance
  • Receiver not using adaptive jitter buffer
  • Contention from other applications on receiver

Solutions:

  • Increase jitter buffer size (adds latency)
  • Enable adaptive jitter buffer if available
  • Improve network to reduce jitter at source
  • Use NACK-based retransmission for missing packets
  • Consider lower latency codec with better loss resilience

References: RFC 4585 (NACK), RFC 5104 (Codec Control Messages)

Visual Artifacts

Symptoms: Green or purple blocks in video. Macroblocking (blocky regions). Image "smearing" or persistence of old content. Partial frame corruption.

What It Looks Like in JitterTrap

In the Video metrics:

  • Seq Loss indicates packets were lost
  • Loss occurred after a keyframe (corrupted reference)

In the Packet Gap chart:

  • Loss event visible as gap in expected packet stream
  • Artifacts persist until next keyframe

How to Diagnose

  1. Note when artifacts appear and how long they persist
  2. Artifact duration ≈ time until next keyframe (GOP interval)
  3. Check Seq Loss—even 1-2 lost packets can corrupt frames
  4. Determine if loss is in I-frame (keyframe) or P/B-frames
  5. I-frame loss: artifacts persist until next I-frame
  6. P-frame loss: artifacts may be shorter-lived

Causes:

  • Packet loss corrupting reference frames
  • Decoder not requesting retransmission or IDR
  • Encoder not responding to PLI (Picture Loss Indication)
  • Network path has persistent low-level loss

Solutions:

  • Enable PLI/FIR support in encoder (request new keyframe on loss)
  • Use FEC to recover from minor loss
  • Reduce GOP so recovery is faster
  • Improve network to eliminate loss
  • Consider more loss-resilient codec (AV1, VP9)

References: RFC 4585 (PLI/FIR), RFC 5104 (FIR)

Audio Glitches

Symptoms: Clicks, pops, or brief silence in audio. Words cut off or repeated. Robotic or garbled sound. Audio ahead of or behind video.

What It Looks Like in JitterTrap

In the Audio metrics:

  • Seq Loss shows lost audio packets
  • Jitter elevated (>20-30ms is problematic for audio)

Note: Audio is more sensitive to loss and jitter than video because:

  • No temporal compression to hide single-packet loss
  • Human ear detects gaps as short as 5-10ms
  • No reference frame recovery—loss is immediately audible

How to Diagnose

  1. Check Seq Loss and Jitter for audio SSRC (separate from video)
  2. Even 0.1% loss can be audible as clicks
  3. Jitter >30ms typically causes audible artifacts
  4. Check if audio and video SSRCs have similar or different loss patterns
  5. Similar patterns = network issue; different = encoder/path issue

Causes:

  • Same as video: congestion, jitter, packet loss
  • Audio often lower priority than video in QoS
  • Small packets more vulnerable to loss
  • Codec-specific sensitivity (G.711 vs Opus)

Solutions:

  • Ensure audio has equal or higher QoS priority than video
  • Use robust codec (Opus handles loss better than G.711)
  • Enable redundancy (RFC 2198) for critical audio
  • Increase audio jitter buffer
  • For conferencing, use WebRTC's built-in loss concealment

References: RFC 3551 (RTP Audio/Video Profile), RFC 2198 (RTP Redundancy)

Stream Detection Issues

Symptoms: JitterTrap shows flow but no video/audio icon. Metrics show "-" instead of values. "Codec not supported" or no Play button.

What It Looks Like in JitterTrap

In Top Talkers:

  • Flow appears but no ▶ or ♪ icon
  • Or icon appears but metrics show "-"

In Video metrics (if visible):

  • Resolution, Profile, Codec may show "-"
  • FPS and Bitrate may still populate

How to Diagnose

  1. Check if flow is RTP (UDP, typically even-numbered port)
  2. Verify codec is supported (H.264 widely supported, H.265 limited)
  3. Wait for keyframe—SPS/PPS needed to identify codec parameters
  4. Check if RTSP signaling was captured (provides SDP with codec info)
  5. Dynamic payload types (96-127) require SDP to identify codec

Causes:

  • Stream started before JitterTrap—missed SPS/PPS
  • Dynamic payload type without RTSP/SDP capture
  • Unsupported codec (H.265 browser support limited)
  • Encrypted stream (SRTP) can't be parsed
  • Non-RTP protocol on UDP (proprietary streaming)

Solutions:

  • Restart the stream so JitterTrap captures from beginning
  • Ensure RTSP signaling goes through same interface
  • Check encoder is using supported codec (H.264 most compatible)
  • For encrypted streams, JitterTrap can only show transport metrics
  • Verify it's actually RTP, not a proprietary protocol

References: RFC 3550 (RTP), RFC 3551 (Payload Types), RFC 2326 (RTSP 1.0)

General Diagnostic Workflow

For any RTP streaming issue:

  1. Identify the flow — Find the video/audio stream in Top Talkers by IP/port or SSRC.

  2. Check transport first — Before looking at codec issues, verify packets are arriving:

    • Seq Loss = 0? Good, packets are arriving
    • High Seq Loss? Focus on network, not codec
  3. Assess jitter — Compare jitter to application requirements:

    • <500μs: Excellent (broadcast quality)
    • 500μs-2ms: Good (professional AV)
    • 2-10ms: Fair (may need larger buffer)
    • 10ms: Poor (likely causing artifacts)

  4. Check timing — Look at Packet Gap chart:

    • Consistent intervals = healthy stream
    • Variable intervals = jitter or encoder issues
    • Large gaps = loss or encoder stalls
  5. Examine codec metrics — For video issues:

    • GOP: How long until recovery after loss?
    • Keyframes: Are they arriving regularly?
    • Bitrate: Stable or spiking?
  6. Correlate with network — Compare video metrics to overall network:

    • Does loss correlate with competing traffic?
    • Does jitter increase under load?
    • Is this flow or the network the problem?
  7. Capture for analysis — Set traps to capture when:

    • Seq Loss increases
    • Jitter exceeds threshold
    • Packet gap exceeds frame interval

    Analyze pcap in Wireshark with RTP analysis tools.

References

Key RFCs

RFCTitle
RFC 3550RTP: Real-time Transport Protocol
RFC 3551RTP Profile for Audio and Video
RFC 3711SRTP: Secure RTP
RFC 4585Extended RTP Profile (NACK, PLI)
RFC 5104Codec Control Messages (FIR)
RFC 6184RTP Payload for H.264
RFC 7826RTSP 2.0