w3c / webrtc-svc

W3C Scalable Video Coding (SVC) Extension for WebRTC
https://w3c.github.io/webrtc-svc/
Other
39 stars 14 forks source link

What should the scalability mode be when no scalability mode is specified? #58

Closed alvestrand closed 2 years ago

alvestrand commented 2 years ago

Consider the following code snippet:

  const pc = new RTCPeerConnection();
  t.add_cleanup(() => pc.close());
  const { sender } = pc.addTransceiver('video', {
    sendEncodings: [{}],
  });
  const param = sender.getParameters();
  const encoding = getFirstEncoding(param);

What should the value of "encoding.scalabilityMode" be?

Three alternatives:

At the moment the Chrome implementation chooses alternative 3.

aboba commented 2 years ago

I would say 'the default scalability mode'. This might be 'L1T1' for some codecs, but not for VP8.

Orphis commented 2 years ago

I don't think we should have an empty string there as it's not a valid scalabilityMode and we shouldn't special case it. Missing (undefined) is probably a better choice. As for what it does, I believe it should be up to the user agent to chose a sensible default.

We don't want to have to update all the existing applications so that they do not fallback to L1T1, nor do we want to have all the users understand all the pros and cons of having temporal layers and have to specify it from now on for all the browsers implementing the SVC spec. Experts probably won't care too much about the default value and supply their own default anyway.

alvestrand commented 2 years ago

I think we need to have the resulting scalability mode be implementation dependent, but there should be one that can be read out by getParameters.

Orphis commented 2 years ago

We probably want to specify that while it is implementation dependent, user agents may only chose to add temporal layers, no spatial layers. So pick any from available L1T* modes.

aboba commented 2 years ago

How about making the proposal for this Issue similar to that proposed for Issue 59?

jan-ivar commented 2 years ago

Leaning toward choice 1.

alvestrand commented 2 years ago

Seems to me right to align with #59 - which is option 1 in the options list, so agreeing with Jan-Ivar.

aboba commented 2 years ago

Closed after merger of PR 64.