Show HN: Semantic search for video (semanticvideosearch.com)
Hello HN
Over the New Year's break, I created semanticvideosearch.com. This can search any video based on meaning and context. I would love to get your feedback on it. What should I change and what can be improved?
The preprocessed videos can be search very quickly, while the youtube video links take some time (yt videos also have a upper duration limit due to compute issues). I intend to add search based on the frames of the video soon.
I would love to know your thoughts on the demo and any suggestions for improvements.
Thanks!
PS: the inspiration to create this was to get the 2 mins of content from youtube videos with 18 other mins of fluff.
35 comments
[ 2.7 ms ] story [ 86.1 ms ] thread0b. Compare/contrast with https://freesubtitles.ai from https://news.ycombinator.com/item?id=33663486 and https://github.com/mayeaux/generate-subtitles
The OP site looks down right now, but it seems that semantic search in this context might mean something like object detection, whereas I am very interested in semantic search as in concept, idea, topic, linguistic search. (The simplest form of this would be direct transcript search, but if that can be transformed into additional useful semantic models to be searched, that would be gravy.)
That said, a constructive critique out of love follows, which may or may not fit with your goals:
1. The 10 minute length limitation makes this useless for most buried spoken content, because, you know, the longer videos have the more buried spoken content. Most detailed presentations are 15-60+ minutes where content would want to be searched IMO. A 3 hour limit would make more sense, but ideally none.
2. The heading says "any video", but the form specifies YouTube link. This needs to support Bitchute, Odysee, and Rumble, at least, because much interesting spoken content (which is totally reasonable content highly suitable for semantic search, if not to say, critically important, BTW) has been repeatedly banned from YouTube. (At least YouTube gives auto-transcripts if enabled for the video, that can be downloaded with tools. This web service actually most needs to exist for video platforms OTHER THAN YouTube, which have not implemented built-in machine-transcription options yet.)
3. The site needs SSL, or else the traffic (video links, titles, search terms) is communicated in plain text and plainly visible to all looking.
Other platforms, I'm sure you can figure out. However, I don't know how you will make this support larger videos affordably, which would be a requirement for it to be really useful IMO.
MOST IMPORTANT IDEA: I think you could support searching GROUPS of videos. So I want to provide URLs of 500 videos, and get their transcript indexed and searchable (with reasonable search capability--verbatim and fuzzy and regex, for example). And I want to share the link to upload more to that group, or to search just that group, with friends. But I do NOT want to simultaneously search the 50,000 videos that other people have listed on your service.
(Extension 1: Another reasonable way to approach searching COLLECTIONS of videos that might satisfy 90% of the use case would be to say: let me input a list of CHANNELS TO SEARCH--YouTube, Bitchute, Odysee, Rumble channel URLs--and show me the text search results for all videos indexed that were retrieved from those CHANNELs.) I might build custom "LISTS OF CHANNELS" to search, and share those collections with friends interested in searching the same content, instead of necessarily curating granular "lists of videos" to search. Though, both might be useful.
(Extension 2: Similarly, accepting input of CHANNELS TO INDEX (YouTube, Bitchute, Odysee, Rumble channel URLs) would be helpful. That way, I don't have to wait each n=? days and add a link to your site manually.)
1. I couldn't agree more. The only issue is transcribing the video. Everything else can be done for hour long videos. I was thinking about pushing transcribing on the user's browser, if possible.
2. Good point. Tbh I didn't even know about these platforms. Similarly, spotify and apple podcasts should also be covered. An issue with these platforms is that they may not have a good way to get the video from the platform (unlike youtube's yt-dlp). But in the long run, it can be covered.
3. Will add SSL soon.
Yes, groups would be very helpful. Another way to look at it would be channels on youtube/other-services. I plan on preprocessing most major channels among all services. For channels/set-of-videos not preprocessed, the only option would be asking user to pay for the compute (because the other option of transcribing on the user's browser won't work for groups of videos)
I will try to add more relevant features, especially the one about longer videos and collection of videos.
Thanks a lot!
For https://github.com/transitive-bullshit/yt-semantic-search, I'm using YouTube's built-in transcriptions which definitely aren't as high quality, but they work well enough to power the semantic search.
I've seen a few other people working on similar stuff in the wild. Very curious to see where this goes.
Plus large scale retrieval of video information is pretty challenging (even for them). Facebook had to create a new framework (FAISS) to solve this problem. So I presume it must be pretty challenging.
But on a short scale, they already do this. For some queries, in the search results, they show a youtube link which automatically goes to the relevant part of the video.
My default out of the box way to approach this would be something straightforward like a BERT-alike encoder to embed each target sentence in a FAISS index (hell, podcasts aren't long -- it could be brute force lookup, I suppose) or similar, with the same encoder running on the queries.
Something I've been playing with is Flan-T5 (https://huggingface.co/docs/transformers/model_doc/flan-t5), which has really strong out of the box question answering capabilities. I could see chunking in larger blocks and using the blocks as a context passage and the query as a question-oriented prompt. I've run some fine-tuning experiments with this setup for text generation (e.g. write me a summary of Huberman's key takes on dopamine) and find that the Flan-T5 model forgets a lot of its other capabilities when subject to fine tuning.
In any event, understand if you're not inclined to share, but love talking shop on this stuff.
There are a couple other tricks I use such as an overlap window for segments and a little post-processing for better results from the comparisons; but overall, this is the gist of it.
An issue with this approach is that ques-ans doesn't work as well as I'd like bec question and answer don't necessarily have similar embeddings ("What's the dog doing?", "He's sleeping" can be 2 completely independent sentences). So I would love to investigate more into Flan-T5 for this.
I am "AlexanderTheGreat#9743" on Discord if you want to discuss more.
https://haystack.deepset.ai/
https://github.com/transitive-bullshit/yt-semantic-search
I also built a semantic search engine for codebases using Openai's embedding and FAISS https://github.com/rahuldan/codesearch