Skip to content

Conversation

PikachuEXE
Copy link
Collaborator

@PikachuEXE PikachuEXE commented Sep 17, 2025

Pull Request Type

  • Bugfix
  • Feature Implementation
  • Documentation
  • Other

Related issue

Closes #7145
#7887

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
  • Handle more edge cases if found

@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

Didnt test yet but im very sure this will close the SABR related issues

#7119
#6683

@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
Collaborator 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
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
Copy link
Contributor

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

@PikachuEXE
Copy link
Collaborator 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)
@PikachuEXE
Copy link
Collaborator Author

@efb4f5ff-1298-471a-8973-3d47447115dc
Audio track seems fixed (I don't have many videos to test)
#7921 seems to be timeout so this PR raising the timeout for SABR responses (due to bigger response body sometimes) might or might not make it better
Auto reload currently only occurs when infinite retry detected (except redirect where none encountered yet)

@ArthurKun21 Let me know if it occurs more often. But could be YT testing new player which affects dev/current release too

@ArthurKun21
Copy link

ArthurKun21 commented Sep 23, 2025

From branch -> https://github.com/PikachuEXE/FreeTube/actions/workflows/build.yml?query=branch%3Asabr-pr

Build -> https://github.com/PikachuEXE/FreeTube/actions/runs/17933228357

https://youtu.be/ubfACjzvBOg

bundle-1758599566888.log


I go out of the window and then play the same video again. It played but like few seconds to the music it reloaded. Thought you might want the log for it

bundle-1758599733091.log

@PikachuEXE
Copy link
Collaborator Author

PikachuEXE commented Sep 23, 2025

I got more reloads at the middle these few days
No idea why, adding debug stuff to my custom build to find out...

Update 1: HTTP 403 Not player JS related (still using 0004de42) but no idea what causes it..
Update 2: Seems to be Failed to extract signature decipher algorithm all the time
Update 3: Testing new fix for audio track with less requests but not sure if that's the cause of 403 (so I enabled some logging and toasts - https://github.com/PikachuEXE/FreeTube/actions/runs/17939377956

@ArthurKun21
Copy link

ArthurKun21 commented Sep 23, 2025

https://github.com/PikachuEXE/FreeTube/actions/runs/17939377956

same music video -> https://youtu.be/ubfACjzvBOg

bundle-1758619603841.log

it still reloaded near the start


different music video https://youtu.be/EjlMPu5sEgw

bundle-1758619987994.log

same issue, reloaded near the start

@efb4f5ff-1298-471a-8973-3d47447115dc
  • Should be sorted A-Z
  • 2x Chinese is listed but i only see one on YT
VirtualBoxVM_Wbl6jvje6r

English should be listed above descriptive
VirtualBoxVM_rW00ywAChm

@absidue
Copy link
Member

absidue commented Sep 23, 2025

English should be sorted above descriptive

We don't sort the audio tracks, that was the same before this PR. Lets keep this PR focused on implementing SABR, all unrelated bugs and feature requests should be left until later.

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
Development

Successfully merging this pull request may close these issues.

4 participants