Skip to content

lasagnastack.models.reel_pipeline.inventory

lasagnastack.models.reel_pipeline.inventory

ClipAnalysisResponse

Bases: BaseModel

What Gemini generates for Stage 2 (excludes metadata we already know).

The source_file and duration_sec fields are added by the stage after the LLM call to produce a full ClipInventory.

overall_assessment instance-attribute

overall_assessment: OverallAssessment

Clip-level quality summary returned by the LLM.

segments instance-attribute

segments: list[Segment]

Usable segments identified by the LLM.

ClipInventory

Bases: BaseModel

Stage 2 output for one clip.

duration_sec instance-attribute

duration_sec: float

Duration of the source clip in seconds.

overall_assessment instance-attribute

overall_assessment: OverallAssessment

Clip-level quality summary.

segments instance-attribute

segments: list[Segment]

Usable segments identified within this clip.

source_file instance-attribute

source_file: str

Filename of the original source clip (not its full path).

NormalisedClip

Bases: BaseModel

A single clip after Stage 1 normalisation.

duration_sec instance-attribute

duration_sec: float

Duration of the source clip in seconds.

normalised_path instance-attribute

normalised_path: Path

Path to the 480×854 H.264 output written by Stage 1.

scene_cut_times instance-attribute

scene_cut_times: list[float]

Scene-cut timestamps (seconds from clip start) detected by PySceneDetect.

Used as fallback segmentation hints for Stage 2; Gemini is the primary source.

source_path instance-attribute

source_path: Path

Path to the original source clip.

OverallAssessment

Bases: BaseModel

Clip-level quality assessment produced by Stage 2.

issues instance-attribute

issues: list[str]

Notable problems with the clip, e.g. ['shaky camera', 'out of focus for first 2s'].

lighting instance-attribute

lighting: str

Brief lighting description, e.g. 'natural window light, slightly overexposed'.

primary_subject instance-attribute

primary_subject: str

Brief description of the main subject, e.g. 'chef plating food'.

usability instance-attribute

usability: str

high | medium | low — overall suitability of the clip for use in the reel.

Segment

Bases: BaseModel

One usable segment identified by Gemini within a normalised clip.

aesthetic_score instance-attribute

aesthetic_score: int

1–10 rating of lighting, composition, sharpness, and colour grading.

audio instance-attribute

audio: str

ambient | dialogue | sound_effects | music | silence

best_use instance-attribute

best_use: str

Suggested role in the reel: hook | establish_location | payoff_reaction | detail | transition | callout | outro

description instance-attribute

description: str

One-sentence description of what is visually happening in the segment.

end instance-attribute

end: str

Segment end time in MM:SS.D format.

hook_potential instance-attribute

hook_potential: int

1–10 rating of scroll-stopping power in the first 0.5 seconds.

id instance-attribute

id: str

Unique segment identifier within the clip, e.g. 'clip_001_seg_2'.

shot_type instance-attribute

shot_type: str

establishing | action | reaction | detail_closeup | cutaway | talking_head | b_roll | other

start instance-attribute

start: str

Segment start time in MM:SS.D format.

subject_position instance-attribute

subject_position: str

left-third | center | right-third — horizontal position of the main subject.

vertical_crop_safe instance-attribute

vertical_crop_safe: bool

False if the subject sits near the horizontal edge and would be cut off by a 9:16 crop.