Hi there,
I’m creating a video producer using the following code:
producer.transport({
track,
encodings: [
{ maxBitrate: 450000, scaleResolutionDownBy: 2 },
{ maxBitrate: 2500000, scaleResolutionDownBy: 1 },
], {
videoGoogleStartBitrate: 500000,
})
And keep getting the temporalLayer 2 selected when a consumer starts. After debugging the worker code I found it was caused by SimulcastConsumer::UseAvailableBitrate.
e[38;5;98;1mmediasoup:worker[pid:58818] e[0mRTC::RtpParameters::ValidateEncodings() | RtpParameters.ValidateEncodings e[38;5;98m+0mse[0m
e[38;5;98;1mmediasoup:worker[pid:58818] e[0mRTC::RtpParameters::ValidateEncodings() | RtpParameters.ValidateEncodings encoding [spatial:1 e[38;5;98m+0mse[0m
e[38;5;98;1mmediasoup:worker[pid:58818] e[0mRTC::RtpParameters::ValidateEncodings() | RtpParameters.ValidateEncodings encoding [temporal:1 e[38;5;98m+0mse[0m
e[38;5;98;1mmediasoup:worker[pid:58818] e[0mRTC::SimulcastConsumer::UseAvailableBitrate() | UseAvailableBitrate params [bitrate:1000000] e[38;5;98m+0mse[0m
e[38;5;98;1mmediasoup:worker[pid:58818] e[0mRTC::SimulcastConsumer::UseAvailableBitrate() | testing layers 0:0 [virtualBitrate:1080000, requiredBitrate:137216] e[38;5;98m+0mse[0m
e[38;5;98;1mmediasoup:worker[pid:58818] e[0mRTC::SimulcastConsumer::UseAvailableBitrate() | testing layers 0:1 [virtualBitrate:1080000, requiredBitrate:234272] e[38;5;98m+0mse[0m
e[38;5;98;1mmediasoup:worker[pid:58818] e[0mRTC::SimulcastConsumer::UseAvailableBitrate() | testing layers 0:2 [virtualBitrate:1080000, requiredBitrate:426248] e[38;5;98m+0mse[0m
e[38;5;98;1mmediasoup:worker[pid:58818] e[0mRTC::SimulcastConsumer::UseAvailableBitrate() | choosing layers 0:2 [bitrate:1000000, virtualBitrate:1080000, usedBitrate:426248, consumerId:08db906d-f18b-4c58-b9b5-a9381fd408bc] e[38;5;98m+0mse[0m
Do you have any idea why this is happening and point me in the right direction as debugging the c++ layer is very time consuming for me.
Thanks.