meetecho / janus-gateway

Janus WebRTC Server
https://janus.conf.meetecho.com
GNU General Public License v3.0
8.25k stars 2.48k forks source link

[1.x] Remotely added publisher sometimes hangs for 5-10 seconds before starts to play #3419

Closed dmitrydiavita closed 2 months ago

dmitrydiavita commented 2 months ago

What version of Janus is this happening on? v1.2.4 bae9c51982835c2d745dbe38a80eb660ac6a07e1

Have you tested a more recent version of Janus too? No. It is fresh installed actually

Was this working before? I don't know

Is there a gdb or libasan trace of the issue? No

Additional context Hello! We are using your videoroom plugin's api for adding remote publishers. As example we have - 2 publishers in room, first one is local, and the second is added from another Janus instance (through add_remote_publisher method call). And when new subscriber opens room, local Janus instance's publisher's stream starts to playing immediately, but remotely added publisher's stream sometimes hangs up to 5-10 seconds, before starts to play, and sometimes it is also starts playing immediately. I suppose that it is somehow depends on codec's keyframes, and its interval. But you some how resolved that for local instance's publishers. What we can do to overcome this difficulty for remotely added publishers ?

lminiero commented 2 months ago

you some how resolved that for local instance's publishers

Remote publishers use RTP forwarders exactly as the VideoRoom-to-Streaming approach, except it's more integrated in the plugin. I just tested it and it works as expected. My guess is you're not passing rtcp_port correctly, or if you do you have network constraints that prevent the RTCP latching from taking place. In both cases, it's not a bug in Janus but a configuration problem, so further discussion belongs to the group, not here. Closing.

lminiero commented 2 months ago

PS: I noticed we still didn't have any documentation for remote publishers in the docs. I just pushed them upstream, and updated them online.