Skip to content

feat(video): read any site yt-dlp supports, not only YouTube - #14

Merged
maxgfr merged 2 commits into
mainfrom
issue-13-video-any-site
Sep 30, 2026
Merged

maxgfr merged 2 commits into
mainfrom
issue-13-video-any-site

Conversation

@maxgfr

@maxgfr maxgfr commented Sep 30, 2026

Copy link
Copy Markdown
Owner

Closes #13.

  • fetch / webindex_fetch send the common video hosts to the transcript ladder by URL alone: YouTube, Vimeo (read through player.vimeo.com, since vimeo.com now asks yt-dlp to log in), Dailymotion, Twitch, TED, Loom, TikTok, Instagram reels, Facebook videos, X posts, Bilibili, Rumble. A post there with no video falls back to the page, with a note (fetchAndExtract gains video: false).
  • video fetch|frames|list take any http(s) URL and let yt-dlp decide. Under an MCP policy the video tools read only the known hosts (and only YouTube's lists): yt-dlp follows its own redirects, out of the public-address check's sight.
  • Runs are keyed <site>-<id> outside YouTube (vimeo-76979871); a known host's run is reused with no yt-dlp call, any other page costs one probe to learn its key.
  • SRT tracks as well as WebVTT (Dailymotion serves only SRT); DRM-protected formats are skipped, and a video served only under DRM says so; login walls, "no video at this URL" and "a list, not a video" are named.
  • Stamped links in each site's own form (?t=, #t=, ?start=, Twitch's ?t=1h2m3s).

Two defects found while testing for real on https://www.youtube.com/watch?v=TUPyNZO73Sk, fixed here:

  • a search hit's stamp was its 45 s passage's start (17:58) rather than the segment that answers (18:39);
  • an MCP video tool's relative dir was resolved against the server's working directory.

Checked live: the Apple Watch guide (French auto-captions, 20 min), vimeo.com/76979871 (manual subtitles through the player; frames refused with the DRM note), vimeo.com/1084537 and /22439234 (whisper), dai.ly/x7tgad0 (SRT), a direct .mp4 (whisper), and the MCP tools over stdio.

- fetch sends the common video hosts to the transcript ladder by their URL
  alone: YouTube, Vimeo (through its player, which needs no login),
  Dailymotion, Twitch, TED, Loom, TikTok, Instagram reels, Facebook videos,
  X posts, Bilibili, Rumble; a post there with no video is read as a page
- video fetch|frames|list take any http(s) URL and let yt-dlp decide; under
  an MCP policy only the known hosts (and YouTube's lists), since yt-dlp's
  own redirects escape the public-address check
- runs are keyed <site>-<id> outside YouTube; SRT tracks are read as well as
  WebVTT; links open at the second in each site's own form; DRM-protected
  formats are skipped, and a video served only under DRM says so
- a search hit's stamp is now the segment that answers, not its passage's
  start, which could be 40 s early
- an MCP video tool's relative dir lands under the video root, not the
  server's working directory

Closes #13
…s apart

- under a policy yt-dlp runs with --use-extractors default,-generic on every
  call (probe, subtitles, audio, frames, lists), so a tweet's player card or
  a redirect cannot send it to an arbitrary address
- frames download from the caller's approved URL, and a meta.json on disk
  is held to the same rules as any other URL
- a video host's post read as a page is cached as a page, with its format
  and read mode; any failure on a host that also carries posts falls back to
  the page, only YouTube, Vimeo and Dailymotion keep the video's reason
- a page read by the generic extractor, or an id made filesystem-safe, gets
  a hash of its URL in its run key: two pages never share a run
- runs are written under the URL's own key, which Twitch VODs, TED talks,
  TikTok, X and Loom now have; site names follow knownVideo's
- YouTube listings keep only YouTube videos (no channel tabs); an unguarded
  MCP list takes a watch URL that carries list=
- SRT with dotted milliseconds, trailing spaces and {\an8} codes; the DRM
  format filter, which filtered nothing, is gone

Refs #13
@maxgfr
maxgfr merged commit 8c570df into main Sep 30, 2026
3 checks passed
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 1.26.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@maxgfr
maxgfr deleted the issue-13-video-any-site branch September 30, 2026 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(video): read any site yt-dlp supports, not only YouTube

1 participant