Produce motion-design video from code only: turn a creative brief into a beat map (timed scene JSON), review PNG stills, then render frame-by-frame with Playwright and encode to MP4 with ffmpeg. Use when someone asks to "make a video" or "animate" something programmatically, turn a script into motion graphics, render an HTML/JS animation to video, or build a repeatable, version-controlled video pipeline with no editor, no React build, and no wall-clock recording.
./install.sh code-motion-designname: code_motion_design description: Produce motion-design video from code only: turn a creative brief into a beat map (timed scene JSON), review PNG stills, then render frame-by-frame with Playwright and encode to MP4 with ffmpeg. Use when someone asks to "make a video" or "animate" something programmatically, turn a script into motion graphics, render an HTML/JS animation to video, or build a repeatable, version-controlled video pipeline with no editor, no React build, and no wall-clock recording.
Ship a finished MP4 from a written brief without a video editor. The pipeline is deterministic: every frame is a pure function of t = frame / fps, so the same beat map always produces the same video, frame counts are exact, and re-renders after a copy change are one command. This is the same architecture Remotion and similar tools use, but framework-free: a single HTML file, Python, Playwright, and ffmpeg, nothing to install beyond that.
beatmap.json following references/beat-map-schema.md: timed scenes (title, bars, lower, fade) with start/end seconds. Duration = last scene end. Frames = duration * fps. Budget accordingly.python3 bin/render.py stills beatmap.json --times 0.5,2.6,6.0 Captures those exact timestamps and prints the PNG paths. Look at them. Every one must read correctly before you proceed. This is the quality gate; a full render of a broken map is wasted time.python3 bin/render.py render beatmap.json --out out.mp4 Captures every frame headless, then encodes (h264, yuv420p, crf 18, faststart). Options: --workdir to keep frames, --audio track.wav to mux a soundtrack, --supersample for razor text (renders 2x, downscales after), --crf for quality vs size.references/encoding-notes.md: resolution, duration, fps, codec. Extract one frame per scene and confirm the subject matches what the beat map promised.Date.now(), Math.random(), or free-running requestAnimationFrame in the render path. Seeded pseudo-random only. Anything time-varying must be a function of t.assets/engine.html) to the four it supports; new scene types get a painter function in the engine and a test still before use.bash
cd <this skill dir>
cp assets/example-beatmap.json my-video.json # edit the copy
python3 bin/render.py stills my-video.json --times 1.0,3.5,6.5
python3 bin/render.py render my-video.json --out my-video.mp4
publisher key 2e43c913833850e6d80f939677e3de76e806d47785c0f1caaca90f9d18c98e1e
No ratings yet — be the first to rate it.