Communitygithub.com

interactive-to-video

Convert an interactive webpage (interactive article, explorable explanation) into a complete explainer video: write a recording script, use a headless browser to walk through the page like a reader, record the screen, add voiceover with cloned voice or the page's own audio, and output 1080p MP4 with subtitles. Used when the user says 'turn this interactive page into a video', 'interactive to video', or 'make a video version'.

What is interactive-to-video?

This skill, named `interactive-to-video`, is a powerful tool for developers and content creators who want to automatically convert interactive web pages (including interactive articles, explorable explanations, and web-based demos) into polished 1080p MP4 explainer videos. It uses a headless browser to simulate a real reader's interactions—scrolling, clicking, and dragging—while recording the screen and optionally adding a synthesized voiceover or the page's own audio. The core workflow involves writing a recording script that defines the narrative, visual interactions, and voiceover timing, after which the system handles the automated recording, audio synthesis (using IndexTTS-2 for voice cloning), and video assembly. It supports two main modes: 'Explainer' (A) for pages that need a new voiceover, and 'Self-voiced' (B) for pages that already have audio and use scroll-based storytelling. The tool is designed for platforms like Claude Code, Cursor, and Codex, and its SKILL.md provides detailed guidance on writing scripts, avoiding common pitfalls (e.g., audio driver issues, CSS zoom problems), and verifying the final output. Key features include automatic subtitle generation, dry-run support without voiceover, efficient pacing, and robust error handling with a watchdog mechanism. A practical demo is included in `examples/demo/` to quickly validate the environment.

Works with✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/micahfang1/interactive-to-video/tree/HEAD

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation

Interactive Page to Video

This directory is the tool itself. A headless browser walks through the interactive page like a reader (scrolling, clicking, dragging – cursor is visible), recording the screen along the way, and produces a 1080p MP4 with voiceover.

Recording and compositing are automatic; you must write the script for each interactive page: understand the page, decide what to cover, what to cut, and what actions to perform on each step. This is the main effort.

  • lib/record.mjs – Recorder: opens the page, injects cursor and subtitles, captures frames into a video, records the page's own audio.
  • lib/make.mjs – All-in-one for explainer mode: synthesize voiceover → drive interactions synchronized with voiceover duration → compose final video and subtitles.
  • lib/voice.mjs + lib/tts.py – Voice cloning (IndexTTS-2).
  • lib/subtitles.mjs – Subtitle splitting, duration estimation, silence detection (has tests, run npm test).
  • examples/demo/ – A ready-to-run mini example (one small interactive page + its script); run it first to confirm the environment.
  • examples/ – Two more real-world examples of each type; they won't run as-is (they depend on their respective interactive page files), but show how to structure the code.

See README for environment setup. Intermediate files are written to work/, final output to out/, so run this from the directory where you want the video to appear.

Classification First

A Explainer-TypeB Self-Voiced-Type
Interactive page featuresNo voiceover, relies on reader reading and interactingHas its own audio, sound effects, subtitles, auto-plays on scroll
Video's audioWrite a separate voiceover, clone the voiceRecord the page's own audio; only add voiceover for text without audio
Exampleexamples/explainer-involution.mjsexamples/selfvoiced-jensen.mjs
Commandnode lib/make.mjs <script>.mjsnode <script>.mjs

To create a new episode: copy the relevant example and modify. The comments in the examples explain what each section does.

Principles

  • Make a complete explainer video, not a teaser.
  • Keep the pace tight: minimize silent parts. After rendering, check the list of

Related Skills