vidmake v0.2.1
Download

Docs/GuidesPage 41 / 45

Editing talking-head video

Turn a walk-and-talk take into three edits — transcript captions, a cut on the beat of music chosen to fit the speaker's rhythm, and a calm edit with diagrams timed to the words.

View .md Ask Claude Ask ChatGPT

A person talking to a camera is the most common footage there is, and it can be cut many ways. This guide edits one real walk-and-talk vlog three ways, each built from the same parts: the take, a word-level transcript, and (for the music cut) the beat of a track.

For agents

Work from the transcript, not the waveform. Put every time you derive from a word into the composition's markers ("snow": "5.28s") and write "@snow" in the layers, so a retimed edit only changes the markers.

#1. Captions from a transcript

Transcribe the take with word timestamps. whisper writes a JSON file that a captions layer reads as is:

bash
whisper take.mp4 --model small.en --word_timestamps True --output_format json
00:00.0 · f 000
A walk-and-talk take with its whisper transcript as captions: each word lights up as it is spokenDownload
talking-captions.jsonjson
{  "fonts": [    { "family": "Schibsted Grotesk", "path": "fonts/SchibstedGrotesk.ttf" },    { "family": "JetBrains Mono", "path": "fonts/JetBrainsMono.ttf" }  ],  "compositions": [{    "id": "captions", "description": "A walk-and-talk take with its whisper transcript as captions: each word lights up as it is spoken",    "width": 720, "height": 1280, "fps": 30, "duration": "8.3s", "background": "#161412",    "layers": [      { "id": "take", "type": "video", "src": "assets/talk-elephant.mp4", "width": "100%", "height": "100%" },      { "id": "subs", "type": "captions", "src": "assets/talk-elephant.json", "y": "72%", "maxWidth": 600,        "font": "Schibsted Grotesk", "fontSize": 54, "fontWeight": 850, "letterSpacing": -1.5, "lineHeight": 1.05,        "fill": "#fbf9f4", "highlight": "#f05a4e", "stroke": "#161412", "strokeWidth": 9 },      { "id": "credit", "type": "text", "text": "FOOTAGE: JACOB GRIBBIN, CC BY 4.0", "font": "JetBrains Mono", "fontSize": 15,        "letterSpacing": 1.5, "fill": "#fbf9f4", "opacity": 0.7, "y": 1240 }    ]  }]}
  • src takes the whisper file directly; its times are seconds from the start of the clip. If you trim the clip, shift the times by the same amount.
  • highlight colors the word being spoken (line mode).
  • Check names and places in the transcript before you style it: whisper hears "Chiang Mai" as "chengmai". Fix the text in the file and keep the times.

#2. Cut to the beat

A hype edit removes the pauses and cuts on the music. Start with what the track gives you:

vidmake analyze assets/beat.mp3
$ vidmake analyze assets/beat.mp3
7.00s at 30.0 fps (210 frames)
beats: 8, tempo ≈100 BPM
  0.60 1.17 1.77 2.43 3.67 4.83 5.37 5.97s
onsets: 21 (TIME  RISE  PEAK  BAND)
    0.070s  +10.2 dB   -4.8 dBFS  low
    0.609s  +12.2 dB   -8.3 dBFS  low
    1.167s  +10.3 dB   -7.2 dBFS  low
    1.596s  + 7.5 dB   -9.2 dBFS  mid
    1.766s  +16.3 dB   -4.9 dBFS  low
    1.846s  + 8.5 dB   -5.1 dBFS  low
    2.365s  +12.9 dB   -5.9 dBFS  low
    2.454s  +13.8 dB   -4.5 dBFS  low
    2.584s  +10.2 dB   -7.0 dBFS  low
    2.734s  + 8.1 dB   -6.7 dBFS  low
    3.023s  +10.5 dB   -5.8 dBFS  low
    3.662s  + 8.8 dB   -6.1 dBFS  low
    3.761s  + 7.0 dB   -6.0 dBFS  low
    4.071s  + 6.6 dB   -7.5 dBFS  mid
    4.230s  + 6.6 dB   -9.9 dBFS  low
    4.809s  +15.0 dB   -6.2 dBFS  mid
    5.198s  + 9.2 dB  -10.4 dBFS  mid
    5.378s  + 9.3 dB  -10.7 dBFS  mid
    5.976s  + 7.1 dB   -6.3 dBFS  mid
    6.096s  + 7.6 dB   -7.1 dBFS  low
    6.276s  + 7.1 dB  -10.1 dBFS  mid

        MEAN    P10 MEDIAN    P90 AT CEILING
amp     0.61   0.32   0.65   0.90         4%
bass    0.55   0.22   0.57   0.88         3%

   TIME  AMP mean/peak                   BASS mean/peak                  BEATS   (bar = mean, ▏ = peak)
  0.00s  0.61/1.00 ████████████       ▏ 0.50/0.93 ██████████        ▏    0
  0.50s  0.61/0.79 ████████████   ▏     0.54/0.69 ███████████  ▏         1
  1.00s  0.70/0.91 ██████████████   ▏   0.69/0.97 ██████████████    ▏    1
  1.50s  0.76/1.00 ███████████████    ▏ 0.74/1.00 ███████████████    ▏   1
  2.00s  0.72/1.00 ██████████████     ▏ 0.71/1.00 ██████████████     ▏   1
  2.50s  0.81/1.00 ████████████████   ▏ 0.82/1.00 ████████████████   ▏   0
  3.00s  0.73/0.98 ███████████████    ▏ 0.72/1.00 ██████████████     ▏   0
  3.50s  0.79/1.00 ████████████████   ▏ 0.74/0.99 ███████████████    ▏   1
  4.00s  0.57/0.81 ███████████    ▏     0.46/0.78 █████████      ▏       0
  4.50s  0.54/0.94 ███████████       ▏  0.37/0.73 ███████       ▏        1
  5.00s  0.50/0.65 ██████████  ▏        0.34/0.54 ███████   ▏            1
  5.50s  0.57/0.99 ███████████        ▏ 0.46/0.89 █████████        ▏     1
  6.00s  0.61/1.00 ████████████       ▏ 0.54/0.94 ███████████       ▏    0
  6.50s  0.11/0.31 ██   ▏               0.09/0.27 ██  ▏                  0

Beats are 0.6 s apart (100 BPM). Split the transcript into phrases wherever the speaker pauses, then place each phrase so its cut lands on a beat. The pause after a phrase is silence the shot can run on into, so the cut to the next phrase can sit anywhere inside that pause. Use a beat if one falls there. If not, use a half or quarter beat, and if none fits, cut straight after the phrase. No word is clipped or heard twice, and nothing freezes. Alternate the framing on each cut (a punch-in with scale), and let a big word take over the frame on the hits:

00:00.0 · f 000
Cut to the beat: pauses removed, every cut lands on a beat (or half beat) of a 100 BPM trackDownload
  • Each shot is a video layer with its own trimStart and duration. Name the cut points as markers and start the shots on them ("start": "@b2").
  • A punch-in on a cut is scale around the face: set anchor to where the face is and y to the same fraction, so the zoom stays centred on them.
  • Word mode with inline items shows one word at a time at the edited times.
  • Keep the music under the voice: around 0.3–0.5 volume while someone talks, louder in the gaps.

To choose the track, compare candidate tracks with how the speaker talks: measure each word's onset from the start of its phrase and count how many fall on each track's grid (within ±45 ms) at playback rates within ±4%. playbackRate on an audio layer keeps the pitch. The full example does this for you and prints the result.

#3. Diagrams on the words

The calm edit keeps the speaker's pace, trims only the long pauses, and illustrates the points they make. Mark each word a graphic hangs on, and let the footage step aside while the graphic is up, so nothing covers a face:

00:00.0 · f 000
A diagram on the words it illustrates: the take steps aside, and each month's bar rises as she names itDownload
  • The take shrinks and slides left with two keyframed properties (x, scale) that start at @aside.
  • Each bar rises on its own month's marker (["@feb+0.45s", 300]). Markers convert to each layer's local time, so the bars work inside a group that starts later.
  • She gives no amounts, so the bars carry none: the diagram shows only what was said.

#Reframing horizontal footage for vertical

A 4K take scaled to 1920 px high is 3414 px wide, so a 1080×1920 window can move across it at full resolution. Give the video layer the full width/height and move x to follow the speaker. Ease between positions, and only move when they drift well off-centre, as a camera operator would. The full example finds the face with macOS Vision four times a second and smooths the path.

#The full example

examples/talking-head, in the examples folder of every vidmake release archive, builds all three edits in vertical (9:16, from a 4K Chiang Mai travel vlog) and horizontal (16:9, from a Shepherdstown couple's vlog), each 60–110 s long, from committed transcripts, music analysis and face positions:

bash
cd examples/talking-head./fetch.sh                         # footage (CC BY 4.0) and music (CC0) from Wikimedia Commonspython3 build.py                   # writes vertical.json and horizontal.jsonvidmake render vertical.json --comp beat -o out/vertical-beat.mp4

build.py is the editor: you name the takes, and it maps words through the cuts, fits the music, cuts on the beat, places keyword hits and diagrams on markers, and follows the face. It prints how many cuts landed on a beat.

Footage: Jacob Gribbin and Whereva, CC BY 4.0 (credit them when you reuse it). Music: Loyalty Freak Music, John Bartmann, Sonatema and Luisalvaz, CC0.