vidmake v0.2.1
Download

Docs/GuidesPage 42 / 45

Coming from Remotion

How Remotion concepts map to vidmake, with side-by-side React and JSON for interpolate, spring, Sequence, Series and TransitionSeries, input props, components, audio visualization and captions, and what is different or missing.

View .md Ask Claude Ask ChatGPT

Remotion makes videos from React components rendered in a headless browser. vidmake takes the same core idea (every frame is a pure function of the frame number) and expresses it as data: a JSON file instead of a React app, a native Rust renderer instead of Chrome, and inspection commands instead of the Studio. If you know Remotion, most concepts carry over one to one.

Remotionvidmake
sourceReact/TypeScript componentsone JSON file (schema)
frame logicany JavaScript per framekeyframes, tweens, springs, expressions
rendererheadless Chrome + ffmpegnative rasterizer (tiny-skia) + the Mac's own media engine
previewStudio, <Player>storyboard, still, inspect, timeline, trace
installNode, npm packages, a browserone Mac app
best forapps, anything the web platform can drawmotion graphics, titles, data, captions, templated video written by programs and agents

#Concept map

Remotionvidmakepage
<Composition id width height fps durationInFrames>an entry in compositions with id, width, height, fps, durationcompositions
calculateMetadata() duration"duration": "auto" (the longest fixed-length layer, media, or series)time
useCurrentFrame()f (layer-local frame) and t (seconds) in expressions; gf/gt for globalexpressions
useVideoConfig()fps, w, h, dur, durf in expressionsexpressions
interpolate()keyframes, tweens, or map() / interpolate() in expressionsanimation
spring()"ease": "spring(0.2)" (bounce 0..1), a motion such as "motion": "snap", "spring": {...} on a tween, or spring(f) in expressionseasing, animation
Easing.bezier(), Easing.out(Easing.cubic)"ease": "cubic-bezier(...)", "easeOutCubic"easing
<Sequence from durationInFrames>start and duration on any layer or grouptime
<Series>a group with "series": trueseries
<TransitionSeries> + @remotion/transitionstransition on series children: fade, slide*, wipe*, zoom, blurseries
<AbsoluteFill>a group or rect (both default to the parent size)groups
<Img>, <OffthreadVideo>, <Audio>image, video, audio layersimages, video, audio
staticFile()a path relative to the project fileimages
defaultProps, input props, --propscomposition props, {{name}}, --props / -p / --props-fileprops
your own componentscompositions placed with use layers, with their own propscomponents
array.map((x, i) => ...)repeat with i and nrepeat
CSS flexboxlayout on a group (column/row, gap, align, justify)groups
@remotion/shapesrect, ellipse, polygon, star, arcshapes
@remotion/paths evolvePath()path / line with drawEnd (drawMode: "total" to draw several sub-paths in turn)paths
@remotion/media-utils visualizeAudio()waveform layer; amp, bass, beat in expressionswaveform, audio-reactive
useAudioData() / getAudioData() to inspect a trackvidmake analyze music.mp3 (beat times, tempo, amp/bass curves)audio-reactive
@remotion/captions, createTikTokStyleCaptions()captions layer (srt, vtt, Whisper JSON), mode: "word", highlightcaptions
<CameraMotionBlur>, <Trail>composition motionBlur (per-layer opt-out)effects
CSS filter, mix-blend-mode, box-shadowblur, brightness, saturation, blendMode, shadow, gloweffects
CSS clip-path, masksmask / maskMode, group clipmasks
loadFont() / @remotion/google-fontsfonts entries pointing at local .ttf/.otf filestext
npx remotion rendervidmake renderrendering
npx remotion stillvidmake stillinspecting
Studio timelinevidmake timelineinspecting

#Side by side

#interpolate()

A fade-in over 20 frames and a slide that starts at frame 10:

Remotiontsx
const frame = useCurrentFrame();const opacity = interpolate(frame, [0, 20], [0, 1], { extrapolateRight: 'clamp' });const x = interpolate(frame, [10, 40], [-200, 960], {  easing: Easing.out(Easing.cubic), extrapolateLeft: 'clamp', extrapolateRight: 'clamp',});return <div style={{ opacity, transform: `translateX(${x}px)` }}>Hello</div>;
vidmakejson
{ "id": "title", "type": "text", "text": "Hello",  "opacity": [[0, 0], [20, 1]],  "x": { "from": -200, "to": 960, "start": 10, "duration": 30, "ease": "easeOutCubic" } }

Keyframes and tweens always clamp outside their range. Numbers are frames; "0.5s" works anywhere a time does. Multi-point interpolation is a keyframe list: [[0, 0], [20, 1], [100, 1], [120, 0]]. The expression form is closest to the original: "opacity": "=interpolate(f, 0, 20, 0, 1)" (clamped; mapu doesn't clamp).

#spring()

Remotiontsx
const frame = useCurrentFrame();const { fps } = useVideoConfig();const scale = spring({ frame, fps, config: { damping: 200 } });const delayed = spring({ frame: frame - 10, fps, config: { damping: 12, stiffness: 180 } });
vidmakejson
"scale": { "from": 0, "to": 1, "spring": { "damping": 200 } }"scale": "=spring(f - 10, 12, 180)"

The physics and defaults are the same as Remotion's (damping 10, stiffness 100, mass 1). In a tween, delay (or start) offsets the spring, from/to map its 0..1 output, and an optional duration stretches it to settle in that time, like Remotion's durationInFrames. "enter": "pop" is a ready-made spring scale-in.

When you only care about the feel, skip the physics: "ease": "spring(0.2)" on any tween or keyframe is a spring with that bounce that starts from rest and settles exactly at the end of the duration, and a motion such as "motion": { "spring": 0.2, "duration": "0.5s" } carries the duration too. Entrances use springs by default (smooth), so most layers need no spring of their own.

#Sequence

Remotiontsx
<Sequence from={30} durationInFrames={60}>  <Title /></Sequence>
vidmakejson
{ "id": "titleScene", "type": "group", "start": 30, "duration": 60, "children": [  { "id": "title", "type": "text", "text": "${f}" }] }

As inside a <Sequence>, time restarts for the children: f and t inside are local, so "${f}" shows 0 at frame 30. Every layer has start and duration, so a group is only needed when several layers share the window.

#Series and TransitionSeries

Remotiontsx
<TransitionSeries>  <TransitionSeries.Sequence durationInFrames={48}><SlideOne /></TransitionSeries.Sequence>  <TransitionSeries.Transition presentation={slide({ direction: 'from-right' })}    timing={linearTiming({ durationInFrames: 15 })} />  <TransitionSeries.Sequence durationInFrames={48}><SlideTwo /></TransitionSeries.Sequence>  <TransitionSeries.Transition presentation={fade()} timing={linearTiming({ durationInFrames: 15 })} />  <TransitionSeries.Sequence durationInFrames={48}><SlideThree /></TransitionSeries.Sequence></TransitionSeries>
vidmakejson
{ "id": "deck", "type": "group", "series": true, "children": [  { "id": "s1", "type": "group", "duration": 48, "transition": { "type": "slideLeft", "duration": 15 }, "children": [] },  { "id": "s2", "type": "group", "duration": 48, "transition": "fade", "children": [] },  { "id": "s3", "type": "group", "duration": 48, "children": [] }] }

The transition sits on the outgoing child and overlaps it with the next one, so the series is 48 × 3 − 2 × 15 frames long, as in Remotion. Without transition it is a plain <Series>; a child's start adds a gap (Remotion's offset). Here it is with real content:

00:00.0 · f 000
Slideshow: a series group plays three slides back to back with push and fade transitionsDownload

#Input props and defaultProps

Remotiontsx
<Composition id="card" component={Card} defaultProps={{ title: 'Hello', color: '#161412' }} ... />// npx remotion render card out.mp4 --props='{"title":"Launch day"}'export const Card = ({ title, color }) => <h1 style={{ color }}>{title}</h1>;
vidmakejson
{ "id": "card", "width": 1920, "height": 1080, "duration": "5s",  "props": { "title": "Hello", "color": "#161412" },  "layers": [ { "id": "title", "type": "text", "text": "{{title}}", "fill": "{{color}}" } ] }
bash
vidmake render card.json -o out.mp4 --props '{"title": "Launch day"}'vidmake render card.json -o out.mp4 -p title="Launch day" -p color=#c92a26

{{name}} is replaced before the project is compiled. A string that is exactly "{{name}}" takes the prop's JSON value (a number stays a number, a list stays a list), so props can drive numbers, colors, arrays for pick(), even whole animation objects. There is no zod schema; validate warns about unknown {{names}}.

#Components

Remotiontsx
const LowerThird = ({ name }) => {  const frame = useCurrentFrame();  return <div style={{ opacity: interpolate(frame, [0, 15], [0, 1]) }}>{name}</div>;};// ...<Sequence from={60}><LowerThird name="Ada" /></Sequence>
vidmakejson
{ "compositions": [  { "id": "main", "width": 1920, "height": 1080, "duration": "8s", "layers": [    { "id": "lt", "type": "use", "ref": "lowerThird", "start": "2s", "props": { "name": "Ada" } }  ] },  { "id": "lowerThird", "width": 1920, "height": 1080, "duration": "3s", "props": { "name": "Name" },    "layers": [ { "id": "n", "type": "text", "text": "{{name}}", "y": "85%", "enter": "fadeUp" } ] }] }

A component is a composition; a use layer places it like a <Sequence> with props. Its time starts at the use layer's start, and it is clipped to its own size and duration. You can render the component on its own with --comp lowerThird. Logic that would be JavaScript in a component becomes expressions, repeat and props.

#Mapping over data

Remotiontsx
{[120, 340, 260, 420].map((v, i) => (  <Bar key={i} height={v * spring({ frame: frame - i * 3, fps })} left={i * 90} />))}
vidmakejson
{ "id": "bar", "type": "rect", "width": 60, "anchor": "bottom", "y": 900,  "repeat": { "count": 4, "layout": "row", "spacing": 90, "delay": 3 },  "height": "=pick(i, [120, 340, 260, 420]) * spring(f)" }

See the bar chart recipe.

#Audio visualization

Remotiontsx
const audioData = useAudioData(staticFile('music.mp3'));if (!audioData) return null;const bars = visualizeAudio({ fps, frame, audioData, numberOfSamples: 32 });const bass = bars.slice(0, 4).reduce((a, b) => a + b) / 4;return (<>  <Audio src={staticFile('music.mp3')} />  {bars.map((v, i) => <div key={i} style={{ height: 300 * v }} />)}  <Logo style={{ transform: `scale(${1 + bass})` }} /></>);
vidmakejson
{ "id": "music", "type": "audio", "src": "music.mp3" },{ "id": "viz", "type": "waveform", "src": "music.mp3", "bars": 32, "y": "85%" },{ "id": "logo", "type": "image", "src": "logo.svg", "scale": "=1 + bass" }

The waveform layer draws bars, a mirrored spectrum or an oscilloscope line. For anything else, the expression variables amp, bass, beat and beats are computed from all the audio in the composition, with beat detection built in. No loading step: analysis happens at compile time.

The scale differs from visualizeAudio(). Its values are raw magnitudes per frequency band, usually well below 1, which is why Remotion code often multiplies them up. amp and bass are normalized per composition so the loudest 2% of the soundtrack reads 1, so 1 + bass really does double the size on every kick, and a loud section can sit at 1 for seconds. Start with smaller multipliers (1 + 0.15 * bass), and run vidmake analyze on the track to see the beat times, the typical values and how long each variable spends at its ceiling, the way you might have logged useAudioData() output.

00:00.0 · f 000
Beat pulse: amp, bass and beat from the music drive scale, glow and colorDownload

#Captions

Remotiontsx
const { pages } = createTikTokStyleCaptions({ captions, combineTokensWithinMilliseconds: 800 });// ...render each page in a <Sequence>, highlight the active token by comparing timestamps
vidmakejson
{ "id": "subs", "type": "captions", "src": "subs.srt", "fontSize": 64, "fontWeight": 800,  "fill": "#ffffff", "highlight": "#c92a26", "stroke": "#000000", "strokeWidth": 10 }

src takes .srt, .vtt or Whisper-style JSON (word timestamps are used when present). "mode": "word" shows one word at a time; highlight colors the spoken word in line mode. See the captions recipe.

#Rendering

bash
npx remotion render src/index.ts card out/video.mp4 --props='{"title":"Hi"}' --frames=0-89vidmake render card.json -o out/video.mp4 --props '{"title":"Hi"}' --frames 0-90

Note the range: Remotion's --frames=0-89 is inclusive, vidmake's --frames 0-90 is end-exclusive (and accepts times: --frames 0-3s). See rendering.

#What's different

  • No code, no imports. Everything is declarative JSON. Per-frame logic is limited to the expression language (math, easing functions, noise, pick, color functions); there are no loops, variables, hooks, fetch, or npm packages. Generate the JSON with any language if you need more.
  • No DOM or CSS. There's no HTML, CSS layout, SVG filters, iframes, canvas/WebGL or Three.js. Layout is absolute positioning plus simple row/column stacks. Text supports wrapping, alignment, letter spacing, rich-text spans with their own color, weight, italic and font, gradients and outlines, but not per-span sizes or other CSS text features.
  • Local files only. src and font paths are files relative to the project; URLs are not fetched (file not found: ./https://...). Download remote assets first. There's no delayRender() because there is nothing to wait for.
  • Fonts are font files. Declare .ttf/.otf files in fonts, or use installed families (vidmake fonts).
  • Time defaults. Numbers are frames, like Remotion, but every time field also takes "1.5s", "500ms", "1:02". Animation times are local to the layer, like inside a <Sequence>.
  • Transitions are presets, not custom presentation components.
  • Inspection replaces the Studio. Instead of scrubbing, ask: timeline for timing, inspect -t 2s for positions, trace for curves, storyboard for an overview. These are designed for agents that can't watch video.
  • Rendering is local and native. No browser, no Lambda/Cloud Run renderer. A single machine renders in parallel across cores; distribute by rendering ranges with --frames and concatenating if you need to.
  • No <Player>. Render a file and embed it, or show storyboards and stills.

#Porting checklist

  1. Create one composition per Remotion <Composition> (same id, width, height, fps; duration from durationInFrames).
  2. Turn each <Sequence> into a group (or just start/duration on a single layer), each <Series> into a series group.
  3. Replace interpolate/spring calls with keyframes, tweens or expressions on the field they drive.
  4. Move defaultProps to props and reference them as {{name}}.
  5. Turn reusable components into compositions placed with use.
  6. Copy assets next to the project and point src/fonts at them.
  7. vidmake validate, vidmake storyboard, compare with your Remotion render, then vidmake render.

For agents

When asked to port a Remotion project, read the components for timing (frames per <Sequence>), props and assets first, write one composition at a time, and validate after each. vidmake docs has the full field list.