A short technical transcript of a YouTube clip discussing why WebRTC may receive but then discard (not play) audio packets. Speakers explain that audio is packetized into 20 ms frames with RTP timestamps so receivers can detect late arrivals caused by network jitter (handled by a jitter buffer) — packets arriving after their playback time are discarded. Other causes include incorrect RTP timestamps from a buggy sender and audio/video lip-sync drift (if video timing advances too far or too slowly, audio may be dropped to maintain real-time sync).
Chapters
What are the reasons for WRTC to discard audio packets? By discard we mean receiving these packets and then deciding not to play them.
So audio is packetized into frames and packets, and each of them is 20 milliseconds long. And each of them has an RTP timestamp. And that means the receiver can determine whether this packet is arriving late, whether it's arriving when it should be driving. Because they are sent at a continuous pace. They should be received at a continuous pace, but they received slightly on and off. That's called jitter, and that's the reason we have the NET accue jitter buffer to deal with that.
Okay, so if a packet is received too late, we have nothing to do with it because the time has already passed to play it back. Hence WebRTC would discard that packet and won't play it if it's an audio packet.
Yes. Basically you see that you already played the packets around it, then you can't play it out of order because after the digital buffer you want to place things in order again.
Yep. Any other reasons why we must might end up discarding packets?
Typically, I would say it's a bug in the other side when it's not sending things in the right with the right RTP timestamp.
Okay, so the sender did something stupid and now webrtc would fudge it or not understand that the time is now too played and think it's too late, too early or whatever.
Yes, yes. The other big reason is that we have lip sync between audio and video. And if your video timestamp advances too much or too slow, you would need to drop the audio packet because you don't have time to play it in real time and you can't compress it anymore.