Skip to content

Lesson 6 of 7 · 6 min read

Cut in code

Time captions to each word, move them clear of on-screen text, add sourced overlays and sound, and check stills before the full render.

A moment at work · fictional example

Every piece of the ad now sits in one folder. The edit has to show each word as Maya says it, put the source under every number, and stay readable on a small screen. Jo wants to find mistakes before a long render, not after.

You will make: Build the edit for your ad. Follow the fictional example first, then try it with material you are permitted to use.

Why an edit in code

An edit defined in code places every caption, overlay and sound at an exact frame. When a word timing or a clip changes, you change one line and render again. An assistant can read and write the edit, because it is text.

Remotion is one way to do this. It builds video from React components and renders an MP4. Any editor works too. The craft below is the same in a timeline editor, with more dragging.

Read the license before you start. On October 28, 2026, Remotion’s license page said it is free for individuals and small companies, and that bigger companies pay a fee. Its license FAQ sets the free limit at a team of up to 3 people.

A company of 4 or more needs a Company License. Remotion’s price page listed a seat for making videos at $25 a month.

Word timings

Captions that light up word by word need the start and end time of each word. Run speech-to-text with word timestamps on the final voice track, laid out on the edit’s clock. whisper.cpp does this for free on your own computer.

Its README shows word-level timestamps with the -ml 1 option, and marks the feature experimental. Save the result as a words file: each word with its start and end in seconds.

Then fix the file by hand. Replace each transcribed spelling with the script’s spelling, such as numerals for a statistic. Check every word within half a second of a cut point against the waveform. A timing that runs late puts a word’s caption on the next shot.

Captions that read on a phone

Show up to three words at a time. Break a group at punctuation and at any pause longer than about a third of a second. Light each word as it is spoken, and dim the words still to come.

Pick a short list of key words from the script, such as the number, the product and the offer. Give them a second color and a small pop when spoken. Use a heavy outline, so captions read on any background.

Then set caption zones. A caption zone is a time window with a position: middle over the creator, top or bottom over a product screen, or hidden during a full-screen overlay. Captions must never cover on-screen text, and that text moves from shot to shot.

Overlays that carry the facts

The stat slam opens the ad. The number enters oversize and lands with a short shake. A source line under it names the source from the claim ledger. A number on screen without its source line fails the ledger.

During the product moment, let the screen recording fill the frame. Put the creator in a round bubble in a corner, still lip-synced, so the voice has a face. Add a slow drift to the screen, so it moves like a phone in a hand.

On jump cuts between the creator’s lines, punch in: scale the shot up by 4 to 20 percent. Add a shake that fades out over about 10 frames. Fire confetti on the reveal, and keep the Demo label above it.

Sound

Mix the voice first, then set everything else well below it. A generated music bed fills the gaps. Synthesize sound effects with ffmpeg, such as a whoosh from filtered noise and a tick from a short tone. Sounds you synthesize raise no license question.

Place each sound on the frame of the event it marks: a whoosh on a cut, a pop when a sticker lands, ticks while the viewer picks an answer.

Check before the full render

A full render takes minutes. A still frame takes seconds. Render stills at every moment that matters: each stat slam, each change of caption zone, the question, the reveal and the call to action.

Look at each still on a phone-sized screen. Check that no caption covers text, every number has its source line, and the Demo label shows. Fix what the stills show, render them again, and then render the video.

After the full render, make a frame grid: one frame per second, tiled into a few images with ffmpeg’s tile filter. Read every tile for hands, faces, captions and labels. Lesson 7 runs the full check.

Worked example · Fernway

Jo cuts the 55-second ad

Jo has the three lip-synced clips, three b-roll clips, the voice take and the 40-second screen recording with its marks file. Jo builds the edit in Remotion at 1080 by 1920 and 30 fps. Fernway has 14 people, so Jo buys a Company License seat first, outside the $25 generation cap.

  1. Jo runs whisper.cpp with the base.en model on the voice track and saves a words file. Jo replaces the transcribed spellings with the script’s, so the number reads the same as on the slam.
  2. Jo renders a still at the cut from the first talking clip to the b-roll. The caption for “the bin” sits on the b-roll shot, after Maya has stopped speaking.
    What would you do next?The words are right. What is wrong, and how does Jo fix it?Think it through, then show the answer

    The timings run late. Speech-to-text placed the two words about a quarter second after Maya said them, past the cut point. Jo moves both start and end times by hand to match the waveform.

  3. Jo sets caption zones: middle over Maya, hidden during the stat slam, and middle again over the b-roll. Jo renders stills at seven moments.
  4. The still at 1 second shows “30–40%” slamming in, with its subline “of the US food supply is wasted”.
    What would you do next?Check the still against the claim ledger. What is missing?Think it through, then show the answer

    The source line. The ledger cites the USDA food waste FAQ, which bases the estimate on 2010 data. Jo adds “Source: USDA estimate, 2010 data” under the number and renders the still again.

  5. The still at 33 seconds shows the first pantry-check question. The caption sits on top of the quiz question. Jo moves the caption zone for those seconds to the bottom, below the answers.That answers the question you guessed at: Guess: Jo’s first edit keeps the captions in the middle of the frame from start to end. What does a still from the product moment show?
  6. Jo adds sound: a generated music bed under the voice, a whoosh on each cut, ticks during the answer pause and a chime on the reveal. Confetti fires on the reveal, and the Demo result label stays on top of it.
  7. Jo renders the full video and a frame grid of one frame per second. Every tile shows captions clear of text, and the source line sits under the stat.

Jo has a 55-second MP4 at 1080 by 1920 and 30 fps. The words file has two hand-fixed timings, and the stills and frame grid sit in the project folder. Nobody outside Fernway has seen the ad yet. Lesson 7 checks it before it posts.

Go deeper: the research and edge cases

Optional. The exercise needs only what is above.

The license in detail

Remotion’s license FAQ also makes qualifying non-profits and evaluation free. An agency that delivers only the video file counts its own headcount, and one of 4 or more needs a Company License. Read the live pages before you build, because terms change.

Caption timing details

Show each word group a frame or two before its first word, so the eye arrives with the sound. Hold the last group until the next one starts, or for under a second if a pause follows.

Keep captions away from the right edge and the bottom of the frame. Feed apps draw their buttons and the post caption there.

A frame grid command

An ffmpeg filter chain of fps=1, a scale to 270 pixels wide and tile=6x4 puts 24 seconds of video on one image. A 55-second ad fits on three images. Lesson 7 adds mouth crops for the lip check.

Starter prompts

  • Check my word timings at the cuts

    Here is my words file, with each word and its start and end in seconds: [paste it]. Here are my cut points in seconds: [paste them]. List every word that starts or ends within 0.5 seconds of a cut point, and say which shot it falls in. Do not change any timing, because I will check each flagged word against the waveform. Then list any word whose spelling differs from this script: [paste the script].
  • Plan caption zones and overlays

    Here is my shot list, with start and end times and any text visible on screen in each shot: [paste it]. Here is my claim ledger: [paste it]. Write a caption zone list: for each time window, put the captions in the middle, at the top or at the bottom, or hide them, so they never cover on-screen text. Then list every number that appears on screen, with its source line from the ledger. Write "missing" where the ledger has no source.
  • Write the still and frame grid commands

    My edit renders with [Remotion, or name your editor]. Write the commands to render still frames at these times in seconds: [list them]. Then write an ffmpeg command that makes a frame grid of my final MP4: one frame per second, each 270 pixels wide, tiled 6 by 4 per image. Explain each part of the commands in one line.

When not to use AI

  • Auto-captions from an editor or a platform, posted without checking each word against the script and the audio.
  • Remotion at a company of 4 or more people without a Company License. Check the live license page first.
  • A full render as the first check. Render stills at the key moments first.
Recall from memoryWhat is a caption zone, and when do you catch a caption that covers on-screen text?Answer it without looking back, then show the answer

A time window with a caption position: middle, top, bottom or hidden. You catch the problem in still frames rendered at the key moments before the full render, and again in the final frame grid.

Exercise · your project

Build the edit for your ad.

  1. Run speech-to-text with word timestamps on your final voice track, and save a words file.
  2. Check every word near a cut point against the waveform, and restore the script’s spellings.
  3. Write your caption zones and your list of key words.
  4. Add each on-screen number with its source line from your claim ledger.
  5. Render stills at each key moment and fix what they show. Then render the video and a frame grid.

Your project workspace

Leave with work you can use.

Write here or use an approved tool. Use fictional or permitted information. Your work stays in this open page and disappears on reload. Nothing is submitted to Emeri or an AI service.

This is self-review. Completion is saved on this device and does not award certification.

Sources