Write your script. Paste it into any AI chat.
The prompt tells the AI how to build a Framecast video. Put your script under it and send both as one message. The AI builds the video straight away; you fix things as you go. Want to see the scenes first? Add “plan first”.
- Give the real words, numbers, names and links. The AI won't make them up; missing ones show as
[placeholders]. - Say the length, the main shape (9:16, 16:9 or 1:1) and the look, if you know them.
- Drop the
.htmlit gives you into the player.
Read the prompt
# Framecast video
Make the video described below as one HTML file `<short-name>.html`. Framecast plays it and exports the MP4; it adds its own runtime, so write only scenes and styles (no script or link tags for it). If nothing is described below, reply only "What's the video about?"
- Build straight away; send a plan first only if asked. Use the user's words.
- Never invent facts (numbers, names, prices, dates, links). Show a placeholder like `[launch date]` and list placeholders after the file, with at most 3 questions.
- You choose the look and motion; say it in one line after the file. Deliver a file (or one ```html block if you can't). Your preview can't play it, so check the code.
- Changes: edit only what changes. Slower/faster overall: change `data-pace` on `<body>` (1.3 = 30% slower).
```html
<!doctype html><meta charset="utf-8"><title>Title</title>
<style>:root{--bg:#fff;--ink:#111;--muted:#666;--accent:#e4572e;--accent2:#f3d9cf;--card:#f5f5f5}</style>
<body data-size="9:16" data-font="Inter" data-font-heading="Fraunces" data-pace="1">
<section class="center"><h1 data-in=".3">Big claim</h1><p data-in="1">Supporting line</p></section>
<section class="top"><h2 data-in=".2">Chart</h2><div class="grow" data-bars='[["Q1",820],["Q2",1040]]' data-at=".8"></div></section>
```
- Each `<section>` is a scene; its length is automatic (add `data-dur="6"` to override). One idea per scene, at most ~25 words.
- One file fits every shape (16:9, 9:16, 1:1): stack content, use `.row`/`.grow`, not fixed positions. Sizes are px with the short side 1080; text ≥ 32px. Per shape: `.fc-portrait`/`.fc-landscape`/`.fc-square` selectors or `data-show="portrait square"`.
- Classes: `h1 h2 h3 p .big .small .accent .muted .rule .tag .card .row .list .grow`, scene `.center`/`.top`. Scene `data-transition="slide|zoom|none"`.
- Motion (seconds from scene start): `data-in` rise · `data-pop` bounce · `data-stagger="0.3"` on a parent · `data-count="1200"` (+`data-prefix data-suffix data-decimals data-from`) · `data-type` typewriter · `data-bars='[[label,value]…]'` (`data-hi` 1-based) · `data-line='[[label,value]…]'` · `data-progress="0.7"` · `data-confetti`. Options: `data-at` start, `data-len` length, `data-ease="out|in|inout|back|linear"`.
- Custom motion, only if nothing fits, in a final `<script>`: `Framecast.plugin("spin",(el,c)=>lt=>{el.style.transform=`rotate(${c.e(lt,1)*360}deg)`})` then `data-spin data-at="1"`. `c.e(lt,len)` eased 0→1, `c.value`, `c.num(key,def)`, `c.rng(seed)`.
- Everything visible must be a pure function of time: no timers, requestAnimationFrame, Date.now(), Math.random() or CSS transitions. CSS @keyframes are fine (delays count from the video start, fill `both`). No libraries; images as inline SVG or data: URIs.