← ClaudeAtlas

vectojs-video-exporterlisted

Use when exporting VectoJS scenes to H.264 MP4 with @vectojs/video-exporter, CLI/API capture, fixed-step scene contracts, Chromium, FFmpeg, cancellation, cleanup, or deterministic animation rendering.
vectojs/vectojs-skills · ★ 0 · Code & Development · score 72
Install: claude install-skill vectojs/vectojs-skills
# VectoJS Video Exporter Use this skill to export VectoJS canvas scenes to deterministic MP4 files through Chromium and FFmpeg. ## Export workflow 1. Confirm `ffmpeg` with `libx264` is on `PATH`. 2. Confirm Chromium resolution: `PUPPETEER_EXECUTABLE_PATH`, system Chromium, or Puppeteer’s browser. 3. Ensure the rendered page exposes `window.vectoScene` with callable `stop()` and `step(dt)`. 4. Keep animations deterministic: use `Scene.step(dt)`, seeded randomness, and no wall-clock/network dependence. 5. Choose local module or hosted URL input. 6. Use cancellation with `AbortController` for API calls or signals for CLI jobs. 7. Verify the output frame count and existing-file preservation on failure when release quality matters. Read `references/export-recipes.md` for CLI/API snippets. ## Current 0.2 contract - CLI binary: `vecto-export`. - API: `exportVideo(options)`. - First page `<canvas>` is resized and captured. - Output is H.264 MP4 with `yuv420p`. - Frame count is `Math.ceil(fps * duration)`. - Failed or aborted exports preserve an existing destination and remove incomplete staged files. - SIGINT/SIGTERM clean up Chromium, Vite, FFmpeg, progress output, and staged files. - Capture runs at `deviceScaleFactor: 1` — output resolution equals `width`×`height` exactly, independent of the host machine's DPR. - The exporter calls `scene.stop()` itself, then drives `step(dt)` per frame; the page only needs to expose the scene, not manage the loop. `step()` uses the Sc