the transport is defined as rtpParameters:="{ “codecs”: [{ “mimeType”:“video/vp8”, “payloadType”:{VIDEO_PT}, \"clockRate\":90000 }], \"encodings\": [{ \"ssrc\":{VIDEO_SSRC} }] }" \
@ibc investigating the rtcp feedbacks received by gstreamer, a found that when mediasoup sends a PLI request, gstreamer gets a RTCP packet with “sender_ssrc” equals to “0”, and so it fails to reply to the request.
In particular, the received RTCP packet has:
type = GST_RTCP_TYPE_PSFB (Payload-specific feedback)
fbtype = GST_RTCP_PSFB_TYPE_PLI
source_ssrc = 0
Full received RTCP buffer: ‘\x81\xce\x00\x02\x00\x00\x00\x00\x00\x98\x96\x80’
@vpalmisano refers to the source ssrc, which is 0 because the sender of the RTCP is not RTP source by any means. It must be set to 0 since mediasoup is only receiving RTP from that stream, it is not the typical bidirectional sendrecv SDP formed stream.
Clearly the PLI has a media ssrc field with the SSRC of the RTP stream. If GStreamer is expecting something different from 0 in the sender ssrc then it must be a bug in GStreamer as obviously we cannot put any other value on it.
I have modified the received RTCP buffer received on UDP by GStreamer setting the SSRC sent in the “encodings” dict, now GStreamer is able to handle the PLI request.
If this is a GStremer bug, I can use this approach without modifications of mediasoup.
This seems an important issue and we are pretty sure we are doing it good in mediasoup. This may be related code in GStreamer. May you please report it in the GStreamer project?
I don’t know if GStreamer can send different RTP streams on the same UDP connection (BUNDLE), probably it should be able to do it. And if so it must check the media ssrc in received PLIs.
I insist that mediasoup is correctly setting the media ssrc field in PLI packets. sender ssrc is another story and it’s 0 because there is no bidirectional RTP sending.
I have modified the received RTCP buffer received on UDP by GStreamer setting the SSRC sent in the “encodings” dict
So you are basically mangling the received PLI packet before GStreamer processes it. What are you exactly overriding in the PLI packet? the sender ssrc?
Will you report an issue in Gstreamer? I’d like to have that as a workaround
BTW Gstreamer seems to look first for “sender ssrc” and, if no session is found then it looks for “media ssrc”. May be there is an issue in Gstreamer when reading those ssrcs (network order, etc)? Why is it finding a session by looking to “sender ssrc = 0”?
GStreamer first looks at the sender ssrc. If it gets NULL then it tries with media ssrc. So, if my proposal makes it work it means that, somehow, GStreamer is getting “something” when looking for sender ssrc = 0, which is crazy.
BTW: when you did the UDP packet mangling to set sender ssrc, did you properly write the ssrc in network order?