Function av_scenechange::detect_scene_changes
source · pub fn detect_scene_changes<R: Read, T: Pixel>(
dec: &mut Decoder<R>,
opts: DetectionOptions,
frame_limit: Option<usize>,
progress_callback: Option<&dyn Fn(usize, usize)>
) -> DetectionResults
Expand description
Runs through a y4m video clip,
detecting where scene changes occur.
This is adjustable based on the opts
parameters.
This is the preferred, simplified interface for analyzing a whole clip for scene changes.
Arguments
progress_callback
: An optional callback that will fire after each frame is analyzed. Arguments passed in will be, in order, the number of frames analyzed, and the number of keyframes detected. This is generally useful for displaying progress, etc.
Panics
- If
opts.lookahead_distance
is 0.