The pipeline
1. The video link
A video arrives through Add video on the dashboard, where it joins the queue, or as a link given straight to the agent. The dashboard takes links from YouTube, including Shorts, TikTok, Instagram Reels, Facebook, Pinterest and X, and other HTTPS web pages when the web page box is ticked. Before anything is captured, the agent checks that the video is not already a recipe.
2. Captions and description
The capture helper first asks the platform for captions, the description and metadata. The description often holds the creator's written ingredient list, and captions hold what was said. Both are read before the video itself is analyzed.
Automatic captions can mishear a quantity. They are kept apart from text the creator wrote, and an uncertain amount is checked against the source before it is treated as stated.
3. Speech-to-text fallback
When the captions have no usable text, the helper takes the audio and runs a speech-to-text program on your own machine, if one is installed with a model already on your disk. Nothing is sent to a transcription service. When captions exist but miss an important part, the fallback can be asked for explicitly.
Without a speech-to-text program this step is skipped, and the analysis continues with what the captions and the description give.
4. Keyframes
The helper samples frames from the video, about one every ten seconds and at most sixty, and can read English text from them. Frames catch what is only shown: an ingredient list on screen, an oven temperature in a caption card.
Sampled frames are hints, not a full viewing. The frames themselves are looked at to catch reading mistakes, moments between samples are checked when they matter, and what cannot be seen is recorded as a gap.
5. The recipe file
The sources are reconciled, and the recipe is written as one file in the recipe format: the method and the summary in the agent's own words, the creator credited and the video linked.
- Each amount is the creator's wording, labelled with where it came from: said, shown on screen or written in the description.
- An amount nobody gave is left empty and labelled
unstated. - A step gets a timestamp only when the evidence shows where it happens.
- The file says what was checked, so a reader can judge it.
6. Validation
npm run validate checks the file against the contract in lib/recipe.mjs. Only after it passes is the video removed from the queue. The dashboard then shows it as a recipe.
Validation checks the form. Whether an amount was really said is the job of steps 2 to 5 and of the evidence rules.
When evidence is missing
| What is missing | What the recipe does |
|---|---|
| An amount | The amount is empty with the basis unstated. The dashboard shows amount not given. |
| A detail of the method | It is listed under gaps. |
| The method itself, because the creator withheld it | The recipe is marked partial and lists what is missing under gaps. |
| Material that could not be reached, such as captions behind a login or a failed download | Not a reason for partial. The limit is recorded in source.evidence. |
| Everything useful | No recipe is written. The queue entry is marked failed with a reason and can be retried on purpose. |
Missing captions are not proof that the video leaves the method out. The limit is written down in source.evidence, not as a gap.
NextRecipe Agent