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

Add backup codec policy to AddTrackRequest #947

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

cnderrauber
Copy link
Contributor

The publisher can set codec policy for how to primary codec are not support by subscribers, the default policy is regression to backup codec and all subscribers will receive the backup codec, this will make a change to current behavior (simulcast-codecs), the client can set it to SIMULCAST explicitly to get the same behavior in new version.

@cnderrauber cnderrauber requested review from lukasIO and a team January 20, 2025 07:41
Copy link

changeset-bot bot commented Jan 20, 2025

🦋 Changeset detected

Latest commit: cdf824f

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

💥 An error occurred when fetching the changed packages and changesets in this PR
Some errors occurred when validating the changesets config:
The package or glob expression "github.com/livekit/protocol" specified in the `fixed` option does not match any package in the project. You may have misspelled the package name or provided an invalid glob expression. Note that glob expressions must be defined according to https://www.npmjs.com/package/micromatch.

// default behavior, regress to backup codec and all subscribers will receive the backup codec
REGRESSION = 0;
// encoding/send the primary and backup codec simultaneously
SIMULCAST = 1;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we keep the current behaviour as default? There are a few users probably used to this. Wondering if the default experience changes, if there are any ill effects.

Also, does the default behaviour change have impact on roll out? Would there be a flag to enable this?

Copy link
Contributor Author

@cnderrauber cnderrauber Jan 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We had discussed the behavior and thought the customer would prefer the codec regression as it is suitable for most device/network that cost more subscriber traffic but save publisher bandwidth/power. So the customer could get codec regression without explicitly setting after sfu is released. Change the default behavior will not break the function of existed applications but just cost more traffic/money, I think it is acceptable. cc @davidzhao @lukasIO

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would there be a flag to enable this?

Will have it to avoid break things.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We had discussed the behavior and thought the customer would prefer the codec regression as it is suitable for most device/network that cost more subscriber traffic but save publisher bandwidth/power. So the customer could get codec regression without explicitly setting after sfu is released. Change the default behavior will not break the function of existed applications but just cost more traffic/money, I think it is acceptable. cc @davidzhao @lukasIO

Got it. Yeah, that sounds good @cnderrauber . I was mainly thinking about behaviour change and if applications would be affected by the change, i. e. the receivers able to receive advanced codec would now have maybe a couple of things happen?

  • a brief disruption (am guessing this can be seamless with payload type switch, is that correct?)
  • more downstream bandwidth use

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed on codec regression being the default going forward though. I am convinced that is the right approach. Please ignore my original question on that.

I am just thinking about managing the transition phase.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a brief disruption (am guessing this can be seamless with payload type switch, is that correct?)

this would of course be interesting to know when deciding on whether or not to change the current behaviour

Copy link
Contributor

@lukasIO lukasIO Jan 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We had discussed the behavior and thought the customer would prefer the codec regression

I could imagine that especially some live streaming use cases would prefer SIMULCAST over REGRESSION.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could imagine that especially some live streaming use cases would prefer SIMULCAST over REGRESSION

yeah, we had focused on the livestreaming when implements the av1 support, that is why we have SIMULCAST first.

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

Successfully merging this pull request may close these issues.

4 participants