steep-shampoo-86436
02/18/2026, 9:31 AMtall-airline-16756
02/18/2026, 9:32 AMtall-airline-16756
02/18/2026, 9:32 AMawait egressClient.startTrackCompositeEgress(roomName, {
audioTrackId: "audio-track-sid", // the human's audio track SID
videoTrackId: "", // empty/omitted for audio-only composite
file: fileOutput, // e.g. { type: "file", url: "s3://..." }
});
• Option B — Track Egress (raw audio file, e.g. ogg):
await egressClient.startTrackEgress(roomName, {
trackId: "audio-track-sid",
file: fileOutput, // produces raw audio file like .ogg
});
2) Record the human’s audio + video (Track Composite Egress)
await egressClient.startTrackCompositeEgress(roomName, {
audioTrackId: "audio-track-sid",
videoTrackId: "video-track-sid",
file: fileOutput,
});
How to get the track IDs (SIDs)
• Use server-side APIs or webhooks that list participants and their published tracks (for example, list participants / track_published events) to obtain the correct audioTrackId / videoTrackId.
Quick clarifying questions
1. How do you identify the “human” participant? By participant identity, metadata, or another method?
2. Can you access track SIDs server-side (e.g., via ListParticipants or webhooks)?
3. Which output format do you want for the audio-only case (composited audio file like mp4, or raw audio like ogg)?
If you tell me how you identify the participant and whether you can fetch track SIDs, I’ll provide exact code you can drop into your Next.js server flow and the precise API call/parameters for your SDK version.
Sources: Universal Egress | Live Conversations with AI using ChatGPT and WebRTC