fix(instant-stream): force android player client (cookie-auth web is SABR-only)#101
Merged
Merged
Conversation
…SABR-only) THE actual reason #771 (and, once cookies were added, #772 and every other video) wouldn't play — found in the server log: ERROR: [youtube] <id>: Requested format is not available Not cookies, not age: once requests are authenticated with cookies, YouTube serves the `web` client SABR-only formats with no progressive/muxed itag, so the instant-stream's progressive selector matches nothing and every resolve 502s. The `android` client still serves itag 18; verified end-to-end (resolves AND fetches HTTP 206 valid MP4). - Resolve now passes `--extractor-args youtube:player_client=android,web` (android for the progressive stream, web kept for age-gate auth). - Share PROGRESSIVE_FORMAT + player_client_args from app.utils.ytdlp so the cookie probe resolves *exactly* as playback does — "connected" now means the real progressive resolve worked, not just that --simulate could read metadata. - verify_cookies treats "requested format is not available" on the age probe as a failure (don't claim connected when no playable stream came back). 321 passed; ruff + mypy clean. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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.
The actual root cause (from the server log)
It was never (just) cookies or age. Once requests are authenticated with cookies, YouTube serves the
webclient SABR-only formats — no progressive/muxeditag. The instant-stream proxies a single muxed file, so the progressive selector matched nothing and every resolve 502'd (which is why #772 broke the moment valid cookies went in). The age gate was a separate, earlier layer we already solved.Fix
--extractor-args youtube:player_client=android,web—androidstill servesitag 18(progressive),webis kept for age-gate auth. Verified locally end-to-end: resolves and fetchesHTTP 206, valid MP4 (no po-token wall).PROGRESSIVE_FORMAT+player_client_args()intoapp.utils.ytdlpso the cookie probe resolves exactly as playback does — green now means the real progressive resolve worked, not just that--simulateread metadata.verify_cookiestreats"requested format is not available"on the age probe as a failure, so the panel won't claim "connected" when no playable stream came back.Tests
resolve splices the player-client args; verify handles resolved / age-gate / malformed / probe-removed / SABR-no-progressive. 321 passed, ruff + mypy clean.
🤖 Generated with Claude Code