Show HN: Gemini can now natively embed video, so I built sub-second video search

https://github.com/ssrajadh/sentrysearch
Gemini Embedding 2 can project raw video directly into a 768-dimensional vector space alongside text. No transcription, no frame captioning, no intermediate text. A query like "green car cutting me off" is directly comparable to a 30-second video clip at the vector level.

I used this to build a CLI that indexes hours of footage into ChromaDB, then searches it with natural language and auto-trims the matching clip. Demo video on the GitHub README. Indexing costs ~$2.50/hr of footage. Still-frame detection skips idle chunks, so security camera / sentry mode footage is much cheaper.

Comments

macNchzMar 24, 2026, 5:56 PM
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.

citruscomputingMar 24, 2026, 7:07 PM
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/

robertlagrantMar 25, 2026, 1:33 PM
I live in Oxford, UK and walked past a police van that said "automatic facial recognition in use". Not exactly a good sign without any caveats. I imagine they recorded me staring at their van.
sohamrjMar 24, 2026, 6:33 PM
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.
mpalmerMar 24, 2026, 7:06 PM
It's 2.50 an hour because Google has margins. A nation state could do it at cost, and even if it's not a huge difference, the price of a year's worth of embeddings is just $21,900. That's a rounding error, especially considering it's a one time cost for footage.
wholinator2Mar 24, 2026, 7:12 PM
Right? $2.50 an hour is trivial to a Government that can vote to invent a trillion dollars. Even just 1 million dollars is the cost of monitoring 45 real time feeds for a year. I'm sure just many very rich people would pay that for the safety of their compound.
jimmySixDOFMar 24, 2026, 10:28 PM
How are you getting to $2.50/hr ? The price sheet says its 0.00079 per frame.

https://ai.google.dev/gemini-api/docs/pricing#gemini-embeddi...

jjwisemanMar 24, 2026, 11:46 PM
From what I see the code downsamples video to 5 fps, so 1 hour of video is 3600 seconds * 5 fps = 18,000 frames. 18,000 frames * $0.00079/frame = $14.22. A couple dollars more with the overlap.

(The code also tries to skip "still" frames, but if your video is dynamic you're looking at the cost above.)

sohamrjMar 25, 2026, 1:35 AM
you're right that the code uses ffmpeg to downsample the chunks to 5fps before sending them, but that's only a local/bandwidth optimization, not what the api actually processes.

regardless of the file's frame rate, the gemini api natively extracts and tokenizes exactly 1 fps. the 5 fps downscaling just keeps the payload sizes small so the api requests are fast and don't timeout.

i'll update the readme to make this more clear. thanks for bringing this up.

jjwisemanMar 25, 2026, 4:35 AM
Thanks for the details and correction.
Ajedi32Mar 24, 2026, 7:27 PM
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.

SpivakMar 24, 2026, 7:56 PM
I think Flock is just a symptom of the underlying tech becoming so cheap that "just blanket the city in cameras" starts to sound like a viable solution when police rely so heavily on camera footage.

I don't think it's a good thing but it seems the limiting factor has been technological feasibility instead of any kind of principle against it.

cake_robotMar 24, 2026, 7:19 PM
Yeah, the panopticon is now technically very feasible it's just expensive to implement (for now).
whattheheckheckMar 24, 2026, 11:48 PM
Its very cheap to target an individual though so they dont need to look everywhere
FuckButtonsMar 24, 2026, 11:57 PM
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.
mbokinalaMar 25, 2026, 9:28 AM
greggsyMar 24, 2026, 8:42 PM
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.
macNchzMar 24, 2026, 10:26 PM
It's definitely creeping into things, though most of the features I've seen are fairly simplistic compared to what would be possible if the video was being reviewed + indexed by current SoTA multimodal LLMs.
zahlmanMar 25, 2026, 12:42 AM
> 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.

macNchzMar 25, 2026, 2:24 AM
Not claiming to have hit on something unique here, but I think it’s realistic and often drowned out in favor of sci-fi nonsense.
janalsncmMar 24, 2026, 7:44 PM
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.
hypeateiMar 24, 2026, 8:01 PM
I think a general description is better for surveillance/tracking like this, no? If they're at a weird angle or intentionally concealing their face then facial recognition falls apart but being able to describe them naturally would result in better tracking IMO.
macNchzMar 24, 2026, 10:22 PM
Presumably the ideal is some kind of a fusion. Upload or tag some images/videos and link someone's social profiles and the system can look out for them based on facial recognition, gait recognition, vehicle/pets/common wardrobe items in combination.
npilkMar 25, 2026, 4:01 AM
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

sbinneeMar 25, 2026, 7:07 AM
Nice article. I saw someone depicting the future of web search with AI. The conclusion was not the bright future. Simply put, ads will never go away. Either AI providers will get paid for whitelisting ads, or even worse these AI will directly promote advertised products.
WarmWashMar 25, 2026, 1:52 PM
People could collectively decide to start paying for stuff and most of our gripes could at least switch to providers not accommodating their customers.
greesilMar 25, 2026, 2:42 PM
Collective action is not our strong suit.
CamperBob2Mar 25, 2026, 4:57 PM
To which I'd say to the advertiser, "Good luck paying off the AI adblocker running in my closet at home."

Then again, let's not be too hasty here. Let's see what you're willing to offer. I can sell you the eyeballs of the AI ad-watcher running in my closet for $10/impression. Or, for $1000/impression, you can bring your message to the attention of myself, an actual human. A bargain at any price!

rigrassmMar 24, 2026, 7:52 PM
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!

cloogshicerMar 24, 2026, 7:39 PM
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.

sohamrjMar 24, 2026, 8:07 PM
Yeah, this is a great idea, I’ve actually been thinking about exactly this as the next logical step.

SentrySearch already returns precise in/out timestamps for any natural-language query and uses ffmpeg to auto-trim clips. Turning that into an EDL (or even a direct Premiere plugin that exports an editable cut list) feels natural.

I’m not a Premiere expert myself, but I’d love to see this happen. If you (or anyone) wants to sketch out a quick EDL exporter or plugin, I’ll happily review + merge a PR and help wherever I can. Just drop a GitHub issue if you start something!

mdrznMar 24, 2026, 4:23 PM
Very interesting (not for a dashcam, but for home monitoring).
SoftTalkerMar 25, 2026, 5:30 AM
Most home monitoring only records when there is movement though? So that already compresses the search space a lot. And just zipping forward and back it's pretty easy to quickly find the 30 seconds where there is a figure wallking up to your front door.
fheMar 25, 2026, 12:51 AM
this function will be a must-have for all home security systems. I used to spend hours going through home security cameras to check if our cat went out the house when the door was accidentally left open (turned out it was just really good at hiding within the house).
lwarfieldMar 24, 2026, 10:29 PM
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

emmitskaMar 25, 2026, 11:35 PM
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.
shivang2607Mar 26, 2026, 5:01 PM
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.
danbrooksMar 24, 2026, 6:13 PM
I work in content/video intelligence. Gemini is great for this type of use case out of the box.
simonreiffMar 24, 2026, 5:49 PM
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.
sohamrjMar 24, 2026, 6:38 PM
Thanks! Yeah that would be pretty cool, but continuous indexing would be pretty expensive now, because the model's in public preview and there are no local alternatives afaik.

This very well might be a reality in a couple years though!

jakejmnzMar 26, 2026, 2:53 PM
Very cool stuff, gave me the inspiration to try it locally. Works fairly well I think: https://github.com/jakejimenez/sentinelsearch
CamperBob2Mar 25, 2026, 4:19 AM
Could https://qwen.ai/blog?id=qwen3-vl-embedding be a possible local alternative?
SpaceManNabsMar 24, 2026, 5:25 PM
> 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?

sohamrjMar 24, 2026, 5:33 PM
Yes to both. The embedding is over raw video frames, so anything visible (text, signs, captions) gets captured in the vector. And Gemini Embedding 2 extracts the audio track and embeds it alongside the visual frames. So a query like 'someone yelling' would theoretically match on audio. My dashcam footage doesn't have audio though, so I haven't tested that side yet.
7777777philMar 24, 2026, 5:00 PM
Today I learned that Gemini can now natively embed video..

Cool Project, thanks for sharing!

wuliwongMar 26, 2026, 6:58 PM
I am working on a really similar thing. My buddy just sent me this. Hit me up if you wanna chat!
bob1029Mar 25, 2026, 8:39 AM
> 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.

bobafett-9902Mar 24, 2026, 8:43 PM
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/
novoreorxMar 25, 2026, 7:53 AM
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
sohamrjMar 25, 2026, 2:18 PM
ur not wrong
WatchDogMar 24, 2026, 9:51 PM
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?
sohamrjMar 24, 2026, 10:32 PM
yea, it's so events on a chunk boundary still get captured in at least one chunk. i haven't had the chance to do formal benchmarks on overlap vs. no-overlap yet. the 5s default is a pragmatic choice, long enough to catch most events that would otherwise be split, short enough to not add much cost (120 chunks/hr to ~138). also it's configurable via the --overlap flag.
nullbyteMar 24, 2026, 5:38 PM
What a brilliant idea! is this all done locally? That's incredible.
apwheeleMar 24, 2026, 5:44 PM
While the vector store is local, it is sending the data to Gemini's API for embedding. (Which if using a paid API key is probably fine for most use cases, no long term retention/training etc.)
jakejmnzMar 26, 2026, 2:54 PM
works completely locally with a decent model: https://github.com/jakejimenez/sentinelsearch
jakejmnzMar 26, 2026, 2:54 PM
Make a proof of concept, honestly worked fairly well: https://github.com/jakejimenez/sentinelsearch
febedMar 25, 2026, 4:47 AM
This seems like something that would be very expensive to run. Do you have some representative figures at a particular resolution and frame rate?
addandsubtractMar 25, 2026, 4:56 PM
The README on the GitHub has a section on this[0]:

>Indexing 1 hour of footage costs ~$2.84 with Gemini's embedding API (default settings: 30s chunks, 5s overlap):

>1 hour = 3,600 seconds of video = 3,600 frames processed by the model. 3,600 frames × $0.00079 = ~$2.84/hr

>The Gemini API natively extracts and tokenizes exactly 1 frame per second from uploaded video, regardless of the file's actual frame rate. The preprocessing step (which downscales chunks to 480p at 5fps via ffmpeg) is a local/bandwidth optimization — it keeps payload sizes small so API requests are fast and don't timeout — but does not change the number of frames the API processes.

[0] https://github.com/ssrajadh/sentrysearch#cost

giversoftheintMar 26, 2026, 9:03 AM
Oh I'm getting this for my website. Cool. Thanks.
ygouzerhMar 24, 2026, 4:07 PM
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!
stavrosMar 24, 2026, 4:34 PM
Man, the surveillance applications for this are staggering.
dev_tools_labMar 24, 2026, 4:11 PM
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?
sohamrjMar 24, 2026, 4:37 PM
as of now, no threshold but that is planned in the future.

for example, for now if i search "cybertruck" in my indexed dashcam footage, i don't have any cybertrucks in my footage, so it'll return a clip of the next best match which is a big truck, but not a cybertruck

dev_tools_labMar 25, 2026, 9:37 AM
Makes sense for now. Thresholding becomes critical at scale though — good luck with the next iteration!
rao-vMar 25, 2026, 1:44 AM
Is there a decent open video embedding model out there? I’d love to play with this without uploading video.
subhashpMar 25, 2026, 8:32 AM
Can I give it a photo of a person and ask it to search for the person in the video?
kamranjonMar 24, 2026, 5:18 PM
Does anyone know of an open weights models that can embed video? Would love to experiment locally with this.
sohamrjMar 24, 2026, 5:37 PM
Not aware of any that do native video-to-vector embedding the way Gemini Embedding 2 does. There are CLIP-based models (like VideoCLIP) that embed frames individually, but they don't process temporal video. you'd need to average frame embeddings which loses a lot.

Would love to see open-weight models with this capability since it would eliminate the API cost and the privacy concern of uploading footage.

CamperBob2Mar 25, 2026, 4:20 AM
A quick search brought up https://qwen.ai/blog?id=qwen3-vl-embedding but I have no idea if it does what Gemini is doing here.
jakejmnzMar 25, 2026, 5:45 PM
more or less works similarly, made a proof of concept for it: https://github.com/jakejimenez/sentinelsearch
CamperBob2Mar 26, 2026, 4:31 AM
Very cool, thanks. Will check it out.
jakejmnzMar 26, 2026, 2:55 PM
[dead]
martzMar 25, 2026, 6:18 AM
jakejmnzMar 26, 2026, 2:50 PM
[dead]
cat-turnerMar 24, 2026, 11:15 PM
This is great, thanks for sharing
ideashowerMar 25, 2026, 6:02 PM
Is there a local model that this would work with?
totisjosemaMar 24, 2026, 7:53 PM
What is your experience so far with the quality of the retrieved pieces?
sohamrjMar 24, 2026, 7:57 PM
I've found I have to be very specific to get the clip I'm searching for. For example, "car cuts me off" just returned a clip of a car driving past my blindspot. But, "car with bike rack on back cuts me off at night" gave me exactly the clip I was looking for.
sans_souseMar 25, 2026, 2:09 AM
Total aside here but is that you driving the pickup I assume?
sohamrjMar 25, 2026, 2:12 AM
haha no i'm driving the tesla and that clip is from the left repeater camera (teslas record from all around the car)
crashabrMar 25, 2026, 2:05 AM
I wonder how well this would work with dance videos.
AeroiMar 24, 2026, 4:35 PM
very cool, anybody have apparent use cases for this?
mannyvMar 24, 2026, 11:03 PM
Indexing all your porn and skipping all the filler.
iso1631Mar 25, 2026, 12:12 PM
isn't the "fill her" the point of porn?
sohamrjMar 24, 2026, 4:48 PM
dashcam and home security footage are the 2 main ones i can think of.

a bit expensive right now so it's not as practical at scale. but once the embedding model comes out of public preview, and we hopefully get a local equivalent, this will be a lot more practical.

CamperBob2Mar 25, 2026, 4:09 AM
Trail and game cams come to mind. "Create a montage of all deer encounters," "Find first appearance of black bear this year," that sort of thing.
giozaarourMar 24, 2026, 5:16 PM
I think a good use case would be searching for certain products or videos across social media (TikTok and Instagram). especially useful for shopping, maybe
vidarhMar 24, 2026, 5:28 PM
Branding/marketing monitoring companies would be all over this.
hebelehubeleMar 24, 2026, 5:00 PM
State surveillance
wahnfriedenMar 24, 2026, 5:28 PM
Worker surveillance
thegabrieleMar 24, 2026, 10:02 PM
Why just the dash cam?
sohamrjMar 24, 2026, 10:25 PM
dashcam is just one of the use cases and the one i tested on. but this could theoretically work with any kind of video footage like home security footage
klntskyMar 24, 2026, 4:27 PM
why not skip the text conversion? is it usable at all?
sohamrjMar 24, 2026, 4:32 PM
gemini embedding 2 converts straight video to vectors. in this case, dashcam clips don't have audio to transcribe and even if they did, it would be useless in the search
password4321Mar 24, 2026, 4:57 PM
What are the SoA audio models right now?
rkaliupinMar 25, 2026, 1:18 AM
[dead]
matzalazarMar 24, 2026, 8:08 PM
[dead]
hikaru_aiMar 25, 2026, 7:10 AM
[dead]
emsignMar 24, 2026, 4:56 PM
Where is the Exit to this dystopia?
nclin_Mar 24, 2026, 6:18 PM
Well, with data analysis powers like this a few treasonous words in front of a flock camera will show you the way.
RobotToasterMar 24, 2026, 5:42 PM
In the matrix the exit was pay phones, which perhaps explains why our overlords are removing them
greesilMar 25, 2026, 2:42 PM
Suicide booths a la Futurama
anxooMar 24, 2026, 10:16 PM
sbinneeMar 25, 2026, 7:10 AM
Thanks for sharing. They say "pause", not stop. Assume that we pause now. When should we resume then? How do we know?
moomoo11Mar 25, 2026, 7:57 AM
You don’t wanna live in Night City?
jama211Mar 24, 2026, 5:59 PM
I don’t think this means we’re in a dystopia
zwirblMar 24, 2026, 6:27 PM
You might not have been paying attention
52-6F-62Mar 24, 2026, 6:49 PM
I think Radiohead said that
draw_downMar 24, 2026, 6:06 PM
The dystopia of searching for video clips and finding them? What?
bitexploderMar 24, 2026, 10:14 PM
Yes? Right now it is relatively expensive to search video. As embedding tech like this advances and makes it even cheaper it just increases the ability to search and analyze every movement. “Locate speech patterns that indicate dissident activity using the dissident activity skill”
draw_downMar 26, 2026, 10:33 AM
[dead]
BrokenCogsMar 24, 2026, 5:13 PM
The Matrix style human pods: we live in blissful ignorance in the Matrix, while the LLMs extract more and more compute power from us so some CEO somewhere can claim they have now replaced all humans with machines in their business.
throwup238Mar 24, 2026, 5:26 PM
I was thinking more of the season 3 episode of Doctor Who titled Gridlock where everyone lives in flying cars circling a giant expressway underground, while all the upper class people on the surface died years ago from a pandemic.
ting0Mar 24, 2026, 5:37 PM
Ever get the feeling that the universe is reading your mind? Maybe there's some truth to that after all.
QubridAIMar 24, 2026, 9:03 PM
[flagged]
QubridAIMar 25, 2026, 8:24 PM
[flagged]