Design a copyright detection system for video uploads
Tests scalable content-identification design. Strong answers cover event-driven ingestion, perceptual hashing and audio fingerprinting versus a reference index, plus tiered enforcement. Red flag: MD5 or pixel-perfect matching that fails after re-encoding.
What's really being asked
This question probes your ability to design a high-throughput, low-latency content moderation pipeline that is robust to real-world distortions like transcoding, cropping, and compression. The interviewer cares about your familiarity with signal-processing techniques, distributed systems patterns, and policy enforcement at scale.
The full answer
First, an event-driven ingestion pipeline where uploads land in object storage and trigger asynchronous preprocessing workers, keeping the upload path non-blocking. Second, media decomposition into parallel audio and video streams. For video, perceptual hashing algorithms like pHash or block mean value hashing that survive re-encoding and minor edits; for audio, acoustic fingerprinting such as Chromaprint or Echoprint that identifies clips despite bitrate changes or noise. Third, a reference index architecture, typically a sharded database or vector store holding fingerprints of registered works, queried with approximate nearest neighbor search to achieve sub-linear lookup times. Fourth, a policy and enforcement tier that routes matches through confidence scoring, automated actions like block or monetize, and human review queues with appeal workflows.
The mistakes people make
Proposing MD5 or SHA checksums, which fail the moment a file is re-encoded. Suggesting pixel-by-pixel or raw audio waveform comparison, which is brittle and computationally infeasible at scale. Designing a single synchronous monolith that processes the entire file before acknowledging upload, creating a terrible user experience and a horizontal scaling bottleneck. Ignoring the distinction between audio and video fingerprints, or omitting the policy layer entirely.
What usually comes next
How would you handle false positives from short royalty-free samples or fair-use clips? What happens when a content owner disputes a match or a user appeals a block? How do you keep reference index latency low as it grows to billions of fingerprints? How would you architect around regional copyright law differences?
A concrete example
YouTube's Content ID system, implemented around 2007, compares uploaded videos against audio and video files registered by content owners. By 2016 Google had spent roughly 60 million dollars developing it, and the system had facilitated approximately 2 billion dollars in payments to copyright holders. By 2018 investment exceeded 100 million dollars, underscoring that production-grade fingerprinting requires massive ongoing infrastructure in ingestion, indexing, and policy enforcement.
Interview question
In a high-throughput copyright detection pipeline, why is approximate nearest neighbor search used against a sharded reference index instead of exact matching?
- a.Approximate search tolerates minor distortions in fingerprints and maintains sub-linear lookup times as the index growsCorrect
- b.Exact matching is only suitable for audio fingerprints, while video fingerprints inherently require probabilistic data structures
- c.Exact matching would require storing full-resolution media files in the database, which is prohibitively expensive
- d.Sharded indexes prevent false positives by enforcing regional copyright law differences at the database layer
Why? this is the answer
Approximate nearest neighbor search accommodates slight fingerprint variations from transcoding and compression while keeping lookups sub-linear as the catalog grows. Exact matching would miss re-encoded content and degrade linearly, whereas regional law differences are handled by the policy tier, not the index structure.
Just read this? Test yourself on what you have been reading.
Read the original → en.wikipedia.org
- #system design
- #content moderation
- #fingerprinting
- #event-driven
- #copyright
Put your scrolling time to good use
Learn one idea, try a quiz and save useful cards for revision. Tezvyn makes it easy to learn and stay current in your tech field, a few minutes at a time.
The iPhone app is on the way
We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.
Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.
We are hiring for this. Open roles that interview on system design — each one lists the topics its interview covers.
See open roles