- The idea: separate the design (a fixed template) from the data (variable), and the same component produces infinite versions.
- How to feed in data: through a React component's props, defaultProps for Studio preview, and real inputProps at render time.
- How to render at scale: the renderMedia API in a loop, or Remotion Lambda for parallel rendering at scale.
Spotify Wrapped produces tens of millions of unique videos every year, one per user, all from a single code template. That is exactly what Remotion was built to enable: video as a function of data.
Spotify Wrapped is not one video. It is one template produced in millions of versions, one for each user. The secret is "data-driven video": a single React template in Remotion that accepts different data and generates a personalized video for each person. In this guide: how to build exactly that yourself, from props to rendering thousands of videos automatically.
In short (TL;DR)
- The idea: separate the design (a fixed template) from the data (variable), and the same component produces infinite versions.
- How to feed in data: through a React component's
props,defaultPropsfor Studio preview, and realinputPropsat render time. - How to render at scale: the
renderMediaAPI in a loop, or Remotion Lambda for parallel rendering at scale. - Shortcut: Claude Code can write the template and the render script for you.
What is data-driven video?
Data-driven video is a video created by combining a fixed template with variable data. Instead of editing each video by hand, you define once what the video looks like, then feed it different data to produce many versions.
This is exactly why Remotion is built on React: a React component is already a function that accepts props and returns a view. Here the props are the data, and the view is the video.
Spotify Wrapped and GitHub Unwrapped are data-driven video at massive scale, tens of millions of unique videos per year, each from a single template. Both were built with Remotion.
How do you pass data to a video? (props)
You pass data to a video exactly as you would to any React component, through props. You define default values on the composition so there is something to preview in Studio:
// Root.tsx
import { Composition } from "remotion";
import { Wrapped } from "./Wrapped";
export const RemotionRoot = () => (
<Composition
id="Wrapped"
component={Wrapped}
durationInFrames={300}
fps={30}
width={1080}
height={1920} // vertical story format
defaultProps={{
name: "Dana",
topArtist: "Omer Adam",
minutesListened: 42130,
}}
/>
);
The component itself simply reads the props and draws the video accordingly:
// Wrapped.tsx
import { AbsoluteFill, useCurrentFrame, spring, useVideoConfig } from "remotion";
export const Wrapped = ({ name, topArtist, minutesListened }) => {
const frame = useCurrentFrame();
const { fps } = useVideoConfig();
const scale = spring({ frame, fps, config: { damping: 12 } });
return (
<AbsoluteFill style={{ background: "#1db954", justifyContent: "center", alignItems: "center" }}>
<h1 style={{ transform: `scale(${scale})`, color: "#fff", fontSize: 80 }}>
{name}, you listened for {minutesListened.toLocaleString("he-IL")} minutes
</h1>
<h2 style={{ color: "#fff" }}>Your top artist: {topArtist}</h2>
</AbsoluteFill>
);
};
How do you validate the data? (Zod schema)
To ensure every video receives exactly the right fields, Remotion supports defining a Zod schema for props. The schema validates the data and also provides a visual props editor inside Remotion Studio:
import { z } from "zod";
export const wrappedSchema = z.object({
name: z.string(),
topArtist: z.string(),
minutesListened: z.number().int().positive(),
});
You attach the schema to the composition using the schema prop, and any attempt to render a video with missing or incorrect data will be stopped before processing begins. You will not discover the problem after you have already rendered 1,000 videos.
How do you render hundreds of videos automatically?
You render in bulk through Remotion's Node API: loop over a list of data records and produce one video per item. Here is the skeleton:
// render-all.ts
import { renderMedia, selectComposition } from "@remotion/renderer";
import { bundle } from "@remotion/bundler";
const users = [
{ name: "Dana", topArtist: "Omer Adam", minutesListened: 42130 },
{ name: "Yossi", topArtist: "Static & Ben El", minutesListened: 38910 },
// ...thousands more users from a CSV or database
];
const serveUrl = await bundle({ entryPoint: "./src/index.ts" });
for (const user of users) {
const composition = await selectComposition({ serveUrl, id: "Wrapped", inputProps: user });
await renderMedia({
composition,
serveUrl,
codec: "h264",
outputLocation: `out/${user.name}.mp4`,
inputProps: user,
});
}
From the CLI you can render a single video with custom data like this:
npx remotion render Wrapped out/dana.mp4 --props='{"name":"Dana","topArtist":"Omer Adam","minutesListened":42130}'
How do you do this at scale? (Remotion Lambda)
Rendering thousands of videos on a single slow machine is painful. Remotion Lambda solves that: it runs many renders in parallel on AWS Lambda, so hundreds of videos finish in the time it takes to render one.
- Parallel rendering: each video (and even each segment within a video) runs as a separate Lambda function.
- No dedicated server: you pay only for actual render time, which is ideal for a seasonal load spike like an annual "Wrapped" campaign.
- Same API: call
renderMediaOnLambdainstead ofrenderMedia, with the same props.
How does Claude Code speed all of this up?
Since January 2026 there are official Remotion Agent Skills for Claude Code, so you can describe the entire flow in plain language and the agent writes the template, the Zod schema, and the render script.
Example prompt: "Using the Remotion skill, build a vertical 'year in review' template: the user's name with a spring animation, the number of minutes, and the top artist. Add a Zod schema and write a script that renders one video for each row in
users.csv."
This is the practical path for anyone who does not write React day to day: you define the idea, and the agent builds the machine. These are exactly the workflows we teach businesses.
What business use cases does this fit?
Data-driven video is not only "Wrapped." It is an engine for producing personalized video at scale:
- Personal year-in-review for clients: "Your year with us," with each client's own data.
- Personalized sales video: an animated proposal with the client's name, price, and package, thousands of versions from one template.
- Certificates and achievements: a course-completion video with the graduate's name and score.
- Localization: the same video in 10 languages, simply swapping the text props.
The bottom line
The real power of Remotion is not rendering one video. It is turning video into a function of data and generating thousands of personalized versions from it. That is what is behind Spotify Wrapped, and it is available to your business too, especially when Claude Code writes the template for you.
Want to build a personalized video engine for your business? That is exactly what we teach.
Continue reading: The complete Remotion guide · What is Claude Code · Free Claude Code course · AI automations for businesses · HyperFrames, video as code

