If you want to record separate segments for each call after a transfer, LiveKit's egress system can help you easily start and stop recordings on the fly. Here’s how you can do it programmatically:
• Use the egress API to stop the current recording right when a transfer happens.
• Then, start a new recording session for the transferred call, and you can even give it a unique filename or segment ID to keep things organized.
On top of that, you can set up segmented file output to automatically create separate files for each segment. This works great with the HLS protocol and lets you customize segment lengths and filenames.
If you'd like, I’m here to walk you through the exact API calls or configuration steps—just let me know!
Sources:
Egress & Recording | livekit/livekit_composite | DeepWiki |
Recording participants | LiveKit Docs |
packages/livekit-server-sdk/src/EgressClient.ts |
livekit-protocol/livekit/protocol/egress.py