Remotion with OpenAI Codex: build and render a product video
Codex edits files and runs commands, which is most of what making a video in Remotion takes: write a shot, render, look, fix. Give it a measured reference and it also gets the part people usually skip, the timing.
The same steps work in Codex CLI and the Codex app, since both read the same MCP server URL.
Want only the install and a few prompts? The Codex launch video page has them on one screen.
Why Codex suits video work
- It runs the build, render and check loop itself instead of handing you code to paste.
- AGENTS.md carries your project rules (brand colours, composition size, asset folders) into every task.
- It accepts images, so you can give it a frame of the reference and a frame of your render and ask what differs.
- Install the workflow skill and it knows the remake method before it calls a tool.
Start a Remotion project
Remotion turns React components into video: every frame is a render of your component at that frame number, so Codex edits a video the way it edits any other code. You need Node.js. Ask Codex to scaffold the project, or run it yourself:
npx create-video@latestGive Codex a reference to work from
A blank prompt gets a generic video. A real launch video measured frame by frame gets one with a rhythm: when each shot starts, how it enters and how much moves. The library at https://kuchi.kalarislabs.com/mcp is a free MCP server with no sign-in and no API key. Add it to Codex:
1. In a terminal, add the server to Codex CLI. No sign-in or API key is needed.
codex mcp add kuchi --url https://kuchi.kalarislabs.com/mcp2. In the Codex app, open a new task with the setup prompt filled in. The Codex page has the Open in Codex button.
3. Optional: install the Kuchi skill so Codex knows the workflow before it calls a tool.
npx skills add kalarislabs/kuchiThen paste the setup prompt, so the agent knows how to use the library:
Connect the Kuchi MCP server at https://kuchi.kalarislabs.com/mcp (Streamable HTTP, no sign-in) and confirm it works by listing its tools.
Kuchi is a library of real product-launch videos to use as inspiration templates. When I want a launch video, read kuchi_get_workflow and follow it: get a short list with kuchi_suggest_templates and show me each one's poster and link so I can choose, in chat or by picking a video on kuchi.kalarislabs.com and pasting its link. Once I pick one, study it with kuchi_get_breakdown, look at its storyboard and note what each shot shows, then call kuchi_plan_remake with my product details and your shot analysis, and ask me for my logo, screenshots and anything else it lists as missing. Build to the blueprint's frames. Before you deliver, run kuchi_check_remake and compare your frames with the reference. Copy only the reference's motion and taste; everything on screen comes from my product.The prompts, in order
- Suggest launch video templates for a B2B SaaS dashboard and show me each poster and link.
- Study the one I picked shot by shot and list what each shot shows.
- Plan the remake for our product at 1920×1080, 30 fps, about 30 seconds. Ask me for anything missing.
- Build each shot as its own Remotion component on the planned frames, then render.
- Run the remake check and fix every shot it flags before you give me the file.
Writing one shot in Remotion
A Remotion video is a React component rendered once per frame. Inside a shot, useCurrentFrame() returns the frame number counted from the start of that shot's <Sequence>, and useVideoConfig() gives the fps and size. Everything that moves is a function of that number, which is why Codex can match a reference to the frame: an entrance that takes 12 frames in the reference takes exactly 12 frames in yours.
The blueprint says how each shot enters. Each entrance has a direct translation:
| Blueprint `enters` | In Remotion |
|---|---|
cut | No entrance animation: the shot is fully on screen at its first frame. |
transition | Animate over the first frames: interpolate(frame, [0, 12], [0, 1], { extrapolateRight: 'clamp' }) for opacity, or a spring() for scale or position. |
hold | Same scene as the shot before: keep the layout and resume the motion where it stopped. |
blank_black, blank_white | Put a frame or two of solid black or white between the shots, as the reference does. |
Here is a product-screen shot that enters with a short transition, written the way Codex should write every shot: assets from public/ through staticFile(), timing from the frame number, nothing random.
import { AbsoluteFill, Img, interpolate, spring, staticFile, useCurrentFrame, useVideoConfig } from 'remotion';
// Blueprint shot 3: kind ui_screen, enters "transition", motion "medium".
export const Shot3 = () => {
const frame = useCurrentFrame();
const { fps } = useVideoConfig();
const opacity = interpolate(frame, [0, 12], [0, 1], { extrapolateRight: 'clamp' });
const rise = spring({ frame, fps, config: { damping: 200 } });
return (
<AbsoluteFill style={{ background: '#0b0b0f', alignItems: 'center', justifyContent: 'center' }}>
<Img
src={staticFile('screens/dashboard.png')}
style={{ width: '78%', borderRadius: 16, opacity, transform: `translateY(${(1 - rise) * 40}px)` }}
/>
</AbsoluteFill>
);
};For a screen recording use <OffthreadVideo src={staticFile('screens/demo.mp4')} /> instead of <Img>. Never use Math.random() or the clock inside a shot: Remotion renders frames in parallel and out of order, so anything not derived from the frame number flickers. Use Remotion's random(seed) when you need variation.
Preview, check and render
Open the Remotion Studio to scrub through the video while Codex works, render single frames to compare with the reference at the times the check gives, then render the file. Launch stands for your composition id.
npx remotion studio
npx remotion still Launch out/frame-90.png --frame=90
npx remotion render Launch out/launch.mp4What trips people up in Codex
- Network-restricted sandboxes. If the npm install fails, approve network access for that step or run it yourself.
- One giant component. Ask for a component per shot and one shot list with frame counts, so a retime is a one-line change.
- Approving a render without looking. Ask Codex to render stills at the check times first.
Questions
Can OpenAI Codex make a video?
Yes. Codex writes Remotion code and renders it to MP4 in your project; the library gives it a real reference to copy the motion from.
Does it work in the Codex app as well as the CLI?
Yes. The CLI adds the server with one command; the app opens a task with the setup prompt from the button on the Codex page.
Which model should Codex use for this?
Use your usual coding model. The hard part, timing and layout, comes from the reference plan rather than the model guessing.

