Bug 261266

Summary: WebRTC maintain-framerate degradationPreference does not apply to resolution adaptation
Product: WebKit Reporter: coin_st
Component: WebRTCAssignee: youenn fablet <youennf>
Status: RESOLVED FIXED    
Severity: Normal CC: coin_st, kagh, karlcow, maojie0924, webkit-bug-importer, youennf
Priority: P2 Keywords: BrowserCompat, InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
See Also: https://bugs.webkit.org/show_bug.cgi?id=267577

Description coin_st 2023-09-07 02:32:56 PDT
By configuring video sender's degradationPreference as maintain-framerate according to standard (https://www.w3.org/TR/mst-content-hint/#degradation-preference-when-encoding), resolution adaptation is expected to be adaptive when certain limitation reasons are satisfied such as lack of compute resources or bandwidth. But safari does not work with this setting under any circumstance even at the beginning, sending resolution usually starts with lower dimensions then ramps up to the target resolution, chromium and firefox both work and we can observe this behavior under maintain-framerate.

We set degradationPreference by following code snippet:

  s = pc.getSenders()[1];
  p = s.getParameters();
  p.degradationPreference = "maintain-framerate";
  s.setParameters(p);

Chromium and firefox will have distinct resolution adaptation at beginning and you may check getStats() outbound qualityLimitationReason which should be "bandwidth" and slow resolution ramp up can be observed, but nothing would happen on safari, plus seems qualityLimitationReason is not supported by safari.
Comment 1 Radar WebKit Bug Importer 2023-09-14 02:33:13 PDT
<rdar://problem/115481961>
Comment 2 youenn fablet 2023-09-25 06:57:15 PDT
Pull request: https://github.com/WebKit/WebKit/pull/18155
Comment 3 EWS 2023-09-26 02:38:28 PDT
Committed 268443@main (8bfbdfcad876): <https://commits.webkit.org/268443@main>

Reviewed commits have been landed. Closing PR #18155 and removing active labels.
Comment 4 coin_st 2023-12-17 19:33:23 PST
(In reply to youenn fablet from comment #2)
> Pull request: https://github.com/WebKit/WebKit/pull/18155

Hi Youenn, do you know what target release that will have this fix?
Comment 5 youenn fablet 2024-01-16 04:59:15 PST
Follow-up fix needed at https://bugs.webkit.org/show_bug.cgi?id=267577.
Comment 6 Kaustav 2024-02-09 06:32:36 PST
@youenn we have tested from our end and it works now. Thanks