Gstreamer send Rtp PlainTransport

hello everyone
I using mediasoup PlainTransport and sending stream to gstreamer.
stream is coming the gstreamer but when i send back the same stream i can’t consume it via webrtc

Gstreamer Send UdpSink pipe => ! vp8enc ! rtpvp8pay ! udpsink host=127.0.0.1 port={videoRtpPort}

mediaSoup Read Stream Producer =>

 this.VideoPlainTransPort = await this.Router.createPlainTransport(
                { 
                  listenIp : '127.0.0.1',
                  rtcpMux  : false,
                  comedia  : true
                                                    
                });
                const videoRtpPort = this.VideoPlainTransPort.tuple.localPort;
                this.VideoProducer = await this.VideoPlainTransPort.produce(
                    {
                      kind          : 'video',
                      rtpParameters :
                      {
                        codecs :
                        [
                          {
                            mimeType     : 'video/VP8',
                            clockRate    : 90000,
                            payloadType  : 101
                          }
                        ],
                        encodings : [ { ssrc: 21233452222 } ]
                      },
                      paused: false
                    });

VideoPlainTransPort stats =>

 [
  {
    bytesReceived: 203427,
    bytesSent: 0,
    comedia: true,
    probationBytesSent: 0,
    probationSendBitrate: 0,
    recvBitrate: 988040,
    rtcpMux: false,
    rtpBytesReceived: 0,
    rtpBytesSent: 0,
    rtpRecvBitrate: 0,
    rtpSendBitrate: 0,
    rtxBytesReceived: 0,
    rtxBytesSent: 0,
    rtxRecvBitrate: 0,
    rtxSendBitrate: 0,
    sendBitrate: 0,
    timestamp: 27718325,
    transportId: '47bc54a5-c2b9-4e37-9fd0-c34ce5ce5dc7',
    tuple: {
      localIp: '127.0.0.1',
      localPort: 47837,
      protocol: 'udp',
      remoteIp: '127.0.0.1',
      remotePort: 33036
    },
    type: 'plain-rtp-transport'
  }
]

webrtc consumer stats => [{“bitrate”:0,“byteCount”:0,“firCount”:0,“fractionLost”:0,“kind”:“video”,“mimeType”:“video/VP8”,“nackCount”:0,“nackPacketCount”:0,“packetCount”:0,“packetsDiscarded”:0,“packetsLost”:0,“packetsRepaired”:0,“packetsRetransmitted”:0,“pliCount”:1,“rtxSsrc”:221131160,“score”:10,“ssrc”:983041940,“timestamp”:27465438,“type”:“outbound-rtp”}]

Enable debug and log tags in mediasoup

There is no error in the logs

 setInterval(() =>
                    {
                        this.VideoProducer.getStats()
                        .then(stats => console.warn("this.VideoProducer => "+JSON.stringify(stats)));
                    }, 2000);

this.VideoProducer => []
producer stats are empty

Enable debug and log tags in mediasoup.

“logLevel”: “debug”,
“logTags:”: [
“info”,
“ice”,
“dtls”,
“rtp”,
“srtp”,
“rtcp”,
“rtx”,
“bwe”,
“score”,
“simulcast”,
“svc”
]

mediasoup:Producer getStats() +1s
mediasoup:Channel request() [method:producer.getStats, id:218] +1s
mediasoup:PlainTransport getStats() +2s
mediasoup:Channel request() [method:transport.getStats, id:219] +1ms
mediasoup:Consumer getStats() +2s
mediasoup:Channel request() [method:consumer.getStats, id:220] +0ms
mediasoup:Channel request succeeded [method:producer.getStats, id:218] +0ms
:warning: this.VideoProducer => []
mediasoup:Channel request succeeded [method:transport.getStats, id:219] +1ms
:warning: this.VideoPlainTransPort => [{“bytesReceived”:12574448,“bytesSent”:0,“comedia”:true,“probationBytesSent”:0,“probationSendBitrate”:0,“recvBitrate”:843144,“rtcpMux”:false,“rtpBytesReceived”:0,“rtpBytesSent”:0,“rtpRecvBitrate”:0,“rtpSendBitrate”:0,“rtxBytesReceived”:0,“rtxBytesSent”:0,“rtxRecvBitrate”:0,“rtxSendBitrate”:0,“sendBitrate”:0,“timestamp”:34440816,“transportId”:“a431d160-5bd0-4088-b049-011f858c936b”,“tuple”:{“localIp”:“127.0.0.1”,“localPort”:44381,“protocol”:“udp”,“remoteIp”:“127.0.0.1”,“remotePort”:44317},“type”:“plain-rtp-transport”}]
mediasoup:Channel request succeeded [method:consumer.getStats, id:220] +0ms
:warning: consumer => [{“bitrate”:0,“byteCount”:0,“firCount”:0,“fractionLost”:0,“kind”:“video”,“mimeType”:“video/VP8”,“nackCount”:0,“nackPacketCount”:0,“packetCount”:0,“packetsDiscarded”:0,“packetsLost”:0,“packetsRepaired”:0,“packetsRetransmitted”:0,“pliCount”:1,“rtxSsrc”:636688912,“score”:10,“ssrc”:101889611,“timestamp”:34440816,“type”:“outbound-rtp”}]
mediasoup:Producer getStats() +924ms
mediasoup:Channel request() [method:producer.getStats, id:80] +922ms
mediasoup:Channel request succeeded [method:producer.getStats, id:80] +1ms
:warning: this.VideoProducer SFU => [{“bitrate”:107091,“bitrateByLayer”:{“0.0”:60720,“0.1”:107091,“0.2”:0},“byteCount”:1999243,“firCount”:0,“fractionLost”:0,“jitter”:0,“kind”:“video”,“mimeType”:“video/VP8”,“nackCount”:0,“nackPacketCount”:0,“packetCount”:2266,“packetsDiscarded”:0,“packetsLost”:0,“packetsRepaired”:0,“packetsRetransmitted”:0,“pliCount”:0,“rid”:“r0”,“roundTripTime”:1.03759765625,“score”:10,“ssrc”:3888048368,“timestamp”:34441739,“type”:“inbound-rtp”},{“bitrate”:922422,“bitrateByLayer”:{“0.0”:542246,“0.1”:922422,“0.2”:0},“byteCount”:16023852,“firCount”:0,“fractionLost”:0,“jitter”:0,“kind”:“video”,“mimeType”:“video/VP8”,“nackCount”:0,“nackPacketCount”:0,“packetCount”:13917,“packetsDiscarded”:0,“packetsLost”:0,“packetsRepaired”:0,“packetsRetransmitted”:15,“pliCount”:1,“rid”:“r1”,“roundTripTime”:0.274658203125,“rtxSsrc”:3941709058,“score”:10,“ssrc”:1783761327,“timestamp”:34441739,“type”:“inbound-rtp”}]
mediasoup:Producer getStats() +1s
mediasoup:Channel request() [method:producer.getStats, id:221] +1s
mediasoup:PlainTransport getStats() +2s
mediasoup:Channel request() [method:transport.getStats, id:222] +1ms
mediasoup:Consumer getStats() +2s
mediasoup:Channel request() [method:consumer.getStats, id:223] +0ms
mediasoup:Channel request succeeded [method:producer.getStats, id:221] +0ms
:warning: this.VideoProducer => []
mediasoup:Channel request succeeded [method:transport.getStats, id:222] +0ms
:warning: this.VideoPlainTransPort => [{“bytesReceived”:12657819,“bytesSent”:0,“comedia”:true,“probationBytesSent”:0,“probationSendBitrate”:0,“recvBitrate”:85248,“rtcpMux”:false,“rtpBytesReceived”:0,“rtpBytesSent”:0,“rtpRecvBitrate”:0,“rtpSendBitrate”:0,“rtxBytesReceived”:0,“rtxBytesSent”:0,“rtxRecvBitrate”:0,“rtxSendBitrate”:0,“sendBitrate”:0,“timestamp”:34442816,“transportId”:“a431d160-5bd0-4088-b049-011f858c936b”,“tuple”:{“localIp”:“127.0.0.1”,“localPort”:44381,“protocol”:“udp”,“remoteIp”:“127.0.0.1”,“remotePort”:44317},“type”:“plain-rtp-transport”}]
mediasoup:Channel request succeeded [method:consumer.getStats, id:223] +0ms
:warning: consumer => [{“bitrate”:0,“byteCount”:0,“firCount”:0,“fractionLost”:0,“kind”:“video”,“mimeType”:“video/VP8”,“nackCount”:0,“nackPacketCount”:0,“packetCount”:0,“packetsDiscarded”:0,“packetsLost”:0,“packetsRepaired”:0,“packetsRetransmitted”:0,“pliCount”:1,“rtxSsrc”:636688912,“score”:10,“ssrc”:101889611,“timestamp”:34442817,“type”:“outbound-rtp”}]
mediasoup:Producer getStats() +924ms
mediasoup:Channel request() [method:producer.getStats, id:81] +923ms
mediasoup:Channel request succeeded [method:producer.getStats, id:81] +0ms
:warning: this.VideoProducer SFU => [{“bitrate”:112989,“bitrateByLayer”:{“0.0”:69930,“0.1”:112989,“0.2”:0},“byteCount”:2027734,“firCount”:0,“fractionLost”:0,“jitter”:0,“kind”:“video”,“mimeType”:“video/VP8”,“nackCount”:0,“nackPacketCount”:0,“packetCount”:2297,“packetsDiscarded”:0,“packetsLost”:0,“packetsRepaired”:0,“packetsRetransmitted”:0,“pliCount”:0,“rid”:“r0”,“roundTripTime”:0,“score”:10,“ssrc”:3888048368,“timestamp”:34443739,“type”:“inbound-rtp”},{“bitrate”:917853,“bitrateByLayer”:{“0.0”:579101,“0.1”:917853,“0.2”:0},“byteCount”:16249175,“firCount”:0,“fractionLost”:0,“jitter”:0,“kind”:“video”,“mimeType”:“video/VP8”,“nackCount”:0,“nackPacketCount”:0,“packetCount”:14111,“packetsDiscarded”:0,“packetsLost”:0,“packetsRepaired”:0,“packetsRetransmitted”:15,“pliCount”:1,“rid”:“r1”,“roundTripTime”:0,“rtxSsrc”:3941709058,“score”:10,“ssrc”:1783761327,“timestamp”:34443740,“type”:“inbound-rtp”}]
mediasoup:Producer getStats() +1s
mediasoup:Channel request() [method:producer.getStats, id:224] +1s
mediasoup:PlainTransport getStats() +2s
mediasoup:Channel request() [method:transport.getStats, id:225] +0ms
mediasoup:Consumer getStats() +2s
mediasoup:Channel request() [method:consumer.getStats, id:226] +0ms
mediasoup:Channel request succeeded [method:producer.getStats, id:224] +1ms
:warning: this.VideoProducer => []
mediasoup:Channel request succeeded [method:transport.getStats, id:225] +0ms
:warning: this.VideoPlainTransPort => [{“bytesReceived”:12995781,“bytesSent”:0,“comedia”:true,“probationBytesSent”:0,“probationSendBitrate”:0,“recvBitrate”:1595104,“rtcpMux”:false,“rtpBytesReceived”:0,“rtpBytesSent”:0,“rtpRecvBitrate”:0,“rtpSendBitrate”:0,“rtxBytesReceived”:0,“rtxBytesSent”:0,“rtxRecvBitrate”:0,“rtxSendBitrate”:0,“sendBitrate”:0,“timestamp”:34444818,“transportId”:“a431d160-5bd0-4088-b049-011f858c936b”,“tuple”:{“localIp”:“127.0.0.1”,“localPort”:44381,“protocol”:“udp”,“remoteIp”:“127.0.0.1”,“remotePort”:44317},“type”:“plain-rtp-transport”}]
mediasoup:Channel request succeeded [method:consumer.getStats, id:226] +0ms
:warning: consumer => [{“bitrate”:0,“byteCount”:0,“firCount”:0,“fractionLost”:0,“kind”:“video”,“mimeType”:“video/VP8”,“nackCount”:0,“nackPacketCount”:0,“packetCount”:0,“packetsDiscarded”:0,“packetsLost”:0,“packetsRepaired”:0,“packetsRetransmitted”:0,“pliCount”:1,“rtxSsrc”:636688912,“score”:10,“ssrc”:101889611,“timestamp”:34444818,“type”:“outbound-rtp”}]

If producer’s stats is an empty array it means that no RTP stream has been created, so you should check whether the info in the producer rtpParameters matches the content of the RTP packets that gstreamer is sending to mediasoup (ssrc, payload type, etc).

For example, why are you indicating encodings : [ { ssrc: 21233452222 } ]?

You are right.
ı replaced gstreamer code

g_object_set (G_OBJECT (rtpvp8pay), "pt",101, NULL);
 g_object_set (G_OBJECT (rtpvp8pay), "ssrc",21233452222, NULL);

this.VideoProducer stats =>

[{“bitrate”:618397,“byteCount”:20342242,“firCount”:0,“fractionLost”:0,“jitter”:0,“kind”:“video”,“mimeType”:“video/VP8”,“nackCount”:0,“nackPacketCount”:0,“packetCount”:15687,“packetsDiscarded”:0,“packetsLost”:0,“packetsRepaired”:0,“packetsRetransmitted”:0,“pliCount”:0,“score”:10,“ssrc”:4053583038,“timestamp”:1234457,“type”:“inbound-rtp”}]

[
  {
    "bitrate": 0,
    "byteCount": 0,
    "firCount": 0,
    "fractionLost": 0,
    "kind": "video",
    "mimeType": "video/VP8",
    "nackCount": 0,
    "nackPacketCount": 0,
    "packetCount": 0,
    "packetsDiscarded": 0,
    "packetsLost": 0,
    "packetsRepaired": 0,
    "packetsRetransmitted": 0,
    "pliCount": 1,
    "rtxSsrc": 601196453,
    "score": 10,
    "ssrc": 138528736,
    "timestamp": 1148445,
    "type": "outbound-rtp"
  },
  {
    "bitrate": 906630,
    "byteCount": 12752429,
    "firCount": 0,
    "fractionLost": 0,
    "jitter": 0,
    "kind": "video",
    "mimeType": "video/VP8",
    "nackCount": 0,
    "nackPacketCount": 0,
    "packetCount": 9762,
    "packetsDiscarded": 0,
    "packetsLost": 0,
    "packetsRepaired": 0,
    "packetsRetransmitted": 0,
    "pliCount": 0,
    "score": 10,
    "ssrc": 4053583038,
    "timestamp": 1148445,
    "type": "inbound-rtp"
  }
]

consumer outbound-rtp byteCount is 0 but inbound-rtp bytecount is 12752429

why could it be ?

okey it worked
added Code

g_object_set (G_OBJECT (rtpvp8pay), “picture-id-mode”,2, NULL);

changed code

 gst_element_link_pads(rtpvp8pay,"src",  rtpbin,"send_rtp_sink_0 ");
  gst_element_link_pads(rtpbin,"send_rtp_src_0",  udpSink,"sink");
  gst_element_link_pads(rtpbin,"send_rtcp_src_0",  udpSinkRtcp,"sink");

to

gst_element_link(rtpvp8pay,  udpSink);

ı removed to rtcp port and ı sending mediasoup only rtp

is this right ?