fix(whep): re-enable RTX retransmission, keep FEC disabled - #629
Merged
Conversation
PR #216 disabled both FEC and RTX to stop bandwidth doubling on high-bitrate pre-encoded streams. The doubling came from FEC's constant proactive redundancy — RTX was disabled alongside it without being the culprit. RTX is reactive: it costs nothing while no packets are lost and only resends the exact packets the client NACKs. Without RTX, client NACKs go unanswered, so every burst loss escalates to PLI -> forced keyframe, leaving the picture broken until the keyframe arrives (observed as fps drops from 50 to 3-9 in client stats). Field-verified on a lossy viewer path: with RTX enabled the client holds 44-50 fps through loss bursts and only ~1 in 5 bursts still escalates to PLI, at a retransmission cost proportional to actual loss (zero on clean paths). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This was referenced Jun 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Re-enables
do-retransmissiononwhepserversinkin the WHEP output block, while keepingdo-fecdisabled.Background
PR #216 disabled both FEC and RTX because a 10 Mbit/s stream transmitted ~21 Mbit/s. That doubling came from FEC, which sends proactive redundancy packets constantly regardless of loss. RTX was disabled in the same sweep without being the culprit — it is reactive and costs nothing while no packets are lost; it only resends the exact packets the client NACKs.
Problem
Without RTX, client NACKs go unanswered, so every burst loss escalates to PLI → forced keyframe, leaving the picture broken until the keyframe arrives. Diagnosed on a live viewer session (packet capture on the sender + client-side media stats):
nack_countrising uselessly andpli_countincrementing ~1:1 with burstsFix verification (live viewer on a lossy path)
Packet capture confirms the RTX stream (separate SSRC, paired payload type) is only active on the flow that actually experiences loss.
Note: RTX repairs loss; it does not create bandwidth. On paths in sustained capacity congestion the underlying fix is lower bitrate / VBV-capped frame sizes, which is follow-up work.
🤖 Generated with Claude Code