Skip to content
Ideas

Open source · 2026

2 min read

vid-bid: swap the product inside a video

Upload a video, pick an object in it, give it a photo of your product, and get the same video back with your product where that object was. Free, local, no paid API and no account.

Product placement is sold once, years early, to one buyer, for every viewer. The camera has already moved; the can on the table is whatever can the production agreed on. vid-bid is the smallest version of the opposite idea: the object in the shot is a slot, and the product that fills it can change after the fact.

You give it a video, or paste a YouTube link (the first 60 seconds are used). It finds the objects it could replace, each with a thumbnail and the times it is on screen. You pick one and upload a photo of the new item. It tracks the old object through every frame and puts the new one in its place, with the scene's own lighting, condensation and grain, and the original audio untouched.

What it checks first

A replacement that does not fit is worse than none. Before anything is rendered, the photo is compared with what is in the clip, and a mismatch is refused with a plain message: "That isn't the same object. It looks like a shoe. Upload an image of a can." The check can be overridden when you know better.

Two engines

EngineWhat it is for
Fast (default)Wraps your product photo onto the tracked shape and lights it from the scene. Exact logo, frame-accurate, and it runs on an ordinary computer in minutes.
RealisticA generative pass with Wan 2.1 VACE, an open-weights video model that runs on your own machine. It re-renders only the region around the object, so reflections and the grip of a hand move naturally. It can drift on fine label text, which is why Fast stays the default when the logo must be exact.

The generative engine used to call paid cloud APIs. The latest change removes all of them: nothing in vid-bid needs an API key, an account or a card, and the weights download once to your own disk.

No GPU needed to try it

There is a command line that runs the same pipeline without the browser, and a notebook that runs the whole thing on a free Google Colab GPU (it also works on Kaggle).

Where it stops

The geometry is built around objects with a roughly cylindrical body, such as cans, bottles and cups, and the benchmark clip has a mostly steady camera. The generative engine can misdraw small label text. The point of publishing it is to make the idea inspectable, not to claim a finished product.

Get it

vid-bid is free and MIT licensed. The code, the setup guide and a worked example (a Diet Coke ad turned into a Pepsi Black one) are at github.com/mayanksagar26/vid-bid.

If the commercial side of this interests you more than the pipeline, the idea it is a prototype of is written up in An ad exchange inside the movie.