Skip to content

Add v2 auto-egress config and egress request builders - #2018

Open
frostbyte73 wants to merge 4 commits into
mainfrom
auto-egress-v2
Open

frostbyte73 wants to merge 4 commits into
mainfrom
auto-egress-v2

Conversation

@frostbyte73

Copy link
Copy Markdown
Member

RoomEgress and RoomInternal can now carry v2-shaped auto-egress config
whose participant and track configs take the same encoding, outputs,
storage and webhooks as a normal egress request, and egress.Auto*Request
build egress requests from either v1 or v2 config so livekit and cloud
share one translation.

RoomEgress and RoomInternal can now carry v2-shaped auto-egress config
whose participant and track configs take the same encoding, outputs,
storage and webhooks as a normal egress request, and egress.Auto*Request
build egress requests from either v1 or v2 config so livekit and cloud
share one translation.
@frostbyte73
frostbyte73 requested a review from a team November 24, 2026 18:22
@changeset-bot

changeset-bot Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 97b9156

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

This PR includes changesets to release 2 packages
Name Type
@livekit/protocol Patch
github.com/livekit/protocol 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 Bot and others added 2 commits November 24, 2026 18:23
# Conflicts:
#	livekit/livekit_egress.pb.go
#	livekit/livekit_egress.twirp.go
#	livekit/livekit_internal.pb.go
Comment thread egress/auto.go
return req
}

if v1 := internal.GetParticipantEgress(); v1 != nil {

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.

Does AutoParticipantRequest mean to change file naming for v1 participant configs?

Once v1 AutoParticipantEgress becomes a Media source with ParticipantVideo, egress only sets the identity and {publisher_identity} for RequestTypeParticipant (SDKSource.joinRoom). If I'm reading it right:

  • rec/{publisher_identity}-{time}.mp4 would no longer be replaced, so the path keeps the literal {publisher_identity}
  • an empty filepath would name the file <room_name>-<time> instead of <identity>-<time>. Would two participants who start publishing in the same second overwrite each other?

I reproduced the first one with an egress integration case: a Media ParticipantVideo request with {publisher_identity} in the filename fails verifyFile.

Should egress set the identity for Media ParticipantVideo before callers switch, or should v1 participant config stay on StartEgressRequest_Participant?

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.

Thanks, v1 looks good now. One follow-up for the v2 configs, since they still go through Media:

  • participant_egress: {publisher_identity} isn't replaced for Media ParticipantVideo, and an empty filepath names the file <room_name>-<time>
  • track_egress: with encoding unset (default transcode), {track_id} is only replaced for passthrough, so the file is also <room_name>-<time>. v1 avoids this via trackFilepath

So with default settings, participants or tracks that start in the same second would write to the same path. Should egress set the identity / track ID templates for these Media requests, or should the builders put the identity / track ID into the v2 output paths?

🤖 Generated with Claude Code

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Egress should set them

Comment thread egress/auto.go Resolved
Comment thread egress/auto.go Resolved
Comment thread egress/auto.go Resolved
Translating v1 room, participant and track configs into v2 requests changed file naming, usage classification and the webhook request shape for customers who never opted in. v1 config now builds its existing v1 request type and only v2 config builds a StartEgressRequest. capture_data is rejected unless the outputs are a single MCAP file, since egress only accepts data capture that way.
@frostbyte73

Copy link
Copy Markdown
Member Author

@milos-lk removed all the conversions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants