All lessons / Module 22

Module 22 of 23

Scroll-driven video websites

A scroll-driven video site plays footage forward and backward as the visitor scrolls, so the page feels like a short film. It's a premium build you can offer once you're comfortable with normal demos. This module explains how it works, walks you through building one with Claude Code from the client's real footage, and shows how to add a scroll section to a WordPress site.

By the end: You have a working scroll-driven video section built from real footage, tested on a phone, and you know how to add one to a WordPress site.
Lesson 22.1 · 10 min

How scroll-scrubbed video sites work

The page doesn't really play a video. It turns the footage into a stack of still images and shows the right one for how far you've scrolled. Once you get that, the rest is easy to follow.

  1. Watch one closely

    Open one of my demo sites from the Work page on your phone and scroll slowly, then fast, then backward. Notice the footage follows your thumb, and stops when you stop.

  2. Learn the frame-sequence idea

    The footage gets split into frames (for example 120 still images). As you scroll, the page draws the matching frame on a canvas. Scroll halfway, you see frame 60. That's why it can go backward smoothly.

  3. Know the other method

    Some sites move the playback position of a real video file instead of using frames. It's fewer files, but it can be choppy on phones unless the video is encoded with a keyframe on every frame. For beginners I recommend frames.

  4. Understand the scroll trigger

    The section is pinned (stays on screen) while you scroll through a tall area, and a small script maps scroll progress to a frame number. A common tool for this is GSAP's ScrollTrigger, but Claude can also write it with plain JavaScript.

  5. Know what makes it fast

    Small frames (compressed WebP images, not huge PNGs), a sensible number of frames, and loading the first frames first. Too many big frames make the page heavy, especially on phone data.

  6. Know the fallbacks

    If someone has "reduce motion" turned on in their phone settings, the page should show a still image instead. There should also be a poster image while frames load. Good scroll sites still work if the animation doesn't.

You're done whenYou can explain in two sentences how a scroll-scrubbed section works (frames drawn on a canvas based on scroll position) and why it needs small files and a still-image fallback.
Watch outThinking you need a long, high-resolution video. A short 4-8 second clip with one clear motion works better and loads much faster.
Lesson 22.2 · 16 min

Building one for a client

You'll take a short real clip from the client, turn it into frames, and have Claude Code build a pinned scroll section around it, then test it on a real phone.

  1. Get the right footage

    Use a short clip of the client's real work with one smooth motion: a car being polished, a roof being finished, espresso being pulled. Filmed footage is best. If you use AI visuals made from their real jobs, follow the honesty rules from Module 7 and don't present them as unedited real footage.

  2. Put it in the project folder

    Make a folder for the build, put the clip inside as clip.mp4 and start Claude Code in that folder.

  3. Turn the clip into frames

    Ask Claude to use ffmpeg (a free video tool; Claude can help you install it) to export the clip as compressed WebP frames into a frames/ folder. Look at the folder: you should see numbered images like frame_0001.webp.

  4. Build the section

    Paste the prompt below. Claude builds a page with a pinned canvas section that draws the right frame as you scroll, plus headline text that fades in at points along the way.

  5. Test on a real phone

    Put it live on a test link (Module 9) and scroll it on your phone, on Wi-Fi and on mobile data. If it's slow, ask Claude to cut the frame count or make the frames smaller.

  6. Check the fallbacks

    Turn on Reduce Motion in your phone's accessibility settings and reload. You should see a still image and all the text, with nothing broken.

  7. Run the polish and safety pass

    Run the same checks you use on every site: real facts only, labeled as a concept if it's a demo, no keys or private info in the files, fast on phones.

Copy-paste prompt
Build a scroll-driven video section for [Business name], a [type of business] in [town].
The clip is clip.mp4 in this folder.
1. Use ffmpeg to export it as WebP frames into frames/ (about 100-150 frames, 1280px wide, good compression). If ffmpeg isn't installed, tell me how to install it first.
2. Build index.html with a full-screen pinned section that draws the matching frame on a canvas as I scroll, preloading the first frames first.
3. Add 3 short lines of text that fade in at different scroll points: [line 1], [line 2], [line 3].
4. Show a poster image while frames load, and a still image instead of the animation when prefers-reduced-motion is on.
5. Make it smooth on phones and keep the total size small. Tell me the total size of the frames folder when you're done.
Open it so I can test it on phone and desktop.
You're done whenThe section scrubs smoothly forward and backward on your phone, loads a poster first, and shows a still image when Reduce Motion is on.
Watch outExporting hundreds of full-size frames. The page gets so heavy it stutters on phones. Keep it around 100-150 compressed frames and check the folder size.
Lesson 22.3 · 10 min

WordPress scroll sections

Lots of local businesses already have a WordPress site. Instead of rebuilding it, you can add one scroll section to a page. You'll build the section as self-contained code and add it the safe way.

  1. Get permission and the right access

    Ask the owner for their own WordPress login to be created for you (an Administrator or Editor account in your name), never their personal password. Confirm they're OK with you editing the site.

  2. Back up first

    Before you change anything, make sure there's a full backup. Many hosts have a backup button in their dashboard, or the site may already use a backup plugin. If the host offers a staging copy, make your changes there first.

  3. Build the section as one block of code

    Ask Claude to build the scroll section as one self-contained piece: HTML, CSS and JavaScript with no outside dependencies except files you'll upload. Use the prompt below.

  4. Upload the frames

    Upload the frames to the WordPress Media Library (or the folder your host gives you) and copy the file address of the first frame. Give Claude that address so it can point the code at the right place.

  5. Add it to the page

    Edit the page, add a Custom HTML block where the section should go, and paste the code. Some setups strip out scripts: on WordPress.com, custom code may need a certain plan, and some hosts or security plugins block it. Check your host's current help page if the section shows up blank.

  6. Test and roll back if needed

    Preview the page on your phone before you publish. Check that the rest of the page still looks right. If anything breaks, remove the block or restore the backup.

Copy-paste prompt
I want to add a scroll-driven video section to an existing WordPress page for [Business name].
The frames are in frames/ and I will upload them to the WordPress Media Library. After upload, the first frame's address will look like: [paste the address].
Build the section as ONE self-contained block of HTML, CSS and JavaScript I can paste into a Custom HTML block. Use plain JavaScript (no build step), scope all CSS to a unique class so it doesn't change the rest of the theme, preload the first frames first, and show a still image when prefers-reduced-motion is on. Don't include any passwords or keys. Save it as wordpress-section.html and tell me exactly where to paste it.
You're done whenThe scroll section works on the live WordPress page on your phone, the rest of the page looks unchanged, and a backup exists.
Watch outEditing a live business site without a backup. One bad paste can break the page. Always back up (or use staging) first, and keep the CSS scoped to its own class so it can't restyle the theme.