I am looking at the simple simulcast scenario: VP8, two spatial layers set as:
encodings: [
{ scaleResolutionDownBy: 4 },
{ scaleResolutionDownBy: 1 }
]
If the producer is in Chrome, everything works correctly. However, if the producer is in Firefox, the video is tending to freeze. The log looks like this (I added output from IncreaseLayer and ApplyLayers):
mediasoup:Channel request succeeded [method:consumer.resume, id:18] +0ms
mediasoup:Channel [pid:2227] RTC::Producer::ReceiveRtpPacket() | key frame received [ssrc:385770193, seq:512] +10ms
mediasoup:Channel [pid:2227] RTC::SimulcastConsumer::SendRtpPacket() | sync key frame received +1ms
mediasoup:Channel [pid:2227] RTC::SimulcastConsumer::SendRtpPacket() | sending sync packet [ssrc:695875555, seq:1, ts:2257638956] from original [ssrc:961059511, seq:512, ts:2257638956] +0ms
mediasoup:Channel [pid:2227] RTC::Producer::ReceiveRtpPacket() | key frame received [ssrc:3082833855, seq:22146] +83ms
mediasoup:Channel [pid:2227] RTC::SimulcastConsumer::ProducerRtcpSenderReport() | first SenderReport [ssrc:385770193] +846ms
mediasoup:Channel [pid:2227] RTC::SimulcastConsumer::ProducerRtcpSenderReport() | first SenderReport [ssrc:3082833855] +57ms
mediasoup:Channel [pid:2227] RTC::SimulcastConsumer::IncreaseLayer() | setting provisional layers to 0:0 [virtual bitrate:600000, required bitrate:244550] +1ms
mediasoup:Channel [pid:2227] RTC::SimulcastConsumer::IncreaseLayer() | setting provisional layers to 0:1 [virtual bitrate:355450, required bitrate:43005] +0ms
mediasoup:Channel [pid:2227] RTC::SimulcastConsumer::IncreaseLayer() | setting provisional layers to 0:2 [virtual bitrate:312445, required bitrate:223846] +1ms
mediasoup:Channel [pid:2227] RTC::SimulcastConsumer::IncreaseLayer() | setting provisional layers to 1:0 [virtual bitrate:88599, required bitrate:1] +0ms
mediasoup:Channel [pid:2227] RTC::SimulcastConsumer::IncreaseLayer() | setting provisional layers to 1:1 [virtual bitrate:88598, required bitrate:2368] +0ms
mediasoup:Channel [pid:2227] RTC::SimulcastConsumer::IncreaseLayer() | setting provisional layers to 1:2 [virtual bitrate:86230, required bitrate:9837] +0ms
mediasoup:Channel [pid:2227] RTC::SimulcastConsumer::ApplyLayers() | +0ms
mediasoup:Channel [pid:2227] RTC::SimulcastConsumer::ApplyLayers() | +2s
mediasoup:Channel [pid:2227] RTC::SimulcastConsumer::UpdateTargetLayers() | target layers changed [spatial:-1, temporal:-1, consumerId:2d636d47-3681-4581-bd27-1ae9b3f11ac1] +0ms
mediasoup:Channel [pid:2227] RTC::SimulcastConsumer::ApplyLayers() | +2s
mediasoup:Channel [pid:2227] RTC::Transport::HandleRtcpPacket() | PLI received, requesting key frame for Consumer [sender ssrc:737112356, media ssrc:695875555] +968ms
mediasoup:Channel [pid:2227] RTC::SimulcastConsumer::ApplyLayers() | +1s
mediasoup:Channel [pid:2227] RTC::SimulcastConsumer::ApplyLayers() | +2s
mediasoup:Channel [pid:2227] RTC::SimulcastConsumer::ApplyLayers() | +2s
mediasoup:Channel [pid:2227] RTC::SimulcastConsumer::ApplyLayers() | +2s
mediasoup:Channel [pid:2227] RTC::SimulcastConsumer::ApplyLayers() | +2s
mediasoup:Channel [pid:2227] RTC::SimulcastConsumer::ApplyLayers() | +2s
mediasoup:Channel [pid:2227] RTC::SimulcastConsumer::ApplyLayers() | +2s
I wonder if the sequence in bold is something normally expected? If I prevent UpdateTargetLayers from setting layers to -1 at this moment, then the video does not freeze.