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

how to specify L3T3? #61

Closed
fippo opened this issue Jan 10, 2022 · 6 comments
Closed

how to specify L3T3? #61

fippo opened this issue Jan 10, 2022 · 6 comments
Labels
question Further information is requested

Comments

@fippo
Copy link
Contributor

fippo commented Jan 10, 2022

pc.addTransceiver(stream.getVideoTracks()[0], {
  direction: 'sendonly',
  sendEncodings: [
    {rid: 'q', scaleResolutionDownBy: 4.0, scalabilityMode: 'L3T3'}
    {rid: 'h', scaleResolutionDownBy: 2.0, scalabilityMode: 'L3T3'},
    {rid: 'f', scalabilityMode: 'L3T3'},
  ]    
});

seems like an odd way to do it since each spatial layer is defined by a separate sendencoding.
One can not specify a single encoding either

pc.addTransceiver(stream.getVideoTracks()[0], {
  direction: 'sendonly',
  sendEncodings: [
    {scalabilityMode: 'L3T3'}  ]    
});

since that looses the ability to control the downscaling factor (which might be tolerable) and the rid.

@murillo128
Copy link

In webrtc svc we only support SRST https://www.w3.org/TR/webrtc-svc/#dfn-srst so the second snipped is the correct one. There should be no need to specify the rid at all (as we don't support MRST). Regarding controlling the downscale factor, I am not sure if it is supported by all of the codecs, or if they are fixed values in the codec spec.

The first code snippet would set up 3 simulcast layers, each one with L3T3, which is something allowed by the spec IIRC:

When sendEncodings is used to request the sending of multiple simulcast streams using addTransceiver(), it is not possible to configure the sending of "S" scalability modes. The browser may only be configured to send simulcast encodings with multiple SSRCs and RIDs, or alternatively, to send all simulcast encodings on a single RTP stream. Attempting to simultaneously utilize both simulcast transport techniques MUST return OperationError in setParameters() or addTransceiver().

But not sure if we should only allow using temporal scalability modes when simulcast is used. For example:

To set up 3 simulcast layers with 3 temporal layers each, the code should be:

pc.addTransceiver(stream.getVideoTracks()[0], {
  direction: 'sendonly',
  sendEncodings: [
    {rid: 'q', scaleResolutionDownBy: 4.0, scalabilityMode: 'L1T3'}
    {rid: 'h', scaleResolutionDownBy: 2.0, scalabilityMode: 'L1T3'},
    {rid: 'f', scalabilityMode: 'L1T3'},
  ]    
});

@Orphis
Copy link
Contributor

Orphis commented Jan 10, 2022

The API as it is doesn't allow you to configure the scaling factor between spatial layers besides picking a supported mode that has a 2x or 1.5x factor (h modes).

@aboba aboba added the question Further information is requested label Jan 12, 2022
@aboba
Copy link
Contributor

aboba commented Jan 12, 2022

As @murillo128 says, sending 3 spatial and 3 temporal layers (L3T3) wouldn't require a RID header extension since the layered bitstream would be sent on a single SSRC. As @Orphis notes it is limited to a 2x or 1.5x scale factor.

@fippo
Copy link
Contributor Author

fippo commented Jan 13, 2022

There should be no need to specify the rid at all

oh true, its a single RTP session!

It might be worth to split examples 2 + 3 into their own subsections.

@aboba
Copy link
Contributor

aboba commented Aug 11, 2022

I have split examples 2 and 3.

@aboba
Copy link
Contributor

aboba commented Aug 25, 2022

I am going to close this issue. If that is no right, please reopen.

@aboba aboba closed this as completed Aug 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants