@ibc I am a bit confused about the rtpCapabilities in mediasoup Device and the rtpCapabilities sent to the server passed in transport?.on('produce', async ({ kind, rtpParameters, appData }, callback, errback) => {...}
callback, they don’t match and so while I find in device.rtpCapabilities.codecs desired VP9 or H264 codecs server producer doesn’t have any of these when created.
The only time I send the device RTP capabilities is when a peer joins the room and set the capabilities to the peer.data.rtpCapabilities
.
Here are the details and data.
Server Side:
device RTP capabilities sent from the client on join.
mediaserver:INFO:./Logger join - peer.data.rtpCapabilities {
codecs: [
{
mimeType: 'audio/opus',
kind: 'audio',
preferredPayloadType: 100,
clockRate: 48000,
channels: 2,
parameters: [Object],
rtcpFeedback: [Array]
},
{
mimeType: 'video/VP8',
kind: 'video',
preferredPayloadType: 101,
clockRate: 90000,
parameters: {},
rtcpFeedback: [Array]
},
{
mimeType: 'video/rtx',
kind: 'video',
preferredPayloadType: 102,
clockRate: 90000,
parameters: [Object],
rtcpFeedback: []
},
{
mimeType: 'video/VP9',
kind: 'video',
preferredPayloadType: 103,
clockRate: 90000,
parameters: [Object],
rtcpFeedback: [Array]
},
{
mimeType: 'video/rtx',
kind: 'video',
preferredPayloadType: 104,
clockRate: 90000,
parameters: [Object],
rtcpFeedback: []
},
{
mimeType: 'video/H264',
kind: 'video',
preferredPayloadType: 105,
clockRate: 90000,
parameters: [Object],
rtcpFeedback: [Array]
},
{
mimeType: 'video/rtx',
kind: 'video',
preferredPayloadType: 106,
clockRate: 90000,
parameters: [Object],
rtcpFeedback: []
},
{
mimeType: 'video/H264',
kind: 'video',
preferredPayloadType: 107,
clockRate: 90000,
parameters: [Object],
rtcpFeedback: [Array]
},
{
mimeType: 'video/rtx',
kind: 'video',
preferredPayloadType: 108,
clockRate: 90000,
parameters: [Object],
rtcpFeedback: []
}
],
headerExtensions: [
{
kind: 'audio',
uri: 'urn:ietf:params:rtp-hdrext:sdes:mid',
preferredId: 1,
preferredEncrypt: false,
direction: 'sendrecv'
},
{
kind: 'video',
uri: 'urn:ietf:params:rtp-hdrext:sdes:mid',
preferredId: 1,
preferredEncrypt: false,
direction: 'sendrecv'
},
{
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: 'video',
uri: 'http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01',
preferredId: 5,
preferredEncrypt: false,
direction: 'sendrecv'
},
{
kind: 'video',
uri: 'http://tools.ietf.org/html/draft-ietf-avtext-framemarking-07',
preferredId: 6,
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'
}
]
}
Request ‘produce’ sent from the client when local client audio transport.produce
invoked to create a server producer.
mediaserver:INFO:./Logger on produce request rtpParameters {
codecs: [
{
mimeType: 'audio/opus',
payloadType: 111,
clockRate: 48000,
channels: 2,
parameters: [Object],
rtcpFeedback: [Array]
}
],
headerExtensions: [
{
uri: 'urn:ietf:params:rtp-hdrext:sdes:mid',
id: 4,
encrypt: false,
parameters: {}
},
{
uri: 'http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time',
id: 2,
encrypt: false,
parameters: {}
},
{
uri: 'http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01',
id: 3,
encrypt: false,
parameters: {}
},
{
uri: 'urn:ietf:params:rtp-hdrext:ssrc-audio-level',
id: 1,
encrypt: false,
parameters: {}
}
],
encodings: [ { ssrc: 4185228809, dtx: false } ],
rtcp: { cname: 'RRIzxbR+TuPeuktn', reducedSize: true },
mid: '0'
}
Request 'produce'
sent from the client when local client video transport.produce
invoked to create a server producer.
This is where I don’t get why transport.on('produce'...)
RTP parameters are not the same as client RTP capabilities.
I guess I can send the device RTP capabilities (that will error, I tested it) but I’d like to learn why the delegate has different RTP parameters; Is it a server router initialization;
mediaserver:INFO:./Logger on produce request rtpParameters {
codecs: [
{
mimeType: 'video/VP8',
payloadType: 96,
clockRate: 90000,
parameters: {},
rtcpFeedback: [Array]
},
{
mimeType: 'video/rtx',
payloadType: 97,
clockRate: 90000,
parameters: [Object],
rtcpFeedback: []
}
],
headerExtensions: [
{
uri: 'urn:ietf:params:rtp-hdrext:sdes:mid',
id: 4,
encrypt: false,
parameters: {}
},
{
uri: 'urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id',
id: 5,
encrypt: false,
parameters: {}
},
{
uri: 'urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id',
id: 6,
encrypt: false,
parameters: {}
},
{
uri: 'http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time',
id: 2,
encrypt: false,
parameters: {}
},
{
uri: 'http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01',
id: 3,
encrypt: false,
parameters: {}
},
{
uri: 'http://tools.ietf.org/html/draft-ietf-avtext-framemarking-07',
id: 8,
encrypt: false,
parameters: {}
},
{
uri: 'urn:3gpp:video-orientation',
id: 13,
encrypt: false,
parameters: {}
},
{
uri: 'urn:ietf:params:rtp-hdrext:toffset',
id: 14,
encrypt: false,
parameters: {}
}
],
encodings: [
{
ssrc: 1297492880,
rtx: [Object],
active: true,
scaleResolutionDownBy: 4,
maxBitrate: 500000,
scalabilityMode: 'S1T3',
dtx: false
},
{
ssrc: 1297492881,
rtx: [Object],
active: true,
scaleResolutionDownBy: 2,
maxBitrate: 1000000,
scalabilityMode: 'S1T3',
dtx: false
},
{
ssrc: 1297492882,
rtx: [Object],
active: true,
scaleResolutionDownBy: 1,
maxBitrate: 5000000,
scalabilityMode: 'S1T3',
dtx: false
}
],
rtcp: { cname: 'RRIzxbR+TuPeuktn', reducedSize: true },
mid: '1'
}