How to build a scroll-scrubbed video website

Updated November 12, 2026

Encode the video so every frame is a keyframe, pin it with position: sticky inside a tall section, and set video.currentTime from the section's scroll progress on each animation frame, easing toward the target so it glides. The video never plays; scroll is the playhead.

The two things that break most attempts are encoding and iPhones. A normally encoded video can only seek cleanly to a keyframe every few seconds, so it judders. And iOS will not paint a seek on a video that has never been played, so the page shows a frozen first frame until you unlock it.

1. Encode all-intra

Re-encode the clip with a keyframe on every frame: `ffmpeg -i in.mp4 -an -vf scale=1600:-2 -c:v libx264 -preset slow -crf 29 -g 1 -pix_fmt yuv420p -movflags +faststart out.mp4`. The `-g 1` is the whole trick. `-an` drops the audio track, `+faststart` lets playback begin before the file has finished downloading, and `yuv420p` keeps it playable everywhere.

All-intra files are larger than normal video, so budget for it. A width of 1600 pixels at CRF 29 is a good balance; export a first-frame JPEG as the poster so there is something to see before the video arrives.

2. Drive the playhead from scroll

Put the video in a sticky container inside a section several viewports tall. Use GSAP ScrollTrigger on the section to get a progress value from 0 to 1, multiply by the video's duration to get a target time, and on the GSAP ticker move currentTime a fraction of the way toward the target each frame.

Guard the ticker with a check that the duration is known and the video has data (`readyState >= 2`). Seeking a video that has not loaded yet can restart its download on every frame.

3. Make it work on iPhone

iOS Safari does not paint seeks on a video that has never played. Call play() and immediately pause() when the component mounts; the video is then considered started and every later seek paints. If the browser refuses autoplay, do the same on the visitor's first touch.

If you ever call video.load() again, for example to switch from a metadata-only preload to the full file, the video is reset and you must unlock it again.

The video needs the `muted` and `playsinline` attributes or iOS will try to open it full screen.

4. Layout rules that silently break it

Never put `overflow-x: hidden` on the body. It turns the body into a scroll container, and position: sticky stops working with no error anywhere. Use `overflow-x: clip` on both html and body instead.

Fade the text out as the sticky panel releases, not partway through the section. If an exit animation is tied to the section's own progress it fires while the panel is still pinned and the copy vanishes while people are reading it.

5. Several videos on one page

Run each section's ticker only while that section is near the viewport, using an IntersectionObserver to switch it on and off. Otherwise every video is being seeked every frame.

Load the first video fully and give the later ones `preload="metadata"`, then upgrade each to a full load about one viewport before the visitor reaches it.

Frequently asked

Why does my scroll video stutter?

Almost always because it is not encoded all-intra. Standard video has a keyframe every few seconds and the browser can only seek cleanly to those. Re-encode with ffmpeg's `-g 1` so every frame is a keyframe.

Why does the scroll video stay frozen on iPhone?

iOS does not paint seeks on a video that has never played. Call play() then pause() once on mount, with a first-touch fallback, and repeat that after any video.load().

Should I use a video or an image sequence?

A video is simpler and usually looks better for the file size. An image sequence drawn to a canvas is worth it when you need to load each chapter separately or apply heavy colour grading per frame.

How big will the video file be?

Expect several megabytes per clip. As a guide, the scroll-scrubbed templates in this studio budget roughly 29 MB for all the film on a page, at 1600 pixels wide and CRF 29.

Templates built this way

More guides