feat(video): keep a video on disk and search it without reading it again - #10
Merged
Merged
Conversation
webindex video fetch writes <dir>/<id>/TRANSCRIPT.md, segments.json and meta.json, and reuses them on the next call without running yt-dlp; --refresh reads the video again. webindex video search ranks ~45 s passages of every kept video with BM25F, chapter titles as headings, each with its stamp and a link that opens the video there. The directory is --out, else WEBINDEX_VIDEO_DIR, else <tmp>/<brand>/video. Refs #7
|
🎉 This PR is included in version 1.23.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.
Second of four PRs for #7.
webindex video fetch <url>writes<dir>/<videoId>/TRANSCRIPT.md,segments.jsonandmeta.json, and reuses them on the next call without running yt-dlp at all;--refreshreads the video again,--langpicks the subtitle language.webindex video search <query>ranks ~45 s passages of every kept video (or one video's directory) with BM25F, chapter titles weighted as headings; each hit carries its[mm:ss]stamp and a&t=Nslink.--out <dir>(new value flag), elseWEBINDEX_VIDEO_DIR, else<tmp>/<brand>/video. UnderWEBINDEX_NO_WRITEnothing is written andfetchprints the transcript.videoRoot,fetchVideoRun,readVideoRun,listVideoRuns,searchVideoRuns.Checked live: a 20-min TED talk fetched in 3.4 s, then served again in 0.04 s with no yt-dlp call; search finds the right passages across an English talk and a French auto-captioned video.