Skip to content

Local API: Implement SABR for VODs#8047

Merged
FreeTubeBot merged 58 commits intoFreeTubeApp:developmentfrom
PikachuEXE:sabr-pr
Jan 17, 2026
Merged

Local API: Implement SABR for VODs#8047
FreeTubeBot merged 58 commits intoFreeTubeApp:developmentfrom
PikachuEXE:sabr-pr

Conversation

@PikachuEXE
Copy link
Member

@PikachuEXE PikachuEXE commented Sep 17, 2025

Pull Request Type

  • Bugfix
  • Feature Implementation
  • Documentation
  • Other

Related issue

#7145
#7887
Closes #6683
Closes #7119
Closes #7920

Description

Based on #7145 (Please read that PR first
Using https://github.com/LuanRT/googlevideo 4.0.4

  • Implementation updated (different from Local API: Implement SABR for VODs #7145) to have playback session scoped stuff like SABR context & playbackCookie (SABR details)
  • Player streaming timeout doubled (30s > 60s) to handle sometimes ~40MB response instead of ~10MB (at 2k quality, e.g. https://youtu.be/NmdXl7vXZ7g)
  • New setting for enabling SABR in experimental section

Non-SABR

Screenshots

Lazy maybe add later?

Testing

A. SABR off

  • Test pre-roll ads time toast
  • Test various video playback (should be the same)

B. SABR on

  • Test various video playback (should be the same)

Find custom builds at https://github.com/PikachuEXE/FreeTube/actions/workflows/build.yml?query=branch%3Asabr-pr
Find cutting edge custom builds (I only use this branch for testing fixes myself, but can be outdated once I finished testing): https://github.com/PikachuEXE/FreeTube/actions/workflows/build.yml?query=branch%3Acustom-builds%2Fsabr

Desktop

  • OS:
  • OS Version:
  • FreeTube version:

Additional context

Remaining tasks

  • Add/Update labels/tooltips/toasts & make them translatable (after text confirmed)
  • Handle infinite player reload - Allow max 3 player reloads for the same video before fallback to older DASH, if player loaded the reload doesn't count
  • Handle player reload during playback - Reload while keeping timestamp
  • Handle SABR playback delay in the middle - keep toast for now
  • Handle infinite SABR playback delay - reload player after (per req) backoff requested 5 times / cumulative delay going to be larger than timeout for request
  • Handle infinite next request policy received - reload player after (per req) next request policy received 100 times
  • Enable SABR by default
  • Handle more edge cases if found

Post PR

  • Remove download feature (broken anyway)

@FreeTubeBot FreeTubeBot enabled auto-merge (squash) September 17, 2025 02:45
@github-actions github-actions bot added PR: dependencies Pull requests that update a dependency file PR: waiting for review For PRs that are complete, tested, and ready for review labels Sep 17, 2025
@efb4f5ff-1298-471a-8973-3d47447115dc

This comment was marked as resolved.

@absidue absidue mentioned this pull request Sep 17, 2025
1 task
@absidue
Copy link
Member

absidue commented Sep 17, 2025

I really hope it being an experimental setting that is disabled by default is just because you have some things left in the remaining tasks section...

@PikachuEXE
Copy link
Member Author

I don't think it should be enabled by default for the first release
Otherwise there might be too many feedbacks to be handled
Whether it should remain in experimental section depends on how many edge case found and not handled well (Might be moved or not before next release

@absidue
Copy link
Member

absidue commented Sep 17, 2025

If we are going to keep it as a setting for the moment, it definitely should stay in the experimental settings and we should have a very clear plan for getting rid of it ASAP. The MWEB workaround is a workaround and is unlikely to keep working forever, so if it breaks while we still allow people to not use SABR we will have to keep finding new workarounds, which quite frankly I don't want to have to do when we know that SABR is the proper solution.

If we keep it a setting I would suggest enabling it by default but having the setting there as a temporary opt-out, that way we'll get more feedback but people can also disable it temporarily if they have issues, until you've decided it is stable enough.

Copy link
Member

@efb4f5ff-1298-471a-8973-3d47447115dc efb4f5ff-1298-471a-8973-3d47447115dc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both with and without SABR i get this error but that is on a server that is running through tor. If i connect to a normal server it does work

VirtualBoxVM_pCIApV5i4Z.mp4

@github-actions github-actions bot added PR: merge conflicts / rebase needed and removed PR: waiting for review For PRs that are complete, tested, and ready for review labels Sep 21, 2025
@github-actions
Copy link
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@efb4f5ff-1298-471a-8973-3d47447115dc

Im not seeing the return of audio tracks -> #6683

* development: (24 commits)
  Add proxy login support (FreeTubeApp#7996)
  Migrate the History view to the composition API (FreeTubeApp#8064)
  Fix player button hiding (FreeTubeApp#8065)
  Translated using Weblate (Norwegian Bokmål)
  Translated using Weblate (Indonesian)
  Fix playback rate reset when video ends (FreeTubeApp#7718)
  Skip Electron binary download in CI as we do not run it (FreeTubeApp#8063)
  Feat: Display player overlay controls on keyboard interaction (FreeTubeApp#7757)
  Translated using Weblate (Hungarian)
  Translated using Weblate (Czech)
  Translated using Weblate (Estonian)
  Translated using Weblate (French)
  Bump electron from 37.4.0 to 38.1.0 (FreeTubeApp#8025)
  Translated using Weblate (Dutch)
  Translated using Weblate (Portuguese (Brazil))
  Translated using Weblate (German)
  Translated using Weblate (Breton)
  Translated using Weblate (Italian)
  Translated using Weblate (Chinese (Simplified Han script))
  Support exporting single playlists as a list of video URLs (FreeTubeApp#8054)
  ...

# Conflicts:
#	src/renderer/components/ft-shaka-video-player/ft-shaka-video-player.js
@github-actions
Copy link
Contributor

Conflicts have been resolved. A maintainer will review the pull request shortly.

@PikachuEXE
Copy link
Member Author

Test fix not pushed this this PR yet: https://github.com/PikachuEXE/FreeTube/actions/runs/17907855602

@efb4f5ff-1298-471a-8973-3d47447115dc

Seems to resolve #7921 but we have to check with users after release

@ArthurKun21
Copy link

Test fix not pushed this this PR yet: https://github.com/PikachuEXE/FreeTube/actions/runs/17907855602

Was using this and got hit with 404 earlier for a music

https://youtu.be/8tamOu8AwFE

bundle-1758589261369.log

It was only once so far.

* development:
  Bump the eslint group across 1 directory with 4 updates (FreeTubeApp#8073)
  Bump electron from 38.1.0 to 38.1.2 (FreeTubeApp#8071)
  Bump sass from 1.92.1 to 1.93.0 (FreeTubeApp#8067)
  Bump lefthook from 1.13.0 to 1.13.1 (FreeTubeApp#8072)
  Bump swiper from 12.0.1 to 12.0.2 (FreeTubeApp#8070)
  Translated using Weblate (Italian)
  Translated using Weblate (Czech)
  Translated using Weblate (Hungarian)
  Translated using Weblate (German)
  Translated using Weblate (Estonian)
  Translated using Weblate (Breton)
  Translated using Weblate (German)
  Translated using Weblate (Chinese (Traditional Han script))
  Improve playlist import performance (FreeTubeApp#8062)
  Translated using Weblate (Norwegian Bokmål)
  Translated using Weblate (Portuguese (Brazil))
  Translated using Weblate (Chinese (Simplified Han script))
  Translated using Weblate (Japanese)
  Handle lockup view videos without a view count (FreeTubeApp#8066)
* development: (50 commits)
  Translated using Weblate (Slovak)
  Translated using Weblate (Slovak)
  Translated using Weblate (Slovak)
  add skip to previous/next video buttons in media player (FreeTubeApp#8285)
  Translated using Weblate (Slovak)
  Translated using Weblate (Slovak)
  Translated using Weblate (German)
  Bump express from 4.21.2 to 4.22.0 (FreeTubeApp#8374)
  Bump electron-builder from 26.3.0 to 26.3.2 (FreeTubeApp#8370)
  Translated using Weblate (Hebrew)
  Bump the eslint group with 2 updates (FreeTubeApp#8367)
  Translated using Weblate (Portuguese)
  Bump stylelint from 16.26.0 to 16.26.1 in the stylelint group (FreeTubeApp#8368)
  Bump vue-i18n from 11.1.12 to 11.2.2 (FreeTubeApp#8369)
  Bump electron from 39.2.3 to 39.2.4 (FreeTubeApp#8371)
  Bump mikefarah/yq from 4.49.1 to 4.49.2 (FreeTubeApp#8372)
  Translated using Weblate (Slovak)
  Translated using Weblate (Slovak)
  Translated using Weblate (Slovak)
  Translated using Weblate (Slovak)
  ...
efb4f5ff-1298-471a-8973-3d47447115dc

This comment was marked as resolved.

@PikachuEXE

This comment was marked as resolved.

@absidue

This comment was marked as resolved.

* development: (62 commits)
  Support exporting single playlists in YouTube's CSV format (FreeTubeApp#8430)
  Move external player handling to the main process (FreeTubeApp#8416)
  Revert "[Bug fix] Set max-block-size to prevent thin videos from passing the …" (FreeTubeApp#8418)
  Migrate the App component to the composition API (FreeTubeApp#8417)
  Bump electron-builder from 26.3.5 to 26.3.6 (FreeTubeApp#8422)
  Bump css-minimizer-webpack-plugin from 7.0.3 to 7.0.4 (FreeTubeApp#8428)
  Bump the eslint group with 3 updates (FreeTubeApp#8420)
  Bump sass from 1.94.2 to 1.96.0 (FreeTubeApp#8429)
  Bump vue-router from 4.6.3 to 4.6.4 (FreeTubeApp#8425)
  Bump peter-evans/create-pull-request from 7 to 8 (FreeTubeApp#8423)
  Bump mikefarah/yq from 4.49.2 to 4.50.1 (FreeTubeApp#8427)
  Bump lefthook from 2.0.8 to 2.0.11 (FreeTubeApp#8426)
  Bump electron from 39.2.6 to 39.2.7 (FreeTubeApp#8421)
  Bump actions/upload-artifact from 5 to 6 (FreeTubeApp#8424)
  Translated using Weblate (Russian)
  Translated using Weblate (Bulgarian)
  Translated using Weblate (German)
  Translated using Weblate (Indonesian)
  Translated using Weblate (Portuguese (Brazil))
  Translated using Weblate (Japanese)
  ...
@BitSynKed

This comment has been minimized.

PikachuEXE and others added 3 commits January 7, 2026 09:42
* development: (26 commits)
  Use bash even in workflows that run on Windows (FreeTubeApp#8493)
  Translated using Weblate (Malay)
  fix refresh (FreeTubeApp#8475)
  Harden GitHub Actions workflows (FreeTubeApp#8476)
  Update copyright year to 2026 (FreeTubeApp#8487)
  Added translation using Weblate (Malay)
  Bump globals from 16.5.0 to 17.0.0 (FreeTubeApp#8484)
  Bump vue-i18n from 11.2.7 to 11.2.8 (FreeTubeApp#8483)
  Translated using Weblate (Welsh)
  Bump qs from 6.14.0 to 6.14.1 (FreeTubeApp#8471)
  Translated using Weblate (Estonian)
  Bump lefthook from 2.0.12 to 2.0.13 (FreeTubeApp#8461)
  Translated using Weblate (Dutch)
  Fix DeArrow thumbnails for shorts getting stretched (FreeTubeApp#8434)
  Clean up FtSlider CSS (FreeTubeApp#8438)
  Migrate the GeneralSettings component to the composition API (FreeTubeApp#8439)
  Translated using Weblate (English (United Kingdom))
  Bump vue-i18n from 11.2.2 to 11.2.7 (FreeTubeApp#8451)
  Bump electron-builder from 26.3.6 to 26.4.0 (FreeTubeApp#8446)
  Bump lefthook from 2.0.11 to 2.0.12 (FreeTubeApp#8449)
  ...
@PikachuEXE
Copy link
Member Author

Maybe last build: https://github.com/PikachuEXE/FreeTube/actions/runs/21014343103
Please test

@MulverineX
Copy link

MulverineX commented Jan 15, 2026

I gave this a shot and its working for me, haven't tested it that extensively though.

@efb4f5ff-1298-471a-8973-3d47447115dc

working perfectly like reported earlier internally but when i set default formats to legacy in the settings it always plays dash

@PikachuEXE
Copy link
Member Author

PikachuEXE commented Jan 16, 2026

I got this and I have no idea how to fix yet
Update 1: No such issue on dev
image

@PikachuEXE
Copy link
Member Author

Fixed
Legacy format requires it to be handled as if SABR disabled, and the ad time parsing also needs to be updated
Build: https://github.com/PikachuEXE/FreeTube/actions/runs/21084719641

@efb4f5ff-1298-471a-8973-3d47447115dc

New build: https://github.com/PikachuEXE/FreeTube/actions/runs/21094847809

@efb4f5ff-1298-471a-8973-3d47447115dc

remaining thing todo is to get rid of the toggle in experimental settings and the fallback to the workarounds

@absidue absidue added the PR: waiting for review For PRs that are complete, tested, and ready for review label Jan 17, 2026
@efb4f5ff-1298-471a-8973-3d47447115dc

remaining thing todo is to get rid of the toggle in experimental settings and the fallback to the workarounds

This will be addressed in a followup. So ready to merge!

Copy link
Member

@ChunkyProgrammer ChunkyProgrammer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work everyone ❤️

@FreeTubeBot FreeTubeBot merged commit 15fb9ee into FreeTubeApp:development Jan 17, 2026
5 checks passed
@github-actions github-actions bot removed the PR: waiting for review For PRs that are complete, tested, and ready for review label Jan 17, 2026
PikachuEXE added a commit to PikachuEXE/FreeTube that referenced this pull request Jan 19, 2026
* development: (55 commits)
  Translated using Weblate (Chinese (Simplified Han script))
  Translated using Weblate (Czech)
  Translated using Weblate (Russian)
  Translated using Weblate (Polish)
  Translated using Weblate (Kurdish (Central))
  Translated using Weblate (French)
  Use GITHUB_TOKEN instead of dedicated PUSH_TOKEN in auto-merge workflow (FreeTubeApp#8541)
  Local API: Implement SABR for VODs (FreeTubeApp#8047)
  Bump package version from 0.23.12 to 0.23.13 (FreeTubeApp#8531)
  Update CodeQL workflow to match the latest template (FreeTubeApp#8533)
  fix: video player playback rate (FreeTubeApp#8407)
  Decipher live DASH manifest URL (FreeTubeApp#8530)
  Add a show all windows button to the tray menu (FreeTubeApp#8494)
  Disable automatically running the flatpak workflow (FreeTubeApp#8507)
  fix using shift on watch page (FreeTubeApp#8491)
  Translated using Weblate (Hebrew)
  Translated using Weblate (Hebrew)
  Fix WAPT link in README (FreeTubeApp#8529)
  Fix typo in auto-merge workflow (FreeTubeApp#8518)
  Added translation using Weblate (Uzbek)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: dependencies Pull requests that update a dependency file

Projects

None yet