RTP anti-packet loss transmission scheme
RTP transmission over UDP faces challenges such as packet loss, out-of-order delivery, duplication, and jitter in complex public network environments, particularly over 3G, 4G, and Wi-Fi networks. These issues severely degrade the quality of real-time audio/video interactions. Even the loss of a single RTP packet, if unaddressed by the receiver, can result in video artifacts like mosaics. This solution combines multiple approaches to mitigate UDP-based video packet loss, including:
1. Jitter Buffer on the receiver side to handle packet reordering and duplication.
2. Forward Error Correction (FEC) to prioritize packet loss recovery.
3. Retransmission Strategy for requesting lost packets when FEC cannot recover the data.
4. I-Frame Request if retransmission fails, where the decoder skips decoding (to avoid artifacts) and directly requests an I-frame from the sender.
By combining these methods, the solution effectively reduces visual artifacts and stuttering caused by packet loss in practice. Adjusting the FEC redundancy ratio allows adaptation to varying packet loss rates.
**FEC (Forward Error Correction)**, a widely adopted technology, works by generating **N-K redundant packets** from **K original media packets**, where **N** is the total number of media and redundant packets. As long as the receiver obtains **K packets** (including both media and redundant packets), it can recover any lost media packet from the original **K packets**.