Matching B-roll clips with GPT-5 in n8n

Automating video editing in n8n

I set this up to cut the boring bits out of short-form editing. n8n builds a first-pass edit, then I polish it in Final Cut Pro. The workflow here uses a 1-minute storytelling clip, with timings that actually work.

Setting up the workflow

I treat it as a pipeline. Each stage produces something the next stage reads. The main pieces are a searchable B-roll library, transcription, an AI cut list, AI clip matching, then a Final Cut Pro XML export. The aim is to automate the repetitive joins, not the creative work.

1) Creating a searchable B-roll library

  • My library lives in Notion. I keep around 200 clips with a thumbnail, filename, duration, location, subject tags, and a short description. A simple schema works best: title, shot type, dominant action, colour, and usable range.
  • I generate descriptions with a Python script and a vision model. The script extracts a frame, sends it to a vision API, and writes back a one-line caption plus three tags. That lets GPT-style models find specific shots by description.
  • Keep the metadata fields small. Search by tag and by a single-sentence description. That cut manual scanning from minutes to seconds.

2) Transcription with Whisper

  • Upload the voiceover or interview to n8n. I add a node that posts the file to Whisper. Request word-level timestamps.
  • Whisper returns timestamps and a JSON transcript. Store that transcript in Notion or a temporary JSON node.
  • On modest cloud CPU this step can take 5–7 minutes for a 3–5 minute clip. Plan for that when you queue runs.

3) Generating a cut list with AI models

  • Feed the transcript to a model and ask for a cut list. My prompt asks for segments with start and end seconds, a short intent label such as hook, point, or payoff, and the recommended shot length.
  • I use a mid-tier large model for this. The output is a JSON array of segments. Example element:
{ "start": 2.4, "end": 10.2, "label": "problem statement", "length": 8 }
  • Keep the prompt tight. Ask for no more than one shot per segment unless the narration really needs b-roll swaps.

4) Matching B-roll clips to timeline segments

  • Pass each cut-list segment to GPT-5, or a similar instruction-tuned model. Give it the segment label, the transcript text in that interval, and the Notion clip metadata.
  • Ask the model to return the best matching clip id, a suggested in/out time within the clip, and a confidence score. I ask for up to two alternates.
  • I add a filter node in n8n that rejects matches below a confidence threshold. That keeps poor matches out of the final XML.
  • Example mapping: a segment about "walking to a train" maps to clip_id 137, in: 0.5s, out: 4.8s.

5) Exporting clips to Final Cut Pro XML

  • The final node is a code node that converts the assembled clip list into an .fcpxml file. The code maps clip ids to media references, sets the timeline start times, and writes handles for cross-dissolves if needed.
  • I import the .fcpxml into Final Cut Pro. The first-pass assembly arrives with clips placed, trims applied, and a marker track with segment labels.
  • Export is quick. My runs take roughly 2–3 minutes to build the XML for a 60–90 second timeline.

Speeding up the edit

This is the bit people miss. Automation gets you to a usable cut fast. The rest is craft, not grunt work.

Reducing manual editing time

  • Expect a first-pass assembly in about 8 minutes of hands-on work for a 1-minute storytelling video. That includes uploading assets, reviewing the auto-assembled timeline, and doing one pass of trims.
  • The workflow removes the repetitive search-and-drag. I spend focused time on sound design and frame-by-frame timing only when it matters.

Improving content creation efficiency

  • Use metadata-driven search. With consistent tags and short descriptions, GPT-5 picks accurate shots most of the time. That cuts trial edits.
  • Keep a list of frequently used shot ids. I reuse three or four signature clips that anchor the edit. It shortens decision time.

Using AI in the edit

  • Whisper timestamps give precise word-level cuts. That lets the cut list line up with syllables or pauses.
  • Use a two-step AI approach: one model creates a cut list from the transcript, another matches clips. Splitting the job keeps prompts simpler and reduces hallucination.
  • Ask the matching model for alternates and a confidence score. That makes it easier to swap a clip if it looks wrong.

Final assembly in Final Cut Pro

  • Import the .fcpxml and check the timeline markers. I mute the automated audio track first and play the arrangement to check shot flow.
  • Add music and subtitles next. Silence any mismatched audio and replace it with room tone or ambient tracks.
  • Do colour and speed tweaks only after the timing is locked. That saves render time.

Tips for the workflow

  • Start small. Automate one project end-to-end before adding complexity.
  • Version your prompts. Keep a text file of successful prompts and the model settings that produced good results.
  • Test the confidence threshold. A strict threshold keeps bad matches out, but can leave gaps. I set mine to around 0.6 and manually fill 10–20 percent of gaps.
  • Watch runtime costs. Whisper and large models incur charges. Run batch jobs overnight when possible.
  • Keep an audit trail. Log each run with the cut list and the matched clips. That makes it easier to tweak prompts later.

Final takeaways
I treat n8n as glue. It moves files, talks to Whisper and GPT-5, writes a Final Cut Pro XML, and leaves me to do the part that needs judgement. If you build a searchable B-roll library, request word-level timestamps, split AI tasks into cut-list and matching, and export an .fcpxml for final polishing, you can cut a lot of repetitive work out of the edit.

Related posts

Metadata schema choices for content libraries

Structured metadata only works when it matches how people actually retrieve content. I have seen neat schemas fail as soon as the library meets real records, and tarot makes the problem obvious. If...

Federation trade-offs in self-hosted social feeds

Federation looks tidy until you let it touch the edges, and then the odd cases arrive fast. I prefer self-hosted social feeds that stay explicit about what is local, what is remote, and what should...

FireAvert Z-Wave stove shutoffs for offline safety

FireAvert’s setup does the part that matters without asking Home Assistant to babysit it, which is exactly how I want stove protection to behave. The Home Assistant Z-Wave stove shutoffs badge is...