Skip to Content
MeowKit
Skills

mk:html-video

Renders a local HTML, CSS and JavaScript animation to an H.264 MP4 by capturing frames with Playwright and encoding them with ffmpeg.

Source.claude/skills/html-video/SKILL.md
Ownerutility
Runtimeclaude-code
Risklow

What it does

mk:html-video captures fps × duration PNG frames from a local HTML file, encodes them to an MP4 with yuv420p compatibility, removes its temporary frame directory on success or failure and prints the output path. It suits authored web animation, canvas, WebGL and GSAP output. It is not enabled by default (default_enabled: false) and needs Playwright and ffmpeg.

When to use it

Use it to export a local HTML animation as MP4 or to produce a video from a deterministic web template. It is not for live browser recording, screen capture or AI video generation.

Usage

bash ${CLAUDE_SKILL_DIR}/scripts/render-html-to-mp4.sh template.html output.mp4 30 5 1920 1080
ArgumentMeaning
<html-file>The template to render
<output.mp4>Output path
[fps], [duration-seconds]Frame rate and length
[width], [height]Viewport size. Use even values.
[background-color]Optional

To capture frames only, run node ${CLAUDE_SKILL_DIR}/scripts/capture-frames.mjs <html-file> <frame-dir> <fps> <duration-seconds> <width> <height> [background-color].

Steps

  1. Check that ffmpeg and Playwright are installed. Install Chromium only if it is missing and you approve.
  2. Pick an even width and height.
  3. Expose a window.onFrame hook in the template for fast deterministic stepping. Without it, capture runs in real time.
  4. Render, then check the MP4 with the ffprobe command in references/render-workflow.md.

References

FileLoad for
references/render-workflow.mdDependency checks, dimensions, fps
references/html-template-contract.mdDeterministic JavaScript, canvas, WebGL, GSAP stepping
references/troubleshooting.mdModule, file://, codec, cleanup and dimension failures

Gotchas

This is a skill, not an npm package. Run its bundled scripts directly.

On this page