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

Encoding parameters for spatial layers #14

Open
Orphis opened this issue Jul 29, 2019 · 9 comments
Open

Encoding parameters for spatial layers #14

Orphis opened this issue Jul 29, 2019 · 9 comments
Labels

Comments

@Orphis
Copy link
Contributor

Orphis commented Jul 29, 2019

It would be interesting to be able to control the encoding parameters for the spatial layers in a similar way we can control simulcast layers. I was thinking of an array of spatial coding parameters nested in the RTCRtpEncodingParameters dictionnary, one entry per layer.

I believe we should be able to have parameters like maxBitrate, maxFramerate, scaleResolutionDownBy and the active flag.

  • Bitrate and framerate are quite self explanatory.
  • scaleResolutionDownBy should be decreasing for each spatial layer (aka layers have to be bigger). There will be some interaction with the same encoding parameter for simulcast to define.
  • active is a bit tricky when there are layer dependencies and should disable that layer and all layers having dependencies on disabled layers. This might not apply in "S" modes.
@aboba
Copy link
Contributor

aboba commented Jul 29, 2019

Related to Issues #3 and #4

@aboba
Copy link
Contributor

aboba commented Jul 29, 2019

@Orphis The ORTC API described dependencies between SVC layers via framerateScale, encodingId and dependencyEncodingIds . However I believe this had some limitations with respect to KEY and KEY_SHIFT modes.

Note that the AV1 Bitstream Specification supports both pre-canned Scalability Modes as well as custom Scalability Structures via the syntax in Section 5.8.6.

@Orphis
Copy link
Contributor Author

Orphis commented Aug 8, 2019

As per discussions we had, let's just try to keep the active boolean and maxBitrate values.
It could look like this:

let encodings = [{
    scalabilityMode = 'L3T3',
    spatialEncodings = [
        { active: true, maxBitrate: 100000 },
        { active: true, maxBitrate: 300000 },
        { active: true, maxBitrate: 600000 },
    ],
}];

@aboba
Copy link
Contributor

aboba commented Aug 8, 2019

The above proposal provides some additional flexibility with respect to spatial ratios as a side effect. For example:

// Provide a full resolution simulcast encoding as well as a quarter-size (thumbnail) encoding
let encodings = [{
    scalabilityMode = 'S3T1',
    spatialEncodings = [
        { active: true },
        { active: false },
        { active: true}
    ],
}];

@aboba
Copy link
Contributor

aboba commented Aug 8, 2019

Additional flexibility can also be provided by defining additional pre-canned modes. For example, popular 16 x 9 resolutions include:

  • 1080p (1920 x 1080)
  • 720p (1280 x 720)
  • 360p (640 x 360)

Since the spatial ratios vary between layers (1.5:1 as well as 2:1), this is not covered by existing modes. However, a new mode could be defined to cover this use case.

@vr000m
Copy link

vr000m commented Apr 5, 2022

Curious about the status of this issue, what do we need to do to move this forward?

@aboba
Copy link
Contributor

aboba commented Apr 5, 2022

We would need implementer interest to move forward.

@Orphis @HTA -- Is there continued interest in this?

@Orphis
Copy link
Contributor Author

Orphis commented Apr 5, 2022

@vr000m We need the rest of the SVC APIs implemented first to get some implementation experience.
We'll move forward with this then. We have certainly not forgotten about it.

@aboba
Copy link
Contributor

aboba commented Sep 7, 2022

Can we get a PR submitted for discussion at TPAC?

@aboba aboba mentioned this issue Oct 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants