AI Video Editing Flows

Effect #036 in our rendered series

Before and after wipe

A divider sweeps across the frame to reveal the improved version, then sweeps back, labelled BEFORE and AFTER.

Real footage

1920x1080 file, 5.0 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

Second shot

1920x1080 file, 5.1 MB

The same ungraded versus graded wipe on a street shot. Nothing in the composition changed except the footage file.

The composition plays your clip as a muted <video> layer under the graphics (the file plate.mp4 in the code below), so you swap the footage by replacing that file and rendering 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 a 5 second before and after wipe where a divider line sweeps across a frame to reveal the improved version, then sweeps back, with the labels BEFORE and AFTER.

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 before-after-wipe, 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):

  • Lint run 1 (2026-11-06): 0 errors, 0 warnings.
  • What changed from the registry block: the block wipes with a CSS custom property. Built the same two-layer idea with a pixel clip-path on the AFTER layer and a divider tweened with the same ease and duration so they stay locked. Sweep out on 0.4 s, hold, sweep back on 3.4 s. Both layers carry the same slowly moving scene so the comparison stays aligned.
  • With plate off, the background fills of both states are hidden too; only the graded content, divider and labels remain.
  • Decided against: autoAlpha on the divider, Math.random, CDN GSAP, footage.
  • 6 Nov (lead): hyperframes check passed lint and runtime (0 errors); its layout pass flags overlapping text boxes between the stacked before and after scenes (by design: both scenes sit on top of each other and the divider clips one). Checked frame by frame instead; the divider reveals the right scene every time.
  • `hyperframes check`: "Check failed". Items quoted: "content_overlap div.h1 > span:nth-of-type(1) inside div.h1 > span:nth-of-type(1) 'YOUR' (33 samples)", the same for eyebrow, sub, button and stat text, "text_occluded div.eyebrow inside div.fill 'Sample label'", "text_occluded div.tag.tag-b ... 'BEFORE'", and 1.4 to 2.1 to 1 contrast items at t=0.278 s and 4.722 s.
  • Cause: the BEFORE and AFTER scenes are two copies of the same layout stacked on each other; a divider clips the top one, so the check sees duplicate text boxes and a cover. The low-contrast items are the deliberately dim "before" scene (a muted grey version). The AFTER scene text is the scene to read and passes. By design, as logged on 6 Nov.
  • v2 (7 Nov 2026): real footage from Tears of Steel, plates ba_canal. Same shot twice: CSS filter on the Before copy (desaturated, low contrast), graded copy on After; divider wipes 0.8 s at 0.5 s and back at 3.7 s.

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 before-after-wipe
npx hyperframes render . -o out.mp4 --fps 24

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

SettingNameTypeDefault
Accent colouraccentcolor#ff5a1f
Wipe directiondirectionenumhorizontal
Divider thickness (px)thicknessnumber6
Show backgroundplatebooleantrue
Our full composition (index.html, 6 KB)
index.html
<!doctype html>
<html lang="en" data-composition-variables='[
  {"id":"accent","type":"color","label":"Accent colour","default":"#ff5a1f"},
  {"id":"direction","type":"enum","label":"Wipe direction","default":"horizontal","options":[{"value":"horizontal","label":"Left to right"},
  {"value":"vertical","label":"Top to bottom"}]},
  {"id":"thickness","type":"number","label":"Divider thickness (px)","default":6,"min":2,"max":16,"step":1},
  {"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@400;500;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: #000; }
      .layer { position: absolute; inset: 0; overflow: hidden; }
      .vid { position: absolute; left:0; top:0; width:1920px; height:1080px; object-fit: cover; }
      .before .vid { filter: saturate(0.35) contrast(0.78) brightness(1.1); }
      .after .vid { filter: saturate(1.45) contrast(1.16) brightness(0.97) sepia(0.12); }
      .tag { position: absolute; top: 80px; font-family: "Montserrat", sans-serif; font-weight: 800; font-size: 44px; letter-spacing: 0.14em; text-transform: uppercase; padding: 14px 32px; border-radius: 12px; color: #fff; background: rgba(12,14,20,0.82); }
      .tag-a { left: 96px; border-left: 10px solid var(--accent); }
      .tag-b { right: 96px; }
      .vert .tag-b { right: auto; left: 96px; top: auto; bottom: 80px; }
      .dv { position: absolute; left: 0; top: 0; width: 0; height: 0; opacity: 0; z-index: 20; }
      .dv .line { position: absolute; background: #ffffff; box-shadow: 0 0 24px rgba(0,0,0,0.55); }
      .dv .knob { position: absolute; width: 88px; height: 88px; border-radius: 50%; background: #ffffff; box-shadow: 0 8px 26px rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; font-family: "Montserrat", sans-serif; font-weight: 800; font-size: 34px; color: #0b0d12; letter-spacing: 0.1em; }
    </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>
      <div class="layer before" id="layer-before"><video class="plate vid" src="plate.mp4" muted playsinline data-start="0" data-duration="5"></video><div class="tag tag-b">Before</div></div>
      <div class="layer after" id="layer-after"><video class="plate vid" src="plate.mp4" muted playsinline data-start="0" data-duration="5"></video><div class="tag tag-a">After</div></div>
      <div class="dv" id="dvh"><div class="line" id="lineh"></div><div class="knob" id="knobh">&lt; &gt;</div></div>
      <div class="dv" id="dvv"><div class="line" id="linev"></div><div class="knob" id="knobv">^ v</div></div>
    </div>
    <script>
      window.__timelines = window.__timelines || {};
      (function () {

        const v = window.__hyperframes.getVariables();
        const root = document.getElementById("root");
        root.style.setProperty("--accent", v.accent || "#ff5a1f");
        const vert = v.direction === "vertical";
        if (vert) root.classList.add("vert");
        const th = Math.max(2, Math.min(16, Number(v.thickness) || 6));
        if (!v.plate) {
          document.getElementById("plate").style.display = "none";
          document.querySelectorAll(".plate").forEach((e) => { e.style.display = "none"; });
        }
        const tl = gsap.timeline({ paused: true });
        const dv = vert ? "#dvv" : "#dvh";
        document.getElementById(vert ? "dvh" : "dvv").style.display = "none";
        const line = document.getElementById(vert ? "linev" : "lineh");
        const knob = document.getElementById(vert ? "knobv" : "knobh");
        if (vert) {
          line.style.left = "0px"; line.style.top = (-th / 2) + "px"; line.style.width = "1920px"; line.style.height = th + "px";
          knob.style.left = "916px"; knob.style.top = "-44px";
        } else {
          line.style.top = "0px"; line.style.left = (-th / 2) + "px"; line.style.height = "1080px"; line.style.width = th + "px";
          knob.style.left = "-44px"; knob.style.top = "496px";
        }
        const CLIP0 = vert ? "inset(0px 0px 1080px 0px)" : "inset(0px 1920px 0px 0px)";
        const CLIP1 = "inset(0px 0px 0px 0px)";
        const prop = vert ? "y" : "x";
        const far = vert ? 1080 : 1920;
        const from0 = {}; from0[prop] = 0;
        const to1 = {}; to1[prop] = far;
        gsap.set("#layer-after", { clipPath: CLIP0 });
        gsap.set(dv, { x: 0, y: 0, opacity: 0 });
        // forward sweep on the 0.4 beat, back sweep on the 3.4 beat
        const F = 0.8, B = 0.8;
        tl.fromTo("#layer-after", { clipPath: CLIP0 }, { clipPath: CLIP1, duration: F, ease: "power2.inOut" }, 0.5);
        tl.fromTo(dv, Object.assign({ x: 0, y: 0 }, from0), Object.assign({ duration: F, ease: "power2.inOut" }, to1), 0.5);
        tl.fromTo(dv, { opacity: 0 }, { opacity: 1, duration: 0.18, ease: "power1.out" }, 0.5);
        tl.to(dv, { opacity: 0, duration: 0.18, ease: "power1.in" }, 0.5 + F - 0.18);
        tl.fromTo("#layer-after", { clipPath: CLIP1 }, { clipPath: CLIP0, duration: B, ease: "power2.inOut", immediateRender: false }, 3.7);
        tl.fromTo(dv, Object.assign({ x: 0, y: 0 }, to1), Object.assign({ duration: B, ease: "power2.inOut", immediateRender: false }, from0), 3.7);
        tl.fromTo(dv, { opacity: 0 }, { opacity: 1, duration: 0.18, ease: "power1.out", immediateRender: false }, 3.7);
        tl.to(dv, { opacity: 0, duration: 0.18, ease: "power1.in" }, 3.7 + B - 0.18);
        tl.fromTo("#layer-after .tag", { scale: 0.85 }, { scale: 1, duration: 0.5, ease: "back.out(2)" }, 0.9);
        tl.fromTo("#layer-before .tag", { scale: 1 }, { scale: 1.06, duration: 0.3, ease: "power2.out" }, 3.7 + B - 0.3);
        tl.to("#layer-before .tag", { scale: 1, duration: 0.3, ease: "power2.inOut" }, 3.7 + B);

        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: thin divider, blue accent{"accent":"#2f6bff","thickness":3}
Bold: thick divider, hot pink{"accent":"#ff2d6f","thickness":14}
Top to bottom wipe{"direction":"vertical"}

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 (5116.9 KB), 1280x720 in the page (2242.2 KB), 640x360 in galleries (423.5 KB), no audio
Picture check
The 1080p file scores VMAF 98.82 against our render master and keeps 96% of its edge detail (measured by us with FFmpeg libvmaf and OpenCV)
Footage
young Thom by the canal looking up, a robot to the right, daylight (Tears of Steel, 8:29)
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 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: 78.1 s (2 render workers, on the laptop above).
  • full.mp4: 5116.9 KB
  • hero.mp4: 2242.2 KB
  • hero.webp: 107.2 KB
  • tile.mp4: 423.5 KB
  • tile.webp: 38.8 KB
  • real-edit.mp4: 2374.4 KB
  • real-edit-full.mp4: 5199.1 KB
  • real-edit.webp: 87.8 KB
  • Variation "subtle": rendered in 52.9 s, 423.4 KB
  • Variation "bold": rendered in 97.1 s, 427.2 KB
  • Variation "vertical": rendered in 71.7 s, 428.5 KB

Credits

  • Built from the HyperFrames registry component before-after-wipe 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.