pub enum VideoDetector {
Black {
min_duration_s: f64,
pixel_th: f64,
picture_th: f64,
},
Scene {
threshold_pct: f64,
},
Crop {
limit: u32,
round: u32,
reset: u32,
},
}Expand description
A video-domain detector.
Variants§
Black
blackdetect: reports black regions.
min_duration_s: minimum black duration to report (seconds).pixel_th: per-pixel blackness threshold, 0.0..1.0.picture_th: fraction of the picture that must be black, 0.0..1.0.
Scene
scdet: reports scene changes.
threshold_pct is a percentage in 0.0..=100.0 (e.g. 10.0 means
10%, not 0.10). Runs with sc_pass=0 so frames/metadata pass through
untouched.
Crop
Native luma crop / letterbox detection (not FFmpeg cropdetect).
Runs on decoded progressive CPU Y planes inside
MetadataEventFilter.
An interlaced, hardware, or otherwise
unreadable frame fails the job as Error::AnalysisFrame (not
Error::InvalidRecipeArg). Event and
report fields are unchanged, but coordinates are not guaranteed to
match FFmpeg bit-for-bit.
limit: 8-bit-equivalent luma threshold (0..=255is scaled by bit depth;0disables black classification and yields the full frame; values> 255are treated as a raw code). 10-bit24becomes 96.round: width/height are expanded outward to a multiple of this (never cutting detected content).0/1skip extra multiples.reset: every N evaluated frames, drop temporal evidence but keep the current stable rectangle (0= never). This is a finite window, not a permanent historical maximum.
The first two real frames are skipped (skip=2) and three further
high-confidence candidates are required before the first event. Use
crate::analysis::CropDetectionOptions to change skip or the
threshold type.
Trait Implementations§
Source§impl Clone for VideoDetector
impl Clone for VideoDetector
Source§fn clone(&self) -> VideoDetector
fn clone(&self) -> VideoDetector
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more