python-sdks icon indicating copy to clipboard operation
python-sdks copied to clipboard

RoomCompositeEgressRequest.output field missing in livekit-api 1.0.2, causing Cloud egress to fail

Open zachariejmartin opened this issue 8 months ago • 6 comments

Summary

LiveKit Cloud (server/egress) rejects RoomCompositeEgressRequest with invalid_argument: … missing field: output. The latest PyPI wheel livekit-api==1.0.2 can’t populate the new output wrapper because the field isn’t in the generated stubs.

Repro

import livekit.api as api
req = api.RoomCompositeEgressRequest(
        room_name=ctx.room.name,
        audio_only=True,
        file_outputs=[
             api.EncodedFileOutput(
                 file_type=api.EncodedFileType.OGG,
                 filepath="./my-room-test.ogg",
             )
        ],
    )
lkapi = api.LiveKitAPI()
res = await lkapi.egress.start_room_composite_egress(req)

TwirpError(code=invalid_argument, message=request has missing or invalid field: output)

Expected

Either:

  • New livekit-api wheel exposing RoomCompositeEgressRequest.output so we can set output=…, or
  • Server accepts requests where any of the *_outputs lists are non-empty.

Environment

  • livekit-api 1.0.2
  • livekit-agents 1.0.20

zachariejmartin avatar May 15 '25 12:05 zachariejmartin

  • Same issue
  • Have you found out any solution for this ??

Meet-katrodiya avatar May 21 '25 09:05 Meet-katrodiya

Not yet, I'm trying self-hosting route to control the server/egress version but haven't managed to get that to work yet.

zachariejmartin avatar May 21 '25 11:05 zachariejmartin

I am also facing same issue. Did anyone solve this or any idea how to fix this? And any chance if I downgrade livekit api then it might work?

nav17een avatar Jun 04 '25 06:06 nav17een

same issue, any solution ??

dincerdegre avatar Jun 11 '25 01:06 dincerdegre

Acutally, this is not an error because here you are trying to save the output file locally and i am guessing you will be most probably not hosting your own livekit server. And, livekit cloud does not allow you to save files locally due to its constraints. So, If you configure it with streaming or any cloud storages like GCP or AWS, it will not throw an error.

nav17een avatar Jun 11 '25 07:06 nav17een

Perhaps it is worth including this in the error message 🦒

livekit cloud does not allow you to save files locally due to its constraints. So, If you configure it with streaming or any cloud storages like GCP or AWS, it will not throw an error.

sevapru avatar Sep 23 '25 12:09 sevapru