mediasoup UP but Not forwarding

I am having a problem get mediasoup_v3_example working.

I have created a remote server and deploy the code. From the terminal everything looks fine and I can see the clients connecting. I can load up the “html” pages and start the media, I’m able to hit publish but whenever people subscribed they only received an empty box.

Im testing with A Ubuntu laptop, a Macbook and an Android phone.

Here is the output from only trying to run the broadcast example

$ node mediasoup_v3_broadcast.js 
socket.io server start. port=443
Web server start. https://178.128.128.151:443/
client connected. socket id=4LBBs9SvfrcviWiwAAAA  , total clients=1
-- mediasoup worker start. --
client connected. socket id=9qXXNU8yctWouTFGAAAB  , total clients=2
getRouterRtpCapabilities:  {
  codecs: [
    {
      kind: 'audio',
      mimeType: 'audio/opus',
      clockRate: 48000,
      channels: 2,
      preferredPayloadType: 100,
      parameters: {},
      rtcpFeedback: []
    },
    {
      kind: 'video',
      mimeType: 'video/VP8',
      clockRate: 90000,
      rtcpFeedback: [Array],
      preferredPayloadType: 101,
      parameters: [Object]
    },
    {
      kind: 'video',
      mimeType: 'video/rtx',
      preferredPayloadType: 102,
      clockRate: 90000,
      rtcpFeedback: [],
      parameters: [Object]
    }
  ],
  headerExtensions: [
    {
      kind: 'audio',
      uri: 'urn:ietf:params:rtp-hdrext:sdes:mid',
      preferredId: 1,
      preferredEncrypt: false,
      direction: 'recvonly'
    },
    {
      kind: 'video',
      uri: 'urn:ietf:params:rtp-hdrext:sdes:mid',
      preferredId: 1,
      preferredEncrypt: false,
      direction: 'recvonly'
    },
    {
      kind: 'video',
      uri: 'urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id',
      preferredId: 2,
      preferredEncrypt: false,
      direction: 'recvonly'
    },
    {
      kind: 'video',
      uri: 'urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id',
      preferredId: 3,
      preferredEncrypt: false,
      direction: 'recvonly'
    },
    {
      kind: 'audio',
      uri: 'http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time',
      preferredId: 4,
      preferredEncrypt: false,
      direction: 'sendrecv'
    },
    {
      kind: 'video',
      uri: 'http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time',
      preferredId: 4,
      preferredEncrypt: false,
      direction: 'sendrecv'
    },
    {
      kind: 'audio',
      uri: 'http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01',
      preferredId: 5,
      preferredEncrypt: false,
      direction: 'inactive'
    },
    {
      kind: 'video',
      uri: 'http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01',
      preferredId: 5,
      preferredEncrypt: false,
      direction: 'inactive'
    },
    {
      kind: 'video',
      uri: 'http://tools.ietf.org/html/draft-ietf-avtext-framemarking-07',
      preferredId: 6,
      preferredEncrypt: false,
      direction: 'sendrecv'
    },
    {
      kind: 'video',
      uri: 'urn:ietf:params:rtp-hdrext:framemarking',
      preferredId: 7,
      preferredEncrypt: false,
      direction: 'sendrecv'
    },
    {
      kind: 'audio',
      uri: 'urn:ietf:params:rtp-hdrext:ssrc-audio-level',
      preferredId: 10,
      preferredEncrypt: false,
      direction: 'sendrecv'
    },
    {
      kind: 'video',
      uri: 'urn:3gpp:video-orientation',
      preferredId: 11,
      preferredEncrypt: false,
      direction: 'sendrecv'
    },
    {
      kind: 'video',
      uri: 'urn:ietf:params:rtp-hdrext:toffset',
      preferredId: 12,
      preferredEncrypt: false,
      direction: 'sendrecv'
    }
  ],
  fecMechanisms: []
}
-- createProducerTransport ---
-- create transport id=ceefb300-f62f-4c81-8420-a3ed26f4368f
-- produce --- kind= video
--broadcast newProducer -- kind= video
-- produce --- kind= audio
--broadcast newProducer -- kind= audio

client connected. socket id=IQUc9QQR6WNRghJFAAAC  , total clients=3
getRouterRtpCapabilities:  {
  codecs: [
    {
      kind: 'audio',
      mimeType: 'audio/opus',
      clockRate: 48000,
      channels: 2,
      preferredPayloadType: 100,
      parameters: {},
      rtcpFeedback: []
    },
    {
      kind: 'video',
      mimeType: 'video/VP8',
      clockRate: 90000,
      rtcpFeedback: [Array],
      preferredPayloadType: 101,
      parameters: [Object]
    },
    {
      kind: 'video',
      mimeType: 'video/rtx',
      preferredPayloadType: 102,
      clockRate: 90000,
      rtcpFeedback: [],
      parameters: [Object]
    }
  ],
  headerExtensions: [
    {
      kind: 'audio',
      uri: 'urn:ietf:params:rtp-hdrext:sdes:mid',
      preferredId: 1,
      preferredEncrypt: false,
      direction: 'recvonly'
    },
    {
      kind: 'video',
      uri: 'urn:ietf:params:rtp-hdrext:sdes:mid',
      preferredId: 1,
      preferredEncrypt: false,
      direction: 'recvonly'
    },
    {
      kind: 'video',
      uri: 'urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id',
      preferredId: 2,
      preferredEncrypt: false,
      direction: 'recvonly'
    },
    {
      kind: 'video',
      uri: 'urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id',
      preferredId: 3,
      preferredEncrypt: false,
      direction: 'recvonly'
    },
    {
      kind: 'audio',
      uri: 'http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time',
      preferredId: 4,
      preferredEncrypt: false,
      direction: 'sendrecv'
    },
    {
      kind: 'video',
      uri: 'http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time',
      preferredId: 4,
      preferredEncrypt: false,
      direction: 'sendrecv'
    },
    {
      kind: 'audio',
      uri: 'http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01',
      preferredId: 5,
      preferredEncrypt: false,
      direction: 'inactive'
    },
    {
      kind: 'video',
      uri: 'http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01',
      preferredId: 5,
      preferredEncrypt: false,
      direction: 'inactive'
    },
    {
      kind: 'video',
      uri: 'http://tools.ietf.org/html/draft-ietf-avtext-framemarking-07',
      preferredId: 6,
      preferredEncrypt: false,
      direction: 'sendrecv'
    },
    {
      kind: 'video',
      uri: 'urn:ietf:params:rtp-hdrext:framemarking',
      preferredId: 7,
      preferredEncrypt: false,
      direction: 'sendrecv'
    },
    {
      kind: 'audio',
      uri: 'urn:ietf:params:rtp-hdrext:ssrc-audio-level',
      preferredId: 10,
      preferredEncrypt: false,
      direction: 'sendrecv'
    },
    {
      kind: 'video',
      uri: 'urn:3gpp:video-orientation',
      preferredId: 11,
      preferredEncrypt: false,
      direction: 'sendrecv'
    },
    {
      kind: 'video',
      uri: 'urn:ietf:params:rtp-hdrext:toffset',
      preferredId: 12,
      preferredEncrypt: false,
      direction: 'sendrecv'
    }
  ],
  fecMechanisms: []
}
-- createConsumerTransport ---
-- create transport id=0b864841-16bf-41dd-b2e5-d18c1798a167
consumerTransports count=1
-- consume --kind=video
videoConsumers count=1
-- consumer ready ---
-- connectConsumerTransport ---
-- resume -- kind=video
-- consume --kind=audio
audioConsumers count=1
-- consumer ready ---

Here is the client console

=== ready ===
socket.io connected()
socket.io message: {type: "welcome", id: "G2flbGkugzd7U6CJAAAH"}
connected to server. clientId=G2flbGkugzd7U6CJAAAH
getRouterRtpCapabilities: {codecs: Array(3), headerExtensions: Array(13), fecMechanisms: Array(0)}
--- createConsumerTransport --
transport params: {id: "f059ade3-782b-4025-864b-9ffce694634b", iceParameters: {…}, iceCandidates: Array(2), dtlsParameters: {…}}
createConsumerTransport: Transport {_events: {…}, _eventsCount: 0, _maxListeners: Infinity, _logger: Logger, _id: "f059ade3-782b-4025-864b-9ffce694634b", …}
--start of consume --kind=video
--consumer trasnport connect
subscribing...
--end of consume
-- track exist, consumer ready. kind=video
-- resume kind=video
--start of consume --kind=audio
resume OK
--end of consume
-- track exist, consumer ready. kind=audio
-- do not resume kind=audio
failed

I have also changed the top of the server file to

const fs = require('fs');
let serverOptions = {
  hostName: "178.128.128.151",
  listenPort: 443,
  useHttps: true,
  httpsKeyFile:"../MyKeyFile",
  httpsCertFile:"../MyCertFile",
};
let sslOptions = {};
if (serverOptions.useHttps) {
  sslOptions.key = fs.readFileSync(serverOptions.httpsKeyFile).toString();
  sslOptions.cert = fs.readFileSync(serverOptions.httpsCertFile).toString();
}

Ps I can get mediasoup-sample-app running

Thanks for any help on this : )

It’s probably best to take this issue up with that example project’s support channel.

Hi @brunton_doug

I have created an issue on the Repo (/github.com/mganeko/mediasoup_v3_example/issues/3)
+ posted it on stack-overflow (/stackoverflow.com/questions/62544922/mediasoup-up-but-not-forwarding),
but no feedback or reply :cry: