Skip to content

feat(youtube): add SABR download session helpers#79

Merged
InfinityLoop1308 merged 6 commits into
InfinityLoop1308:mainfrom
Priveetee:draft/sabr-download
Jul 2, 2026
Merged

feat(youtube): add SABR download session helpers#79
InfinityLoop1308 merged 6 commits into
InfinityLoop1308:mainfrom
Priveetee:draft/sabr-download

Conversation

@Priveetee

@Priveetee Priveetee commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Part of InfinityLoop1308/PipePipe#2569

Pairs with the client-side SABR download draft: InfinityLoop1308/PipePipeClient#68

Summary

This adds the small extractor-side helpers needed by the SABR downloader.

Right now I have something working locally on the client side, but this is still draft. I will keep updating this PR while testing/fixing the remaining cases. Once it looks solid enough, I will ask for review.

Why

SABR download cannot really use the old direct URL / post-processing path.

Playback already drives a real SABR session, but download needs to do something similar:
request the selected audio/video formats, collect init/media segments, write them in order, then let the client mux the result.

This extractor PR only exposes the small session controls needed for that.

Changes

  • Add SABR request modes:
    • audio only
    • video only
    • audio + video
  • Add a way to discard a cached segment after the downloader wrote it to disk

Current local state

With the paired client draft, I can download one SABR AV1 test video locally:

Notes

Draft on purpose.

This is working locally for the tested case, but I still need more testing and probably more updates before review.

@Priveetee Priveetee force-pushed the draft/sabr-download branch 2 times, most recently from e649b67 to 93fb5ed Compare July 1, 2026 11:43
@Priveetee Priveetee marked this pull request as ready for review July 1, 2026 15:38
@Priveetee

Copy link
Copy Markdown
Contributor Author

@InfinityLoop1308 I think this extractor side is ready for review too.

This is the extractor part needed by the SABR download implementation on the client side. The client PR now uses these helpers to drive SABR download sessions instead of treating SABR like a normal direct URL.

I tested it together with the client PR on emulator, with:

  • AV1 720p HFR download: ok, final MP4 with AV1 + AAC.
  • VP9/WebM video+audio: ok.
  • Opus audio-only: ok.
  • Audio-only after clean reinstall + SAF folder permission + overwrite: ok.
  • Long video download, Big Buck Bunny 10m34: ok.
  • Network cut/reconnect during download: ok, final file still valid.
  • Force-stop during download, then resume from Downloads: ok.
  • Temporary SABR work directory cleanup after success/retry/resume: ok.

Videos tested:

  • lLaRC7GkVR8
  • aqz-KE-bpKQ
  • dQw4w9WgXcQ
  • 3JZ_D3ELwOQ

The client PR is ready too now. I would still like you to test it on your side, especially with videos/formats that usually hit SABR edge cases.

@Priveetee Priveetee force-pushed the draft/sabr-download branch from 80cbf2a to 04f7781 Compare July 2, 2026 07:08
@InfinityLoop1308 InfinityLoop1308 merged commit 44e385a into InfinityLoop1308:main Jul 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants