
The weakness of ffmpeg’s scene change detector is that it only compare each frame to the one preceding it. You can easily find many examples of how ffmpeg’s detector performs on the web, it does do a remarkable job and is sensitive to all changes that can be detected on frame by frame basis.

This is important because it is comparing the pixels of two frames which can be quite large when dealing with HD sized video (1920x1080). The ffmpeg’s scene change detector is fast because it leverages possibly optimized CPU instructions to calculate the SAD value across frames. Static double get_scene_score (AVFilterContext *ctx, AVFrame *frame ) Commentary Annotated version of ffmpeg’s scene detector The current implemented uses a metric called sub of absolute differences or SAD. It is well documented on their site.Īt a high level, the current scene detector compares each frame of the video the one preceding it to compute the scene change score score. ffmpeg’s scene detectorįfmpeg’s scene detector works such that it produces a value between 0 and 1 that denotes how likely a scene change has occurred at a particular frame. Cuts are frequently used in dialog, and fades are useful for beginning or ending clips of video or logical divisions in a plot. Dissolves between scenes are generally used to denote the passage of time. Fades are where the video fades to a particular solid color. Gradual transitions are dissolves from one scene to another over a certain period of times. Hard cuts are the video flips from one scene to another instantly. Some are more difficult to detect than others but they’ve been characterized into three main groups, hard cuts, gradual transitions and fades. There are many different ways to detect scene changes.
