Skip to content

fix(webrtc): give weak links room to back off instead of wedging - #168

Open
gwdp wants to merge 1 commit into
gwdp/h264-encode-level-capfrom
gwdp/webrtc-weak-link-tuning
Open

gwdp wants to merge 1 commit into
gwdp/h264-encode-level-capfrom
gwdp/webrtc-weak-link-tuning

Conversation

@gwdp

@gwdp gwdp commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

Why

minBitrateBps was 90% of the target, so bandwidth estimation had nowhere to back off to on a path slower than the target. The encoder kept overshooting and the stream wedged.

maintainFramerate holds frame rate by dropping resolution. A 1206-wide surface holds 60fps at 300x654, where UI text is unreadable.

How

  • Floor the minimum at max(300 kbps, target / 10), never above the target
  • degradationPreference to balanced

Test Plan

  • CI
  • Shaped link with dnctl: loss 58% -> 1.5%, rtt 420ms -> 125ms
  • Five concurrent viewers on an EAS worker: traded between full resolution at 30fps and 1748 at 58fps instead of collapsing resolution
  • All live testing ran against a build of the stack tip (feat(webrtc): raise the offer's H.264 level to keep native resolution #171), which carries all five PRs, not this branch alone

@gwdp gwdp changed the title fix(webrtc): let weak links converge without shrinking the picture fix(webrtc): give weak links room to back off instead of wedging Sep 17, 2026
@gwdp gwdp self-assigned this Sep 17, 2026
@gwdp gwdp changed the title fix(webrtc): give weak links room to back off instead of wedging fix(webrtc): give weak links room to back off instead of wedging (ENG-26485) Sep 17, 2026
@linear-code

linear-code Bot commented Sep 17, 2026

Copy link
Copy Markdown

ENG-26485

@gwdp
gwdp requested a review from szdziedzic September 17, 2026 18:21
@gwdp
gwdp marked this pull request as ready for review September 17, 2026 18:21
@gwdp gwdp removed their assignment Sep 17, 2026
@gwdp gwdp changed the title fix(webrtc): give weak links room to back off instead of wedging (ENG-26485) fix(webrtc): give weak links room to back off instead of wedging Sep 17, 2026
@gwdp
gwdp force-pushed the gwdp/webrtc-weak-link-tuning branch from 13da9c6 to b45a5ea Compare September 18, 2026 00:17
@gwdp
gwdp force-pushed the gwdp/h264-encode-level-cap branch 2 times, most recently from f137306 to f74215f Compare September 21, 2026 18:04
@gwdp
gwdp force-pushed the gwdp/webrtc-weak-link-tuning branch from b45a5ea to a12d107 Compare September 21, 2026 18:04
@gwdp
gwdp force-pushed the gwdp/h264-encode-level-cap branch from f74215f to 9af9441 Compare September 21, 2026 21:56
@gwdp
gwdp force-pushed the gwdp/webrtc-weak-link-tuning branch from a12d107 to 09355e8 Compare September 21, 2026 21:56
@gwdp
gwdp force-pushed the gwdp/h264-encode-level-cap branch from 9af9441 to 4b43e82 Compare September 22, 2026 00:16
@gwdp
gwdp force-pushed the gwdp/webrtc-weak-link-tuning branch from 09355e8 to 70fe822 Compare September 22, 2026 00:16
@gwdp
gwdp force-pushed the gwdp/webrtc-weak-link-tuning branch from 70fe822 to b17a8a5 Compare September 22, 2026 01:03
@gwdp
gwdp force-pushed the gwdp/h264-encode-level-cap branch from 4b43e82 to 97b2c20 Compare September 22, 2026 01:03

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant