Docs · Templates

Swap in your own video: replacing the footage in an Edok Motion template

By Md Mahafuj Alam · Updated

Kestra and Orbitly scrub image sequences cut from video, and both ship ffmpeg scripts that join your clips and extract every frame tier. The flow is: plan the shots, generate keyframes, generate the clips, run the template's frame script, check the tiers and portrait set, then rebuild. MANJARI swaps images through its prompts and asset pipeline, and Zelvo changes in code.

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.

TemplateHero is built fromHow you replace itIncluded
Kestra443 frames from two 4K Kling 3.0 clipsYour 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
OrbitlyA 691-frame image sequenceYour own clips, then the frame scriptsffmpeg scripts to join clips and extract every frame tier; Seedance video prompts; review checklist; brand-swap table
MANJARIAI images rendered live in three.js, no videoNew images through the image prompts and asset pipelineEvery image prompt and the asset pipeline
ZelvoObjects built in code, no video or model filesChange colours and shapes in codeFull 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:

Terminalbash
printf "file 'clip-01.mp4'\nfile 'clip-02.mp4'\n" > clips.txt
ffmpeg -f concat -safe 0 -i clips.txt -c copy joined.mp4

Clips 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:

Terminalbash
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.mp4

Check the result: size and exact frame count.

Terminalbash
ffprobe -v error -select_streams v:0 -count_frames \
  -show_entries stream=width,height,nb_read_frames -of csv=p=0 joined.mp4

Step 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:

Terminalbash
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.webp

The 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=12 keeps 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:-2 sets the width and computes an even height from the aspect ratio.
  • crop=ih*9/16:ih cuts 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.webp writes 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.

Terminalbash
for t in preview hd portrait; do
  echo "$t: $(ls frames/$t | wc -l) frames, $(du -sh frames/$t | cut -f1)"
done

Mismatched 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:

Terminalbash
ffmpeg -i "frames/hd/frame_%04d.webp" -vf "select='not(mod(n\,10))',scale=320:-2,tile=6x1" -frames:v 1 contact-sheet.png

Run 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.

Terminalbash
npm run dev
npm run build
  1. Scroll slowly through each chapter and check the copy still describes what is on screen.
  2. Scroll back to the top. The story should rewind exactly.
  3. Open the page on a phone in portrait and confirm the portrait frames load.
  4. Turn on reduced motion and check the still frame or poster frame shows your footage, not the original.
  5. 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.

FAQ

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.