Skip to main content

Egress overview

Use LiveKit's Egress service to record or livestream a room.

Overview

LiveKit Egress gives you a powerful and consistent set of APIs to export any room or individual tracks from a LiveKit session. It supports recording to an MP4 file or HLS segments, as well as exporting to live streaming services like YouTube Live, Twitch, and Facebook via RTMP.

For LiveKit Cloud customers, egress is available for your project without any additional configuration. If you're self-hosting LiveKit, egress must be deployed separately.

Egress types

The Egress service supports multiple types of exports for different use cases. The table below lists the different egress components and their descriptions.

Egress typeDescriptionUse cases
RoomComposite egressExport an entire room's video and/or audio using a web layout rendered by Chrome. Tied to a room's lifecycle and stops automatically when the room ends. Composition templates are customizable web pages that can be hosted anywhere.Recording meetings for team members to watch later, capturing all participants and interactions in a room.
Web egressRecord and export any web page. Similar to room composite egress, but isn't tied to a LiveKit room and can record non-LiveKit content.Restreaming content from a third-party source to YouTube and Twitch, recording external web applications.
Participant egressExport a participant's video and audio together. A newer API designed to be easier to use than Track Composite Egress.Recording individual participants in online classes, capturing a specific speaker's video and audio.
TrackComposite egressSync and export one audio and one video track together. Transcoding and multiplexing happen automatically.Exporting audio and video from multiple cameras during production for post-production use, combining specific tracks.
Track egressExport individual tracks directly without transcoding. Video tracks are exported as-is.Streaming audio tracks to captioning services via WebSocket, exporting raw track data for processing.
Auto egressAutomatically start recording when a room is created. Configure the egress field in CreateRoom to record the room as a composite and each published track separately.Recording all rooms automatically, capturing every track published to a room without manual intervention.

Service architecture

Depending on your request type, the Egress service either launches a web template in Chrome and connects to the room (for example, for room composite requests), or it uses the SDK directly (for track and track composite requests). It uses GStreamer to encode, and can output to a file or to one or more streams.

Egress instance

Additional resources

The following topics provide more in-depth information about the various egress types.