-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
--- | ||
layout: default | ||
title: SwitchHistoryRule | ||
parent: Adaptive Bitrate Streaming | ||
grand_parent: Advanced Features | ||
--- | ||
|
||
# SwitchHistoryRule | ||
|
||
## Description | ||
|
||
Frequent quality switches result in a negative QoE for the end-user. The main objective of the `SwitchHistoryRule` is to | ||
to detect and avoid any extreme bitrate oscillations allowed by the ABR algorithms. For that reason, | ||
the `SwitchHistoryRule` monitors quality down-switches. It derives a ratio of down-switches divided by the number of | ||
times the quality stayed the same or even improved. If this ratio exceeds the `switchPercentageThreshold` the quality is | ||
reduced. | ||
|
||
````js | ||
if (drops + noDrops >= settings.get().streaming.abr.rules.switchHistoryRule.parameters.sampleSize | ||
&& (drops / noDrops > settings.get().streaming.abr.rules.switchHistoryRule.parameters.switchPercentageThreshold)) { | ||
switchRequest.representation = (i > 0 && switchRequests[currentPossibleRepresentation.id].drops > 0) ? representations[i - 1] : currentPossibleRepresentation; | ||
} | ||
```` | ||
|
||
## Configuration Options | ||
|
||
| Parameter | Description | | ||
|:----------------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------| | ||
| `minimumSampleSize` | Sum of ABR quality checks required before the rule kicks in. | | ||
| `switchPercentageThreshold` | Ratio of quality drops compared to no quality drops must exceed this threshold before a potential quality down-switch by the `SwitchHistoryRule` is enforced. | | ||
|
||
## Example | ||
|
||
```js | ||
player.updateSettings({ | ||
streaming: { | ||
abr: { | ||
rules: { | ||
switchHistoryRule: { | ||
active: true, | ||
parameters: { | ||
minimumSampleSize: 8, | ||
switchPercentageThreshold: 0.075 | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}); | ||
``` |