purple-autumn-79340
12/19/2025, 3:12 PMtall-airline-16756
12/19/2025, 3:13 PMtall-airline-16756
12/19/2025, 3:13 PMroom_name, layout, preset, file_outputs / segment_outputs / stream_outputs.
• Track Composite: room_name, audio_track_id, video_track_id, file_outputs.
• Participant: room_name, identity, screen_share, output arrays.
• Track: room_name, track_id, file (S3/GCP/Azure).
• Web: url, preset, outputs.
Start egress
• CLI example:
a. Create an egress JSON config (see fields above).
b. Run: lk egress start --type room-composite egress.json
• SDK / Twirp: call the corresponding Start*Egress RPC (StartRoomCompositeEgress, StartTrackEgress, etc.).
• Ensure the access token includes roomRecord permission.
Update an active egress
• Change layout (Room Composite):
◦ CLI: lk egress update-layout --id <egress_id> --layout speaker
◦ SDK/API: call UpdateLayout for the active egress.
• Modify streaming targets:
◦ Add/remove RTMP URLs with UpdateStream (CLI or API).
List active egresses
• CLI: lk egress list
• API: call ListEgress to get active jobs and their IDs/status.
Stop egress
• CLI: lk egress stop --id <egress_id>
• API: call StopEgress with the egress ID.
Auto-Egress (start recording when room is created)
• Include an egress block in CreateRoom specifying room/tracks outputs to automatically start recording on room creation.
Storage backends supported
• S3-compatible (S3, MinIO, R2), GCP, Azure Blob, AliOSS — include respective credentials in the output config.
Permissions & notes
• All egress operations require appropriate API credentials and an access token with roomRecord.
• You can use CLI, SDKs (Go/JS/Python), or Twirp HTTP API depending on your integration.
Would you like:
• A ready-to-use example JSON for a specific egress type (Room Composite → S3, RTMP stream, or HLS)?
• Instructions for generating an access token with roomRecord?
• A sample CLI or SDK call in a specific language (Go/JS/Python)?
Tell me which egress type and output you plan to use and I’ll send a tailored example.
Sources: Egress examples | LiveKit docs | RoomComposite Egress | LiveKit Docs | Egress API | LiveKit docs | Recording participants | LiveKit docs | Track egress | LiveKit docspurple-autumn-79340
12/19/2025, 3:16 PMtall-airline-16756
12/19/2025, 3:16 PMegress block in your CreateRoom request (auto‑egress)? If yes, auto‑egress will start recording when the room is created.
• Are you using any server or orchestration process that calls StartRoomCompositeEgress automatically on room events (room.created or participant.join)?
• When you inspect active egresses (lk egress list or ListEgress), do you see an egress started earlier than your manual start time? If so, note its egress_id and `reason`/`start_time`.
• Is your client using a long‑lived access token with roomRecord that a background job might reuse?
What this behavior usually means
• If auto‑egress is enabled in CreateRoom, recordings start automatically on room creation — so a later manual start looks redundant because an active egress already exists.
• If a server process listens to room events and starts egress automatically, that will also make egress always active.
• A previously started egress not stopped (or restarted by automation) will remain active until explicitly stopped or completed.
Immediate actions to confirm/resolve
1. Check room creation code/config for an egress block and remove/disable it if you want manual starts only.
2. Run lk egress list or call ListEgress and compare start_time and type to your manual starts to find the originating job.
3. Search your backend for any automated calls to StartRoomCompositeEgress (webhooks, event handlers).
4. If you find an auto egress you don’t want, stop it with lk egress stop --id <egress_id>.
If you’d like, share:
• Whether you use CreateRoom with an egress section, or
• The output of lk egress list (egress IDs and start times), or
• A snippet of how you start recording (CLI/SDK/Twirp JSON)
I can then point to the exact field or line to change and give a tailored example to disable the automatic recording.