DEV Community

Vincent Schmalbach for Explainroo

Posted on

Making an explainer video with Claude Code and an open-source renderer

An explainer video is a short video where a voice explains one idea and drawings appear while it speaks. For a developer tool it's often the fastest way to show what the thing does. You can put one at the top of a README, or next to a feature in the docs that is hard to explain in text.

Making one used to mean a screen recorder and a video editor. Now a coding agent can do most of it. It can write the script and draw the scenes in code. What it can't do on its own is turn that into a video file, or watch the video to see whether it's any good.

I built explainroo for that part. It's a free, open-source video tool for AI agents under the MIT license. I make the videos for my other products with it. Most of the advice about the script holds for any tool.

Start with the words

A few things I'd keep in mind about the script:

  • One idea per video. "How our sync works" is a video. "Everything about our product" is a landing page.
  • About 60 to 90 seconds for a first video. You can make a longer one later, once you know the short one works.
  • One idea per scene. If the voice says two things, the picture can only show one of them.
  • Write it for the ear. Short sentences read aloud better than long ones, and a voice model stumbles less over plain words than over clever ones.

How explainroo turns that into a video

The agent writes two files. script.md holds the words the voice says. scenes.js draws the pictures with a bit of JavaScript, and each drawing can appear on a word from the script. explainroo does the rest on your computer:

Part What does it
Voice Kokoro, an open voice model with 54 voices, or your own recording
Timing Whisper, which notes when each word is spoken
Pictures Chrome in the background, with hand-drawn lines from Rough.js and Lucide icons
Camera moves in on what the voice talks about and pulls back at the end
File ffmpeg, which writes an MP4 with subtitles and a cover image, plus YouTube chapters when the script has them

Kokoro reads English, Spanish, French, Italian, Brazilian Portuguese, Hindi, Japanese and Mandarin Chinese. It needs no account and no API key. German works with an ElevenLabs or Cartesia voice on your own key, or with your own recording, because Kokoro has no German voice.

Making the first video

Open Claude Code in an empty folder and paste this, with your topic in the brackets:

Make me a short explainer video about [your topic].
Use explainroo for it: run npx --yes explainroo docs and follow what it prints.
Enter fullscreen mode Exit fullscreen mode

The agent sets up explainroo through npx, so you don't clone anything. It writes the script and the scenes. Then it renders the video and checks it, and you get an MP4 file.

You need Node.js 20.11 or newer, ffmpeg and Chrome or Chromium. The first run downloads about 400 MB of voice and timing models. It also works with Codex, Pi and other coding agents, and it works best with Claude Code.

If you don't like a scene, say so in plain words: "the second scene shows too much text, use an icon and three words instead." The agent changes scenes.js and renders again.

How an agent checks a video it can't watch

An agent can't watch a video, so explainroo gives it other ways to see its work:

  • stills of each scene and a sheet of small frames for the whole video
  • a layout check that finds text that is cut off or overlaps
  • a speech check that finds words the voice got wrong

For a video that will play small, like in a social feed, there is a flag for that:

npx --yes explainroo check videos/my-video --view-width 854
Enter fullscreen mode Exit fullscreen mode

It flags text that would be too small to read at that width.

Checking videos you made some other way

check and verify also work on a video file made with any tool, including a screen recording you edited yourself:

npx --yes explainroo check talk.mp4 --script script.txt
Enter fullscreen mode Exit fullscreen mode

The report lists:

  • black or blank frames, and stretches where the picture stands still
  • silence, the loudness and the true peak
  • text too small to read on a phone
  • with --script, the words of your script that the speech model didn't hear

Add --json and your agent can read the report.

There is also npx --yes explainroo cut talk.mp4, which edits your own recording by its words. It writes talk.cut.md, one sentence a line with the time of each word. You or your agent delete words and long pauses there, and npx --yes explainroo cut talk.mp4 --apply writes the shorter video with a short crossfade at each cut.

Product demos from your real app

Since version 0.6, explainroo record records your app, and a scene plays that recording with a pointer and zooms that land on the narration. For a product demo, a recording shows the viewer the screen they will use.

Other tools worth knowing

Tool Good for
Remotion videos written as React components, with full control in code
Manim math and science animations, the library behind 3Blue1Brown's videos
Synthesia, HeyGen videos with an AI presenter, made in a web app
Loom quick screen recordings with your own face and voice

If you already know React and want a video template your app fills with data, Remotion is the obvious choice. If you want an AI presenter talking to the camera, that's Synthesia or HeyGen. explainroo is for the case where you want an agent to do the whole explainer and you want it to run on your own machine.

What leaves your computer

Making the video sends nothing anywhere. Everything explainroo does runs on your computer, and explainroo itself is free. Your coding agent is a separate service with its own terms and prices. Outside services for voices or AI video clips are optional and run on your own key. The code is on GitHub at vincentsch/explainroo, and explainroo.com/videos has example videos that agents made with it.

Top comments (0)