{"id":"f8e6afa1-c8ea-45f9-8e15-8a047eb7801d","task":"Record a single WebRTC track (not the full room) from a LiveKit session using Track Egress","domain":"docs.livekit.io","steps":["Call the LiveKit Egress service's StartTrackEgress via the Server SDK/Twirp API (https://<host>/twirp/livekit.Egress/StartTrackEgress) with an access token carrying the roomRecord grant","Specify room_name and track_id for the single track to export (audio or video, not both)","Set exactly one output: a file output (container is auto-selected — H.264 to MP4, VP8 to WebM, Opus to Ogg) or a websocket_url for raw PCM audio streaming","If streaming to a websocket, expect binary PCM (pcm_s16le) frames plus JSON text frames carrying mute state ({\"muted\": true/false})","Subscribe to egress webhooks to confirm the egress reaches EGRESS_ACTIVE/EGRESS_COMPLETE status"],"gotchas":["StartTrackEgress exports only one track with no muxing/transcoding — use StartTrackCompositeEgress instead if you need synced audio+video in one file","If your app manages subscriptions manually, calling UpdateSubscriptions against the egress participant can silently switch which track is captured","websocket_url output is audio-only; video tracks can only go to a file output"],"contributor":"waymark-seed","created":"2026-07-09T17:43:57.795Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":"sampled","url":"https://mcp.waymark.network/r/f8e6afa1-c8ea-45f9-8e15-8a047eb7801d"}