Design Video Copyright Matching Across Clips of Different Lengths
Company: Meta
Role: Machine Learning Engineer
Category: ML System Design
Difficulty: medium
Interview Round: Onsite
Design a system that checks whether a newly uploaded video reuses content from a library of copyrighted reference videos supplied by rights holders. The main difficulty to address is comparing videos of different lengths: an upload can be a short excerpt of a long reference, a full copy, a longer video that contains a reference, or a compilation of excerpts from several references. The report names only the problem and this focus, so the scale, the edits the matcher must survive and the actions taken on a match are open: settle them with the interviewer before designing.
```hint Compare pieces
Think about why a single vector per video cannot reveal that a short excerpt appears inside a much longer video, and what unit you should fingerprint and index instead.
```
```hint Coincidence or copy
Many individual segment matches will be coincidental. Think about what pattern the matches of a genuinely copied stretch form when you compare the times at which they occur in the two videos.
```
### Clarifying Questions
- How large is the reference library, how many uploads a day must be checked, and must the check finish before a video becomes public?
- How much copied content counts as a match, and do audio-only or picture-only matches count?
- Which edits must the matcher survive: re-encoding, cropping, mirroring, overlays, picture-in-picture, speed or pitch changes?
- What happens after a match: blocking, sharing revenue with the rights holder, or only reporting? Must the system report the matched time ranges?
- Are live streams in scope?
### What a Strong Answer Covers
- Requirements: the match definition, the edits to survive, scale, latency and the actions on a match
- Segment-level visual and audio fingerprints instead of whole-video vectors, and how they are trained
- A sharded nearest-neighbor index over billions of reference segments, and handling of low-information segments
- Temporal alignment that turns segment hits into matched intervals for excerpts, full copies, containment and compilations, including speed changes
- Evaluation by clip length and edit type, with precision, recall and the accuracy of matched intervals
- The serving pipeline, checks of existing uploads against new references, disputes and shared footage
### Follow-up Questions
- The upload is mirrored and slightly sped up. Which parts of the pipeline must handle that, and how?
- A rights holder adds a new reference. How are videos uploaded before it was added checked?
- Two references contain the same stock footage. How do you avoid false or conflicting claims?
- How do you keep the index's memory and lookup cost manageable as the library grows to billions of segments?
Overview: An ML system design question on matching uploaded videos against a library of copyrighted reference videos when the two differ in length. It tests segment-level video and audio fingerprints, large-scale nearest-neighbor indexing, temporal alignment of excerpts and compilations, robustness to edits and evaluation.