Expand description
ffcine breakdown: the shot list of a reference video (a reel, a trailer), for recreating it.
One decode at analysis size (NVDEC with its hardware resize when it takes the clip, else the
CPU) feeds the scene detector of ffcine triage frame by frame, the camera motion estimate
(motion), per-frame sharpness and colour (colour). From the cuts come the shots; a
second decode at keyframe size writes each shot’s first, sharpest-middle and last frame. The
soundtrack’s beats (ffcine_audio::beats) say whether the cuts land on them (rhythm),
batched faster-whisper (as triage) transcribes the speech, and tesseract, when on PATH,
reads on-screen text off the keyframes. Out come breakdown.json, contact-sheet.jpg
(sheet) and shotlist.md (shotlist); see docs/breakdown.md.
Re-exports§
pub use colour::Colour;pub use motion::Motion;pub use motion::MotionKind;pub use motion::MotionParams;pub use rhythm::Music;
Modules§
- colour
- Per-frame colour samples and their per-shot average.
- motion
- Camera motion from small luma frames: a global shift per frame pair (coarse-to-fine SAD over a three-level pyramid), refined per textured block, and a zoom fitted to the blocks’ divergence. Per shot the frame-pair motion is summed into pan, tilt and zoom, and its high-frequency part is the handheld shake.
- ocr
- On-screen text through the
tesseractCLI, when it is installed. - rhythm
- Whether the cuts land on the music’s beats.
- sheet
- The contact sheet: every shot’s keyframe in a grid, labelled with its number and length.
- shotlist
shotlist.md: the shots as a Markdown table with an empty notes column to fill in.
Structs§
- Breakdown
breakdown.json.- Keyframes
- A shot’s stills, relative to the output directory.
- Pacing
- Shot lengths over the whole video.
- Shot
- One shot, between two cuts.
- Span
- A shot’s frame range and its chosen stills, before the analysis is attached.
- Transcript
Enums§
Constants§
- VERSION
breakdown.jsonformat version.
Functions§
- clock
m:ss.cc.- pacing
- Shot-length statistics.
- spans
- Splits
nframes atcuts(frame indices where a shot starts, ascending) and picks each shot’s stills: one frame in from each end (so a soft cut doesn’t leak in), and the sharpest frame of the middle 60 %, favouring the centre. - words_
in - The words of
twhose middle falls in[start, end), with the text of segments that have no word times, in time order.