TL;DR
We'll auto-generate chapters for a video. The trick: transcribe with timestamps, let the LLM choose chapter boundaries by segment index (never raw time), then map indices back to real timestamps in code. That sidesteps the one thing LLMs are reliably bad at: echoing exact timecodes. Output is a chapters.vtt file plus YouTube-style stamps.
Pasting a transcript into a chat model and asking for "chapters with timestamps" produces great titles and fabricated times. LLMs don't preserve exact timestamps across long inputs, and long-context models also skip the middle. The fix is to stop asking the model to be a clock. Let's build the pipeline that does it right.
1. Transcribe with real timestamps
Use WhisperX (or faster-whisper) for aligned segment timestamps. Each segment has a start, end, and text.






