適応型ビットレートと輻輳制御
輻輳制御アルゴリズムとsimulcastを使い、変化するネットワーク上でも通話を滑らかに保つためにWebRTCがメディア品質をリアルタイムで適応させる方法を学びます。
「適応型ビットレートと輻輳制御」はCoddyKit上の無料Real-Time Streaming Systems (WebRTC + Live Data)レッスンです。 これはレッスン4/4です。 下記で完全なレッスンを無料で読むことができます。その後、ブラウザ内の組み込みコードエディタと24時間対応のAIチューターでハンズオン演習できます。 これはReal-Time Streaming Systems (WebRTC + Live Data)学習パスの一部であり、ウェブとCoddyKitアプリ全体で進捗が同期されます。 Real-Time Streaming Systems (WebRTC + Live Data)コースには全4レッスンが含まれています。
このレッスンの一部はまだ翻訳されておらず、英語で表示されています。
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.
よくある質問
「適応型ビットレートと輻輳制御」レッスンは無料ですか?
はい。「適応型ビットレートと輻輳制御」の完全なテキストはこのウェブで無料で読めます。インタラクティブに演習し(組み込みコードエディタと24時間対応のAIチューター)、Real-Time Streaming Systems (WebRTC + Live Data)コースの残りをアンロックするには、CoddyKit PROにアップグレードしてください。 Real-Time Streaming Systems (WebRTC + Live Data)コースには全4レッスンが含まれています。
「適応型ビットレートと輻輳制御」で何を学びますか?
輻輳制御アルゴリズムとsimulcastを使い、変化するネットワーク上でも通話を滑らかに保つためにWebRTCがメディア品質をリアルタイムで適応させる方法を学びます。 ブラウザで直接実行するハンズオンコードでReal-Time Streaming Systems (WebRTC + Live Data)を演習し、24時間対応のAIチューターがレッスンを進める中での質問に答えます。
Real-Time Streaming Systems (WebRTC + Live Data)を始めるのに経験は必要ですか?
事前経験は必要ありません。CoddyKitのReal-Time Streaming Systems (WebRTC + Live Data)は初級者から上級者向けに構成されているため、ここから始めるか最初から始めて、自分のペースで進むことができます。 これはレッスン4/4です。
「適応型ビットレートと輻輳制御」レッスンにはどのくらい時間がかかりますか?
ほとんどのCoddyKitレッスンは約5~10分かかります。各レッスンはコンパクトでインタラクティブなので、着実に進歩し、ウェブとアプリ全体で正確に前回の場所から再開できます。
このReal-Time Streaming Systems (WebRTC + Live Data)レッスンでコードを書いて実行できますか?
はい。すべてのReal-Time Streaming Systems (WebRTC + Live Data)レッスンに組み込みコードエディタが含まれているため、ブラウザでリアルコードを書いて実行し、即座のAIフィードバックを取得できます。ローカル設定は不要です。
このコースのすべてのレッスン
- WebRTCセキュリティのベストプラクティス
- メディア品質の最適化
- 帯域幅管理の手法
- 適応型ビットレートと輻輳制御