Hi,
I just upgraded mediasoup from 3.1.0 to 3.1.5 and am now seeing 10-20 ‘layerschange’ events per second that affect only the temporalLayer, for every consumer with simulcast streams. There’s a noticeable impact on video framerate (so I don’t think that this is just a cosmetic warning I can ignore).
Bisecting my changes indicates that downgrading to 3.1.4 makes these go away. So does sending only a single encoding.
mediasoup:worker[pid:21853] RTC::Transport::ReceiveRtcpPacket() | no Consumer found for received Receiver Report [ssrc:905464878] +273ms
demo-app consumer layerschange d93-483-083b->d93-483-083b cam-video { spatialLayer: 1, temporalLayer: 2 } +233ms
demo-app consumer layerschange d93-483-083b->d93-483-083b cam-video { spatialLayer: 1, temporalLayer: 0 } +36ms
demo-app consumer layerschange d93-483-083b->d93-483-083b cam-video { spatialLayer: 1, temporalLayer: 1 } +1ms
demo-app consumer layerschange d93-483-083b->d93-483-083b cam-video { spatialLayer: 1, temporalLayer: 0 } +66ms
mediasoup:worker[pid:21853] RTC::Transport::ReceiveRtcpPacket() | no Consumer found for received Receiver Report [ssrc:905464878] +263ms
demo-app consumer layerschange d93-483-083b->d93-483-083b cam-video { spatialLayer: 1, temporalLayer: 2 } +160ms
demo-app consumer layerschange d93-483-083b->d93-483-083b cam-video { spatialLayer: 1, temporalLayer: 0 } +31ms
demo-app consumer layerschange d93-483-083b->d93-483-083b cam-video { spatialLayer: 1, temporalLayer: 1 } +0ms
demo-app consumer layerschange d93-483-083b->d93-483-083b cam-video { spatialLayer: 1, temporalLayer: 0 } +72ms
mediasoup:worker[pid:21853] RTC::Transport::ReceiveRtcpPacket() | no Consumer found for received Receiver Report [ssrc:905464878] +282ms
demo-app consumer layerschange d93-483-083b->d93-483-083b cam-video { spatialLayer: 1, temporalLayer: 2 } +177ms
demo-app consumer layerschange d93-483-083b->d93-483-083b cam-video { spatialLayer: 1, temporalLayer: 0 } +30ms
demo-app consumer layerschange d93-483-083b->d93-483-083b cam-video { spatialLayer: 1, temporalLayer: 1 } +1ms
I’m not filing an issue because I’m assuming this is showing up some bad code on my part. But I can file an issue if that’s helpful.
To reproduce:
https://github.com/daily-co/mediasoup-sandbox.git
- cd mediasoup-sandbox/single-page/
- npm install
- DEBUG=“mediasoup*, demo-app*” npm run start
- open http://localhost:3000/ in a web browser
- click on “send camera streams”
- click on the “subscribe” button next to “my cam-video”
- see the debug messages from the ‘layerschange’ event handler in the server terminal window
Reproduces for me on Chrome 75.0.3770.80/Linux, Chrome 75.0.3770.100/OS X, Safari 12.1.1/OS X, Chrome 75.0.3770.100/Windows, and Firefox 67.0.1/Windows.
Here are the mediaCodecs passed to worker.createRouter():
mediaCodecs:
[
{
kind: 'audio',
mimeType: 'audio/opus',
clockRate: 48000,
channels: 2
},
{
kind: 'video',
mimeType: 'video/VP8',
clockRate: 90000,
parameters:
{
// 'x-google-start-bitrate': 1000
}
}
And here are the simulcast encodings I’m passing to transport.produce() (all the encodings I’ve tried seem to have this same behavior, though):
[
{ maxBitrate: 96000, scaleResolutionDownBy: 4 },
{ maxBitrate: 680000, scaleResolutionDownBy: 1 },
]