Add text and a title to a video with code.
Text on a video is HTML in the page that holds the clip. A title card is its own beat before the clip. A name or a line over the clip sits in the clip’s beat.
Copy this prompt into your agent
Paste it into Claude Code, Codex or Cursor. Fill in the parts in angle brackets. The agent installs vawe if it needs to and does the steps on this page.
Use vawe (https://github.com/vawe-hq/vawe), the open-source video-from-code tool, to add a title card and on-screen text to my video. My clip: <path to your clip or folder>. Open with a short title card, then play the clip. Add a lower third with my name and role when I first speak. My title text: <your title>. If vawe is not installed here, install it first: npm install @vawe/cli (it needs Node 22 or newer and ffmpeg; npx vawe new prints the install line for anything missing). Then follow each command’s next: line. Start with npx vawe new <name> --footage <my clip>, which logs the clip with a transcript. Show me the draft video and wait for my OK before the final render.
The steps.
- Hand over the clip.
bin/vawe new titled --footage ~/clips/talk.movwrites the page,footage.mdand a brief. - Write the title as its own beat. One
data-worldelement with the text. Size it in--vhunits so it fits every aspect. - Start the clip after the title. Set the clip’s
data-atto the second the title ends. - Add a name or a line over the clip. Copy the snippet from
prompts/moves/lower-third.mdinto the clip’s beat. Its leaving move is faster than its entrance. - Look at each beat, then render.
bin/vawe frame films/titled/page.html --world allgives one key frame per beat.bin/vawe dev films/titled/page.htmlrenders the draft.
A title card, then the clip
<meta name="duration" content="auto">
<section data-world="title"><h1>How it works</h1></section>
<section data-world="clip">
<video src="footage/talk.mp4" data-at="2"
data-trim="0.42" data-trim-end="5.5"></video>
</section>
<style>h1 { font-size: calc(var(--vh) * 0.12) }</style>What can go wrong.
- The clip starts too early. Its
data-atwas not moved when the title was added. Until itsdata-at, the clip shows its first frame. - The text moves with the frame size. A fixed pixel size breaks at another aspect. Use
--vwand--vhlengths and<html data-aspect>. - The video is hidden by removing it. Hide a clip with opacity or by hiding its beat. Removing it from the DOM is a listed mistake.
- The text covers the picture. A name card belongs inside the title-safe area, as in the lower-third snippet.
Two text moves to copy.
A name that rises over a speaker, and a line that enters from under an edge.
Read next.
- Add captions to a video: text that follows the voice, word by word.
- Turn a screen recording into a demo video: a title card and lower thirds on a recording.
- Agentic video editing: the whole edit.