← Questions
Design near-duplicate video detection at scale
0
I was asked this
No reports yet. Sign in to say where you were asked it.
A system design interview question asked in Google's system design round, last asked Jan 2026. It tests embeddings, vector search and video.
A video platform with billions of videos must detect when a new upload is a near copy of an existing video: re-encoded, resized, cropped, trimmed, mirrored, with a border or logo added, or sped up. Design the system that finds such matches as videos are uploaded.
Requirements
- Functional:
- For every upload, find existing videos that are near duplicates, including partial matches where only a clip is copied.
- Return the matching videos and the matching time ranges.
- Route uncertain matches to human review; act on confident ones (for example, copyright claims or de-duplication).
- Non-functional: billions of indexed videos, a high upload rate, results within minutes of upload, high precision (false matches hurt creators) with good recall, storage and compute costs kept in check.
Clarifying questions
- What is the action on a match: blocking, a copyright claim, ranking, de-duplication?
- How much transformation must be tolerated, and are partial copies in scope?
- Which matters more, precision or recall?
- How fast must the decision be?
What a strong answer covers
- Representation: sample frames or segments; compute embeddings robust to the listed edits (a self-supervised or contrastively trained model), optionally plus perceptual hashes and audio fingerprints.
- Compression: dimensionality reduction and product quantization so billions of segment embeddings fit in an index.
- Retrieval: an approximate nearest neighbour index (IVF-PQ, HNSW) sharded across machines; candidates per segment aggregated by video.
- Verification: temporal alignment of matching segments (consistent time offsets), a score, thresholds tuned on labelled pairs, and a review queue for the uncertain band.
- Scale: an asynchronous upload pipeline, batched GPU inference, incremental index updates, re-indexing when the model changes.
- Evaluation: a labelled set of known transformations, precision and recall at the operating threshold, reviewer agreement, drift monitoring.
Follow-ups
- A new embedding model is better. How do you migrate billions of vectors?
- Attackers adapt to evade detection. What do you do?
- Popular clips match thousands of videos. How do you keep that from flooding the system?
Where it's asked
- Google · System design · Last asked Jan 202645 min · Whiteboard for the diagram, a doc for requirements and capacity math
What it tests
embeddings · vector search · video
No official answer yet. Draw yours on the right; publish it and it shows under Community.
Nothing published yet. Publish your canvas and it shows here for others to open and remix.
Draw your answer hereBoxes, arrows and notes, saved for you to come back to.Sign in to start drawing
