Any to Videos
Turn articles, products, data, and ideas into videos that feel like real films. There is only one core criterion: every beat has a protagonist changing, the change has a cause, and the visuals do what sound cannot. If you don't meet this, no amount of effects will save it from being a moving PPT.
The second criterion is just as important: pause at any frame and you get a designed composition — the subject is clear, text is large enough, there isn't too much in the frame, and the composition works. The main weakness of this repository's output is here, not in motion.
SKILL_DIR = the directory containing this file. New videos go in a separate directory under the current project (e.g. <project>/<video-name>/), not inside the skill directory.
What to Read First
| Task | Required | On Demand |
|---|---|---|
| Any video-making task | references/01-质感原则.md (includes §11 Visual Appeal, §12 Four-Pass Construction, §13 Interesting, §14 Content & Runtime, §15 People & Things Need Images) | — |
| Decide video type, choose tech stack | references/03-风格路由.md | — |
| Write motion, shots, transitions | references/02-运动与镜头手艺.md | templates/film.html toolbox |
| Write prompts for model / yourself | references/04-提示词库.md | — |
| Voice-over explainers / series | references/05-口播讲解片流程.md | templates/DESIGN.md |
| Music, sound effects, mixing | references/06-声音与卡点.md | — |
| Rendering, self-check, delivery | references/07-渲染与质检.md | — |
| Deconstruct someone else's video | 03-风格路由 § 参考片复刻 | scripts/review.py sheet |
| Need photographic assets, layers, style exploration | references/08-生图素材.md (optional extension) | scripts/imagegen.py |
| Choose tools, check what's available locally; integrate GSAP / physics / WebGL libraries | 03-风格路由 § 工具速查 | 07 §1 Stateful library integration |
Workflow (⛳ = pause and show the user for confirmation before proceeding)
This is the default route, not a fixed procedure: merge, adjust, or skip steps based on the size of your video, using your own judgment to make a better video. The gates have only one purpose — let the user see real frames before expensive steps.
- Brief ⛳: Copy
templates/brief.mdto the video directory. Ask about purpose, audience, the one thing they should remember, duration & aspect ratio, video type, and clock (music or voiceover). List all assets needed and ask the user for them (brand terms, 9–12 real photos, royalty-free music, sound effects, voiceover, font). If assets are missing, state what's missing — don't start with placeholder images, they're the source of cheapness; missing photographic assets can be supplemented with generated images (08-生图素材). Anything you can infer (aspect ratio, framerate, tech stack), decide yourself, don't ask. For explainer/narrative videos, do content research first (coincidences, details, character stories — prepare 2x what you need), create an "object → image" table — people and things can't just be names. - Set Visual Direction & Prohibitions: Colors ≤ 3–4 (accent color only for current focus), font down to weight/axis, font size hierarchy (must-read text ≥ 28 px), materials (≤ 2 worlds for the whole video), camera style; write at least 5 prohibitions (defaults: crossfade, blur fade-in, dead frames, centered large text with gradient background, particle/glow clutter, breathing/floating false motion). For a series, do static + motion tests first, then write
DESIGN.md. - Clock: For music videos, run
scripts/beats.py(and listen to--clickto confirm BPM and downbeats); for explainers, usescripts/voice.pyto generate voiceover, produce the timeline (timeline.jswithkw()keyword moments), review its playback differences and segment health checks (inner WAV header, syllable ending louder than body, clipping — AI can't hear these, so the numbers act as its first ear), then have the user listen and confirm before locking. - Structure & Beat Table ⛳: First propose 2–3 candidate structures (one sentence + why) and runtime allocation (intro short, climax long, first 3 seconds hook — the hook should be the most concrete, counterintuitive result of the whole video; give the result first, then the argument; the first frame having an image is just form, an abstract argument is not a hook). Once selected, write the state chain per segment (who → becomes what, what triggers it). For explainers, fill in "sound already given / new visuals / must-keep text" for each segment; then fill in "beat → event → shot → sound effect" table, seam table (exit vector → entry vector + carrier), and energy curve (build-up, climax, release, true silence). Mark a surprise beat roughly every 30 seconds. Place the climax beat at the most important revelation; reduce information density during interludes.
- Key Still Frames ⛳: Following the first two of the Four-Pass Construction (01 §12) — first use grayscale blocks to establish composition hierarchy, then replace with real copy for layout — produce 4 key frames (opening / core / climax / final) and show them to the user. After viewing, point out the model defaults in the frame and add them to the prohibitions. For complex continuous states or contact, first render a few seconds of a risk prototype.
- Production: Start from
templates/film.html(toolbox: closed-form spring superposition, logarithmic space camera zoom, easing, deterministic randomness, grain,mark()semantic markers). Write all times as beatb(n)or keywordkw();draw(t)is a pure function. Usemark()/fillTextM()conveniently for drawing protagonists, must-read text, subtitles; for explainers, setwindow.KEYS. Apply colors and materials only after motion is set. - Self-Check (do not skip):
render.mjs film.html --lint: font size, number of text blocks, subject size, shot distance, dead frames, subtitle occlusion, reading time — fix each issue or give a reason;render.mjs --stills beats|keys→review.py sheet --images stills/(also produce a--width 360mobile-size sheet) → read the contact sheet yourself, check each beat against the criteria in 07 §3 ①, identify and fix issues, then produce again;- key transitions
--from/--topartial render + 0.05 s dense contact sheet; - full render (60fps × 4 sub-frames, use
--jobsfor long videos) →review.py scan: skip frames, frozen frames, first and last frame. - Independent Final Review: Dispatch a sub-agent with a fresh context, give it only the key frame contact sheet, brief, and prohibitions, not the production rationale. Let it produce a timeline-stamped issue list per 07 §5. Fix all P0 issues before delivery; if no review is available, write "No independent review obtained" in the delivery notes.
- Audio ⛳: Page
window.cues()gives sound effect and music timings →render.mjs --cues→voice.py mix(ducking, peak alignment, dual loudness normalization) →beats.py verifyback-test beat alignment; user confirms with their ears. - Delivery: Final video (
ffprobeconfirm 60fps, color metadata, intact audio track) + source HTML + asset source/license + quality check records (lint, scan, independent review conclusions); honestly state any unchecked items (e.g. "not viewed on mobile portrait", "not heard on external speakers"). - Retrospective: Points of rework, points to repeatedly remind, points to optimize → write general methods back to this skill's
references/, write series preferences back toDESIGN.md.
Small requests (single animation, modify one segment) don't need documentation; but inspect still frames and scan results yourself before delivery — it's the cheapest time to catch "looks like PPT" problems.
Revision Protocol (for both user feedback and self-checks): Write each as timestamp · location · problem → fix · items not to change, 3–5 items per round. Fix P0 first (viewer can't understand, can't read, factual error). Stop when the feedback changes from "I can't understand" to "I prefer something else".
Hard Engineering Conventions
- Page contract:
window.FILM = {width,height,fps,duration,bpm},window.seek(t)(pure function), optionalwindow.ready,window.inspect(t)(for linting),window.KEYS(key moments),window.cues()(audio timeline); canvascanvas#film. - No CSS transitions/animations, timers, rAF accumulated state; reset Canvas context every frame; fix all randomness with a seed; fonts and assets loaded in
ready. - Springs use closed-form step response; when a value changes multiple times, superposition the responses (
track()); camera zoom useszoomAt()(logarithmic space). - Stateful libraries (GSAP, physics engines) are not advanced inside
seek: after pause,tl.time(t); physics pre-simulate with fixed timestep inready, look up by t (07 §1). WebGL pages use Metal backend by default inrender.mjs. - Shapes covering a transition must extend beyond all four corners, with about 0.3 s expansion; cut scenes during occlusion.
- Video assets: all intra-frame encoding + blob URL + wait for
seekedon every frame. - Final video: H.264 yuv420p, BT.709 limited with color metadata (handled by render.mjs); use
-tnot-shortestfor container.
Division of Labor Boundaries
- Code excels at: precise text, numbers, interfaces, graphics, routes, data, order & quantity, camera moves, beat alignment.
- Leave to assets: real photo textures, real location shots, real sound effects and music. If no ready asset exists, Codex can generate photo-grade images, layers, and multi-version compositions (code still overlays text and numbers).
- Leave to video models: continuous character performance, natural motion, cross-style motion transitions — code overlays precise text and readings on top.
- True 3D lighting/claymation: Three.js (DOF+Bloom) or Blender.
Scripts
cd "$SKILL_DIR/scripts" && npm install # First time (Playwright; reuse local Chromium, fall back to system Chrome)
node render.mjs <film.html> -o out.mp4 [--audio mix.wav] [--fps 60] [--sub 4] [--from s --to s] [--scale 0.5]
node render.mjs <film.html> -o out.mp4 --jobs 6 # Long videos: parallel time-sliced render, lossless concatenation (12 s video ~84 s, single process ~6 min)
node render.mjs <film.html> --stills beats|keys|t1,t2,... -o stills/
node render.mjs <film.html> --lint [--json lint.json] # Semantic check (requires page to use mark() markers)
node render.mjs <film.html> --cues audio/sound.json # Export window.cues() audio timeline
python3 review.py sheet <video> [--from a --to b] --every 0.25 -o sheet.jpg # Also used to deconstruct reference videos
python3 review.py sheet --images stills/ -o sheet.jpg [--width 360] # 360 = mobile readability check
python3 review.py scan <video> [--hold 1.0]
python3 beats.py <song> --fps 60 -o beats.json --click check.wav [--bpm 120]
python3 beats.py peak <sfx.wav>
python3 beats.py verify audio/stem-sfx.wav audio/sound.json # Back-test sound effect alignment (then add --ref audio/mix.wav to final video to measure overall offset)
python3 voice.py tts 口播稿.txt -o audio/vo [--provider gemini] # Per-sentence AI voiceover (OpenAI or Gemini, pay per use; can also use your own recording)
python3 voice.py timeline 口播稿.txt --vo audio/vo # → audio/voice.wav + timeline.js (kw()) + segment health + playback differences
# For short vertical videos (≤ 90 s), tighten pauses: --lead 0.2 --tail 1.6 --gap 0.12 --seg-gap 0.28, after re-beating use --extra to leave 0.3–0.45 s landing point
python3 voice.py mix audio/sound.json --voice audio/voice.wav -o audio/mix.wav
python3 imagegen.py gen "<Task A>" "<Task B>" -o assets/ [--ref 参考图] [--effort medium] # Parallel image generation via Codex (ChatGPT quota)
python3 imagegen.py check assets/*.png [--align master.png variant.png --fix-align] [--clean-alpha]
Dependencies: Node 18+, ffmpeg, Python 3 (pip install -r scripts/requirements.txt: numpy, Pillow; librosa, soundfile for beats.py; openai-whisper for voice.py timeline; openai only needed for voice.py tts default backend).
Examples & Sources
- Starter template demo:
templates/film.htmlrender result — text markers squeeze into ellipsis, ellipsis becomes capsule, cursor click, iris open, grid unfolds from behind, bento rearranges, camera pushes in, slider drives re-lighting, black shape fills transition, full circle. The procedural landscape is just placeholder; real photo assets are what make the final video look professional. examples/contains approved 002 / 005 / 006 / 007 case source code, see examples/README.md for details.- Methodology sources (only paraphrased and distilled, watch original videos from the authors): 卡尔的AI沃茨 "AI做代码动画动效大片的零基础教程" (marked 〔卡〕), 一只桌子 "我的 AI 视频制作流程和开源 SOP" (marked 〔桌〕).