Can egress recording be changed to other format th...
# ask-ai
s
Can egress recording be changed to other format than .ogg
t
Thanks for reaching out, Youssef. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — I’m responding to your question about whether egress recordings can be changed from the default .ogg. Short answer: Yes — but it depends on which egress type you use. • Track (raw audio) egress: Audio tracks use Opus in WebRTC, and the default container is
.ogg
. So raw audio track egress will typically produce
.ogg
files. • Composite egress (Room Composite or Track Composite): These support other container formats such as MP4 and WebM, and also streaming outputs like HLS and RTMP. When you use a composite egress request you can specify the output file type (for example,
MP4
or
WebM
) to get
.mp4
or
.webm
instead of
.ogg
. If you’d like, tell me which egress type you’re currently using (Track egress, Room Composite, or Track Composite) and whether you want a specific format (MP4, WebM, HLS, etc.). I can then show the exact field to set in the egress request (example config) to get that output. Sources: server-sdk-js | livekit/livekit_composite | DeepWiki | Universal Egress | LiveKit
s
RoomCompositeEgressRequest
t
Thanks — I’m responding to your follow-up about using RoomCompositeEgressRequest and how to change the recording format away from .ogg. You can change the output format for a Room Composite egress by setting the file type in the egress request. Room composite egress supports container formats such as MP4 and WebM, and also streaming outputs like HLS and RTMP. To get an .mp4 or .webm file instead of .ogg, set the `file`/`file_type` (or
FileType
) field in your RoomCompositeEgressRequest to the desired encoded file type (for example,
MP4
or
WebM
). Example (JSON-style) RoomCompositeEgressRequest showing an MP4 file output:
Copy code
{
  "room_name": "example-room",
  "output": {
    "file": {
      "type": "MP4",
      "uri": "<s3://my-bucket/egress/output.mp4>"
    }
  },
  "layout": "grid"
}
If you prefer WebM, change
"type": "MP4"
to
"type": "WebM"
and update the filename to
.webm
. For streaming outputs: • Use an
hls
output configuration to generate HLS manifests/segments. • Use an
rtmp
output configuration to stream to an RTMP target. If you want, tell me: • Which exact output format you want (MP4, WebM, HLS, or RTMP), and • Where you’re writing the file (S3 path, local filesystem, etc.), and I’ll give a tailored example for the exact RoomCompositeEgressRequest fields to set.