1.
Temporal Sampling: The clip is parsed and 6 key frames are sampled from 3 zones (Beginning, Middle, Ending).
2.
Audio & Speech: The audio track is isolated, and speech is transcribed using Groq Whisper.
3.
Scene Intelligence: Gemini Flash processes the zone frames to analyze Scene Type, Mood, Story beats, and evocation.
4.
Creative Direction: Gemini Flash drafts 5 style captions based on a tailored brief.
5.
Gemma Critic Review: Gemma evaluations score the captions (0-10) on style authenticity, human likeness, creativity, and strength.
6.
Automatic Rewrite Loop:
- If a caption style scores ≥ 8.5, it passes instantly.
- If it scores < 8.5, it is flagged. The pipeline feeds Gemma's feedback back into Flash to rewrite only that weak style until the target score is met.