fix(youtube): restore SABR initialization cold start#86
Open
Priveetee wants to merge 1 commit into
Open
Conversation
Owner
|
Thanks. I was able to reproduce the missing init segment issue, but in my local testing, changing the request shape as done here did not appear to fix it. Can you share some logs showing the difference in your test environment? |
Owner
|
btw, thanks for your replies and doc updates this week :) I'm busy with some other things this week and your works really helps a lot. (and I am not good at writing docs lol |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
While fixing a SABR playback regression in TypeType, I found that initialization requests could receive several valid SABR responses without the requested init segment.
The session eventually failed with:
PipePipe normally gets initialization data directly from the format metadata, but both the player fallback and the downloader still use
fetchSegment(SabrSegmentRequest.initialization(...))when that data is unavailable.This restores the cold-start request shape needed for those initialization requests without changing the normal media request flow.
Problem
An initialization request needs to identify the requested audio or video track without carrying the buffered ranges and playback state of a normal follow-up request.
With the current request shape, YouTube can return policy and media responses while skipping the requested init segment entirely.
Changes
Validation
Build:
./gradlew :extractor:compileJavagit diff --checkRuntime validation through TypeType with the patched extractor:
Test videos:
https://www.youtube.com/watch?v=X4FeyMPB6SYhttps://www.youtube.com/watch?v=J_T7EFHEcpcNotes
This is extractor-only. PipePipe already uses the affected initialization API, so no client change is required.
This does not address WebView, BotGuard, or DNS failures. It only fixes SABR init-segment retrieval.