RTC Audio-Video Transmission Weak Network Countermeasure Technologies
This doc shares an “Overview of Weak Network Countermeasure Technologies for RTC Audio-Video Transmission.”
With the speedy development of RTC (Real-Time Communication) audio-video expertise, new purposes emerge, penetrating numerous use circumstances. While cutting-edge applied sciences are driving substantial development in on-line eventualities, consumer expectations for a greater expertise—decrease latency, larger definition, and smoother playback—are escalating.
These three user-experience elements correspond to 3 core RTC metrics: real-time efficiency, readability, and smoothness.
However, it’s typically not possible to have all of it. In eventualities requiring extraordinarily low latency, video readability could also be sacrificed to make sure minimal delay, whereas eventualities emphasizing excessive definition may tolerate additional latency to safe higher-quality audio-video knowledge.
To obtain higher efficiency, we normally search decrease latency, larger readability, and improved fluency via community transport optimizations. The predominant adversary right here is the weak community, which causes congestion, packet loss, and jitter—main culprits behind poor consumer expertise.
“Weak community countermeasure expertise” is a broad time period referring to methods for addressing the aforementioned community deterioration and different network-related points.
On the Choice of Transport-Layer Protocol (TCP/IP)
First, a short introduction to transport-layer protocols:
In the TCP/IP layered mannequin, the transport layer sits beneath the appliance layer and is often supplied by the working system. It gives two principal protocols: TCP and UDP. TCP is a connection-oriented, dependable transport protocol that ensures knowledge integrity and ordering; UDP is a connectionless, unreliable protocol whose knowledge reliability is left totally to the appliance layer.
In real-time audio-video eventualities, utilizing UDP first has grow to be frequent follow throughout the business, primarily as a result of:
- TCP was not designed for real-time audio-video purposes. Its built-in congestion and error-control mechanisms concentrate on reliability and throughput, resulting in larger latency. Under poor community situations, latency can improve dramatically. According to ITU Standard G.114, when end-to-end latency exceeds 400ms, consumer interplay is noticeably impaired.
- TCP’s congestion-control and error-control mechanisms reside within the working system, which the appliance layer can not optimize or modify per state of affairs. This severely limits flexibility.
- UDP has much less overhead than TCP, and transport-control methods may be applied totally on the utility layer, offering the flexibleness real-time media typically requires.
Hence, the weak-network challenges and countermeasures mentioned right here assume using the UDP protocol and, particularly, RTP/RTCP atop UDP, which is extensively adopted in audio-video purposes.
Primary Weak Network Issues and Corresponding Countermeasures
In essence, a “weak community downside” for audio-video transmission refers to opposed community situations that undermine the consumer expertise, mainly community congestion, packet loss, and jitter. These issues trigger stutters and poor real-time efficiency. Given the advanced, heterogeneous nature of community environments, the severity of weak community issues can differ extensively. Ensuring clean communication beneath such situations has at all times been a key focus in RTC.
Congestion Issues
When the visitors within the community exceeds the bottleneck capability, congestion arises.
Congestion instantly causes sudden packet loss or bursts of jitter. If the system fails to detect and reply (e.g., by lowering the ship price) shortly, receivers will see stuttering, excessive latency, or poor picture high quality.
To fight congestion, the first method is to design a “congestion-control algorithm” that promptly detects congestion and recovers from it as shortly as doable, thereby minimizing influence on the consumer expertise.
1) Requirements for Congestion-Control Algorithms
RFC8836 comprehensively summarizes the wants of congestion-control algorithms for interactive real-time audio-video purposes. A simplified overview:
- Latency: The algorithm ought to hold latency—significantly any latency it introduces—as little as doable whereas nonetheless offering possible throughput.
- Throughput: Maximize throughput for the given state of affairs.
- Fairness: The algorithm ought to share bandwidth pretty with different real-time flows and TCP flows.
- Avoid “hunger”: Media flows mustn’t starve or be starved by competing TCP flows.
- Convergence pace: The algorithm ought to attain a secure state as shortly as doable when a media circulation begins.
- Network help: The algorithm mustn’t depend on particular community options.
- Stability: The algorithm ought to stay secure even when media flows change, for instance, if a short lived interruption happens in media transmission.
- Rapid response: The algorithm ought to swiftly adapt to modifications in community situations, equivalent to bottleneck bandwidth or link-latency variations.
In brief, congestion management faces two core duties: (1) quick and correct detection of community congestion, and (2) acceptable management measures to stop or mitigate congestion and resume regular states shortly.
2) Congestion-Detection Algorithms
Congestion-detection algorithms may be divided into two classes based mostly on measured indicators:
- Loss-based: Detect congestion by monitoring packet-loss occasions.
- Delay-based: Detect congestion by measuring delay variation.
For interactive, real-time audio-video purposes, delay-based strategies are sometimes most well-liked, primarily as a result of they detect congestion earlier—earlier than critical packet loss happens—and thus assist keep away from the standard points related to dropping packets.
Furthermore, loss-based strategies typically probe for hyperlink capability by constantly rising the ship price till packet loss happens, which may result in unbounded queueing delays within the community, particularly the place giant buffers exist, generally inflicting multi-second latency spikes.
However, as a result of delay-based strategies react so shortly to latency will increase, they’ll danger “ravenous” themselves when competing for bandwidth with loss-based flows. Proper methods are wanted to share community sources extra pretty.
Delay-based strategies usually use RTT (round-trip time) or OWD (one-way delay) measurements to gauge congestion. RTT measurement is extra simple however contains reverse-direction results that may masks forward-path congestion. OWD delay measurement avoids that.
As proven within the determine, OWD is estimated by observing the variations between ship intervals and obtain intervals, indicating how queueing delays fluctuate.
3) Congestion Response Measures
In brief, congestion response includes calculating an acceptable ship price based mostly on the present congestion state. With regard to different weak community measures on the ship aspect, doable rate-throttling strategies embody adjusting audio-video encoder charges, controlling Automatic Repeat Request bandwidth, or modifying FEC redundancy, which we discover later. If the sender is a forwarding node, then additional methods equivalent to SVC layering or multi-stream adaptation might also apply.
4) A Typical Congestion-Control Framework
Below is the early congestion-control framework as soon as utilized in Google’s WebRTC:
It adopts a hybrid sender- and receiver-driven method. The sender makes use of a loss-based algorithm:
- If packet loss < 2%, improve sending bandwidth by 8%.
- If packet loss is between 2% and 10%, hold sending bandwidth unchanged.
- If packet loss > 10%, scale back sending bandwidth = present price × (1 – 0.5 × loss).
The receiver makes use of a delay-based algorithm, estimating one-way delay with a Kalman filter, then combining that estimate with precise obtain throughput to derive an optimum goal bandwidth and feeding it again to the sender by way of RTCP. The sender then takes the minimal of the loss-based and delay-based estimates as the ultimate goal.
Below is WebRTC’s improved congestion-control framework:
Here, your complete congestion-control logic resides on the sender; the receiver merely gives measurement suggestions.
The new framework refines the delay-estimation mechanism by making use of linear regression to one-way delay variation. It discerns three traits—delay is rising, secure, or lowering—after which makes use of that evaluation together with the present ship price to find out one of the best goal bandwidth.
In addition to refining detection, the brand new framework additionally introduces “proactive bandwidth probing,” additional enhancing general efficiency. It improves startup convergence in addition to responsiveness to altering community situations.
Packet Loss Issues
As famous, real-time interactive media sometimes runs over RTP/UDP, leaving packet-loss dealing with to the appliance layer.
From a network-transport standpoint, the first methods to deal with packet loss are Automatic Repeat Request (ARQ) and Forward Error Correction (FEC). On the encoding aspect, relying on content material or codec design, sure robustness options can offset loss—as an example, utilizing B-frames in video encoding to scale back the influence of lacking frames. Below, we concentrate on network-transport measures.
1) ARQ (Automatic Repeat Qequest)
In RTP/RTCP, the idea is simple: the receiver infers lacking packets by gaps in sequence numbers and sends RTCP “NACK” requests for the sender to retransmit the lacking knowledge. The general circulation seems as follows:
When it detects a niche (say seq# 101 or 102), the receiver sends RTCP NACK(req 101, 102). The sender retransmits these packets, sometimes on a separate SSRC if doable.
Key particulars embody:
- Initial request delay: Decide whether or not to request a lacking packet instantly or wait—probably factoring in FEC utilization.
- Interval between repeated requests: For the identical packet, don’t resend the request earlier than a full RTT elapses.
- Limit on complete requests: Calculate the utmost allowable requests based mostly on RTT and permissible general delay.
- ARQ bandwidth restrict: Automatic Repeat Request consumes a part of complete bandwidth and can’t exceed obtainable capability.
- Means of returning retransmitted packets: Sending them by way of a devoted RTP SSRC is beneficial, facilitating separate monitoring of packet loss and ARQ bandwidth.
2) FEC (Forward Error Correction)
In real-time audio-video, FEC is extensively used because of its immediacy in recovering from misplaced packets.
The elementary thought is that the sender appends additional restore packets containing redundant knowledge computed over supply packets. The receiver then makes use of these redundancy packets to get well any lacking supply packets, as proven beneath:
Algorithms for producing restore knowledge vary from easy XOR-based strategies to matrix-based or different coding methods, which we won’t element right here.
Below is the essential transmitting-side FEC framework:
“ADU” stands for Application Data Unit, i.e. an audio or video packet. The FEC encoder produces restore (redundancy) packets at a sure safety ratio. These restore packets, together with the supply packets and metadata describing their safety relationship, are despatched to the receiver.
Below is the receiving-side FEC framework:
The receiver passes each supply and restore packets to the FEC decoder. If any supply packet is lacking, the decoder reconstructs it utilizing the obtainable supply and restore packets, then delivers the recovered audio-video knowledge to the higher layer for decoding and playback.
In brief, the “safety relationship” signifies which supply packets every restore packet helps defend, sometimes signaled in a specialised format.
Under the RTP/RTCP framework, two requirements outline such codecs:
- ULPFEC (RFC5109): “Uneven Level Protection,” which permits utilizing totally different safety ranges for kind of necessary packets.
- FlexFEC (RFC8627): “Flexible Forward Error Correction,” which helps each interleaved and non-interleaved parity-based FEC encoding for RTP packets.
3) Combining ARQ and FEC
Compared with FEC, ARQ’s shortcoming is added latency, however its benefit is larger bandwidth effectivity. Generally, the aim is to fulfill latency necessities whereas minimizing additional bandwidth and processing overhead for sufficient safety.Hence, when combining ARQ and FEC, contemplate:
- Use ARQ beneath reasonable latency constraints. Based on RTT and the max permissible latency, calculate the utmost variety of retransmissions.
- If retransmissions alone can drive residual packet loss beneath ~1%, FEC is likely to be pointless.
- If you do want FEC, the FEC safety ratio ought to be based mostly on the residual loss likelihood after retransmissions, offering the ultimate security web.
Below is an instance exhibiting how ARQ and FEC may work collectively at totally different RTT values. For RTT < 20ms and max delay < 100ms, on a hyperlink experiencing 30% loss, ARQ alone can scale back loss beneath 1%. Thus, ARQ suffices right here. As RTT grows, FEC protection grows accordingly. Ultimately, beneath excessive RTT, FEC alone handles misplaced packets.
Jitter Issues
In brief, jitter means variation in community delay over time. Greater jitter signifies extra fluctuation in transmission delay.
Jitter causes stutter, skip-ahead playback, and different points that severely influence the standard of audio-video communication. It arises from a number of sources—new flows competing for a similar bandwidth, unstable ship charges, and basic community volatility.
A typical method is to compensate on the receiver with a Jitter Buffer, as proven beneath:
By introducing a “Jitter Delay,” the buffer homogenizes incoming knowledge to allow clean playback.
Estimating the optimum buffer delay is essential. If it’s too giant, it provides additional delay; if it’s too small, it received’t absolutely take up the jitter. In WebRTC, Google employs totally different approaches for audio and video:
- Audio Jitter: The NetEQ module makes use of a histogram-based methodology with a forgetting issue, taking the ninety fifth percentile of arrival intervals (Iat) because the buffer delay. This permits it to trace variations over time whereas discarding outdated knowledge.
- Video Jitter: WebRTC makes use of a separate method. It measures variations in body dimension and latency, making use of a Kalman filter for dynamic delay estimation.
However, WebRTC is primarily designed for one-on-one calls. In multi-party conferencing eventualities with media forwarding nodes in between, the end-to-end latency variation may be totally different, so additional optimizations could also be wanted.
Tencent RTC’s Weak Network Countermeasure Optimizations in Practice
TRTC (Tencent RTC) excels in weak community environments. Its core technical optimizations and real-world check knowledge show excessive efficiency even beneath advanced community situations: world end-to-end latency stays beneath 300ms, packet loss tolerance exceeds 80%, and it manages jitter above 1000ms. Details of its weak community resilience are as follows:
1. Transport-Layer Optimization
By utilizing a protocol stack based mostly on UDP + RTP/RTCP, it avoids the queue blocking and congestion-control latency seen in TCP beneath poor community situations.
Adopting an NACK retransmission mechanism: An NACK request is just despatched upon detecting packet-sequence discontinuities, enabling exact retransmission of lacking packets and lowering the round-trip latency overhead from frequent acknowledgments.
Integrating FEC (Forward Error Correction): A small variety of redundant packets are added on the sender, permitting the receiver to get well lacking packets from the redundancy and drastically reducing latency attributable to ready for retransmissions.
TRTC can flexibly change between or mix ARQ (retransmissions) and FEC, adjusting the variety of retransmissions and FEC overhead in actual time based mostly on community situations.
2. Adaptive Bandwidth Control (QoS)
QoS dynamically measures packet loss price, RTT, and jitter to foretell obtainable bandwidth in actual time.
Based on these predictions, it adjusts encoder bitrate, FEC redundancy ratios, and retransmission charges, responding shortly to modifications in community standing and avoiding each congestion from overly aggressive transmission and wasted overhead from pointless redundancy.
3. Improvements on the Codec Layer
TRTC modifies the video-frame reference construction so it’s not absolutely depending on the “earlier body,” lowering the influence a single misplaced body can have on the following decoding course of, and thereby bolstering packet loss resilience.
For audio, TRTC employs PLC (Packet Loss Concealment). When a loss is detected, it estimates and interpolates the lacking samples from previous and following audio frames, preserving pure sound high quality even with excessive packet loss.
4. Jitter Buffer and Synchronization Strategies
By setting an acceptable Jitter Buffer on the receiver, TRTC dynamically adjusts buffer dimension based mostly on arrival occasions and playback schedules, balancing minimal latency with jitter compensation.
It additionally gives an audio-video synchronization mechanism: detecting discrepancies and jitter between audio and video arrivals, then utilizing variable-speed playback to align audio with video, mitigating the damaging influence of desynchronization on the viewing expertise.
5. Echo Cancellation and “Double-Talk” Optimization
Relying on Tencent’s in-house TRAE (Tencent Real-time Audio Engine), TRTC applies acoustic echo suppression (AEC) between the speaker and microphone to stop acoustic echo loops.
It additional optimizes “double-talk” eventualities (the place each events communicate concurrently), eliminating points like suggestions squeals and enhancing readability in order that each ends can hear one another distinctly.
6. Cloud-Side Decision-Making and Big Data Analysis
TRTC deploys a QoE (Quality of Experience) evaluation framework, gathering packet loss, latency, MOS scores, and different metrics in actual time to precisely gauge customers’ subjective experiences.
The cloud resolution system dynamically fine-tunes parameters for various customers and networks, making certain each participant receives the optimum transmission technique and the absolute best audio-video high quality.
By orchestrating these a number of methods, TRTC persistently delivers low-latency, high-quality efficiency in harsh community environments characterised by excessive packet loss and extreme jitter, making it perfect for on-line training, distant work, interactive stay streaming, and related eventualities.
HI-FI News
by way of DEV Community https://dev.to
May 19, 2025 at 09:34AM
-
Product on sale
Audiophile Vinyl Records Cleaning BundleOriginal price was: €69.90.€59.90Current price is: €59.90. incl. VAT -
Product on sale
Easy Start Vinyl Records Cleaning KitOriginal price was: €69.90.€59.90Current price is: €59.90. incl. VAT -
Vinyl Records Cleaner Easy Groove Concentrate€34.95 incl. VAT -
Easy Groove Super Set€199.00 incl. VAT -
Easy Groove Enzycaster – vinyl records prewash cleaner€34.95 incl. VAT -
Easy Groove Extreme MK. II- vinyl records prewash cleaner€45.00 incl. VAT -
Vinyl Records Cleaner – Easy Groove Virgin Concentrate€35.00 incl. VAT -
Easy Groove Spray&Wipe vinyl records cleaner€34.95 incl. VAT


















