Adaptive Bitrate und Congestion Control
Lernen Sie, wie WebRTC die Medienqualität mithilfe von Congestion-Control-Algorithmen und Simulcast in Echtzeit anpasst, damit Gespräche in wechselnden Netzwerken reibungslos bleiben
Adaptive Bitrate und Congestion Control ist eine kostenlose Real-Time Streaming Systems (WebRTC + Live Data)-Lektion auf CoddyKit. Dies ist Lektion 4 von 4. Du kannst die komplette Lektion unten kostenlos lesen – dann übst du sie direkt im Browser mit einem integrierten Code-Editor und einem KI-Tutor rund um die Uhr. Sie ist Teil des Real-Time Streaming Systems (WebRTC + Live Data)-Lernpfads, und dein Fortschritt wird über Web und CoddyKit-App synchronisiert. Der Real-Time Streaming Systems (WebRTC + Live Data)-Kurs umfasst insgesamt 4 Lektionen.
Teile dieser Lektion wurden noch nicht übersetzt und werden auf Englisch angezeigt.
Networks Are Never Stable
Real-time media runs over networks that fluctuate constantly: Wi-Fi dips, cellular handoffs, shared bandwidth. A fixed bitrate will either waste capacity or overwhelm a weak link.
Adaptive bitrate lets the sender match its output to current conditions.
Signals of Congestion
WebRTC infers congestion from feedback:
- Packet loss reported via RTCP.
- Increasing delay (jitter and one-way delay growth).
- Receiver estimates of available bandwidth.
Google Congestion Control
The core algorithm in WebRTC is GCC (Google Congestion Control). It combines a loss-based controller and a delay-based controller to estimate the safe sending rate.
Delay-Based Estimation
The delay-based part watches how packet arrival times drift. If packets start queuing up, that growing delay signals congestion before loss even happens, so the sender can back off early.
Loss-Based Estimation
The loss-based controller reacts to RTCP loss reports. Above a threshold it lowers the rate; with little loss it slowly probes upward to reclaim bandwidth.
Trading Resolution for Frame Rate
When bandwidth drops, the encoder must shed bits. It can lower resolution (softer image) or frame rate (choppier motion). WebRTC chooses based on content: video calls favor smoothness, screen shares favor sharpness.
Simulcast to the Rescue
With simulcast, a sender encodes the same video at several qualities at once. The SFU forwards the layer each receiver can handle, so one weak viewer does not degrade everyone.
const sender = pc.addTransceiver(track, {
sendEncodings: [
{ rid: 'low', scaleResolutionDownBy: 4 },
{ rid: 'mid', scaleResolutionDownBy: 2 },
{ rid: 'high', scaleResolutionDownBy: 1 }
]
});Reading Bandwidth from Stats
You can observe the estimate via getStats(), watching available outgoing bitrate and current send rate to drive UI warnings.
const stats = await pc.getStats();
stats.forEach(r => {
if (r.type === 'outbound-rtp') {
console.log('bitrate', r.targetBitrate);
}
});Setting Bitrate Caps
You can bound the encoder so it never exceeds a ceiling, useful for cost control or guaranteeing other traffic gets bandwidth.
const params = sender.getParameters();
params.encodings[0].maxBitrate = 500000;
await sender.setParameters(params);FEC and Retransmission
To survive loss without dropping quality, WebRTC uses FEC (forward error correction) and selective retransmission (NACK/RTX). These add overhead but protect against lossy links.
Tuning for Your Use Case
- Conferencing: prioritize low latency and smoothness.
- Broadcast: allow a larger buffer for stability.
- Screen share: protect resolution over frame rate.
Quick Check
Test your understanding of adaptive bitrate.
Recap
WebRTC adapts bitrate using GCC's delay- and loss-based estimates, trades resolution for frame rate as needed, and uses simulcast plus FEC/retransmission to keep calls smooth across unstable networks.
Lerne Real-Time Streaming Systems (WebRTC + Live Data) mit einem KI-Tutor — kostenlos
Schreibe und führe echten Code in deinem Browser aus, bekomme sofortige Hilfe von einem 24/7 KI-Tutor und setze dein Lernen im Web oder in der App fort.
- Kurse
- 12
- Lektionen
- 48
Häufig gestellte Fragen
Ist die Lektion „Adaptive Bitrate und Congestion Control“ kostenlos?
Ja — der vollständige Text von „Adaptive Bitrate und Congestion Control“ ist hier im Web kostenlos zu lesen. Um sie interaktiv zu üben (integrierter Code-Editor und 24/7 KI-Tutor) und den Rest des Real-Time Streaming Systems (WebRTC + Live Data)-Kurses freizuschalten, upgrade auf CoddyKit PRO. Der Real-Time Streaming Systems (WebRTC + Live Data)-Kurs umfasst insgesamt 4 Lektionen.
Was lerne ich in „Adaptive Bitrate und Congestion Control“?
Lernen Sie, wie WebRTC die Medienqualität mithilfe von Congestion-Control-Algorithmen und Simulcast in Echtzeit anpasst, damit Gespräche in wechselnden Netzwerken reibungslos bleiben Du übst Real-Time Streaming Systems (WebRTC + Live Data) mit praktischem Code, den du direkt im Browser ausführst, und ein 24/7 KI-Tutor beantwortet deine Fragen während du die Lektion bearbeitest.
Brauche ich Erfahrung, um Real-Time Streaming Systems (WebRTC + Live Data) zu starten?
Keine Vorkenntnisse erforderlich. Real-Time Streaming Systems (WebRTC + Live Data) auf CoddyKit ist für Anfänger bis fortgeschrittene Lernende strukturiert, sodass du hier starten oder von Anfang an beginnen und in deinem eigenen Tempo voranschreiten kannst. Dies ist Lektion 4 von 4.
Wie lange dauert die Lektion „Adaptive Bitrate und Congestion Control“?
Die meisten CoddyKit-Lektionen dauern etwa 5–10 Minuten. Jede ist kompakt und interaktiv, sodass du stetig Fortschritte machst und genau dort weitermachst, wo du aufgehört hast – im Web und in der App.
Kann ich in dieser Real-Time Streaming Systems (WebRTC + Live Data)-Lektion Code schreiben und ausführen?
Ja. Jede Real-Time Streaming Systems (WebRTC + Live Data)-Lektion enthält einen integrierten Code-Editor, sodass du echten Code direkt in deinem Browser schreibst und ausführst und sofort KI-Feedback erhältst — ohne lokale Einrichtung erforderlich.
Alle Lektionen in diesem Kurs
- Best Practices für WebRTC-Sicherheit
- Medienqualität optimieren
- Techniken zur Bandbreitenverwaltung
- Adaptive Bitrate und Congestion Control