Thanks — I’ll explain how Room Composite Egress differs and what that means for short/fast calls and the stop-before-start error.
How Room Composite Egress differs
• What it records: Room Composite captures the whole room as a single composite output (multiple tracks mixed into one file or stream), unlike Track Egress which records individual participant tracks separately.
• Initialization: Composite pipelines do more work (mixing, layout, encoding) so they can take slightly longer to become fully active than a single track egress.
• Use cases: Best when you want a single stitched recording or a specific visual layout (grid, spotlight, etc.). Not ideal when you only need one participant’s audio or separate per-track files for short interactions.
Implications for short/fast calls
• Higher chance of race: Because the composite pipeline needs to initialize (layout computation, mixers, encoders), stopping it very quickly after starting is more likely to trigger “Stop called before pipeline could start.”
• Prefer deferred/start-on-demand: For very short sessions, skip starting composite egress until you know the call will last (timer threshold, sustained media, or explicit user action).
• If you must start immediately: Wait for confirmation the composite egress is active (egress_started / EGRESS_ACTIVE webhook or poll listEgress) before calling stop, or use a small non-blocking grace period (hundreds of ms) to avoid the race.
Practical recommendations
• If you only need a single participant or per-track files for short calls, consider Track Egress instead — it initializes faster and reduces composite overhead.
• For Room Composite:
◦ Use deferred start: start egress after N seconds of call duration or after detecting sustained media.
◦ Use event-based stop: only call stop after receiving
egress_started
(webhook) or confirming
active
via API.
◦ Make stop async/non-blocking so it won’t delay transfers.
• Consider skipping recording entirely for calls under your chosen threshold.
If you want, I can provide:
• A small webhook-based flow example for Room Composite (start → wait for egress_started → stop), or
• A timer-based snippet for your language/SDK. Which language are you using?, with interactive elements