validate this flow: ``` flowchart TD %% ─── Cli...
# ask-ai
e
validate this flow:
Copy code
flowchart TD
  %% ─── Client calls SDK ───
  A["Client / SDK<br>startRoomEgress()"] -- "Twirp RPC<br>StartRoomCompositeEgress" |--> B["LiveKit Server"]

  %% ─── Server decision tree ───
  subgraph Server
    B --> C{{"Room exists?"}}
    C -- "no" --> X1["404<br>room not found"]
    C -- "yes" --> D["Lookup<br>worker registry"]

    D --> E{{"Worker available<br>& CPU OK?"}}
    E -- "none" --> X2["Twirp<br>not_found"]
    E -- "all busy" --> X3["Twirp<br>unavailable"]

    E -- "yes" --> F["Pick worker &<br>reserve CPU"]
    F -- "PSRPC<br>enqueue job" |--> G
    F -- "EgressInfo<br>EGRESS_STARTING" |--> A
  end

  %% ─── Worker lifecycle ───
  subgraph "Egress Worker"
    G["Egress Pod"] --> H["set egress_available = 0"]
    H --> I["FFmpeg / Chrome"]
    I --> J["webhook<br>egress_started"]
    I --> K["do recording"]
    K --> L["webhook<br>egress_finished|failed"]
    L --> M["egress_available = 1"]
    M -.-> D
  end
t
Thanks for reaching out, Hamza. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
There is no specific official documentation or guidance available in the knowledge base that validates or confirms the detailed flow you provided for LiveKit egress from the SDK call through server processing and worker lifecycle. The knowledge base includes general information on LiveKit egress concepts, such as universal egress and webhook events, but does not provide a definitive flowchart or validation for the sequence you described. If you have particular questions about parts of this flow or want to verify certain steps, please indicate those for more targeted assistance. Sources: Universal Egress | Custom Recording Template | LiveKit Docs | Egress Overview | LiveKit Docs