Clip Analysis¶
The analysis step uses Ollama structured outputs instead of asking the model to return "JSON only".
build_analysis_schema() creates a JSON Schema and analyze_with_llm() passes that schema to:
This keeps smaller models from inventing unrelated response shapes.
Windowed selection¶
Small models can cluster every candidate in the same part of a long transcript. shortificator avoids that by splitting the transcript into consecutive time windows based on --max-shorts.
Each window requests a small set of candidates. The pipeline then:
- pools all candidates;
- sorts them by score;
- removes heavy overlaps;
- trims the list to
--max-shorts.
This gives better temporal coverage across the video.
Duration fitting¶
The prompt asks the model to respect --min-duration and --max-duration, but models are not perfectly reliable. fit_clip_window() adjusts short or long candidates around their center and clamps them to the source duration.
Defaults:
Manual clips¶
When you already know where the cuts should be, skip the LLM entirely with --clip START-END (repeatable):
Timestamps accept plain seconds (90, 90.5), MM:SS, or HH:MM:SS (fractions allowed).
With --clip:
- every clip is rendered in the order given —
--max-shortsand the duration bounds do not apply; - transcription still runs (burned subtitles and
--srtneed the word timestamps), and reusing a saved transcript with--transcriptworks as usual; --candidatescannot be combined with--clip, since both define the cuts.
Model choices¶
mistral-small: recommended for quality.qwen2.5:7b: useful for faster prompt iteration.llama3: generic fallback.