feat(youtube): support live streams through SABR#87
Open
Priveetee wants to merge 5 commits into
Open
Conversation
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.
Depends on #86
Part of TypeType-Video/TypeType#145
Summary
While working on live SABR support in TypeType, I found that PipePipeExtractor already decodes most of the required live protocol data, but live streams are still excluded from the normal SABR stream and session path.
YouTube live responses also behave differently from VOD responses: the live window evolves through
LIVE_METADATA, segment numbers are absolute within the broadcast timeline, and MP4/WebM media responses can include initialization data again with each media fragment.This adds the missing extractor-side handling for those cases.
Problem
The current stream extractor only builds WEB/MWEB SABR streams for VOD. Live and post-live streams are routed through the existing HLS path instead.
Even when a SABR session is opened manually, the session still has several VOD assumptions:
This prevents a downstream client from driving a complete live SABR session through the normal extractor API.
Changes
LIVE_METADATAwhile the UMP response is still being streamed.ftyp/moovinitialization data andmoof/mdatmedia data.Cluster.Validation
Build:
./gradlew :extractor:compileJava./gradlew :extractor:buildgit diff --checkLive SABR probe:
Observed behavior:
Notes
This PR is extractor-only.
It does not switch PipePipe Client live playback from its current DASH/HLS path to SABR. It makes the existing extractor SABR API capable of supporting live playback when a client chooses to use it.