helpful-machine-32005
06/25/2025, 1:08 PMtall-airline-16756
06/25/2025, 1:08 PMtall-airline-16756
06/25/2025, 1:09 PMhelpful-machine-32005
06/25/2025, 1:10 PMasync def entrypoint(ctx: JobContext):
# Add the following code to the top, before calling ctx.connect()
# Set up recording
req = api.RoomCompositeEgressRequest(
room_name=ctx.room.name,
audio_only=True,
file_outputs=[api.EncodedFileOutput(
file_type=api.EncodedFileType.OGG,
filepath="livekit/my-room-test.ogg",
s3=api.S3Upload(
bucket="<S3 bucket name>",
region="<S3 region>",
access_key="<S3 access key>",
secret="<S3 secret key>",
),
)],
)
lkapi = api.LiveKitAPI()
res = await lkapi.egress.start_room_composite_egress(req)
await lkapi.aclose()
tall-airline-16756
06/25/2025, 1:10 PM<S3 bucket name>
, <S3 region>
, <S3 access key>
, and <S3 secret key>
with your actual S3 credentials and bucket details.
4. Pro tip: Double-check that you've got the right permissions and configurations set up for your S3 bucket to allow uploads.
Got questions? I'm here to help! Don't hesitate to reach out if anything seems tricky or you need a bit more guidance. We'll get this sorted together!
Sources: Recording agent sessions | LiveKit Docshelpful-machine-32005
06/25/2025, 1:11 PMtall-airline-16756
06/25/2025, 1:12 PMdocker run
command. Here's a handy example:
2. Next, in your egress request configuration, use the mounted directory path for your file output. Pro tip: you could set the file path to something like /out/my-recording.mp4
.
3. One quick thing to remember - make sure that mounted directory has write permissions for all users, since the egress service isn't running as root.
And just like that, your recordings will be safely saved in your local folder! If you run into any hiccups or have questions, I'm right here to help. You've got this! 😊
Sources: GitHub::livekit::livekit_composite | livekit/egress/README.md