AI Video Editing Flows

Effect #067 in our rendered series

Code typing animation

A short snippet is typed token by token into an editor card, with the caret following the end of the text.

Real footage

1920x1080 file, 3.4 MB

Rendered by us at 1920x1080 over a shot from Tears of Steel (Blender Foundation, CC-BY 3.0). Expand plays the full 1080p file.

Edit in Premiere, Resolve or After Effects? Jump to editor templates. Making many versions of the same video? Use the code route.

Make this effect with

Built and tested by us

Other ways, not tested by us

Use it in a real edit

The demo above already plays the composition over real footage: the clip is a muted <video> layer under the graphics (the file plate.mp4 in the code below). Replace that file with your own clip and render again. To use the graphics in an editor instead, switch the background off and render a transparent MOV (an H.264 MP4 cannot carry transparency):

Render the graphics alone, with transparency
npx hyperframes render . -o overlay.mov --format mov --fps 24 --variables '{"plate":false}'

The routes in full

With Claude Code: the prompt we used

Rendered and tested by us in HyperFrames 0.8.10 on Nov 14, 2026.

Make a 5 second code typing animation: a short generic snippet is typed out token by token with a caret that tracks the end of the text, inside a simple editor card, then holds, with the snippet text and the typing speed as variables. Use harmless template code only, no real products or keys.

What changed since this prompt: the demo on this page is our second version, 5 seconds long, rebuilt on a shot from Tears of Steel with the same animation idea. The full composition below is the one we rendered; its build log lists every change.

Built by a Claude Code subagent (Sonnet) from the HyperFrames registry block code-typing, HyperFrames 0.8.10. Claude Code then checked the composition with hyperframes lint and hyperframes check before we rendered it.

What we had to correct (8 notes from the build log):

  • 6 Nov 2026, lint 1: 1 error, `invalid_composition_variables_declaration` (the variables JSON was written HTML-escaped inside a double-quoted attribute, and the linter does not decode entities). Fix: the attribute is now single-quoted raw JSON.
  • 6 Nov 2026, lint 2: 0 errors, 0 warnings.
  • Adapted from code-typing: kept the editor card, per-token reveal and a caret that moves to the end of each token. Replaced the pre-tokenized Shiki data with a small built-in tokenizer so the snippet is a variable. Caret position uses the fixed monospace advance (0.6 em) instead of measuring the DOM, so it does not depend on font timing.
  • If a snippet would take longer than 3.3 seconds the timings are compressed to fit, so very slow speeds on long snippets are capped.
  • Decided against: the registry's diff, highlight-box and block-flight scenes (not part of this prompt).
  • hyperframes check, first run: "t=4.17-4.72s (2 samples) text_occluded span.tok inside #caret "}" - Text is hidden beneath an opaque element". Real defect: the resting caret sat on the closing brace. The caret now stands 5 px to the right of the typed text. Second run: "Check passed".
  • Render: flash check passed. Frames at 0.5, 1.4, 2.2, 3.0, 4.2 and 4.8 s show the snippet typed token by token, caret clear of the last character, card fading out.
  • v2 (14 Nov 2026): rendered again from the current source. Every number on screen comes from our own measured test results (labelled Measured by us, 2026); frames and the poster were checked by eye.

With HyperFrames code

Rendered and tested by us in HyperFrames 0.8.10 on Nov 14, 2026.

Install the block and render
npx hyperframes add code-typing
npx hyperframes render . -o out.mp4 --fps 24

Settings you can change without rebuilding (pass them with --variables):

SettingNameTypeDefault
Code snippet (use \n for new lines)snippetstringgroups, cur = [], [] for w in words: gap = w[1] - cur[-1][2] if cur else 0 if cur and (len(cur) >= 4 or gap > 0.6): groups.append(cur) cur = [] cur.append(w) if cur: groups.append(cur)
Typing speed (characters per second)speednumber24
Caret and highlight colouraccentcolor#58a6ff
Show backgroundplatebooleantrue
Our full composition (index.html, 11 KB)
index.html
<!doctype html>
<html lang="en" data-composition-variables='[{"id":"snippet","type":"string","label":"Code snippet (use \\n for new lines)","default":"groups, cur = [], []\nfor w in words:\n    gap = w[1] - cur[-1][2] if cur else 0\n    if cur and (len(cur) >= 4 or gap > 0.6):\n        groups.append(cur)\n        cur = []\n    cur.append(w)\nif cur:\n    groups.append(cur)"},{"id":"speed","type":"number","label":"Typing speed (characters per second)","default":24,"min":8,"max":40},{"id":"accent","type":"color","label":"Caret and highlight colour","default":"#58a6ff"},{"id":"plate","type":"boolean","label":"Show background","default":true}]'>
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=1920, height=1080" />
    <link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400&display=block" rel="stylesheet" />
    <script src="gsap.min.js"></script>
    <style>
      *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
      html, body { width: 1920px; height: 1080px; overflow: hidden; background: transparent; }
      #root { position: relative; width: 100%; height: 100%; overflow: hidden; background: transparent; }
      #plate { position: absolute; inset: 0; background: radial-gradient(120% 90% at 30% 40%, #1b2335 0%, #0b0d12 70%); overflow: hidden; }
      #world { position: absolute; left: -200px; top: -120px; width: 2400px; height: 1320px; }
      .blob { position: absolute; border-radius: 50%; filter: blur(60px); }
      .pb1 { width: 760px; height: 760px; left: 180px; top: 260px; background: #ff5a1f; opacity: 0.35; }
      .pb2 { width: 900px; height: 900px; left: 1200px; top: 80px; background: #2f6bff; opacity: 0.45; }
      .grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px); background-size: 120px 120px; }

      #stage { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 10; }
      #editor { width: 1380px; height: 720px; background: #0b0f17; border: 1px solid #1d2733; border-radius: 16px; box-shadow: 0 40px 120px rgba(0,0,0,0.6); overflow: hidden; display: flex; flex-direction: column; opacity: 0; font-family: "JetBrains Mono", monospace; color: #e6edf3; }
      .titlebar { height: 56px; flex: 0 0 56px; display: flex; align-items: center; gap: 16px; padding: 0 22px; background: linear-gradient(#11161f, #0c111a); border-bottom: 1px solid #1b2430; }
      .dots { display: flex; gap: 10px; }
      .dot { width: 14px; height: 14px; border-radius: 50%; }
      .dot.r { background: #ff5f57; } .dot.y { background: #febc2e; } .dot.g { background: #28c840; }
      .fname { font-size: 19px; color: #a3afbf; }
      .surf { position: relative; flex: 1 1 auto; overflow: hidden; }
      .gutter { position: absolute; top: 34px; left: 0; width: 84px; padding-right: 20px; font-size: 30px; line-height: 50px; text-align: right; color: #8b98a9; }
      .ln { display: block; height: 50px; }
      #code { position: absolute; top: 34px; left: 104px; right: 44px; font-size: 30px; line-height: 50px; font-variant-ligatures: none; }
      .line { display: block; height: 50px; white-space: pre; position: relative; z-index: 1; }
      .tok { display: inline-block; white-space: pre; opacity: 0; }
      #hl { position: absolute; left: -104px; right: -44px; top: 0; height: 50px; background: var(--accent); opacity: 0.1; z-index: 0; }
      #caret { position: absolute; left: 0; top: 0; width: 3px; height: 36px; margin-top: 7px; background: var(--accent); border-radius: 1px; z-index: 3; }
      .status { height: 38px; flex: 0 0 38px; display: flex; align-items: center; justify-content: space-between; padding: 0 22px; background: #0c111a; border-top: 1px solid #1b2430; font-size: 16px; color: #a3afbf; }

    
      /* footage plate (v2): real footage, pinned, no generated blobs */
      #plate { background: #000 !important; }
      #world { left: 0 !important; top: 0 !important; width: 1920px !important; height: 1080px !important; transform: none !important; }
      #world .blob, #world .grid { display: none !important; }
      #pv { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; object-fit: cover; }
      #scrim { position: absolute; inset: 0; background: rgba(0,0,0,0.35); }
    
      /* data family v2: dashboard window over dimmed footage */
      #scrim { background: rgba(4,6,12,0.58) !important; }
      .win { position: absolute; border-radius: 26px; background: rgba(11,15,25,0.94); border: 2px solid rgba(255,255,255,0.16); box-shadow: 0 30px 80px rgba(0,0,0,0.55); overflow: hidden; font-family: "Inter", "Montserrat", sans-serif; }
      .win .bar { position: absolute; left: 0; right: 0; top: 0; height: 64px; background: rgba(255,255,255,0.06); border-bottom: 2px solid rgba(255,255,255,0.10); display: flex; align-items: center; padding-left: 28px; gap: 12px; color: #aab3c5; font-size: 24px; font-weight: 500; }
      .win .bar i { width: 16px; height: 16px; border-radius: 50%; background: #ff5f57; display: block; }
      .win .bar i:nth-child(2) { background: #febc2e; } .win .bar i:nth-child(3) { background: #28c840; }
      .win .bar b { margin-left: 18px; font-weight: 500; }
      .chip { position: absolute; font-family: "Inter", "Montserrat", sans-serif; font-weight: 700; font-size: 26px; padding: 8px 20px; border-radius: 999px; background: rgba(255,210,63,0.14); border: 2px solid #ffd23f; color: #ffd23f; white-space: nowrap; }
    </style>
  </head>
  <body>
    <div id="root" data-composition-id="main" data-start="0" data-duration="5" data-fps="24" data-width="1920" data-height="1080">
      <div id="plate"><div id="world"><video id="pv" src="plate.mp4" muted playsinline data-start="0" data-duration="5"></video><div id="scrim"></div><div class="blob pb1" id="pb1"></div><div class="blob pb2" id="pb2"></div><div class="grid"></div></div></div>
      <div id="stage"><div id="editor">
        <div class="titlebar"><div class="dots"><span class="dot r"></span><span class="dot y"></span><span class="dot g"></span></div><span class="fname">caption_groups.py</span></div>
        <div class="surf"><div class="gutter" id="gutter"></div><div id="code"><div id="hl"></div><div id="caret"></div></div></div>
        <div class="status"><span>Python</span><span>UTF-8</span></div>
      </div></div>
    </div>
    <script>
      window.__timelines = window.__timelines || {};
      (function () {
        const v = window.__hyperframes.getVariables();
        const tl = gsap.timeline({ paused: true });

        if (!v.plate) { document.getElementById("plate").style.display = "none"; document.getElementById("root").classList.add("noplate"); }
        tl.fromTo("#pb1", { x: 0, y: 0 }, { x: 140, y: -80, duration: 5, ease: "sine.inOut" }, 0);
        tl.fromTo("#pb2", { x: 0, y: 0 }, { x: -120, y: 100, duration: 5, ease: "sine.inOut" }, 0);


        const DEFAULT = "groups, cur = [], []\nfor w in words:\n    gap = w[1] - cur[-1][2] if cur else 0\n    if cur and (len(cur) >= 4 or gap > 0.6):\n        groups.append(cur)\n        cur = []\n    cur.append(w)\nif cur:\n    groups.append(cur)";
        let SRC = (typeof v.snippet === "string" && v.snippet.trim()) ? v.snippet : DEFAULT;
        SRC = SRC.replace(/\\n/g, "\n");
        const CPS = Math.max(8, Math.min(40, Number(v.speed) || 24));
        document.getElementById("root").style.setProperty("--accent", (typeof v.accent === "string" && v.accent) ? v.accent : "#58a6ff");
        const KW = ["function","const","let","var","return","if","else","for","while","of","in","new","async","await","true","false","null","and","or","not","def","import","from","None"];
        const COL = { kw: "#ff7b72", fn: "#d2a8ff", str: "#a5d6ff", num: "#79c0ff", pun: "#e6edf3", id: "#ffa657" };
        const CH_W = 18, LH = 50;
        const lines = SRC.split("\n").slice(0, 10);
        const code = document.getElementById("code"), gutter = document.getElementById("gutter");
        const re = /(\s+)|("(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*')|(\d+(?:\.\d+)?)|([A-Za-z_$][\w$]*)|([\s\S])/g;
        const toks = [];
        lines.forEach(function (ln, li) {
          const g = document.createElement("span"); g.className = "ln"; g.textContent = String(li + 1); gutter.appendChild(g);
          const row = document.createElement("div"); row.className = "line"; code.appendChild(row);
          let pending = "", col = 0, m;
          re.lastIndex = 0;
          const parts = [];
          while ((m = re.exec(ln)) !== null) {
            if (m[1]) { pending += m[1]; continue; }
            let type = "pun", text = m[0];
            if (m[2]) type = "str"; else if (m[3]) type = "num";
            else if (m[4]) { type = KW.indexOf(text) >= 0 ? "kw" : (ln.charAt(re.lastIndex) === "(" ? "fn" : "id"); }
            parts.push({ text: pending + text, type: type }); pending = "";
          }
          parts.forEach(function (p, pi) {
            const el = document.createElement("span"); el.className = "tok"; el.textContent = p.text; el.style.color = COL[p.type];
            row.appendChild(el);
            col += p.text.length;
            toks.push({ el: el, line: li, endCol: col, len: p.text.length, firstOfLine: pi === 0 });
          });
        });
        // timing: each token appears after a wait proportional to its length; line breaks add a short pause
        const T0 = 0.8, NL = 0.2;
        const dts = toks.map(function (t) { return Math.max(0.07, t.len / CPS) + (t.firstOfLine && t.line > 0 ? NL : 0); });
        const total = dts.reduce(function (a, b) { return a + b; }, 0);
        const scale = total > 3.3 ? 3.3 / total : 1;
        const caret = document.getElementById("caret"), hl = document.getElementById("hl");
        gsap.set(caret, { x: 0, y: 0 });
        gsap.set(hl, { y: 0 });
        let t = T0, tEnd = T0;
        toks.forEach(function (k, i) {
          if (k.firstOfLine && k.line > 0) {
            tl.set(caret, { x: 0, y: k.line * LH }, t);
            tl.set(hl, { y: k.line * LH }, t);
          }
          t += dts[i] * scale;
          tl.fromTo(k.el, { opacity: 0 }, { opacity: 1, duration: 0.06, ease: "none" }, t);
          tl.set(caret, { x: k.endCol * CH_W + 5, y: k.line * LH }, t);
          tEnd = t;
        });
        // the caret blinks only while idle (before the first token and after the last)
        let on = false;
        for (let b = 0.4; b < T0 - 0.05; b += 0.4) { tl.set(caret, { opacity: on ? 1 : 0 }, b); on = !on; }
        tl.set(caret, { opacity: 1 }, T0 - 0.02);
        on = false;
        for (let b = tEnd + 0.45; b < 4.55; b += 0.45) { tl.set(caret, { opacity: on ? 1 : 0 }, b); on = !on; }
        tl.set(caret, { opacity: 1 }, 4.58);
        tl.fromTo("#editor", { opacity: 0, y: 36, scale: 0.97 }, { opacity: 1, y: 0, scale: 1, duration: 0.6, ease: "power3.out" }, 0.1);
        tl.fromTo("#editor", { opacity: 1, y: 0 }, { opacity: 0, y: -24, duration: 0.35, ease: "power2.in", immediateRender: false }, 4.62);

        tl.to({}, { duration: 5 }, 0);
        window.__timelines["main"] = tl;
      })();
    </script>
  </body>
</html>

With Remotion

We have not built this effect in Remotion. If you use it, read its licence first: Individuals (personal or commercial use), organisations or teams with a total headcount of 3 or less, non-profits, and anyone evaluating Remotion before commercial use. A company does not qualify merely because it is unprofitable. Everyone not eligible for the Free License needs a Company License. Remotion licence FAQ, checked Nov 4, 2026.

In your editor: Premiere, Resolve, After Effects, CapCut

We have not reviewed an editor template for this effect yet.

Variations

The same composition rendered again with different settings. Nothing was rebuilt.

Subtle: slow typing, sky blue caret{"speed":14,"accent":"#7dd3fc"}
Bold: fast typing, orange caret{"speed":36,"accent":"#ff5a1f"}
A shell command: FFmpeg silence detection{"snippet":"# find the pauses\nffmpeg -i clip.mp4 -vn \\\n -af silencedetect=noise=-28dB:d=0.5 \\\n -f null -","speed":30}

Spec and test details

Engine
HyperFrames 0.8.10, GSAP 3.14.2 (local copy)
Length and frame rate
5 seconds at 24 fps, rendered at 1920x1080
Video files on this page
H.264: 1920x1080 for Expand (3448.4 KB), 1280x720 in the page (1160 KB), 640x360 in galleries (302.1 KB), no audio
Picture check
The 1080p file scores VMAF 98.44 against our render master and keeps 100% of its edge detail (measured by us with FFmpeg libvmaf and OpenCV)
Footage
Old Thom among robot machinery in an overgrown hall, wide (Tears of Steel, 9:35)
Tested in editors
None yet
Flash check
Passed: at most 0 general and 0 red flashes in any second. automated approximation of WCAG 2.3.1 on a 96x54 grid, whole loop including the restart; not a certification.
Licence
Composition adapted by us from the HyperFrames registry (Apache-2.0); text fonts from Google Fonts under the SIL Open Font License.
Last tested
Nov 14, 2026
Machine
Laptop: AMD Ryzen 7 7735U (8 cores, 16 threads), 31 GB RAM, Windows 11 Home; CPU rendering
Technical details: render times and file sizes
  • Render of the 5-second master: 82.6 s (2 render workers, on the laptop above).
  • full.mp4: 3448.4 KB
  • hero.mp4: 1160 KB
  • hero.webp: 46 KB
  • tile.mp4: 302.1 KB
  • tile.webp: 14.1 KB
  • Variation "subtle": rendered in 58.8 s, 303.3 KB
  • Variation "bold": rendered in 68.5 s, 303.2 KB
  • Variation "long": rendered in 71.1 s, 289.7 KB

Credits

  • Built from the HyperFrames registry block code-typing by HeyGen (Apache-2.0), adapted by us.
  • Fonts from Google Fonts, under the SIL Open Font License.
  • Footage: Tears of Steel, (c) Blender Foundation, mango.blender.org, licensed CC-BY 3.0. We cropped the shots to 16:9 and laid our graphics over them.
  • Editor templates and other routes on this page belong to their creators, who are credited on each card.

Related effects and jobs

Page checked on Nov 4, 2026.