enough-match-43171
12/16/2025, 5:42 PMreq = api.RoomCompositeEgressRequest(
room_name=self.room_name,
audio_only=True,
file_outputs=[
api.EncodedFileOutput(
file_type=api.EncodedFileType.MP4,
filepath=filepath,
s3=api.S3Upload(
bucket=os.getenv("EGRESS_AWS_BUCKET_NAME"),
region=os.getenv("EGRESS_AWS_REGION"),
access_key=os.getenv("EGRESS_AWS_ACCESS_KEY_ID"),
secret=os.getenv("EGRESS_AWS_SECRET_ACCESS_KEY"),
),
)
],
)
What config should i add to record video not just audio in egress ?tall-airline-16756
12/16/2025, 5:42 PMtall-airline-16756
12/16/2025, 5:42 PMaudio_only=True, which disables video. Remove it or set it to False so both audio and video are recorded. Example:
req = api.RoomCompositeEgressRequest(
room_name=self.room_name,
audio_only=False, # remove or set False to enable video
file_outputs=[
api.EncodedFileOutput(
file_type=api.EncodedFileType.MP4, # MP4 supports video + audio
filepath=filepath,
s3=api.S3Upload(
bucket=os.getenv("EGRESS_AWS_BUCKET_NAME"),
region=os.getenv("EGRESS_AWS_REGION"),
access_key=os.getenv("EGRESS_AWS_ACCESS_KEY_ID"),
secret=os.getenv("EGRESS_AWS_SECRET_ACCESS_KEY"),
),
)
],
)
Want the composite layout (grid, speaker, or custom) or specific video resolution/framerate options? I can show those next.
Sources: RoomComposite Egress | LiveKit Docsenough-match-43171
12/16/2025, 5:43 PMtall-airline-16756
12/16/2025, 5:43 PMgrid layout and lower the output resolution, framerate, and bitrate.
Example Python request (RoomCompositeEgress) — set audio_only=False (or omit it), specify layout="grid", and use a low-cost encoding preset or custom advanced settings:
req = api.RoomCompositeEgressRequest(
room_name=self.room_name,
audio_only=False,
layout="grid",
file_outputs=[
api.EncodedFileOutput(
file_type=api.EncodedFileType.MP4,
filepath=filepath,
s3=api.S3Upload(
bucket=os.getenv("EGRESS_AWS_BUCKET_NAME"),
region=os.getenv("EGRESS_AWS_REGION"),
access_key=os.getenv("EGRESS_AWS_ACCESS_KEY_ID"),
secret=os.getenv("EGRESS_AWS_SECRET_ACCESS_KEY"),
),
# optional: use a preset like H264_720P_30 for lower cost
preset="H264_720P_30",
# or use advanced custom encoding to reduce cost further
advanced=api.EncodedFileOutputAdvanced(
width=640,
height=360,
framerate=15,
video_codec="H264_MAIN",
video_bitrate=800, # kbps
audio_codec="AAC",
audio_bitrate=64 # kbps
),
)
],
)
Notes:
• layout="grid" produces the tiled meeting view.
• Lower resolution (e.g., 640x360), lower framerate (15 fps), and lower video bitrate (≈800 kbps) reduce processing and egress bandwidth.
• MP4 supports both audio and video; preset="H264_720P_30" is a convenient lower-quality option if you prefer predefined settings.
Would you like a version tuned for more participants (larger grid) or instructions for HLS segment output to S3 instead?
Sources: RoomComposite Egress | LiveKit Docs | Composite and web recordings | LiveKit docs | Egress API | LiveKit docs | A Tale of Two Protocols: WebRTC vs. HLS for Live Streaming | Egress examples | LiveKit docs