able-jackal-84140
10/03/2025, 8:46 AMtall-airline-16756
10/03/2025, 8:46 AMtall-airline-16756
10/03/2025, 8:47 AMable-jackal-84140
10/03/2025, 8:47 AMtall-airline-16756
10/03/2025, 8:48 AMable-jackal-84140
10/03/2025, 8:48 AMtall-airline-16756
10/03/2025, 8:49 AM~/livekit-egress to the container’s /out directory. Feel free to replace ~/livekit-egress with any local path you prefer.
2. Configure the Egress Request:
In your Python code, you’ll want to specify the file output path inside that mounted directory like this:
`from livekit.api import LiveKitAPI
from livekit.protocol.egress import TrackEgressRequest, DirectFileOutput
api = LiveKitAPI()
req = TrackEgressRequest(
room_name="my-room",
track_id="TR_audio_track_id",
file=DirectFileOutput(
filepath="/out/recording.ogg" # Matches the mounted path
)
)
result = await api.egress.start_track_egress(req)
print(f"Egress started: {result.egress_id}")`This setup will save your audio file as recording.ogg right in the ~/livekit-egress folder on your computer.
If you have any questions or want me to walk you through more examples, just let me know—I’m here to help!able-jackal-84140
10/03/2025, 8:54 AMtall-airline-16756
10/03/2025, 8:55 AMminioadmin:minioadmin and make it accessible at http://localhost:9000.
2. Configure LiveKit to Use MinIO:
Next, in your Python code, you can set up the egress request to point to your MinIO endpoint like this:
`from livekit.api import LiveKitAPI
from livekit.protocol.egress import TrackEgressRequest, S3Upload
api = LiveKitAPI()
req = TrackEgressRequest(
room_name="my-room",
track_id="TR_audio_track_id",
file=S3Upload(
bucket="livekit-recordings",
region="us-east-1",
access_key="minioadmin",
secret="minioadmin",
endpoint="http://localhost:9000",
filepath="recordings/audio.ogg"
)
)
result = await api.egress.start_track_egress(req)
print(f"Egress started: {result.egress_id}")`This setup will save your audio file to the /data directory in MinIO, which you can access right from your local machine.
If you have any questions or want me to walk you through any part of this, just let me know—I’m here to help!able-jackal-84140
10/03/2025, 8:55 AMtall-airline-16756
10/03/2025, 8:55 AM