RTP - Plain Transport GetStats() shows no bytes being received

Hi guys,

I’m very new working with media generally (but especially media soup and real time comms) I was doing well (or so I thought). I’ve been trying to push an external RTP in to Media soup, and from what I can tell, I’ve followed the docs @ mediasoup :: Communication Between Client and Server

I’ve got the transport set up followed by a call to produce - which returns a producerId. When I then push data to the Ip and port exposed by the create plain transport. Nothing appears to be received. When I call GetStats against the transport - it always looks pretty much like;

[
  {
    bytesReceived: 0,
    bytesSent: 0,
    comedia: true,
    probationBytesSent: 0,
    probationSendBitrate: 0,
    recvBitrate: 0,
    rtcpMux: false,
    rtpBytesReceived: 0,
    rtpBytesSent: 0,
    rtpRecvBitrate: 0,
    rtpSendBitrate: 0,
    rtxBytesReceived: 0,
    rtxBytesSent: 0,
    rtxRecvBitrate: 0,
    rtxSendBitrate: 0,
    sendBitrate: 0,
    timestamp: 56078690,
    transportId: '442fb048-be4c-42ec-991a-940b6a9a5c29',
    tuple: { localIp: '127.0.0.1', localPort: 10000, protocol: 'udp' },
    type: 'plain-rtp-transport'
  }
]

I assumed that the packets were simply not being sent to the IP - but using a UDP sniffing tool - that suggests that indeed the relevant process generating the RTP packets does appear to be sending packets to the remote address (in this case ‘127.0.0.1:10000’).

my next guess would be that media soup must be rejecting the packets or they are malformed. Incase the data was malformed and indeed wasn’t RTP - say something in the RTP header of each packet was screwed - would I expect this sort of output from the GetStats()? - I’m curious since the stat has both bytesReceived and rtpBytesReceived - so I kinda thought that at least something might give a hint that data was landing at media soup even if it was screwed.

I know there is barely a question in there - but I’m just trying to figure out what to try next - and if anyone has any suggestions - for example, in the set up - do I need to do anything with the producerId that is returned from the Produce() call? as currently I’m not.

@alex.sapple I suggest starting with mediasoup demo and try to see how things relate to each other. It will point you in the right direction as its a working example. I’m afraid that without knowing the source code its difficult for anyone to help you.

thank you @ibc and @aetheon - really appreciate the quick feedback. I’ll continue reading up, certainly the debugging docs will be really useful.

sweet!! - it works. I really should have realized this far sooner… a day of my life I’m not getting back :slight_smile:

My media soup instance is running inside a docker container - and the exposed port was outside of the range the container was exposing… so yeh… data was indeed not getting to media soup - nothing to do with media soup or with the packet sender… I’ve now lined up the rtcMin and Max port with the public ports of the container and the GetStats() shows data is being received.

[
  {
    bytesReceived: 1745275,
    bytesSent: 1352,
    comedia: true,
    probationBytesSent: 0,
    probationSendBitrate: 0,
    recvBitrate: 333616,
    rtcpMux: false,
    rtpBytesReceived: 1756175,
    rtpBytesSent: 0,
    rtpRecvBitrate: 355722,
    rtpSendBitrate: 0,
    rtxBytesReceived: 0,
    rtxBytesSent: 0,
    rtxRecvBitrate: 0,
    rtxSendBitrate: 0,
    sendBitrate: 416,
    timestamp: 62831564,
    transportId: 'f0dac9a8-929c-4b80-83d0-c1a2e51d4da6',
    tuple: {
      localIp: '127.0.0.1',
      localPort: 10074,
      protocol: 'udp',
      remoteIp: '172.23.0.1',
      remotePort: 38246
    },
    type: 'plain-rtp-transport'
  }
]
1 Like