livekit / egress

Export and record WebRTC sessions and tracks
https://blog.livekit.io/livekit-universal-egress-launch/
Apache License 2.0
170 stars 71 forks source link

stream output url return wrong #746

Open shoyu666 opened 1 month ago

shoyu666 commented 1 month ago

Describe the bug get web stream output url return wrong

To Reproduce use java server sdk get web stream output url return wrong use golang server sdk get web stream output url return wrong

Expected behavior return the right url

Device Info: sdk version :io.livekit:livekit-server:0.6.1 egress version:1.8 livekit version:1.7 github.com/livekit/server-sdk-go v1.1.1

Additional context 1:push rtmp to rtmpserver success,So I think egress knows the correct stream_outputs URL 2:egress log stream_outputs url also wrong https://github.com/livekit/egress/issues/748

  egress  server/server_rpc.go:72 request validated       {"nodeID": "NE_V3xrc5Hi3rVn", "clusterID": "", "egressID": "EG_4TPtyfKyK9M8", "requestType": "web", "outputType": "stream", "room": "", "request": {"Web":{"url":"http://192.168.0.87:30064/#/liveKitRoom?liveUrl=ws://192.168.0.87:7880&trailId=172258437878237103000000001&url=http://192.168.0.87:30064","Output":{"Stream":{"urls":["rtmp://192.168.0.87:30010/live/{172...c_1}"]}},"Options":null,"stream_outputs":[{"urls":["rtmp://192.168.0.87:30010/live/{172...c_1}"]}]}}}
shoyu666 commented 1 month ago

https://github.com/livekit/egress/blob/f77a4a071d98dbbd39cbeae44adbbbc53a886d5f/pkg/config/output.go#L251

this code will change url rtmp://192.168.0.87:30010/live/171410956351389402000000001_171410956364910003000000001_a_801 to rtmp://192.168.0.87:30010/live/{171...801} I just realized there's a new version , i will try "docker pull livekit/egress:v1.8.5"

shoyu666 commented 1 month ago

try v.18.5 same https://github.com/livekit/egress/blob/4427655cccf94520a203f03ea24862f458e77786/pkg/config/pipeline.go#L244 Egress returns the modified URL to Livekit, which stores the address in Redis (rtmp://192.168.0.87:30010/live/{171...801})