Swap in your own video: replacing the footage in an Edok Motion template
By Md Mahafuj Alam · Updated
What "swap the video" means for each template
Only two of the four templates are built on video. Check which kind you have before you generate anything, because the swap is different for each.
| Template | Hero is built from | How you replace it | Included |
|---|---|---|---|
| Kestra | 443 frames from two 4K Kling 3.0 clips | Your own clips, then the frame scripts (five steps) | ffmpeg scripts to join clips and extract all frame tiers; Nano Banana keyframe prompts; Kling 3.0 clip prompts |
| Orbitly | A 691-frame image sequence | Your own clips, then the frame scripts | ffmpeg scripts to join clips and extract every frame tier; Seedance video prompts; review checklist; brand-swap table |
| MANJARI | AI images rendered live in three.js, no video | New images through the image prompts and asset pipeline | Every image prompt and the asset pipeline |
| Zelvo | Objects built in code, no video or model files | Change colours and shapes in code | Full source |
The rest of this page covers the video swap for Kestra and Orbitly. Script names and folder paths differ between the two, so take exact names from the template's README. The commands below show what such scripts do, so you understand each step and can debug it.
Step 1: plan the shots against the existing story
The hero's copy, HUD readouts and chapter changes are tied to positions in the scroll. Your new footage must hit the same beats, or the text will describe one thing while the canvas shows another. Write down, for each chapter of the template, what is on screen at its start and end.
- Kestra: ink drawing of a waterfront, an empty plot that lights up, a tower that builds itself, a drone move over a rooftop pool into a penthouse.
- Orbitly: orbit, a fall through the haze, a swoop over a coastal city, a landing on a phone in hand.
Keep the camera move and the beats; change the subject. A different city, a different building, a different phone screen. Orbitly's brand-swap table is written for exactly this. The scroll story planning guide covers shot planning in depth.
Step 2: generate keyframes, then clips
Generate still keyframes first, then animate between them. A still is quick to regenerate until the composition is right; a clip is not. Kestra includes the exact Nano Banana keyframe prompts and Kling 3.0 clip prompts used for its footage. Orbitly includes Seedance video prompts and a review checklist. Start from those prompts and change only the subject and brand details, so the camera language stays the same.
Review each clip before you cut frames. Look for warped geometry, flicker, text that turns to nonsense and a final frame that does not match the next clip's first frame. Orbitly's review checklist exists for this step. For model-specific advice, see the Kling 3.0 guide, the Seedance guide and the Nano Banana keyframe guide.
Step 3: join the clips
Both templates include a script that joins clips. Use it. If you want to know what joining involves, ffmpeg has two common approaches. The concat demuxer joins files without re-encoding, which is fast and lossless, but every file must have the same streams, codecs and time base:
printf "file 'clip-01.mp4'\nfile 'clip-02.mp4'\n" > clips.txt
ffmpeg -f concat -safe 0 -i clips.txt -c copy joined.mp4Clips from the same model and settings usually match. If they do not, for example because one was exported at a different frame rate, the concat filter decodes and re-encodes them into one stream:
ffmpeg -i clip-01.mp4 -i clip-02.mp4 \
-filter_complex "[0:v][1:v]concat=n=2:v=1:a=0[v]" \
-map "[v]" -c:v libx264 -crf 18 -pix_fmt yuv420p joined.mp4Check the result: size and exact frame count.
ffprobe -v error -select_streams v:0 -count_frames \
-show_entries stream=width,height,nb_read_frames -of csv=p=0 joined.mp4Step 4: extract the frame tiers and the portrait set
This is the step the template script exists for, because the frame tiers must match what the template's loader expects: the folder names, file naming, frame count and sizes. Run the template's script rather than hand-made commands. Kestra's tiers, for reference, are light previews and 1920 × 1072 HD frames, plus separate 9:16 portrait frames for phones. Orbitly has light preview frames, HD frames, and 9:16 portrait and 16:9 landscape sets.
Under the hood, extracting a tier is one ffmpeg command: sample the frame rate, scale, and encode each frame as an image. These three commands make a light preview tier, an HD tier and a centre-cropped 9:16 portrait tier as WebP. The sizes and quality values are examples:
mkdir -p frames/preview frames/hd frames/portrait
# Light preview tier
ffmpeg -i joined.mp4 -vf "fps=12,scale=640:-2" -c:v libwebp -quality 60 frames/preview/frame_%04d.webp
# HD tier
ffmpeg -i joined.mp4 -vf "fps=12,scale=1920:-2" -c:v libwebp -quality 80 frames/hd/frame_%04d.webp
# Portrait 9:16 tier: crop the centre, then scale
ffmpeg -i joined.mp4 -vf "fps=12,crop=ih*9/16:ih,scale=720:1280" -c:v libwebp -quality 75 frames/portrait/frame_%04d.webpThe frame rate you sample at sets the trade-off between smoothness and weight. More frames per second of footage gives smoother scrubbing but more files to download; fewer gives a lighter page. Match the rate the template's script uses, because the template's scroll mapping and loading are tuned to its frame count.
What each part does
fps=12keeps 12 frames per second of footage. Every tier must use the same rate, so frame 100 is the same moment in every set.scale=1920:-2sets the width and computes an even height from the aspect ratio.crop=ih*9/16:ihcuts a 9:16 window from the centre at full height. A centre crop keeps only about a third of a 16:9 frame's width, so it can lose the subject. If the shot is off-centre, generate a dedicated portrait clip instead; that is why the templates ship separate portrait frames rather than relying on a crop.frame_%04d.webpwrites zero-padded, numbered files that sort correctly.
For more on each flag, formats and frame budgets, see converting video to an image sequence with ffmpeg, or use the in-browser video to frames tool.
Step 5: check the tiers and the portrait set
Before rebuilding, confirm that every tier has the same number of frames and see what each weighs.
for t in preview hd portrait; do
echo "$t: $(ls frames/$t | wc -l) frames, $(du -sh frames/$t | cut -f1)"
doneMismatched counts mean one export failed or used a different rate. Then look at the frames, not only the numbers. A contact sheet puts every tenth frame in one image, so a jump or a bad crop is easy to spot:
ffmpeg -i "frames/hd/frame_%04d.webp" -vf "select='not(mod(n\,10))',scale=320:-2,tile=6x1" -frames:v 1 contact-sheet.pngRun the same check on the portrait set. Look for the subject drifting out of frame and for the seam where two clips meet. If the frame count changed from the original, check the README for where the template reads it; the scroll mapping depends on it. The frame budget calculator helps if the total weight has grown.
Step 6: rebuild and test
Run the development server, scroll the hero end to end in both directions, then build the static export.
npm run dev
npm run build- Scroll slowly through each chapter and check the copy still describes what is on screen.
- Scroll back to the top. The story should rewind exactly.
- Open the page on a phone in portrait and confirm the portrait frames load.
- Turn on reduced motion and check the still frame or poster frame shows your footage, not the original.
- Throttle the network in your browser's developer tools and confirm previews appear first and HD frames follow.
The customisation guide covers copy, colours and hosting once the footage is in. For the full workflow, see the guide to building a 3D website with Claude, or compare all Motion templates.
MANJARI and Zelvo: no video to swap
MANJARI is built from AI images only (GPT Image 2), rendered live in three.js. To use your own product, follow its image prompts and asset pipeline to produce new images; the backdrops also rely on depth maps made with Depth Anything V2. The MANJARI build log explains how those images are used.
Zelvo builds every object in code with no 3D model files. There is nothing to regenerate: change colours and shapes in code. The Zelvo build log explains how the scenes are put together.
Questions, answered.
The questions people ask most about this topic.
01Which Edok Motion templates can use my own video?
Kestra and Orbitly. Both scrub image sequences cut from video and include ffmpeg scripts to join clips and extract every frame tier. MANJARI uses AI images and Zelvo builds its objects in code.
02Do I need to know ffmpeg?
No. The templates include scripts that run ffmpeg for you. Knowing what the commands do helps when a step fails, which is why this page shows them.
03Can I just crop my landscape video for phones?
You can, but a centre crop keeps only about a third of a 16:9 frame and often loses the subject. Kestra and Orbitly use separate 9:16 portrait frames for phones.
04Which prompts are included?
Kestra includes the Nano Banana keyframe prompts and Kling 3.0 clip prompts used for its footage. Orbitly includes Seedance video prompts, a review checklist and a brand-swap table. MANJARI includes every image prompt.
05What if my clips have a different frame count?
Check every tier has the same count, then follow the template README to update the frame count the scroll mapping reads.
Keep reading
- Start here · the full workflowHow to Build a 3D Motion Website with ClaudeBuild a 3D motion website with Claude: plan the story, generate keyframes and video, cut frames with ffmpeg, then build it in Next.js with GSAP and Lenis.Read the guide
- Guide · BuildConvert a video to an image sequence with ffmpeg, ready for the webOne ffmpeg command turns a video into WebP, AVIF or JPEG frames for scroll animation, plus how many frames to export and what frame size to use.Read the guide
- Docs · TemplatesHow to customize an Edok Motion templateCustomize a Next.js template from Edok Motion: run it locally, edit copy in the config files, change colour tokens and fonts, then build a static export.Read the guide