The interview problem

Practice prompt

Design shot segmentation for a media library with hard cuts, fades and camera flashes.

Original practice, not a reported company interview. Scenarios and numbers are illustrative. Interview date: not applicable. Sources retrieved October 1, 2026.

1. Scope and worked approach

Score frame neighborhoods for transition type, then consolidate detections into timestamped intervals. Use a histogram-change baseline and a temporal model. Split by complete source film or program; adjacent frames from the same clip must not cross train and test.

2. Trace the design or derivation

Frames
  → temporal scores
  → transition consolidation
  → timestamp intervals

Streaming requires bounded lookahead, whereas offline processing can examine both sides of a transition. Publish that latency difference explicitly. Downstream thumbnail selection should choose stable frames away from transitions instead of simply taking the first frame in each segment.

3. Calculate the example

A reference cut at 10.00 s and a prediction at 10.04 s match under a ±0.05 s tolerance. A second prediction at 10.03 s is a duplicate false positive, not a second successful match.

4. Failure cases and trade-offs

Flashes and fast motion resemble cuts; gradual dissolves span intervals rather than a single exact frame. Evaluation can be inflated by an overly generous tolerance.

5. Validation, follow-ups and self-review

Report one-to-one matched precision and recall by transition type. Follow-up: how would you segment a live stream? Self-review: explain tolerance, duplicate handling and temporal context.

Sources and related practice

Technical reference: arxiv.org — TransNet V2 shot-boundary detection.

Source publication/update: 2020-08-11. Retrieved October 1, 2026. The workflow, calculations and review exercises are original; this reference is not evidence that a company asked this question.

Continue with Find action intervals inside long videos; Design a video streaming service.

Continue your preparation

Choose a connected learning path or browse more ML system design questions. Read our editorial method and attribution policy.