🎥 Make videos programmatically with React
update skills
JonnyBurger1bc12e9504bf
diff --git a/packages/agent-plugin/build.mts b/packages/agent-plugin/build.mtsindex 4552afe2bb..15595f9457 100644--- a/packages/agent-plugin/build.mts+++ b/packages/agent-plugin/build.mts@@ -80,45 +80,67 @@ If Studio still fails to start from Codex, ask the user to start it manually froconsole.log(' Added Codex-only troubleshooting instructions');};-const makeRemotionCreateOpenPreview = () => {- const remotionCreateSkill = join(skillsOut, 'remotion-create', 'SKILL.md');- if (!existsSync(remotionCreateSkill)) {+const makeOpenPreviewClientSpecific = () => {+ const remotionSkill = join(skillsOut, 'remotion-best-practices', 'SKILL.md');+ if (!existsSync(remotionSkill)) {return;}- const currentInstructions = readFileSync(remotionCreateSkill, 'utf8');+ const currentInstructions = readFileSync(remotionSkill, 'utf8');const previewInstruction = ['Instead of rendering the video, consider starting the preview server for faster iteration:','Start the preview server after building the composition:',].find((instruction) => currentInstructions.includes(instruction));if (!previewInstruction) {- throw new Error('Could not find a remotion-create preview instruction');+ throw new Error(+ 'Could not find a remotion-best-practices preview instruction',+ );}- const replacements = [- [- previewInstruction,- 'After creating or updating the video, start the preview server by default:',- ],- [- 'If an in-harness browser is available, open it there.',- "Open the exact URL in the agent client's available browser. If no browser tool is available, keep the preview server running and provide the URL to the user.",- ],- ] as const;-- let instructions = currentInstructions;- for (const [genericInstruction, replacement] of replacements) {- if (!instructions.includes(genericInstruction)) {- throw new Error(- `Could not find remotion-create instruction: ${genericInstruction}`,- );- }-- instructions = instructions.replace(genericInstruction, replacement);+ const browserSectionStart = '### If you have an in-app browser';+ const browserSectionEnd = '### More options';+ const startIndex = currentInstructions.indexOf(browserSectionStart);+ const endIndex = currentInstructions.indexOf(browserSectionEnd);+ if (startIndex === -1 || endIndex === -1 || endIndex < startIndex) {+ throw new Error(+ `Could not find remotion-best-practices browser instructions between "${browserSectionStart}" and "${browserSectionEnd}"`,+ );}- writeFileSync(remotionCreateSkill, instructions);- console.log(' Made remotion-create open previews in the agent browser');+ const openInstruction =+ client === 'codex'+ ? 'Open the exact URL in the Codex in-app browser. If the in-app browser is not available, keep the preview server running and provide the URL to the user.'+ : "Open the exact URL in the agent client's available browser, such as the integrated browser in GitHub Copilot (VS Code) or Cursor. If no browser tool is available, keep the preview server running and provide the URL to the user.";++ const browserSection = `Always pass \`--no-open\` so the system browser is not opened:++\`\`\`bash+npx remotion studio --no-open+\`\`\`++This will start a long-running process and print the server URL for the preview.+If the server is already started, it will print the URL.+${openInstruction}+You can visit a specific composition by navigating to \`/[composition-id]\`, for example \`http://localhost:3000/MapAnimation\`.++:::note+The Studio supports WebMCP tools.+:::++`;++ const instructions =+ currentInstructions+ .slice(0, startIndex)+ .replace(+ previewInstruction,+ 'After creating or updating the video, start the preview server by default:',+ ) ++ browserSection ++ currentInstructions.slice(endIndex);++ writeFileSync(remotionSkill, instructions);+ console.log(' Made previews open in the agent browser');};console.log(@@ -138,7 +160,7 @@ if (existsSync(packagesSkillsDir)) {if (client === 'codex') {addCodexOnlyInstructions();}- makeRemotionCreateOpenPreview();+ makeOpenPreviewClientSpecific();} else {console.warn('Warning: packages/skills/skills/ not found');}diff --git a/packages/agent-plugin/test/plugin.test.ts b/packages/agent-plugin/test/plugin.test.tsindex 1db742452a..f0054e05d1 100644--- a/packages/agent-plugin/test/plugin.test.ts+++ b/packages/agent-plugin/test/plugin.test.ts@@ -169,21 +169,20 @@ test('maps is available from either standalone parent skill', () => {}});-test('remotion-create opens the preview in the agent browser by default', () => {- const remotionCreateSkill = readFileSync(- path.join(generatedSkillsRoot, 'remotion-create', 'SKILL.md'),+test('remotion-best-practices opens the preview in the agent browser by default', () => {+ const previewSkill = readFileSync(+ path.join(generatedSkillsRoot, 'remotion-best-practices', 'SKILL.md'),'utf-8',);- expect(remotionCreateSkill).toContain('start the preview server by default');- expect(remotionCreateSkill).toContain(- "Open the exact URL in the agent client's available browser.",- );- expect(remotionCreateSkill).not.toContain('Codex in-app browser');- expect(remotionCreateSkill).not.toContain('tool_search');- expect(remotionCreateSkill).not.toContain(- 'consider starting the preview server',+ expect(previewSkill).toContain('start the preview server by default');+ expect(previewSkill).toContain(+ 'Open the exact URL in the Codex in-app browser.',);+ expect(previewSkill).not.toContain('If you have an in-app browser');+ expect(previewSkill).not.toMatch(/^npx remotion studio$/m);+ expect(previewSkill).not.toContain('tool_search');+ expect(previewSkill).not.toContain('consider starting the preview server');});test('Codex troubleshooting does not open the system browser', () => {@@ -220,13 +219,14 @@ test('portable build passes Vally lint and omits Codex troubleshooting', async (path.join(cursorSkillsRoot, 'remotion-best-practices', 'SKILL.md'),'utf-8',);- const remotionCreateSkill = readFileSync(- path.join(cursorSkillsRoot, 'remotion-create', 'SKILL.md'),+ const previewSkill = readFileSync(+ path.join(cursorSkillsRoot, 'remotion-best-practices', 'SKILL.md'),'utf-8',);- expect(remotionCreateSkill).toContain(- "Open the exact URL in the agent client's available browser.",+ expect(previewSkill).toContain(+ "Open the exact URL in the agent client's available browser, such as the integrated browser in GitHub Copilot (VS Code) or Cursor.",);+ expect(previewSkill).not.toContain('Codex in-app browser');expect(remotionSkill).not.toContain('## Codex troubleshooting');expect(remotionSkill).not.toContain('## Agent client troubleshooting');await expectVallyLintToPass(cursorSkillsRoot, cursorSkillsRoot);diff --git a/packages/skills/skills/remotion-best-practices/SKILL.md b/packages/skills/skills/remotion-best-practices/SKILL.mdindex e2c6c9e531..4d49a5abd3 100644--- a/packages/skills/skills/remotion-best-practices/SKILL.md+++ b/packages/skills/skills/remotion-best-practices/SKILL.md@@ -34,14 +34,55 @@ For achieving multimedia tasks in the browser, such as trimming, cropping videosBy structuring the Remotion markup well, we can allow users to interactively change things in the Studio and write back to code. If relevant: [Interactivity Best Practices](./remotion-interactivity/SKILL.md)-## Rendering+## Open the preview-For advanced rendering beyond simple `npx remotion render`, see: [Rendering Best Practices](./remotion-render/SKILL.md)+If the user asks to "make" a video, "create" a video, etc.+Don't render the video by default unless they are very explicit. They want to instead see an interactive preview.+Start the preview server after building the composition:++### If you have an in-app browser++If you are e.g. Codex, GitHub Copilot or any other desktop agent with an in-app browser, run:++```bash+npx remotion studio --no-open+```++This will start a long-running process and print the server URL for the preview.+If the server is already started, it will print the URL.+You can visit a specific composition by navigating to `/[composition-id]`, for example `http://localhost:3000/MapAnimation`.++:::note+The Studio supports WebMCP tools.+:::++### If you do not have an in-app browser++This will open the Studio in the browser or-refocus it if it is already open.-## Opening Remotion Studio+```bash+npx remotion studio+```++### More optionsTo launch a project in Remotion Studio, open its exact local URL, or configure Studio CLI flags, load [Remotion Studio](./remotion-studio/SKILL.md).+## Render the video++Only render if the user is very explicit in asking for it.+E.g. "Render the video", "Export", "Give me the MP4".++The preview also has a more intuitive rendering interface, so consider using it instead of the command line for rendering.++```+npx remotion render+```++For more options, see [Rendering](../remotion-render/SKILL.md).++For advanced rendering beyond simple `npx remotion render`, see: [Rendering Best Practices](./remotion-render/SKILL.md)+## CaptionsWhen working with Captions, load [Remotion Captions](./remotion-captions/SKILL.md).diff --git a/packages/skills/skills/remotion-captions/SKILL.md b/packages/skills/skills/remotion-captions/SKILL.mdindex 1314da4b7a..795194f234 100644--- a/packages/skills/skills/remotion-captions/SKILL.md+++ b/packages/skills/skills/remotion-captions/SKILL.md@@ -34,3 +34,9 @@ To display captions in your video, load the [display-captions.md](display-captio## Importing captionsTo import captions from a .srt file, load the [import-srt-captions.md](import-srt-captions.md) file for more instructions.++## Post-creation++After you're done, load this skill: [Remotion Best Practices](../remotion-best-practices/SKILL.md)++If not alreay done, open the Remotion Studio, unless instructed otherwise.diff --git a/packages/skills/skills/remotion-captions/display-captions.md b/packages/skills/skills/remotion-captions/display-captions.mdindex c720d0c58e..4aeccdaf2f 100644--- a/packages/skills/skills/remotion-captions/display-captions.md+++ b/packages/skills/skills/remotion-captions/display-captions.md@@ -1,190 +1,94 @@---name: display-captions-description: Displaying captions in Remotion with TikTok-style pages and word highlighting+description: Displaying captions in Remotion using the Basic Captions elementmetadata:- tags: captions, subtitles, display, tiktok, highlight+ tags: captions, subtitles, display, element---# Displaying captions in Remotion-This guide explains how to display captions in Remotion, assuming you already have captions in the [`Caption`](https://www.remotion.dev/docs/captions/caption) format.+This guide explains how to display captions in Remotion, assuming you already have captions in the [`Caption`](https://www.remotion.dev/docs/captions/caption.md) format.## PrerequisitesRead [Transcribing audio](transcribe-captions.md) for how to generate captions.-First, the [`@remotion/captions`](https://www.remotion.dev/docs/captions) package needs to be installed.+First, the [`@remotion/captions`](https://www.remotion.dev/docs/captions.md) package needs to be installed.If it is not installed, use the following command:```bash-npx remotion add @remotion/captions+npx remotion add @remotion/captions # If project uses npm+bunx remotion add @remotion/captions # If project uses bun+yarn remotion add @remotion/captions # If project uses yarn+pnpm exec remotion add @remotion/captions # If project uses pnpm```-## Fetching captions+## Adding the Basic Captions element-First, fetch your captions JSON file. Use [`useDelayRender()`](https://www.remotion.dev/docs/use-delay-render) to hold the render until the captions are loaded:+Use the [Basic Captions](https://www.remotion.dev/elements/captions/basic-captions) element to display captions.-```tsx-import { useState, useEffect, useCallback } from "react";-import { AbsoluteFill, staticFile, useDelayRender } from "remotion";-import type { Caption } from "@remotion/captions";--export const MyComponent: React.FC = () => {- const [captions, setCaptions] = useState<Caption[] | null>(null);- const { delayRender, continueRender, cancelRender } = useDelayRender();- const [handle] = useState(() => delayRender());-- const fetchCaptions = useCallback(async () => {- try {- // Assuming captions.json is in the public/ folder.- const response = await fetch(staticFile("captions123.json"));- const data = await response.json();- setCaptions(data);- continueRender(handle);- } catch (e) {- cancelRender(e);- }- }, [continueRender, cancelRender, handle]);-- useEffect(() => {- fetchCaptions();- }, [fetchCaptions]);-- if (!captions) {- return null;- }-- return (- <AbsoluteFill>- {/* Render captions here */}- </AbsoluteFill>- );-};-```+Alternatives are available at [Remotion Captions Elements](https://www.remotion.dev/elements/captions), but use Basic Captions unless there are more precise specifications.-## Creating pages+Fetch its source code from https://www.remotion.dev/elements/captions/basic-captions.md and copy the `basic-captions.tsx` file into the project unchanged.-Use `createTikTokStyleCaptions()` to group captions into pages. The `combineTokensWithinMilliseconds` option controls how many words appear at once:+## Inlining captions-```tsx-import { useMemo } from "react";-import { createTikTokStyleCaptions } from "@remotion/captions";-import type { Caption } from "@remotion/captions";--// How often captions should switch (in milliseconds)-// Higher values = more words per page-// Lower values = fewer words (more word-by-word)-const SWITCH_CAPTIONS_EVERY_MS = 1200;--const { pages } = useMemo(() => {- return createTikTokStyleCaptions({- captions,- combineTokensWithinMilliseconds: SWITCH_CAPTIONS_EVERY_MS,- });-}, [captions]);-```--If a caption has `pageBreakAfter: true`, the current page ends after that caption and the next caption starts a new page.--## Rendering with Sequences--Map over the pages and render each one in a `<Sequence>`. Calculate the start frame and duration from the page timing:+Inline the captions directly in the `captions` prop. Do not fetch them from a JSON file.+If the captions were transcribed to a JSON file, copy its contents into the prop:```tsx-import { Sequence, useVideoConfig, AbsoluteFill } from "remotion";-import type { TikTokPage } from "@remotion/captions";--const CaptionedContent: React.FC = () => {- const { fps } = useVideoConfig();+import { BasicCaptions } from "./basic-captions";+export const MyComponent: React.FC = () => {return (- <AbsoluteFill>- {pages.map((page, index) => {- const nextPage = pages[index + 1] ?? null;- const startFrame = (page.startMs / 1000) * fps;- const endFrame = Math.min(- nextPage ? (nextPage.startMs / 1000) * fps : Infinity,- startFrame + (SWITCH_CAPTIONS_EVERY_MS / 1000) * fps,- );- const durationInFrames = endFrame - startFrame;-- if (durationInFrames <= 0) {- return null;- }-- return (- <Sequence- key={index}- from={startFrame}- durationInFrames={durationInFrames}- >- <CaptionPage page={page} />- </Sequence>- );- })}- </AbsoluteFill>+ <>+ <BasicCaptions+ captions={[+ {+ text: "Hello",+ startMs: 0,+ endMs: 400,+ timestampMs: 200,+ confidence: null,+ },+ {+ text: " world",+ startMs: 400,+ endMs: 900,+ timestampMs: 650,+ confidence: null,+ },+ ]}+ />+ </>);};```-## White-space preservation--The captions are whitespace sensitive. You should include spaces in the `text` field before each word. Use `whiteSpace: "pre"` to preserve the whitespace in the captions.--## Separate component for captions--Put captioning logic in a separate component.-Make a new file for it.--## Word highlighting--A caption page contains `tokens` which you can use to highlight the currently spoken word:--```tsx-import { AbsoluteFill, useCurrentFrame, useVideoConfig } from "remotion";-import type { TikTokPage } from "@remotion/captions";--const HIGHLIGHT_COLOR = "#39E508";--const CaptionPage: React.FC<{ page: TikTokPage }> = ({ page }) => {- const frame = useCurrentFrame();- const { fps } = useVideoConfig();+If a caption has `pageBreakAfter: true`, the current page ends after that caption and the next caption starts a new page.- // Current time relative to the start of the sequence- const currentTimeMs = (frame / fps) * 1000;- // Convert to absolute time by adding the page start- const absoluteTimeMs = page.startMs + currentTimeMs;+## White-space preservation- return (- <AbsoluteFill style={{ justifyContent: "center", alignItems: "center" }}>- <div style={{ fontSize: 80, fontWeight: "bold", whiteSpace: "pre" }}>- {page.tokens.map((token, tokenIndex) => {- const isActive =- token.fromMs <= absoluteTimeMs && token.toMs > absoluteTimeMs;-- return (- <span- key={`${token.fromMs}-${tokenIndex}`}- style={{ color: isActive ? HIGHLIGHT_COLOR : "white" }}- >- {token.text}- </span>- );- })}- </div>- </AbsoluteFill>- );-};-```+The captions are whitespace sensitive. You should include spaces in the `text` field before each word.## Display captions alongside video contentBy default, put the captions alongside the video content, so the captions are in sync.-For each video, make a new captions JSON file.+Transcribe each video separately and inline its captions next to it.```tsx<AbsoluteFill>- <Video src={staticFile("video.mp4")} />- <CaptionPage page={page} />+ <Video src={staticFile("video123.mp4")} />+ <BasicCaptions+ captions={[+ {+ text: "Hello",+ startMs: 0,+ endMs: 400,+ timestampMs: 200,+ confidence: null,+ },+ ]}+ /></AbsoluteFill>```diff --git a/packages/skills/skills/remotion-captions/transcribe-captions.md b/packages/skills/skills/remotion-captions/transcribe-captions.mdindex ba649d5749..49ef11795c 100644--- a/packages/skills/skills/remotion-captions/transcribe-captions.md+++ b/packages/skills/skills/remotion-captions/transcribe-captions.md@@ -1,70 +1,170 @@-----name: transcribe-captions-description: Transcribing audio to generate captions in Remotion-metadata:- tags: captions, transcribe, whisper, audio, speech-to-text-----# Transcribing audio-To transcribe audio to generate captions in Remotion, you can use the [`transcribe()`](https://www.remotion.dev/docs/install-whisper-cpp/transcribe) function from the [`@remotion/install-whisper-cpp`](https://www.remotion.dev/docs/install-whisper-cpp) package.+To transcribe audio to generate captions in Remotion, use the [`transcribe()`](https://www.remotion.dev/docs/whisper-webgpu/transcribe.md) function from the [`@remotion/whisper-webgpu`](https://www.remotion.dev/docs/whisper-webgpu.md) package.+It runs Whisper locally on the GPU and works in both Node.js and the browser.## Prerequisites-First, the @remotion/install-whisper-cpp package needs to be installed.-If it is not installed, use the following command:+Install the required packages if they are not installed:```bash-npx remotion add @remotion/install-whisper-cpp+npx remotion add @remotion/whisper-webgpu @huggingface/transformers mediabunny @mediabunny/server # If project uses npm+bunx remotion add @remotion/whisper-webgpu @huggingface/transformers mediabunny @mediabunny/server # If project uses bun+yarn remotion add @remotion/whisper-webgpu @huggingface/transformers mediabunny @mediabunny/server # If project uses yarn+pnpm exec remotion add @remotion/whisper-webgpu @huggingface/transformers mediabunny @mediabunny/server # If project uses pnpm```+A compatible GPU is required. ONNX Runtime does not work on Linux arm64.+## Transcribing-Make a Node.js script to download Whisper.cpp and a model, and transcribe the audio.+Make a Node.js script that decodes the audio to a 16kHz mono waveform, downloads a model, and transcribes it.```ts-import path from "path";+import { registerMediabunnyServer } from "@mediabunny/server";import {+ WHISPER_WEBGPU_SAMPLE_RATE,+ canUseWhisperWebGpu,downloadWhisperModel,- installWhisperCpp,- transcribe,+ loadWhisperModel,toCaptions,-} from "@remotion/install-whisper-cpp";-import fs from "fs";--const to = path.join(process.cwd(), "whisper.cpp");--await installWhisperCpp({- to,- version: "1.5.5",+ transcribe,+} from "@remotion/whisper-webgpu";+import {+ ALL_FORMATS,+ Conversion,+ FilePathSource,+ Input,+ NullTarget,+ Output,+ WavOutputFormat,+} from "mediabunny";+import { writeFile } from "node:fs/promises";++registerMediabunnyServer();++const support = await canUseWhisperWebGpu();+if (!support.supported) {+ throw new Error(support.detailedReason);+}++type WaveformChunk = {+ startFrame: number;+ waveform: Float32Array;+};+const chunks: WaveformChunk[] = [];++using input = new Input({+ formats: ALL_FORMATS,+ source: new FilePathSource("public/video123.mp4"),});--await downloadWhisperModel({- model: "medium.en",- folder: to,+const audioTrack = await input.getPrimaryAudioTrack();+if (audioTrack === null) {+ throw new Error("The media does not contain an audio track.");+}++const conversion = await Conversion.init({+ input,+ output: new Output({+ format: new WavOutputFormat(),+ target: new NullTarget(),+ }),+ video: { discard: true },+ audio: (track) => {+ if (track.id !== audioTrack.id) {+ return { discard: true };+ }++ return {+ codec: "pcm-f32",+ forceTranscode: true,+ numberOfChannels: 1,+ sampleFormat: "f32",+ sampleRate: WHISPER_WEBGPU_SAMPLE_RATE,+ process: (sample) => {+ const waveform = new Float32Array(+ sample.allocationSize({ format: "f32", planeIndex: 0 }) /+ Float32Array.BYTES_PER_ELEMENT,+ );+ sample.copyTo(waveform, { format: "f32", planeIndex: 0 });+ chunks.push({+ startFrame: Math.round(sample.timestamp * WHISPER_WEBGPU_SAMPLE_RATE),+ waveform,+ });+ return sample;+ },+ };+ },});-// Convert the audio to a 16KHz wav file first if needed:-// import {execSync} from 'child_process';-// execSync('ffmpeg -i /path/to/audio.mp4 -ar 16000 /path/to/audio.wav -y');+if (!conversion.isValid) {+ throw new Error("The audio track cannot be decoded.");+}++await conversion.execute();++const waveformLength = chunks.reduce(+ (max, chunk) => Math.max(max, chunk.startFrame + chunk.waveform.length),+ 0,+);+const channelWaveform = new Float32Array(waveformLength);+for (const chunk of chunks) {+ const destinationStart = Math.max(0, chunk.startFrame);+ const sourceStart = Math.max(0, -chunk.startFrame);+ const availableLength = Math.min(+ chunk.waveform.length - sourceStart,+ channelWaveform.length - destinationStart,+ );++ if (availableLength > 0) {+ channelWaveform.set(+ chunk.waveform.subarray(sourceStart, sourceStart + availableLength),+ destinationStart,+ );+ }+}++const model = "small.en";+await downloadWhisperModel({ model });+await using modelHandle = await loadWhisperModel({ model });+const transcription = await transcribe({ channelWaveform, model });+const { captions } = toCaptions({ whisperWebGpuOutput: transcription });++// Write it to a file so the captions can be inlined into the Remotion code+await writeFile("captions123.json", JSON.stringify(captions, null, 2));+```++## Choosing a model-const whisperCppOutput = await transcribe({- model: "medium.en",- whisperPath: to,- whisperCppVersion: "1.5.5",- inputPath: "/path/to/audio123.wav",- tokenLevelTimestamps: true,-});+`small.en` is the recommended default for English.+For other languages, use a multilingual model such as `small` and pass the `language` option to `transcribe()` - automatic language detection is not supported.+See [`getAvailableModels()`](https://www.remotion.dev/docs/whisper-webgpu/get-available-models.md) for all models.-// Optional: Apply our recommended postprocessing-const { captions } = toCaptions({- whisperCppOutput,-});+## Transcribing in the browser-// Write it to the public/ folder so it can be fetched from Remotion-fs.writeFileSync("captions123.json", JSON.stringify(captions, null, 2));+In the browser, use [`resampleTo16Khz()`](https://www.remotion.dev/docs/whisper-webgpu/resample-to-16khz.md) to get the waveform from a `File` instead of using Mediabunny:++```ts+import {+ downloadWhisperModel,+ resampleTo16Khz,+ toCaptions,+ transcribe,+} from "@remotion/whisper-webgpu";++export const transcribeFile = async (file: File) => {+ await downloadWhisperModel({ model: "small.en" });+ const channelWaveform = await resampleTo16Khz({ file });+ const transcription = await transcribe({+ channelWaveform,+ model: "small.en",+ });++ const { captions } = toCaptions({ whisperWebGpuOutput: transcription });+ return captions;+};```-Transcribe each clip individually and create multiple JSON files.+Transcribe each clip individually.See [Displaying captions](display-captions.md) for how to display the captions in Remotion.diff --git a/packages/skills/skills/remotion-create/SKILL.md b/packages/skills/skills/remotion-create/SKILL.mdindex f681f6b6fc..247909d855 100644--- a/packages/skills/skills/remotion-create/SKILL.md+++ b/packages/skills/skills/remotion-create/SKILL.md@@ -32,7 +32,6 @@ npm iIf the current folder contains meaningful contents and no project already exists, scaffold into a new subfolder.Replace `my-video` with a suitable project name.-```bashnpx create-video@latest --yes --blank --no-tailwind my-videocd my-video@@ -56,29 +55,6 @@ By structuring the React Markup following [Remotion Interactivity Best PracticesIf Tailwind is requested, see [tailwind.md](tailwind.md) for using TailwindCSS in Remotion.-## Open the preview--Start the preview server after building the composition:--```bash-npx remotion studio --no-open-```--This will start a long-running process and print the server URL for the preview.-If the server is already started, it will print the URL.-If an in-harness browser is available, open it there.-You can visit a specific composition by navigating to `/[composition-id]`, for example `http://localhost:3000/MapAnimation`.--## Render the video--Only render if the user explicitly asks for it.--```-npx remotion render-```--For more options, see [Rendering](../remotion-render/SKILL.md).-## Follow-upThe video creation process has finished.