A short technical dialogue explaining "pacing" in WebRTC: pacing is the practice of sending RTP packets at a controlled rate and possibly a different order than generation to avoid network bursts. The speakers contrast frequent small audio packets (typically 50 packets/sec, every 20 ms) with bursty video frames that are packetized into multiple RTP packets (e.g., 30 fps → frame every 33 ms, which may produce 5–10 packets). They recommend spreading video packets over part of the frame interval (rather than sending all at once), interleaving and prioritizing audio, and prioritizing retransmissions so lost data arrives earlier.
Chapters
So what is pacing in WebRTC?
Pacing means sending out the packets that you want to send at a certain rate and in an order that might not be the same as you are generating them. So what you get is if you have an audio stream of packets, which is typically 50 packets per second every 20 milliseconds, and you have a video stream, which means you packetize a frame into multiple RTP packets every 33 milliseconds at 30fps.
Okay. So with video, we need to generate a frame every 33 milliseconds for 30 frames per second. So what we do is we generate that frame, but that frame might be too big. And then I need every, let's say once in a while, every 33 or at a point in time to send, let's say, five or even ten packets.
Yes, yes. Basically, you don't want to send these packets all at once because that will likely cause issues in your network. Overload some buffers. So you want to spread them out a bit over these 33 milliseconds. You don't want to use the full 33 milliseconds, but maybe the first half of that.
So I would paste them out, like trickling them over that period of time instead of bursting them all at the same time towards the network.
Correct. And the problem you have is that you want to interleave them with audio packets, which should have higher priority. And you would also do things like prioritizing retransmissions over the video packets. Because retransmissions, if you lost something, it's better if it arrives early, earlier.