pub fn simulate_video(
path: &Path,
config: SimulatorConfig,
scale: Option<(usize, usize)>,
max_frames: Option<usize>,
on_events: impl FnMut(EventStream) -> Result<()>,
) -> Result<(usize, usize)>Expand description
Simulates a whole video file, calling on_events with each interval’s events as they are
produced.
Streaming by construction: nothing is held but the current frame pair, so a long recording costs
memory proportional to one interval rather than to the whole output. scale decodes at a
different resolution, which is much cheaper than decoding full-size and downsampling after.
max_frames stops early.