understanding keyFrameRequestDelay

We are trying to understand keyFrameRequestDelay option. In the Scalability section, at: mediasoup :: Scalability, it says:

If the encoder receives many PLIs or FIRs (although mediaoup protects the producer endpoint by preventing it from receiving more than one PLI or FIR per second)

but in the documentation (mediasoup :: API) it says:

Just for video. Time (in ms) before asking the sender for a new key frame after having asked a previous one. If 0 there is no delay. (default:0)

Is there a default of 0 or 1 second, are those two distinct mechanisms?

Also, when discussing a single producer, and hundreds or thousands of viewers, does it really makes a difference if the producer need x2 or x3 bitrate?

Thanks!!
EyalS

0 or 1 second will behave similar as the client (libwebrtc) ignores a PLI if a previous PLI was received less than 1-2 seconds before.

A higher value will help with sender bitrate at the cost of causing random lack of video in new consumers for that period of time.

Thanks @ibc
Regarding the second question, do you think it will matter significantly?

Also, when discussing a single producer , and hundreds or thousands of viewers, does it really makes a difference if the producer need x2 or x3 bitrate?

If you increase the keyFrameRequestDelay value, new consumers should wait for the first keyframe up to keyFrameRequestDelay milliseconds. Users will see a delay receiving the video flow at start. I think that the same will happen if a stream re-synchronization is required.

1 Like