Broll Ken Burns 1
B-roll under any beat. A scene photo, up to three stills or a supplied clip drifts in a slow Ken Burns push, pull or pan in its natural colour (or toned to the brand), with an optional short phrase on a text-side scrim.
Use it in a prompt
Use the video/broll-ken-burns video frame from the FunnelDNA library in my brand (landscape and vertical). Follow the video skill. Ask me for the script facts, voice and images you need; do not invent proof.
Paste into Claude or ChatGPT with FunnelDNA connected (MCP setup), or alongside the skill.
Use it in code
- Save
component.tsx(Code tab) ascomponents/funneldna/video/broll-ken-burns.tsx. - Import it and pass your copy and images (Props tab):
import { BrollKenBurns } from "@/components/funneldna/video/broll-ken-burns"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/video/broll-ken-burns/component.tsx 230 lines
// When to use: B-roll under any beat. A scene photo, up to three stills or a supplied clip drifts in a slow Ken Burns push, pull or pan in its natural colour (or toned to the brand), with an optional short phrase on a text-side scrim.
import * as React from "react"
import { Img, OffthreadVideo, Sequence, useCurrentFrame, useVideoConfig } from "remotion"
import noise from "../fx/textures/noise"
import { Backdrop, Scrim, type BackdropTreatment, type ScrimSide } from "../fx/fx"
import {
HOLD, IN_OUT, StageField, T, VideoStage, XFADE, display, progress, springAt, useFitText, useHeld, useStage, useWords,
type SpringConfig, type VideoFormat, type VideoMeta, type Word,
} from "../fx/video-kit"
export const video = { fps: 30, durationInFrames: 180, formats: ["landscape", "vertical"], poster: 170 } satisfies VideoMeta
/** push 1.02 → 1.10 toward the focus, pull 1.06 → 1.00, or a pan that settles on the focus. */
export type BrollMove = "push" | "pull" | "pan-left" | "pan-right"
/** The fx Backdrop treatments that sit footage in the brand's palette. */
export type BrollTreatment = Extract<BackdropTreatment, "natural" | "duotone" | "tint" | "scrim-dark" | "fade-to-band">
export type BrollCorner = "bottom-left" | "bottom-right" | "top-left" | "top-right"
export type BrollKenBurnsProps = {
format?: VideoFormat
durationInFrames?: number
/** The scene still (pass slot("scene", …)). */
scene?: string
/** Up to three stills played in turn with a soft 10-frame crossfade; replaces `scene`. */
images?: string[]
/** A supplied or image-to-video clip (URL), played muted instead of the stills and trimmed to the scene. */
video?: string
/** Seconds into `video` where the scene's footage starts. */
videoStart?: number
/** The camera move. */
move?: BrollMove
/** How the picture takes the theme: natural keeps its own colours (scrimmed on the text side only); the others map it to the tokens. */
treatment?: BrollTreatment
/** Landscape focal point (CSS object-position, e.g. "62% 54%"). The move eases toward it and never past it. */
focus?: string
/** Focal point for the 9:16 re-crop; falls back to `focus`. */
focusVertical?: string
/** Optional line of five words or fewer. Words after the fifth are dropped. */
phrase?: string
/** Voice timings for `phrase`; without them the words rise five frames apart. */
words?: Word[]
/** Landscape: the corner the phrase sits in. 9:16: the phrase is centred vertically in the safe area, aligned to the corner's side. */
corner?: BrollCorner
/** Deepens the text-side scrim for one beat after the phrase lands, then eases it back; the picture's colour is never washed. */
dim?: boolean
}
/** A soft spring for the rise: near-critical, settles in about a third of a second. */
const RISE: SpringConfig = { damping: 18, stiffness: 140, mass: 0.7 }
/** B-roll: the picture moves slowly toward its focus in its own colour; a short phrase rises on its words over a text-side scrim. */
export function BrollKenBurns({
format = "landscape",
durationInFrames = video.durationInFrames,
scene,
images,
video: footage,
videoStart = 0,
move = "push",
treatment = "natural",
focus,
focusVertical,
phrase = "",
words,
corner = "bottom-left",
dim = true,
}: BrollKenBurnsProps) {
const frame = useCurrentFrame()
const f = useHeld(durationInFrames)
const { fps } = useVideoConfig()
const { u, width, height, text, portrait } = useStage()
const run = Math.max(1, durationInFrames - HOLD)
const point = parseFocus(portrait ? focusVertical ?? focus : focus)
// The picture: a clip, up to three stills in turn, one scene still, or the lit stage field when nothing is supplied.
const shots = footage ? [] : (images ?? []).filter(Boolean).slice(0, 3)
if (!footage && !shots.length && scene) shots.push(scene)
const count = shots.length
const seg = count > 1 ? (run + (count - 1) * XFADE) / count : run
// The phrase: at most five words, each rising on its spoken frame (five frames apart without a voice).
const line = phrase.split(/\s+/).filter(Boolean).slice(0, 5).join(" ")
const n = line ? line.split(" ").length : 0
const timed = useWords(line, line ? words : undefined, durationInFrames, { from: 3, span: Math.min(0.5, (4 + 5 * Math.max(0, n - 1)) / durationInFrames) })
const last = timed.length ? timed[timed.length - 1].at : 0
// Dim beat: on the last spoken word the text-side scrim deepens for one beat, then returns before the final hold.
const beat = Math.max(0, Math.min(last + 2, run - 40))
const dimK = line && dim ? progress(f, beat, beat + 8) * (1 - progress(f, beat + 22, beat + 36)) : 0
const right = corner.endsWith("right"), top = corner.startsWith("top")
// Where the words sit, and so the only place the picture is darkened.
const textSide: ScrimSide = portrait ? "center" : right ? "right" : "left"
const fadeSide: ScrimSide = portrait ? "bottom" : textSide
const boxW = portrait ? width - text.left - text.right : 840 * u
const boxH = portrait ? Math.min(620 * u, height - text.top - text.bottom) : 440 * u
const head = React.useRef<HTMLHeadingElement>(null)
const size = useFitText(head, line, {
boxW, boxH, guess: (portrait ? 140 : 112) * u, max: (portrait ? 144 : 130) * u, min: (portrait ? 96 : 90) * u, lines: portrait ? [2, 3] : [1, 2, 3],
})
const place: React.CSSProperties = portrait
? { left: text.left, right: text.right, top: text.top, bottom: text.bottom, display: "flex", flexDirection: "column", justifyContent: "center" }
: { width: boxW, ...(right ? { right: text.right } : { left: text.left }), ...(top ? { top: text.top + 24 * u } : { bottom: text.bottom + 32 * u }) }
const backdropSide: ScrimSide | "none" = treatment === "fade-to-band" ? fadeSide : "none"
const parts: React.ReactNode[] = []
timed.forEach((x, i) => {
const s = springAt(f, x.at, fps, RISE)
parts.push(
<span key={x.i} style={{ display: "inline-block", opacity: Math.min(1, s * 1.8), transform: `translateY(${((1 - s) * 32 * u).toFixed(2)}px)` }}>{x.w}</span>,
)
if (i < timed.length - 1) parts.push(" ")
})
return (
<VideoStage format={format} tone="band">
{footage
? <Footage src={footage} start={videoStart} frame={frame} held={f} dur={durationInFrames} run={run} move={move} focus={point} treatment={treatment} edge={fadeSide} />
: count
? shots.map((src, i) => {
const start = Math.round(i * (seg - XFADE))
const next = i + 1 < count ? Math.round((i + 1) * (seg - XFADE)) : Infinity
const lf = f - start
if (lf < 0 || f >= next + XFADE) return null
const o = i === 0 ? 1 : progress(lf, 0, XFADE, IN_OUT)
return (
<div key={i} style={{ ...FILL, opacity: o }}>
<Still src={src} frame={lf} dur={Math.round(seg)} move={move} focus={point} treatment={treatment} side={backdropSide} />
</div>
)
})
: <StageField tone="band" texture={noise} opacity={0.14} frame={f} />}
{line && (
<>
{/* One scrim, on the text side only: the subject keeps its own colour. */}
<div aria-hidden style={{ ...FILL, isolation: "isolate" }}><Scrim side={textSide} tone="band" strength={portrait ? 0.76 : 0.9} /></div>
{dimK > 0 && <div aria-hidden style={{ ...FILL, isolation: "isolate", opacity: dimK }}><Scrim side={textSide} tone="band" strength={0.42} /></div>}
<div style={{ position: "absolute", ...place }}>
<h2 ref={head} style={{
...display(size, { lineHeight: 1.04 }), margin: 0, color: T.bandInk, maxWidth: boxW, textAlign: right ? "right" : "left",
marginLeft: right ? "auto" : 0,
}}>
{parts}
</h2>
</div>
</>
)}
</VideoStage>
)
}
export default BrollKenBurns
const FILL: React.CSSProperties = { position: "absolute", inset: 0 }
const COVER: React.CSSProperties = { position: "absolute", inset: 0, width: "100%", height: "100%", objectFit: "cover" }
const KEY: Record<string, number> = { left: 0, top: 0, center: 50, right: 100, bottom: 100 }
/** A CSS object-position (percentages or keywords) as [x, y] percentages, clamped to the picture. */
function parseFocus(s?: string): [number, number] {
const p = (s ?? "").trim().toLowerCase().split(/\s+/).filter(Boolean)
const val = (v: string | undefined, d: number) =>
v === undefined ? d : v in KEY ? KEY[v] : /^-?\d+(\.\d+)?%$/.test(v) ? Math.min(100, Math.max(0, parseFloat(v))) : d
if (p[0] === "top" || p[0] === "bottom") return [val(p[1], 50), KEY[p[0]]]
return [val(p[0], 50), val(p[1], 50)]
}
/**
* The camera at local frame `lf` of `dur`: scale, sideways shift (% of the picture), object-position and origin. Progress
* is clamped and eased without overshoot, so the framing arrives at the focus and never passes it. Every move keeps the
* picture covering the frame (scale ≥ 1 about an origin inside it; pans shift 5% inside a 6% overflow).
*/
function framing(move: BrollMove, lf: number, dur: number, [fx, fy]: [number, number]) {
const k = progress(lf, 0, dur, IN_OUT)
const at = `${fx}% ${fy}%`
const toward = `${(50 + (fx - 50) * k).toFixed(2)}% ${(50 + (fy - 50) * k).toFixed(2)}%`
if (move === "pan-left" || move === "pan-right")
return { scale: 1.12 + 0.02 * k, x: (move === "pan-left" ? 5 : -5) * (1 - k), position: at, origin: "50% 50%" }
if (move === "pull") return { scale: 1.06 - 0.06 * k, x: 0, position: toward, origin: at }
return { scale: 1.02 + 0.08 * k, x: 0, position: toward, origin: toward }
}
type Shot = { move: BrollMove; focus: [number, number]; treatment: BrollTreatment }
/** One still under its treatment: natural keeps its colours untouched (the phrase brings its own text-side scrim); the rest go through the fx Backdrop. */
function Still({ src, frame, dur, move, focus, treatment, side }: Shot & { src: string; frame: number; dur: number; side: ScrimSide | "none" }) {
const m = framing(move, frame, dur, focus)
const camera: React.CSSProperties = { ...FILL, isolation: "isolate", transform: `translateX(${m.x.toFixed(3)}%) scale(${m.scale.toFixed(4)})`, transformOrigin: m.origin }
if (treatment === "natural") {
return (
<div aria-hidden style={{ ...FILL, isolation: "isolate", overflow: "hidden", background: T.band }}>
<div style={camera}><Img src={src} alt="" style={{ ...COVER, objectPosition: m.position }} /></div>
</div>
)
}
return (
<div aria-hidden style={{ ...FILL, isolation: "isolate", overflow: "hidden", background: T.band }}>
<Img src={src} alt="" style={{ position: "absolute", width: 1, height: 1, opacity: 0 }} />
<div style={camera}>
<Backdrop src={src} slot={null} treatment={treatment} side={side} tone="band" position={m.position} />
</div>
</div>
)
}
/**
* A supplied clip, muted and trimmed to the scene, under the same camera and treatment. During the final hold the
* Sequence offset pins the footage to the held frame, so the last frames are identical.
*/
function Footage({ src, start, frame, held, dur, run, move, focus, treatment, edge }: Shot & {
src: string; start: number; frame: number; held: number; dur: number; run: number; edge: ScrimSide
}) {
const { fps } = useVideoConfig()
const m = framing(move, held, run, focus)
const from = Math.max(0, Math.round(start * fps))
const mapped = treatment === "duotone" || treatment === "tint"
return (
<div aria-hidden style={{ ...FILL, isolation: "isolate", overflow: "hidden", background: T.band }}>
<Sequence from={frame - held} layout="none">
<div style={{ ...FILL, transform: `translateX(${m.x.toFixed(3)}%) scale(${m.scale.toFixed(4)})`, transformOrigin: m.origin }}>
<OffthreadVideo src={src} muted startFrom={from} endAt={from + dur} style={{
...COVER, objectPosition: m.position, filter: mapped ? "grayscale(1)" : undefined, mixBlendMode: mapped ? "luminosity" : undefined, opacity: mapped ? 0.62 : 1,
}} />
</div>
</Sequence>
{treatment === "duotone" && <div style={{ ...FILL, background: `color-mix(in oklch, ${T.band} 30%, transparent)` }} />}
{treatment === "tint" && <div style={{ ...FILL, background: `color-mix(in oklch, ${T.accentFill} 16%, transparent)` }} />}
{treatment === "scrim-dark" && <div style={{ ...FILL, isolation: "isolate" }}><Scrim side="full" tone="band" strength={0.5} /></div>}
{treatment === "fade-to-band" && <div style={{ ...FILL, isolation: "isolate" }}><Scrim side={edge} tone="band" strength={0.9} /></div>}
</div>
)
}
pieces/video/broll-ken-burns/specimen.tsx 33 lines
import __studioImageacbae602 from "../assets/96f8601dcf127e6b.webp";
import __studioImagef71c8692 from "../assets/b1286770d5462d1b.webp";
import __studioImage249ca756 from "../assets/3ec7cda94739f87a.webp";
import * as React from "react"
import { slot } from "../../slots"
import { VideoPreview, type VideoFormat } from "../../fx/video-kit"
import { BrollKenBurns, video, type BrollKenBurnsProps } from "../broll-ken-burns"
export const states = ["landscape", "vertical"]
/** Start (phrase rising on the first still), the dim beat, mid (second still), final hold. */
export const keyframes = [14, 46, 100, 179]
// Fictional sample: Kettle Row, a small-batch coffee roaster. Three tabletop stills, subject right of centre, no text or people.
const pour = __studioImageacbae602
const mug = __studioImagef71c8692
const beans = __studioImage249ca756
// Serialisable sample props; the stills are resolved in the render below (the first through the scene slot).
export const sample: BrollKenBurnsProps = {
move: "push",
treatment: "natural",
phrase: "Roasted small. Poured slow.",
corner: "bottom-left",
focus: "64% 52%",
focusVertical: "62% 50%",
}
/** The sample business in its own colours and type (sample-brands.json); Original and every preset stay one click away. */
export const sampleBrand = {"name":"Kettle Row","theme":"dark","background":"#1e2328","colors":["#e2733b","#8fb8de"],"fonts":["Fraunces","Nunito Sans"]}
export default function BrollKenBurnsSpecimen({ state = "landscape" }: { state?: string }) {
return <VideoPreview component={BrollKenBurns} props={{ ...sample, images: [slot("scene", pour), mug, beans] }} format={state as VideoFormat} meta={video} />
}
| Name | Type | Details |
|---|---|---|
format OptionalBrollKenBurns |
VideoFormat |
Default "landscape"
|
durationInFrames OptionalBrollKenBurns |
number |
Default video.durationInFrames
|
scene OptionalBrollKenBurns |
string |
|
images OptionalBrollKenBurns |
string[] |
|
video OptionalBrollKenBurns |
string |
|
videoStart OptionalBrollKenBurns |
number |
Default 0
|
move OptionalBrollKenBurns |
BrollMove |
Default "push"
|
treatment OptionalBrollKenBurns |
BrollTreatment |
Default "natural"
|
focus OptionalBrollKenBurns |
string |
|
focusVertical OptionalBrollKenBurns |
string |
|
phrase OptionalBrollKenBurns |
string |
Default ""
|
words OptionalBrollKenBurns |
Word[] |
|
corner OptionalBrollKenBurns |
BrollCorner |
Default "bottom-left"
|
dim OptionalBrollKenBurns |
boolean |
Default true
|
Theme roles it reads
Set by the theme bar, a preset or your brand. Colours come from the base tokens (--surface, --ink, --cta…) every piece uses.
None listed in this pack.
Image slots
Filled from the brand’s images; the specimen ships its own defaults.
scene- A wide atmosphere photo behind or beside the copy.
-
3ec7cda94739f87a.webp
image/webp · 72.1 KB
-
96f8601dcf127e6b.webp
image/webp · 51.3 KB
-
b1286770d5462d1b.webp
image/webp · 48.4 KB
-
bec2a41897a3364d.webp
image/webp · 51.2 KB