Show HN: Gemini can now natively embed video, so I built sub-second video search (github.com)

by sohamrj 108 comments 438 points
Read article View on HN

108 comments

[−] macNchz 53d ago
This is a really cool implementation—embeddings still often feel like magic to me. That said, this exact use case is sort of also my biggest point of concern with where AI takes us, much more so than most of the common AI risks you hear lots of chatter about. We live in a world absolutely loaded with cameras now but ultimately retain some semblance of semi-anonymity/privacy in public by virtue of the fact that nobody can actually watch or review all of the video from those cameras except when there is a compelling reason to do so, but these technologies are making that a much more realistic proposition.

The presence of cameras everywhere is considerably more concerning than the status quo, to me at least, when there is an AI watching and indexing every second of every feed—where camera owners or manufacturers or governments could set simple natural language parameters for highly specific people or activities notify about. There are obviously compelling and easy-to-sell cases here that will surely drive adoption as it becomes cost effective: get an alert to crime in progress, get an alert when a neighbor who doesn't clean up after his dog, get an alert when someone has fallen...but the potential implications of living in a panopticon like this if not well regulated are pretty ugly.

[−] citruscomputing 52d ago
It's being built as we speak. I attended at a city council meeting yesterday, discussing approving a contract for ALPR cameras. I learned about a product from the camera vendor called Fusus[0], a dashboard that integrates various camera systems, ALPRs, alerts, etc. Two things stood out to me: natural-language querying of video feeds, and future planned integration with civilian-deployed cameras. The city only had budget for 50 ALPRs, and they stressed how they're only deploying them on main streets, but it seems like only a matter of time before your neighbor is able to install a camera that feeds right into the local PD's AI-enabled systems. One council member raised concerns about integrations with the citizen app[1] specifically (and a few others I didn't catch the names of). I'm very worried about where all this is heading.

[0]: https://www.axon.com/products/axon-fusus [1]: https://citizen.com/

[−] sohamrj 52d ago
Totally valid concern. Right now the cost ($2.50/hr) and latency make continuous real-time indexing impractical, but that won't always be the case. This is one of the reasons I'd want to see open-weight local models for this, keeps the indexing on your own hardware with no footage leaving your machine. But you're right that the broader trajectory here is worth thinking carefully about.
[−] Ajedi32 52d ago
Most cameras are also not queryable by any one person or organization. They are owned by different companies and if the government wants access they have to subpoena them after the fact.

The problems start cropping up when you get things like Flock where governments start deploying cameras on a massive scale, or Ring where a single company has unrestricted access to everyone's private cameras.

[−] cake_robot 52d ago
Yeah, the panopticon is now technically very feasible it's just expensive to implement (for now).
[−] FuckButtons 52d ago
Once the hardware to run inference for something like the vision understanding module of this can be run on a low / medium power asic drones are going to be absolutely horrifying weapons.
[−] greggsy 52d ago
All the major cloud providers offer some form of face detection and numberplate reading, with many supporting object detection (ie package, vehicle, person) out of the camera itself.
[−] zahlman 52d ago

> this exact use case is sort of also my biggest point of concern with where AI takes us, much more so than most of the common AI risks you hear lots of chatter about.

I've been hearing warnings that AI would be used for this since well before it seemed feasible.

[−] janalsncm 52d ago
For specific people they probably wouldn’t use general embeddings. These embeddings can let you search for “tall man in a trenchcoat” but if you want a specific person you would use facial recognition.
[−] rigrassm 52d ago
I picked up a Rexing dash cam a few months back and after getting frustrated with how clunky it is to get footage of it, I decided to look into building something out myself to browse and download the recordings without having to pull the SD card. While scrolling through the recordings, I explicitly remember thinking it would be nice to just describe what I was looking for and run a search. Looking forward to incorporating this into my project.

Thanks for sharing!

[−] npilk 52d ago
Multimodal AI will lead to an interesting arms race in ad detection vs ad insertion. I played around with AI ad removal with older Gemini models, but it seems like this would be even more powerful to instantly identify ads (and potentially mute or strip them out).

https://notes.npilk.com/experiments-with-ai-adblock

[−] cloogshicer 52d ago
Could this be used for creating video editing software?

Imagine a Premiere plugin where you could say "remove all scenes containing cats" and it'll spit out an EDL (Edit Decision List) that you can still manually adjust.

[−] mdrzn 53d ago
Very interesting (not for a dashcam, but for home monitoring).
[−] lwarfield 52d ago
Damn, I need to going with my embeddings project. I've currently got a prototype for using embeddings (not gemini in my case) for making a game that's kinda reverse connections:

collections.lwarfield.dev

[−] danbrooks 53d ago
I work in content/video intelligence. Gemini is great for this type of use case out of the box.
[−] simonreiff 53d ago
Very impressive! A webhook could be configured to trigger an alarm if a semantic match to any category of activities is detected, and then you basically have a virtual security guard and private investigator. Well played.
[−] SpaceManNabs 53d ago

> No transcription, no frame captioning, no intermediate text.

If there is text on the video (like a caption or wtv), will the embedding capture that? Never thought about this before.

If the video has audio, does the embedding capture that too?

[−] 7777777phil 53d ago
Today I learned that Gemini can now natively embed video..

Cool Project, thanks for sharing!

[−] emmitska 51d ago
The cost structure here is what stands out to me. $2.50/hr makes this viable for personal or small-business use cases that would have been unthinkable a year ago — security footage, home cameras, dashcam archives. The interesting design question is what happens when that cost drops another 10x and this is just a default feature of consumer cameras. Most people won't opt out of something they didn't know they opted into.
[−] bobafett-9902 52d ago
I wonder if the underlying improvements in visual language learning will allow for even more efficient search. The First Fully General Computer Action Model -> https://si.inc/posts/fdm1/
[−] bob1029 52d ago

> Check if a video chunk contains mostly still frames. Extracts 3 evenly-spaced frames as JPEG and compares file sizes.

I believe you could use a combination of select and scene parameters in ffmpeg to do this automatically when a chunk of video is created each time.

[−] shivang2607 51d ago
But don't you think 768 dimensional space is too less for comparing a video ? I build a similarity search for Anime and it worked Okayish. Really interested to know how it will work for video similarity search.
[−] novoreorx 52d ago
In the demo bro shows how to search for "a car with a bike rack on the back that cut me off at night." Given the grudge he must've held from being cut off, I strongly suspect that finding this specific car was his main motivation for building the project in the first place
[−] WatchDog 52d ago
I don't quite understand the 5 second overlap. I assume it's so that events that occur over the chunk boundary don't get missed, but is there any examples or benchmarking to examine how useful this is?
[−] nullbyte 53d ago
What a brilliant idea! is this all done locally? That's incredible.
[−] febed 52d ago
This seems like something that would be very expensive to run. Do you have some representative figures at a particular resolution and frame rate?
[−] ygouzerh 53d ago
That's quite interesting, well done! I haven't thought of this use case for embeddings. It open the door to quite many potential applications!
[−] dev_tools_lab 53d ago
Nice use of native video embedding. How do you handle cases where Gemini's response confidence is low? Do you have a fallback or threshold?
[−] wuliwong 50d ago
I am working on a really similar thing. My buddy just sent me this. Hit me up if you wanna chat!
[−] rao-v 52d ago
Is there a decent open video embedding model out there? I’d love to play with this without uploading video.
[−] kamranjon 53d ago
Does anyone know of an open weights models that can embed video? Would love to experiment locally with this.
[−] cat-turner 52d ago
This is great, thanks for sharing
[−] subhashp 52d ago
Can I give it a photo of a person and ask it to search for the person in the video?
[−] martz 52d ago
[−] totisjosema 52d ago
What is your experience so far with the quality of the retrieved pieces?
[−] giversoftheint 51d ago
Oh I'm getting this for my website. Cool. Thanks.
[−] sans_souse 52d ago
Total aside here but is that you driving the pickup I assume?
[−] ideashower 52d ago
Is there a local model that this would work with?
[−] crashabr 52d ago
I wonder how well this would work with dance videos.
[−] Aeroi 53d ago
very cool, anybody have apparent use cases for this?
[−] thegabriele 52d ago
Why just the dash cam?
[−] klntsky 53d ago
why not skip the text conversion? is it usable at all?
[−] rkaliupin 52d ago
[dead]
[−] matzalazar 52d ago
[dead]
[−] hikaru_ai 52d ago
[dead]
[−] emsign 53d ago
Where is the Exit to this dystopia?
[−] QubridAI 51d ago
[flagged]
[−] QubridAI 52d ago
[flagged]