← projects.5uf.de

📉 Packet Loss Simulator

Generate a packet trace under a chosen loss model, from 0 % to 100 %, and see what the loss actually looks like on the wire — then hear the same trace chop up real audio. Two links can drop the same fraction of packets and behave completely differently, which is the point of the burst models, and it is far more obvious through a speaker than in a statistic.

Model

%

Measured loss
Loss bursts
Mean burst
consecutive packets
Longest burst
Mean good run
packets between bursts

Packet timeline

delivered lost

Hear it

A test signal — a synthetic tone, or a real spoken sentence — is cut into packets of the size below and pushed through this exact trace: the same seed, the same drops you see in the strip above. What comes out is what the far end would hear.

delivered audio gap — concealed headphones + a low volume; square and saw are harsh
0:00.0 / 0:00.0

Why 10 % here sounds milder than the 10 % in the textbook

The trace is exact. At 10 % random with 20 ms packets, a 24 s clip loses about 120 packets — one dropout every ~200 ms, mean burst 1.1, and just under 11 % of the signal's total energy. Nothing is being softened.

What differs from a real call is the codec, not the loss. This page drops uncompressed PCM, which is the G.711 case: frames are independent, so a lost packet costs its own 20 ms and nothing more. The ITU-T E-model puts numbers on exactly that split. Using the packet-loss robustness factor Bpl from Appendix I/G.113 in Ie_eff = Ie + (95 − Ie)·Ppl / (Ppl/BurstR + Bpl), 10 % random loss gives Ie_eff ≈ 66MOS ≈ 1.5 with no concealment (Bpl 4.3 — the Hard mute button), but Ie_eff ≈ 27MOS ≈ 3.4 once concealment is on (Bpl 25.1 — Pitch repeat). "Poor, but still usable" is the right answer for 10 % random loss on G.711 with PLC.

So switch the codec. The Codec control runs the audio through a real encoder and a real decoder — libopus, bcg729, vo-amrwbenc and opencore-amrwb, compiled to WebAssembly — and withholds the erased frames from the decoder exactly as a lost RTP packet would. Nothing is approximated: what you hear is that codec's own concealment, and its own error propagation. Measured here from a single erased frame, as residual error against the loss-free decode of the same file: G.711 damages only the frame it lost; G.729 stays wrong for about 80 ms after a 10 ms loss; AMR-WB about 60 ms after a 20 ms loss; Opus about 140 ms. At 10 % that is most of the signal touched by damage, not 10 % of it — which is the missing factor between this page and the figure you remember.

Two things still are not modelled. A reported loss figure usually folds in packets that arrived too late and were discarded by the jitter buffer, which is time-warping the audio on top of the holes. And real loss is bursty: switch the model above to Burst or Gilbert–Elliott at the same 10 % and listen again — BurstR above 1 pushes Ie_eff up, and a 160 ms hole takes a whole syllable rather than clipping a phoneme. G.729 on a bursty 10 % is the link the "10 % is unlistenable" figure came from.

Burst length distribution

How many consecutive packets each loss burst swallowed. A pure random link is nearly all 1s; a bursty link grows a tail.

Cumulative loss rate

Running loss percentage as packets arrive, against the configured rate (dashed). Bursty models wander far from target for a long time.

Reproduce this on a real link