Skip to content

[Proposal] Add PlaybackRate-based rebuffering avoidance mechanism#1588

Open
peaBerberian wants to merge 4 commits intodevfrom
feat/playbackRateBasedRebufferingAvoidance
Open

[Proposal] Add PlaybackRate-based rebuffering avoidance mechanism#1588
peaBerberian wants to merge 4 commits intodevfrom
feat/playbackRateBasedRebufferingAvoidance

Conversation

@peaBerberian
Copy link
Collaborator

While admittedly checking what other media players were doing that we don't do yet, I saw an interesting opportunity.

Some players have a mechanism where they lower very slightly the playback rate (the speed at which we play) - for example at 0.95 (meaning we play 0.95 seconds of content every second) - if the current buffer size is low, until it gains back an acceptable size again.

I'm not sure of the actual impact this mechanism has in terms of rebuffering avoidance but it seems that it can help.

Because it has potential but has high uncertainties, I propose adding this mechanism as an experimental loadVideo option for now, meaning that we reserve the right to update this API or even remove it at any time. I re-use the experimentalOptions concept I already proposed in several of the currently-open PRs for this.

Because we might want to check the buffer size often when it's close to
the potentially-very-low value where this mechanism activates, I reduced our PlaybackObserver's regular interval from 1s to 500ms. This is the same interval we already tested on low-latency contents so it shouldn't be an issue.

I also for now only enable this mechanism if the application plays at x1, not if it is already updating the playbackRate as I found the wanted behavior in thoses cases harder to define.

Some players also only enable this mechanism on VoD contents, not on live contents. I think that this is a mistake as there's no reason timeshifted live shouldn't be treated the same.

I didn't do the API documentation yet nor link it to the demo because I'm somewhat unhappy for that mechanism's name, for now called playbackRateBasedRebufferingAvoidance.
Even if it describes well what it does, I found that name too long even in the code. I think we may prefer finding it a nicer-sounding name to make the code more readable and the API more approachable, like we did for our "fast-switching concept" (which sadly has now a new meaning for DASH low-latency contents different than ours or dash.js's usage, but that's always a risk and I'm willing to take it).

@peaBerberian peaBerberian added the proposal This Pull Request or Issue is only a proposal for a change with the expectation of a debate on it label Oct 29, 2024
@peaBerberian peaBerberian force-pushed the feat/playbackRateBasedRebufferingAvoidance branch from f3c5cc1 to e3d4723 Compare October 29, 2024 11:34
@peaBerberian peaBerberian force-pushed the feat/playbackRateBasedRebufferingAvoidance branch 2 times, most recently from a0d489f to e4567e7 Compare November 15, 2024 18:01
@peaBerberian peaBerberian added Priority: 2 (Medium) This issue or PR has a medium priority. Priority: 3 (Low) This issue or PR has a low priority. and removed Priority: 2 (Medium) This issue or PR has a medium priority. labels Nov 22, 2024
@peaBerberian peaBerberian force-pushed the feat/playbackRateBasedRebufferingAvoidance branch from e4567e7 to 3a50743 Compare December 12, 2024 13:48
@peaBerberian peaBerberian force-pushed the feat/playbackRateBasedRebufferingAvoidance branch from 3a50743 to aa14ba6 Compare January 28, 2025 14:06
@peaBerberian peaBerberian force-pushed the dev branch 2 times, most recently from 00fc806 to b7216b4 Compare April 15, 2025 18:14
@peaBerberian peaBerberian force-pushed the feat/playbackRateBasedRebufferingAvoidance branch 3 times, most recently from 94db9d5 to 1ceed37 Compare April 22, 2025 18:56
@peaBerberian peaBerberian force-pushed the feat/playbackRateBasedRebufferingAvoidance branch from 1ceed37 to 59da7ac Compare June 30, 2025 12:42
@peaBerberian peaBerberian force-pushed the feat/playbackRateBasedRebufferingAvoidance branch from 59da7ac to 452e049 Compare July 8, 2025 10:45
@peaBerberian peaBerberian force-pushed the feat/playbackRateBasedRebufferingAvoidance branch from 452e049 to 512bdc4 Compare August 1, 2025 13:27
@peaBerberian peaBerberian force-pushed the feat/playbackRateBasedRebufferingAvoidance branch from 512bdc4 to ee09dd3 Compare August 29, 2025 15:37
@peaBerberian peaBerberian force-pushed the dev branch 8 times, most recently from 6d4fed2 to 9b856a5 Compare September 25, 2025 15:56
@peaBerberian peaBerberian force-pushed the feat/playbackRateBasedRebufferingAvoidance branch from ee09dd3 to 951c596 Compare September 25, 2025 20:44
@canalplus canalplus deleted a comment from github-actions bot Sep 26, 2025
@canalplus canalplus deleted a comment from github-actions bot Sep 26, 2025
@canalplus canalplus deleted a comment from github-actions bot Sep 26, 2025
@canalplus canalplus deleted a comment from github-actions bot Sep 26, 2025
@canalplus canalplus deleted a comment from github-actions bot Sep 26, 2025
@canalplus canalplus deleted a comment from github-actions bot Sep 26, 2025
@peaBerberian peaBerberian force-pushed the feat/playbackRateBasedRebufferingAvoidance branch from 951c596 to e67b0eb Compare October 9, 2025 19:00
@peaBerberian peaBerberian force-pushed the dev branch 4 times, most recently from 6cfd206 to 1e55170 Compare October 13, 2025 20:54
@peaBerberian peaBerberian force-pushed the feat/playbackRateBasedRebufferingAvoidance branch from e67b0eb to 8644618 Compare December 10, 2025 17:33
@peaBerberian peaBerberian force-pushed the dev branch 2 times, most recently from d4be192 to 9ad6758 Compare December 19, 2025 19:49
@peaBerberian peaBerberian force-pushed the dev branch 9 times, most recently from 0142e34 to 1fd9df3 Compare January 27, 2026 11:59
While admittedly checking what other media players were doing that we
don't do yet, I saw an interesting opportunity.

Some players have a mechanism where they lower very slightly the
playback rate (the speed at which we play) - for example at `0.95`
(meaning we play 0.95 seconds of content every second) - if the current
buffer size is low, until it gains back an acceptable size again.

I'm not sure of the actual impact this mechanism has in terms of
rebuffering avoidance but it seems that it can help.

Because it has potential but has high uncertainties, I propose adding
this mechanism as an experimental `loadVideo` option for now, meaning
that we reserve the right to update this API or even remove it at any
time. I re-use the `experimentalOptions` concept I already proposed in
several of the currently-open PRs for this.

  Because we might want to check the buffer size often when it's close to
the potentially-very-low value where this mechanism activates, I reduced
our PlaybackObserver's regular interval from 1s to 500ms. This is the
same interval we already tested on low-latency contents so it shouldn't
be an issue.

I also for now only enable this mechanism if the application plays at
x1, not if it is already updating the playbackRate as I found the wanted
behavior in thoses cases harder to define.

Some players also only enable this mechanism on VoD contents, not on live
contents. I think that this is a mistake as there's no reason
timeshifted live shouldn't be treated the same.

I didn't do the API documentation yet nor link it to the demo because
I'm somewhat unhappy for that mechanism's name, for now called
`playbackRateBasedRebufferingAvoidance`.
Even if it describes well what it does, I found that name too long even
in the code. I think we may prefer finding it a nicer-sounding name to
make the code more readable and the API more approachable, like we did
for our "fast-switching concept" (which sadly has now a new meaning for
DASH low-latency contents different than ours or dash.js's
usage, but that's always a risk and I'm willing to take it).
@peaBerberian peaBerberian force-pushed the feat/playbackRateBasedRebufferingAvoidance branch from 8644618 to 54573c9 Compare February 27, 2026 15:29
@github-actions
Copy link

✅ Automated performance checks have passed on commit 62060f5f94680f9a1f9b0c97951598af3d4dd53b with the base branch dev.

Details

Performance tests 1st run output

No significative change in performance for tests:

Name Mean Median
loading 25.14ms -> 26.17ms (-1.032ms, z: 1.30753) 35.70ms -> 35.55ms
seeking 385.44ms -> 188.76ms (196.681ms, z: 7.66482) 16.80ms -> 760.80ms
audio-track-reload 32.02ms -> 32.03ms (-0.015ms, z: 0.78289) 47.55ms -> 47.70ms
cold loading multithread 51.21ms -> 50.63ms (0.582ms, z: 11.23587) 75.75ms -> 74.55ms
seeking multithread 62.96ms -> 31.88ms (31.084ms, z: 0.56796) 19.80ms -> 20.10ms
audio-track-reload multithread 30.34ms -> 30.33ms (0.010ms, z: 0.44680) 44.55ms -> 44.55ms
hot loading multithread 20.32ms -> 20.05ms (0.271ms, z: 5.07836) 29.70ms -> 29.40ms

@canalplus canalplus deleted a comment from github-actions bot Feb 27, 2026
@canalplus canalplus deleted a comment from github-actions bot Feb 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Priority: 3 (Low) This issue or PR has a low priority. proposal This Pull Request or Issue is only a proposal for a change with the expectation of a debate on it

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant