fix: Disable FEC and RTX in WHEP output to prevent bandwidth doubling - #216
Merged
Conversation
webrtcsink enables FEC (Forward Error Correction) and RTX (retransmission) by default, which can nearly double bandwidth usage for high-bitrate streams. For a 10 Mbit/s pre-encoded H.264 stream: - Before fix: ~21 Mbit/s transmitted (FEC + RTX overhead) - After fix: ~11 Mbit/s transmitted (expected with RTP overhead) Also includes defensive deduplication of codec caps when relaxing profile matching to prevent potential duplicate stream issues. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
birme
pushed a commit
to eyevinn-osaas/strom
that referenced
this pull request
Feb 2, 2026
…Eyevinn#216) webrtcsink enables FEC (Forward Error Correction) and RTX (retransmission) by default, which can nearly double bandwidth usage for high-bitrate streams. For a 10 Mbit/s pre-encoded H.264 stream: - Before fix: ~21 Mbit/s transmitted (FEC + RTX overhead) - After fix: ~11 Mbit/s transmitted (expected with RTP overhead) Also includes defensive deduplication of codec caps when relaxing profile matching to prevent potential duplicate stream issues. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Per Enstedt <per.enstedt@svt.se> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
srperens
added a commit
that referenced
this pull request
Jun 5, 2026
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 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
Problem
For a 10 Mbit/s pre-encoded H.264 stream sent via WHEP:
Changes
do-fec=falseanddo-retransmission=falseon whepserversinkTest plan
🤖 Generated with Claude Code