Repository navigation
feat(video): read a YouTube video as a citable, timestamped transcript - #8
Merged
Merged
Conversation
fetchAndExtract sends a YouTube video URL to a transcript ladder instead of the watch page: manual subtitles, then the video's own auto-captions (never a machine translation, rolling repetition undone), then a local whisper transcription through uvx, each behind a words-per-minute gate. Everything goes through yt-dlp; its failures come back as reasons, and doctor shows its age and what whisper needs. Refs #7
- a caller's signal reaches every command (shAsync kills the tree on abort), so an MCP client that gives up stops yt-dlp, ffmpeg and whisper - WHISPER_TIMEOUT_MS is one deadline for download, conversion and transcription, and a slot no transcription used is refunded - only a recognised video URL is read; yt-dlp gets the canonical watch URL after --, so no caller string can reach it as an option - live and upcoming streams are left until they have ended - rolling-caption dedupe drops only the lines a cue carries over, so a line said twice on purpose survives; manual tracks never roll - whisper is told a bare language code; the header names the subtitle track and flags a translation; every chapter heading is kept Refs #7
|
🎉 This PR is included in version 1.22.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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.
First of four PRs for #7 (spec:
docs/superpowers/specs/2026-09-30-video-engine-design.md).fetchAndExtractnow sends a YouTube video URL to a transcript ladder instead of the watch page:<lang>-orig), never a machine translation; rolling captions de-duplicated;uvx whisper-ctranslate2, PyAV pinned<18), budgeted byWEBINDEX_WHISPER_MAX.Each rung sits behind a words-per-minute gate. Everything goes through yt-dlp; its failures (403 / sign-in / PO token, private, members-only, age-restricted, removed, unavailable) come back as notes. Output is Markdown with a metadata header, a
##heading per chapter and a[mm:ss]stamp per paragraph; segments never straddle a chapter start.src/video/{url,ytdlp,vtt,whisper,ladder,markdown}.tsbehindsrc/video.tsfetch/webindex_fetchread videos with no change on their side;documentType: "video", extractorsmanual-subs | auto-subs | whisper, own cache namespacedoctorgainsvideo rungs(yt-dlp version and age, flagged past 60 days; uvx and ffmpeg for whisper),rungs.videoin JSONWEBINDEX_VIDEO_ENGINES,WEBINDEX_WHISPER_MODEL|MAX|TIMEOUT_MS,WEBINDEX_YTDLP_ARGSTested with real VTT fixtures (manual, translated, rolling auto-captions) and an injected runner — no network in the suite. Checked live on manual-subtitle, auto-caption-only (French) and whisper transcriptions.