rough-energy-64097
11/13/2025, 2:09 PMtall-airline-16756
11/13/2025, 2:10 PMtall-airline-16756
11/13/2025, 2:11 PMrough-energy-64097
11/13/2025, 2:12 PMEG_JuwiXTjYMGxo, { action: 'start' });
didn't worktall-airline-16756
11/13/2025, 2:13 PMawaitStartSignal parameter is there to help delay the start of recording until a specific signal (like START_RECORDING) is detected. It’s a handy feature to have that control. However, just a heads-up—the updateEgress method with the action 'start' isn’t actually meant to kick off the recording. Instead, you’ll want to start egress first using one of the Start...Egress methods, such as StartWebEgress.
Once your egress session is up and running, you can definitely use updateEgress to tweak your streaming outputs on the fly, but starting the recording itself needs that initial start method. Also, make sure your access token has the roomRecord permission so everything works smoothly.
If any of this feels a bit tricky or if you’d like me to walk you through starting egress or using awaitStartSignal, just give me a shout—I’m here to help!
Sources: lib/livekit/egress_service_client.rb | src/main/kotlin/io/livekit/server/EgressServiceClient.kt | cmd/lk/egress.go | livekit-api/livekit/api/egress_service.py | Egress API | LiveKit docsrough-energy-64097
11/13/2025, 2:18 PMtall-airline-16756
11/13/2025, 2:18 PMstartWebEgress and startTrackEgress! Let me walk you through it in a simple way, so it’s easy to understand:
• startWebEgress:
◦ Purpose: This one helps you capture and record or stream any website by using a headless Chromium instance.
◦ Input Source: You just need to provide a URL, and it will render and capture the webpage content for you.
◦ Use Case: It’s perfect when you want to record website content that isn’t connected to a LiveKit room. Its lifecycle works independently from LiveKit rooms.
◦ Output Options: You have several options here, like encoded file outputs (such as MP4), segmented files, streams, and even images.
• startTrackEgress:
◦ Purpose: This one is designed to export individual audio or video tracks from a LiveKit room, sending them directly to cloud storage or a WebSocket server without any transcoding.
◦ Input Source: You’ll need a specific track ID from a participant in the room to get started.
◦ Use Case: It’s the best choice if you want to export raw, unprocessed tracks. Just keep in mind it exports one track at a time, whether audio or video.
◦ Output Format: The tracks are exported in their original format—H.264 as MP4, VP8 as WebM, and Opus as Ogg. For audio streaming through WebSocket, it sends raw PCM data.
To sum it up, startWebEgress is your go-to for capturing web content outside of LiveKit rooms, while startTrackEgress is tailored for exporting individual, raw media tracks from participants inside a LiveKit room. I hope this clears things up! If you have any more questions, feel free to ask—I’m here to help.
Sources: Web Egress | LiveKit Docs | lib/livekit/proto/livekit_egress_twirp.rb | Track egress | LiveKit docsrough-energy-64097
11/13/2025, 2:22 PMtall-airline-16756
11/13/2025, 2:23 PMStartRoomCompositeEgress with the custom_base_url parameter. This lets you specify a custom web application that beautifully renders the room's participants exactly how you'd like.
You might be wondering, why not use startWebEgress?
• startWebEgress is mainly meant for recording static web pages and doesn’t dynamically connect to LiveKit rooms. It won’t automatically render participants unless you manually integrate it, which isn’t the recommended path here.
Here’s a simple way to set up your custom recording template:
1. Create your custom frontend using the LiveKit template SDK.
2. Deploy your frontend to a public URL.
3. Use StartRoomCompositeEgress with the custom_base_url pointing to your deployed template.
This approach ensures everything works smoothly with LiveKit’s egress lifecycle and participant rendering. If you have any questions or need a hand along the way, just let me know—I’m here to help!
Sources: Web Egress | LiveKit Docs | Custom recording templates | LiveKit docs | src/main/kotlin/io/livekit/server/EgressServiceClient.kt | livekit-api/livekit/api/egress_service.py | lib/livekit/egress_service_client.rbrough-energy-64097
11/13/2025, 2:28 PMtall-airline-16756
11/13/2025, 2:29 PMEGRESS_ABORTED with the reason "Stop called before pipeline could start" can be a bit confusing. This usually happens when the StopEgress API is called before the egress pipeline has had a chance to move from EGRESS_STARTING to EGRESS_ACTIVE. Often, this is due to calling StopEgress too early, which might be caused by logic hiccups, race conditions, or event handling that’s not quite aligned yet.
Let’s walk through some steps together to help you troubleshoot and resolve this:
1. First, please check that StopEgress isn’t being triggered immediately after starting the egress. Taking another look at your application logic to prevent early stop signals can make a big difference.
2. Next, make sure your custom template is correctly sending the START_RECORDING signal. This step is important because it helps the egress move from EGRESS_STARTING to EGRESS_ACTIVE.
3. It’s also helpful to consider any network delays or resource allocation times that might be extending the EGRESS_STARTING phase, as this could create a bigger window for an early stop call.
4. Using the ListEgress API or webhooks to keep an eye on the egress status can ensure it reaches EGRESS_ACTIVE before you proceed with other actions.
If you notice that your custom template isn’t sending data to Mux, double-check that the START_RECORDING log is being executed and that your template is set up correctly to connect to the LiveKit room and render participants.
Please don’t hesitate to reach out if you’d like more help debugging your custom template or egress setup—I’m here to support you!
Sources: pkg/handler/handler_rpc.go | cmd/lk/egress.go | Egress API | LiveKit docs