Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scalable Video Codec include an SVC support check #1597

Open
4 tasks done
opusonline opened this issue Mar 13, 2023 · 1 comment
Open
4 tasks done

Scalable Video Codec include an SVC support check #1597

opusonline opened this issue Mar 13, 2023 · 1 comment
Assignees

Comments

@opusonline
Copy link

opusonline commented Mar 13, 2023

Please read first!

Please use discuss-webrtc for general technical discussions and questions.
If you have found an issue/bug with the native libwebrtc SDK or a browser's behaviour around WebRTC please create an issue in the relevant bug tracker. You can find more information on how to submit a bug and do so in the right place here

  • I understand that issues created here are only relevant to the samples in this repo - not browser or SDK bugs
  • I have provided steps to reproduce
  • I have provided browser name and version
  • I have provided a link to the sample here or a modified version thereof

Note: If the checkboxes above are not checked (which you do after the issue is posted), the issue will be closed.

Browser affected

Browser name including version (e.g. Chrome 64.0.3282.119)
Google Chrome 110.0.5481.77

Description

Add a check if SVC is supported in the current browser to the SVC sample, since even Chrome >= 101 will report supported: true in MediaCapabilities.encodingInfo() with scalabilityMode. But SVC is only supported in Chrome >= 111 (see https://chromestatus.com/feature/5769626174619648).

The only way I could find to check this, is something like:

() => {
  let supported = false;
  try {
      const pc = new RTCPeerConnection();
      const scalabilityMode = 'L2T2';
      const transceiver = pc.addTransceiver('video', { sendEncodings: [{ scalabilityMode }] });
      const parameters = transceiver.sender.getParameters();
      const [encoding] = parameters.encodings || [];
      supported = Boolean(encoding && encoding.scalabilityMode === scalabilityMode);
  } catch (error) {
      console.error(error);
  }
  return supported;
};

Steps to reproduce

Open the SVC sample https://webrtc.github.io/samples/src/content/extensions/svc/ in a Chrome browser >=101 and < 111. Click the "Start button", allow camera access, select "video/VP8" as Codec preferences.

Expected results

Since SVC is not supported in Chrome < 111, the list of scalability modes should be empty.

Actual results

The list of scalability modes include L1T1, L1T2, and L1T3.

@Orphis
Copy link
Member

Orphis commented Mar 14, 2023

This is a browser bug where the MediaCapabilities would report that the encoders are technically able to do SVC but the WebRTC encoders are not able to be configured for SVC.

It is also an issue for browsers implementing the Media Capabilities API partially and don't read the scalabilityMode query, but would still answer "supported: true", which could possibly be avoided by making sure the "question" could be integrated in the response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants