Glossary
Shot boundary detection
Shot boundary detection finds the points in a video where one continuous camera shot ends and the next begins, whether by a hard cut or a gradual transition.
Shot boundary detection (SBD) is the task of finding the frames in a video where one shot ends and another begins. A shot is a continuous run of frames from a single camera take, and the boundary between two shots is either a hard cut, where the picture changes from one frame to the next, or a gradual transition such as a dissolve, fade or wipe that blends the two over several frames. A shot boundary detector scans the video, measures how much each frame differs from its neighbours, and marks the points where the change is too large or too structured to be ordinary motion. The result is a list of shots with start and end times. It is usually the first step in turning raw footage into something a search system, an editor or a language model can work with, because almost every later task, from picking thumbnails to describing what happens, works shot by shot or scene by scene.
Shots, scenes and transitions
A shot and a scene are different units. A shot is a technical unit defined by the camera: it starts when the camera starts recording and ends at the next edit. A scene is a narrative unit made of one or more shots that share a location, time and action. A two-person conversation filmed with alternating close-ups might contain twenty shots but only one scene. Shot boundary detection finds the edits; video scene detection groups shots into scenes, usually by comparing what the shots show and when people speak. Many tools use the word scene loosely for both, so it is worth checking which one a tool returns.
Transition | What happens | Detection difficulty |
|---|---|---|
Hard cut | The picture switches between two consecutive frames | Low, except with flashes or very fast motion |
Dissolve | Two shots blend over a number of frames | Medium to high, because each frame differs only slightly from the last |
Fade | The picture fades to or from black or another colour | Medium, the dark frames are easy to spot but the exact boundary is not |
Wipe and other effects | One shot replaces the other with a moving edge or graphic | High, because the change looks like motion |
Hard cuts make up the large majority of edits in most footage, so a detector that only finds cuts is still useful. Gradual transitions are rarer but more common in documentaries, music videos, trailers and older broadcast material, and they account for most detection errors.
How shot boundary detection works
Every method compares frames and looks for a change that is unusual for the video at that point. They differ in what they compare and how they decide.
Pixel and histogram differences
The oldest methods compute the difference between consecutive frames directly. Pixel differences sum how much each pixel changed, which is cheap but very sensitive to camera motion and moving objects. Colour histogram differences compare the distribution of colours in each frame instead, which ignores where things are and so tolerates motion much better. A cut shows up as a sharp spike in the difference score. Tools such as PySceneDetect and the scene filter in FFmpeg use variations of this idea, with a threshold the user can tune, and they remain a practical default for well-edited footage.
Edge, motion and adaptive methods
Edge change ratio compares the outlines of objects between frames, on the basis that a new shot brings new edges. Motion-compensated methods estimate how the camera and objects moved and only count change that motion cannot explain, which reduces false cuts from pans and zooms. Adaptive thresholds compare each frame’s score with a rolling average of recent scores rather than a fixed number, so a busy action sequence and a slow interview are judged on their own terms. Gradual transitions need a wider window: a dissolve is detected by noticing that a run of frames moves steadily from one look to another.
Learned detectors
Modern detectors are neural networks trained on edited video with labelled boundaries. They look at a short window of frames at once, often with 3D convolutions, and output the probability that each frame is a boundary. TransNetV2 is a widely used open-source example. Learned detectors are better at gradual transitions and at ignoring flashes and fast motion, and they run fast enough on a GPU to process long archives. Some systems also compare image embeddings of neighbouring frames, which measure change in content rather than in raw colour.
What makes shot boundary detection hard
Most errors come from a handful of situations. Camera flashes, explosions and strobe lighting change every pixel without a cut. Fast pans and whip pans look like cuts to simple detectors. Very short shots, common in trailers and music videos, can fall between the frames a detector samples. Heavy compression adds blocky artefacts that rise and fall with the encoder’s keyframes, and the choice of video codec and bitrate affects how much of that noise survives. Screen recordings and slide presentations break the usual assumptions in another way: a new slide is a large, sudden change but is not a camera edit, and whether it should count as a boundary depends on what the boundaries are for.
The purpose matters more than any benchmark. For video indexing and search, an extra boundary costs little, because it only splits one segment into two. For automated editing or highlight cutting, a false boundary can produce a clip that starts mid-action, so precision matters more.
Measuring accuracy
Shot boundary detection is evaluated like other detection tasks, with precision and recall against a set of hand-labelled boundaries. Precision is the share of detected boundaries that are real, and recall is the share of real boundaries that were found. A detected boundary usually counts as correct if it falls within a small tolerance of the true one, a few frames for cuts and an overlap rule for gradual transitions. Results are normally reported separately for cuts and for gradual transitions, because a detector can score very well on one and poorly on the other. The TRECVID evaluations ran a shot boundary task for several years in the 2000s and shaped how the task is still measured. As with most video tasks, the most useful test set is a sample of your own footage, labelled by hand.
A worked example
A sports broadcaster wants to make its match archive searchable and to cut short clips automatically. A typical 90-minute match recording contains around 1,500 shots, with replays introduced by a branded wipe and many hard cuts between cameras.
A histogram-based detector with a fixed threshold finds most of the cuts but splits several fast pans across the pitch into extra shots and misses most of the replay wipes. Switching to a learned detector picks up the wipes and ignores most of the pans. The team then merges very short shots of under half a second into their neighbours, because those are usually graphics flashes, and uses the remaining boundaries in two ways. For search, each shot gets a representative frame through keyframe extraction and a short description, so a query such as goal from a header lands on the right shot. For clips, the replay wipes become natural start and end points. The numbers here are illustrative, but moving from a threshold method to a learned detector and then adding a few simple rules is a common path.
What shot boundaries are used for
Shot boundaries are the skeleton that other video tasks hang on. Keyframe extraction picks one or more frames per shot to represent it. Video summarization selects and orders the most informative shots. Video captioning and description models describe a video shot by shot or scene by scene instead of frame by frame, which is both cheaper and more coherent. Search systems index each shot as its own unit, which makes video moment retrieval possible: a query returns a time range, not a two-hour file.
Shot boundaries also combine with other signals. Voice activity detection splits a video by when people talk, so pairing it with shot boundaries keeps a spoken sentence from being cut in half. Object detection and near duplicate detection run per shot to tag what appears and to find reused footage. Broadcasters use boundaries to find advertising breaks, and moderation teams use them to review a video shot by shot. In broader video understanding pipelines, shots are the unit that a vision language model is asked to describe.
Shot boundary detection and Exabase
Exabase Extract runs this kind of segmentation as part of video processing. Submit a video to POST /v2/extract and the result includes the transcript with timestamps, the detected scenes, a visual analysis of what each scene shows, and the video split into chunks with start and end timestamps, so each chunk carries both what was said and what was shown. Extract documents scenes rather than individual shot boundaries, and it does not label transition types such as dissolves or wipes, so if your product needs an edit decision list or frame-accurate cut points, run a dedicated shot detector alongside it. The extraction guide describes the output, and the video to JSON tool runs on the same endpoint.
Videos stored as Resources are processed and indexed the same way, and Deep Search matches text queries against both transcripts and the visual content of each scene, returning the chunk with its timestamp range. That is the basis of the asset search solution and the video search use case. The post on why transcripts miss half of what is in a video explains why visual segmentation matters for search, and the best video understanding API roundup and the Exabase vs Twelve Labs comparison cover other vendors.
FAQs
What is shot boundary detection?
Shot boundary detection finds the frames in a video where one camera shot ends and the next begins. It detects hard cuts and gradual transitions such as dissolves and fades, and returns a list of shots with start and end times.
What is the difference between a shot and a scene?
A shot is a single continuous camera take between two edits, while a scene is a group of shots that share a location, time and action. Shot boundary detection finds the edits, and scene detection groups the resulting shots into scenes.
Why are gradual transitions harder to detect than cuts?
In a dissolve or fade each frame differs only slightly from the one before, so the change is spread over many frames instead of appearing as a single spike. Detectors need a wider window of frames, or a learned model, to recognise the pattern.
Which tools can detect shot boundaries?
PySceneDetect and the FFmpeg scene filter are common threshold-based tools, and TransNetV2 is a widely used learned detector. Video understanding APIs also return shot or scene segments as part of their output.
How accurate is shot boundary detection?
Good detectors find hard cuts with high precision and recall on well-edited footage, while gradual transitions, flashes and fast camera motion cause most errors. Accuracy varies by content, so test on a labelled sample of your own videos.
Does Exabase detect shot boundaries?
Exabase Extract detects scenes in video, describes what each scene shows and returns timestamped chunks. It does not document individual shot cuts or transition types, so pair it with a dedicated shot detector if you need frame-accurate edit points.
Related pages: Video scene detection, Keyframe extraction, Video summarization, Video understanding, Video indexing, Video moment retrieval, Highlight generation, Twelve Labs vs Google Video Intelligence, How we search what is shown in a video