I called track_egress with rtmpUrl = "rtmp://esw-rtmp.livekit:1935/live/test-room1"
But I got below error at my backend:
raise exceptions.TwirpServerException.from_json(resp.json())twirp.exceptions.TwirpServerException: the protobuf request could not be decoded
And on livekit server logs:
2023-01-04T09:52:26.579Z INFO livekit service/twirp.go:111 API Egress.StartTrackEgress {"service": "Egress", "method": "StartTrackEgress", "duration": "67.808µs", "status": "400", "error": "the protobuf request could not be decoded", "code": "malformed"}
How can I fixed it ? please advise this.
I fixed it, I called wrong function in track_egress, it should be: StartTrackCompositeEgress
For example: I used livekit-cli for stream request as below and it worked:
Hi,
I'm using this sdk for my backend. My flow at my backend as below:
Livekit server: v1.2.5 livekit-server-sdk-python: 0.4.1
In init.py of livekit-server-sdk-python, I added following code:
class TrackServiceClient: """ Client to access Egress APIs """ def init(self, host: str, api_key: str, api_secret: str): self._client = TwirpEgressServiceClient(host) self._api_key = api_key self._api_secret = api_secret
I called track_egress with rtmpUrl = "rtmp://esw-rtmp.livekit:1935/live/test-room1"
But I got below error at my backend:
raise exceptions.TwirpServerException.from_json(resp.json()) twirp.exceptions.TwirpServerException: the protobuf request could not be decoded
And on livekit server logs:
2023-01-04T09:52:26.579Z INFO livekit service/twirp.go:111 API Egress.StartTrackEgress {"service": "Egress", "method": "StartTrackEgress", "duration": "67.808µs", "status": "400", "error": "the protobuf request could not be decoded", "code": "malformed"}
How can I fixed it ? please advise this.
I fixed it, I called wrong function in track_egress, it should be: StartTrackCompositeEgress
For example: I used livekit-cli for stream request as below and it worked:
{ "room_name": "test-room1", "video_track_id": "TR_VCHQ3DH3JauRdJ", "stream": { "urls": [ "rtmp://esw-rtmp.livekit:1935/live/test" ] } }