Skip to content

Support simulcast for svc codecs (vp9/av1) - #2083

Open
cnderrauber wants to merge 6 commits into
mainfrom
svc_simulcast
Open

Support simulcast for svc codecs (vp9/av1)#2083
cnderrauber wants to merge 6 commits into
mainfrom
svc_simulcast

Conversation

@cnderrauber

@cnderrauber cnderrauber commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Conditions to enable:

  1. The server supports it (version > 1.13.6).
  2. ScalabilityMode: L1tx and simulcast: True
  3. Chrome only, version >= M113

@changeset-bot

changeset-bot Bot commented Sep 3, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: b9a7d3f

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

This PR includes changesets to release 1 package
Name Type
livekit-client Patch

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

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size
dist/livekit-client.esm.mjs 111.06 KB (+0.16% 🔺)
dist/livekit-client.umd.js 120.25 KB (+0.17% 🔺)

devin-ai-integration[bot]

This comment was marked as resolved.

@1egoman 1egoman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

High level makes sense to me, but I'm probably not the best person to give a lower level review and defer to @xianshijing-lk or @lukasIO

Comment on lines +248 to +252
private getServerVersion(): string | undefined {
const joinResponse = this.engine?.latestJoinResponse;
return joinResponse?.serverInfo?.version || joinResponse?.serverVersion || undefined;
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nitpick: with the introduction of this, could you also update

() => this.engine.latestJoinResponse?.serverInfo?.version,
to use this method? I think that's the only other place in the sdk where there's an explicit SFU version check currently that I know about.

Comment thread src/room/utils.ts
Comment on lines +188 to +197
/**
* VP9 and AV1 are published as SVC (a single RTP stream carrying every spatial layer)
* by default. They can instead be published as real, rid based simulcast — one
* independent stream per rid, each carrying a single spatial layer — when the caller
* opts in with `simulcast: true` and a single spatial layer scalability mode (`L1Tx`).
*
* The SFU has to be told about this: without an explicit
* `SimulcastCodec.videoLayerMode` it assumes `MULTIPLE_SPATIAL_LAYERS_PER_STREAM` for
* any SVC capable codec.
*/

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

suggestion: It might be worth adding some of this context to a user facing docstring in RoomConnectOptions (and eventually docs.livekit.io). As is I don't think it is very discoverable.

Also maybe worth considering as well - some sort of debug log that prints when isSVCSimulcast(...) is true in the connection path, to be able to confirm it is enabled properly.

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.

3 participants