AI Video Editing Flows

Effect #041 in our rendered series

Pill karaoke captions

Words sit in a pill-shaped card while an accent capsule highlights each word in turn, three short phrases in sequence.

Real footage, with sound

1920x1080 file, 4.8 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 with the film's sound.

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), and the film's sound is added to the finished file. 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 7, 2026.

Make 5 seconds of karaoke captions for YouTube Shorts: words in a pill-shaped card, the active word highlighted in an accent colour, three short phrases in sequence, with a transparent background option.

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 caption-pill-karaoke, 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 (5 notes from the build log):

  • Lint run 1 (2026-11-06): 0 errors, 0 warnings.
  • What changed from the registry block caption-pill-karaoke: the block groups a long transcript with canvas text measuring and fades word colour. Here three template phrases are pre-built as pills on the 0.4, 1.9 and 3.4 s beats. The active word gets an accent capsule behind it (separate element, so the colour never interpolates through transparent), with dark or white text picked from the accent luminance. Spoken words turn white, upcoming words stay grey. Poppins swapped for Montserrat 800. The long-phrase variation wraps to two lines inside a pill capped at 1560 px.
  • Decided against: canvas text measurement (fonts may not be loaded at build time), CDN GSAP, Math.random.
  • `hyperframes check` result: "Check passed" (0 errors). Contrast section lists two warnings: "#t0_2 2.92:1 (need 3:1, t=1.389s)" and "#t2_4 1.35:1 (need 3:1, t=4.722s)". #t0_2 is the word "words" 0.05 s into its 0.1 s colour change from dark (on the yellow capsule) back to white, with the capsule fading at the same time, about 2 frames. #t2_4 is the last word of the last phrase while the whole pill fades out (3.4 s + 1.3 s, 0.2 s fade), so it is mid-fade by design. At rest every word is dark on the accent or white on the pill, and the check passes all other samples.
  • v2 (7 Nov 2026): rebuilt on Tears of Steel footage (plate dlg_rockstar, 5.0 s: 190.6 to 195.6 s) with the film's sound; the highlight pill hops from word to word as 'Are you ready? Of course you're ready. You're a rock star.' is spoken (each word lights on its measured start, held until the next word starts). The pill sits 80 px above the bottom edge, text 76 px. Word times: medium.en + envelope onsets; 'Are' starts 0.44 s, 'star' 3.68 s after a short breath.

With HyperFrames code

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

Install the block and render
npx hyperframes add caption-pill-karaoke
npx hyperframes render . -o out.mp4 --fps 24

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

SettingNameTypeDefault
Active word colouraccentcolor#ffd400
Phrase lengthphrasesenumshort
Show backgroundplatebooleantrue
Our full composition (index.html, 7 KB)
index.html
<!doctype html>
<html lang="en" data-composition-variables='[
  {"id":"accent","type":"color","label":"Active word colour","default":"#ffd400"},
  {"id":"phrases","type":"enum","label":"Phrase length","default":"short","options":[{"value":"short","label":"Short phrases"},{"value":"long","label":"Long phrases (two lines)"}]},
  {"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=Montserrat:wght@800&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); }
      .b1 { width: 760px; height: 760px; left: 180px; top: 260px; background: var(--accent); opacity: 0.35; }
      .b2 { 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; }

      #caps { position: absolute; left: 0; right: 0; bottom: 80px; height: 300px; display: flex; align-items: flex-end; justify-content: center; }
      .pill { position: absolute; bottom: 0; max-width: 1560px; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 4px; padding: 22px 40px; border-radius: 70px; background: rgba(17,24,39,0.93); box-shadow: 0 10px 30px rgba(0,0,0,0.4); opacity: 0; font-family: "Montserrat", sans-serif; font-weight: 800; font-size: 76px; line-height: 1.2; white-space: nowrap; }
      .wd { position: relative; display: inline-block; padding: 2px 16px; }
      .hl { position: absolute; inset: 0; border-radius: 999px; background: var(--accent); opacity: 0; }
      .tx { position: relative; color: #8b93a7; }
    
      /* 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: linear-gradient(180deg, rgba(0,0,0,0) 45%, rgba(0,0,0,0.55) 100%); }
    </style>
  </head>
  <body>
    <div id="root" data-composition-id="main" data-start="0" data-duration="5.0" 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.0"></video><div id="scrim"></div><div class="blob b1" id="b1"></div><div class="blob b2" id="b2"></div><div class="grid"></div></div></div>
      <div id="caps"></div>
    </div>
    <script>
      window.__timelines = window.__timelines || {};
      (function () {
        const v = window.__hyperframes.getVariables();
        const root = document.getElementById("root");
        const accent = v.accent || "#ffd400";
        root.style.setProperty("--accent", accent);
        if (v.plate === false) document.getElementById("plate").style.display = "none";
        // dark text on light accents, white text on dark accents
        const hx = accent.replace("#", "");
        const full = hx.length === 3 ? hx.split("").map(function (c) { return c + c; }).join("") : hx;
        const lum = (0.299 * parseInt(full.substr(0, 2), 16) + 0.587 * parseInt(full.substr(2, 2), 16) + 0.114 * parseInt(full.substr(4, 2), 16)) / 255;
        const ON = lum > 0.55 ? "#101828" : "#ffffff";
        const PAST = "#ffffff";
        const PH = {"short": [[["Are", 0.44, 0.92], ["you", 0.92, 1.08], ["ready?", 1.08, 1.42]], [["Of", 2.16, 2.4], ["course", 2.48, 2.62], ["you're", 2.62, 2.74], ["ready.", 2.74, 2.92]], [["You're", 3.08, 3.22], ["a", 3.22, 3.34], ["rock", 3.34, 3.52], ["star.", 3.68, 3.98]]], "long": [[["Are", 0.44, 0.92], ["you", 0.92, 1.08], ["ready?", 1.08, 1.42], ["Of", 2.16, 2.4], ["course", 2.48, 2.62], ["you're", 2.62, 2.74], ["ready.", 2.74, 2.92]], [["You're", 3.08, 3.22], ["a", 3.22, 3.34], ["rock", 3.34, 3.52], ["star.", 3.68, 3.98]]]};
        const phrases = PH[v.phrases === "long" ? "long" : "short"];
        const caps = document.getElementById("caps");
        const tl = gsap.timeline({ paused: true });
        phrases.forEach(function (p, pi) {
          const pill = document.createElement("div");
          pill.className = "pill";
          pill.id = "p" + pi;
          p.forEach(function (wv, wi) {
            const wd = document.createElement("span");
            wd.className = "wd";
            const hl = document.createElement("span");
            hl.className = "hl"; hl.id = "h" + pi + "_" + wi;
            const tx = document.createElement("span");
            tx.className = "tx"; tx.id = "t" + pi + "_" + wi; tx.textContent = wv[0];
            wd.appendChild(hl); wd.appendChild(tx);
            pill.appendChild(wd);
          });
          caps.appendChild(pill);
          const s = p[0][1], last = p[p.length - 1][2];
          tl.fromTo(pill, { opacity: 0, y: 28, scale: 0.88 }, { opacity: 1, y: 0, scale: 1, duration: 0.24, ease: "back.out(1.8)" }, s - 0.22);
          p.forEach(function (wv, wi) {
            const t = wv[1];
            const nx = wi < p.length - 1 ? p[wi + 1][1] : wv[2];
            const off = (wi < p.length - 1 && nx - wv[2] < 0.3) ? nx : wv[2] + 0.05;
            const h = "#h" + pi + "_" + wi, x = "#t" + pi + "_" + wi;
            tl.fromTo(h, { opacity: 0, scale: 0.8 }, { opacity: 1, scale: 1, duration: 0.09, ease: "back.out(2)" }, t);
            tl.to(x, { color: ON, duration: 0.07, ease: "none" }, t);
            tl.to(h, { opacity: 0, duration: 0.1, ease: "none" }, off);
            tl.to(x, { color: PAST, duration: 0.1, ease: "none" }, off);
          });
          tl.to(pill, { opacity: 0, y: -18, duration: 0.2, ease: "power2.in" }, Math.min(last + 0.4, 5.0 - 0.22));
        });
        
        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: mint highlight{"accent":"#3dd9a0"}
Bold: hot pink highlight{"accent":"#ff2d6f"}
Long phrases wrapping to two lines{"phrases":"long"}

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 (4935.4 KB), 1280x720 in the page (1703.4 KB), 640x360 in galleries (382.6 KB); the 1080p and 720p files carry the film's sound
Picture check
The 1080p file scores VMAF 99.23 against our render master and keeps 96% of its edge detail (measured by us with FFmpeg libvmaf and OpenCV)
Footage
Old Thom walks away, then the trio; dialogue 'Are you ready? Of course you're ready. You're a rock star.' (subtract 190.6) (Tears of Steel, 3:10)
Tested in editors
None yet
Flash check
Passed: at most 1 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 7, 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: 50.5 s (2 render workers, on the laptop above).
  • full.mp4: 4935.4 KB
  • hero.mp4: 1703.4 KB
  • hero.webp: 50.3 KB
  • tile.mp4: 382.6 KB
  • tile.webp: 17.1 KB
  • Variation "subtle": rendered in 61.8 s, 379.5 KB
  • Variation "bold": rendered in 50 s, 378 KB
  • Variation "long": rendered in 50.9 s, 371.8 KB

Credits

  • Built from the HyperFrames registry component caption-pill-karaoke 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.