レイテンシーの削減
概要
ストリーミング開始時と視聴者がストリームを見る時の間にできるだけレイテンシーが少なくなることを望むのは自然です。 しかし、Owncast のようなストリーミングシステムでは、レイテンシーに寄与する要因がいくつかあります。
管理者でレイテンシーバッファレベルを減らしてみてください。 これにより、ユーザーはライブに近づきますが、クライアントが扱うプレイ可能なセグメントが減少し、エラーやネットワーク速度の問題に対する回復力が低下する可能性があります。 ビデオを迅速に処理できるマシンがある場合は、レイテンシーをわずか数秒にまで減少させることができるかもしれませんが、エラーの余地はほとんどありません。
あなたが信頼性の低下よりも低遅延を望むか、追加の遅延のあるより信頼性の高いストリームを選択するかはあなた次第です。
ビデオパススルーに関する警告
ビデオ設定でビデオパススルーを使用している場合は、レイテンシーが増加する可能性が高いです。 Owncastにビデオを再エンコードしないよう指示しているため、レイテンシーを管理するために必要なサイズのチャンクに最適にビデオをセグメント化できません。 レイテンシーを本当に最適化したい場合は、パススルーを必ずオフにしてください。
欠点
ネットワークリクエスト
レイテンシーが低いほど、視聴者に提供されるビデオセグメントがより多く、小さくなります。 これにより、ウェブリクエストが増加します。 必ずしも使用する帯域幅が増えるわけではありませんが、サーバーによって処理される必要があるリクエストが単純に増えます。
エラー耐性
ビデオの各セグメントが小さくなるため、ネットワークの途切れや稀に発生するリクエストの失敗に対するエラー耐性は、視聴者のバッファリングにつながります。 レイテンシーが大きい場合、ネットワークリクエストが再試行されるか回復できる間、視聴者が再生できるビデオがより多くキューに入ります。
考慮事項
オブジェクトストレージや請求に影響を与えるCDNサービスを利用している場合は、レイテンシーを下げた場合のトレードオフを考慮するか、インフラ構成を変更することを検討した方が良いかもしれません。
Latency buffer levels
The Latency Buffer setting on the admin's Video configuration page selects one of five levels. Each level trades latency for stability by changing how long each video segment is and how many segments the playlist holds for viewers.
| Level | Seconds per segment | Segments in playlist | Approximate latency |
|---|---|---|---|
| 0 (lowest) | 1 | 25 | ~5 seconds |
| 1 | 2 | 15 | ~8-9 seconds |
| 2 (default) | 3 | 10 | ~10 seconds |
| 3 | 4 | 8 | ~15 seconds |
| 4 (highest) | 5 | 5 | ~18 seconds |
Changing the level while you are live does not affect the current stream. The new setting takes effect the next time you begin a stream.
The Minimize latency player setting
This option may not be the best for everyone. People should try it for themselves in the player settings.
Viewers can turn on Minimize latency in the player's settings menu. It slightly speeds up playback to bring the viewer closer to live. It only acts when there is spare bandwidth and enough buffered video, it backs off immediately when playback conditions degrade, and it disables itself for the rest of the session after repeated buffering. Viewers with an unstable connection can leave it off.
Improve this page
See something missing or incorrect? Edit this page and improve the documentation for everyone.
