Skip to content

fix: explain age-verification quality limit for YouTube downloads - #134

Merged
vanloctech merged 1 commit into
mainfrom
fix/issue-128-age-restricted-quality
Oct 30, 2026
Merged

vanloctech merged 1 commit into
mainfrom
fix/issue-128-age-restricted-quality

Conversation

@vanloctech

Copy link
Copy Markdown
Owner

Summary

Closes #128.

If the account behind the cookies hasn't passed YouTube's age verification, yt-dlp prints This video is age-restricted and YouTube is requiring account age-verification; some formats may be missing and can only fetch low-quality formats (usually format 18, 360p). Before this change the download finished at 360p with no explanation.

  • is_youtube_age_verification_notice detects that line.
  • log_youtube_age_verification_notice logs one info entry per download. The entry explains the 360p limit and tells the user to verify their age on YouTube with the cookie account, then refresh cookies.
  • The check runs on both stdout and stderr, in both download paths (download_video and handle_tokio_download). An AtomicBool shared across the stdout and stderr readers keeps it to one log entry per download.
  • A unit test covers the detector. Changelog entries are added in EN, VI and ZH-CN.

This PR does not get higher quality for these videos. That requires the user's account to be age-verified.

Test plan

  • Biome, tsc, bun tests and cargo check pass (pre-commit hook)
  • Unit test detects_youtube_age_verification_notice
  • Manual: download an age-restricted video with cookies from an account that isn't age-verified, and check that the notice shows up in Logs (ideally on Windows, where the issue was reported)

🤖 Generated with Claude Code

When YouTube requires account age-verification for an age-restricted
video, yt-dlp can only fetch low-quality formats (usually 360p). Detect
the notice on stdout and stderr in both download paths and log a clear
explanation once per download.

Closes #128

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-30T09:03:33.274682Z 9b63b1a PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@vanloctech
vanloctech merged commit b715e0a into main Oct 30, 2026
4 checks passed
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.

[Window] Downloading age-restricted videos causes downloaded videos to be 360p

1 participant