Remotion Best Practices
Domain-specific knowledge and best practices for creating videos programmatically with Remotion (React-based video framework).
When to Use
Use this skill whenever you are dealing with Remotion code to obtain the domain-specific knowledge, including:
- Writing or editing Remotion compositions, animations, or transitions
- Working with audio, video, images, or fonts in Remotion
- Creating captions, subtitles, charts, 3D content, or text animations
- Using FFmpeg for video operations (trimming, silence detection) within a Remotion workflow
- Troubleshooting Remotion rendering, timing, or asset issues
Do NOT use this skill if:
- You need general React/Next.js best practices (not video-specific) → use general React knowledge
- You need to discover/install agent skills → use
find-skills instead
- You need GitHub operations → use
gh-cli instead
- You need non-Remotion video editing (Premiere, Final Cut, DaVinci) → this skill is Remotion-specific
Typical triggers:
- 「remotion」「React视频」「视频生成」「remotion动画」
- "programmatic video" "remotion best practices" "React video creation"
- 「remotion音频」「视频渲染」「remotion composition」
Workflow
探查 (Probe)
确认用户正在处理的 Remotion 具体领域(动画 / 音频 / 字幕 / 3D / 图表 / 转场 / 资源管理 / FFmpeg),确认项目使用的 Remotion 版本和相关依赖。
约束 (Constrain)
设定 Remotion 项目约束:使用官方推荐的组件和 API,不绕过 Remotion 的渲染管线。对于 FFmpeg 操作,确认系统已安装 ffmpeg。不降级交付——若缺少依赖,先指导安装。
证据 (Evidence)
所有最佳实践和代码示例来自本技能的 rules/ 目录下的规则文件。根据具体领域加载对应的规则文件获取详细说明和代码示例,不凭记忆编造 API 用法。
执行 (Execute)
根据领域加载对应的规则文件(见下方 "How to use" 和规则文件列表),应用其中的最佳实践和代码模式到用户的 Remotion 项目中。对于常见操作:
- Captions/subtitles: load
rules/subtitles.md
- FFmpeg operations (trimming, silence detection): load
rules/ffmpeg.md
- Audio visualization (spectrum, waveform, bass-reactive): load
rules/audio-visualization.md
验证 (Verify)
验证 Remotion 代码:确认组件导入正确、props 类型匹配、时间计算(frame/fps)准确、资源路径有效。对于渲染问题,建议用户运行 npx remotion render 或 npx remotion studio 验证输出。
交付 (Deliver)
返回应用了最佳实践的 Remotion 代码或修改建议,引用对应的规则文件来源。对于多文件修改,总结每个文件的变更点。不保留临时文件。
Output
Remotion code snippets, component implementations, or modification guidance based on the relevant rule files. Output includes: correct component usage, prop configurations, animation timing patterns, asset import statements, and references to the specific rules/*.md file that supports each recommendation. For FFmpeg operations, returns command-line instructions.
Captions
When dealing with captions or subtitles, load the ./rules/subtitles.md file for more information.
Using FFmpeg
For some video operations, such as trimming videos or detecting silence, FFmpeg should be used. Load the ./rules/ffmpeg.md file for more information.
Audio visualization
When needing to visualize audio (spectrum bars, waveforms, bass-reactive effects), load the ./rules/audio-visualization.md file for more information.
How to use
Read individual rule files for detailed explanations and code examples:
- rules/3d.md - 3D content in Remotion using Three.js and React Three Fiber
- rules/animations.md - Fundamental animation skills for Remotion
- rules/assets.md - Importing images, videos, audio, and fonts into Remotion
- rules/audio.md - Using audio and sound in Remotion - importing, trimming, volume, speed, pitch
- rules/calculate-metadata.md - Dynamically set composition duration, dimensions, and props
- rules/can-decode.md - Check if a video can be decoded by the browser using Mediabunny
- rules/charts.md - Chart and data visualization patterns for Remotion (bar, pie, line, stock charts)
- rules/compositions.md - Defining compositions, stills, folders, default props and dynamic metadata
- rules/extract-frames.md - Extract frames from videos at specific timestamps using Mediabunny
- rules/fonts.md - Loading Google Fonts and local fonts in Remotion
- rules/get-audio-duration.md - Getting the duration of an audio file in seconds with Mediabunny
- rules/get-video-dimensions.md - Getting the width and height of a video file with Mediabunny
- rules/get-video-duration.md - Getting the duration of a video file in seconds with Mediabunny
- rules/gifs.md - Displaying GIFs synchronized with Remotion's timeline
- rules/images.md - Embedding images in Remotion using the Img component
- rules/light-leaks.md - Light leak overlay effects using @remotion/light-leaks
- rules/lottie.md - Embedding Lottie animations in Remotion
- rules/measuring-dom-nodes.md - Measuring DOM element dimensions in Remotion
- rules/measuring-text.md - Measuring text dimensions, fitting text to containers, and checking overflow
- rules/sequencing.md - Sequencing patterns for Remotion - delay, trim, limit duration of items
- rules/tailwind.md - Using TailwindCSS in Remotion
- rules/text-animations.md - Typography and text animation patterns for Remotion
- rules/timing.md - Interpolation curves in Remotion - linear, easing, spring animations
- rules/transitions.md - Scene transition patterns for Remotion
- rules/transparent-videos.md - Rendering out a video with transparency
- rules/trimming.md - Trimming patterns for Remotion - cut the beginning or end of animations
- rules/videos.md - Embedding videos in Remotion - trimming, volume, speed, looping, pitch
- rules/parameters.md - Make a video parametrizable by adding a Zod schema
- rules/maps.md - Add a map using Mapbox and animate it
- rules/voiceover.md - Adding AI-generated voiceover to Remotion compositions using ElevenLabs TTS
Guardrails
Source & Attribution
- This skill contains best practices for Remotion (https://www.remotion.dev/), a React-based framework for programmatic video creation, developed by Remotion GmbH.
- Rule files in
rules/ are derived from Remotion official documentation and community best practices.
- Some rule files reference Mediabunny (https://mediabunny.com/) for media processing operations.
- FFmpeg operations require the FFmpeg open-source tool (https://ffmpeg.org/) installed on the system.
- Users must have Remotion installed in their project (
npm i remotion @remotion/cli).
Anti-patterns
- NEVER bypass Remotion's rendering pipeline with direct DOM manipulation outside of components.
- Do NOT use
setTimeout or setInterval for animations — use Remotion's useCurrentFrame() and interpolate().
- NEVER hardcode frame numbers without considering FPS — always calculate based on
fps prop.
- Do NOT load rule files that are not relevant to the user's task — only load on demand.
Constraints
- Always load the specific
rules/*.md file relevant to the user's task before providing code examples.
- Verify Remotion version compatibility — some APIs may differ between major versions.
- For FFmpeg operations, confirm ffmpeg is installed (
ffmpeg -version) before providing commands.
- For Mediabunny operations, confirm the user has access to the Mediabunny API.
- Never modify or delete rule files in the
rules/ directory.
Related Skills
- gh-cli — GitHub CLI reference for managing Remotion project repositories, releases, and CI/CD workflows.
- find-skills — Discover additional agent skills for video creation, animation, and media processing.
- bright-data — Web data extraction, useful for gathering data to visualize in Remotion charts.
About UniqueClub
Part of the UniqueClub toolkit. This skill curates third-party Remotion best practices within the UniqueClub skill ecosystem.
🌐 https://uniqueclub.ai
1---2name: remotion-best-practices3description: Best practices and domain-specific knowledge for Remotion — programmatic video creation in React. Covers animations, audio, captions, 3D, charts, compositions, transitions, text effects, FFmpeg operations, and 30+ specialized rule files with code examples. Use when: "remotion", "React视频", "programmatic video", "remotion动画", "视频生成", "remotion best practices", "React video creation", "remotion音频", "视频渲染", "remotion composition". Loads on-demand rule files for captions, FFmpeg, audio visualization, 3D, animations, assets, and more. Cross-references: gh-cli, find-skills. Built by UniqueClub 🌐 https://uniqueclub.ai4---56# Remotion Best Practices78Domain-specific knowledge and best practices for creating videos programmatically with Remotion (React-based video framework).910## When to Use1112Use this skill whenever you are dealing with Remotion code to obtain the domain-specific knowledge, including:13- Writing or editing Remotion compositions, animations, or transitions14- Working with audio, video, images, or fonts in Remotion15- Creating captions, subtitles, charts, 3D content, or text animations16- Using FFmpeg for video operations (trimming, silence detection) within a Remotion workflow17- Troubleshooting Remotion rendering, timing, or asset issues1819Do NOT use this skill if:20- You need general React/Next.js best practices (not video-specific) → use general React knowledge21- You need to discover/install agent skills → use `find-skills` instead22- You need GitHub operations → use `gh-cli` instead23- You need non-Remotion video editing (Premiere, Final Cut, DaVinci) → this skill is Remotion-specific2425Typical triggers:26- 「remotion」「React视频」「视频生成」「remotion动画」27- "programmatic video" "remotion best practices" "React video creation"28- 「remotion音频」「视频渲染」「remotion composition」2930## Workflow31321. **探查 (Probe)**33确认用户正在处理的 Remotion 具体领域(动画 / 音频 / 字幕 / 3D / 图表 / 转场 / 资源管理 / FFmpeg),确认项目使用的 Remotion 版本和相关依赖。34352. **约束 (Constrain)**36设定 Remotion 项目约束:使用官方推荐的组件和 API,不绕过 Remotion 的渲染管线。对于 FFmpeg 操作,确认系统已安装 ffmpeg。不降级交付——若缺少依赖,先指导安装。37383. **证据 (Evidence)**39所有最佳实践和代码示例来自本技能的 `rules/` 目录下的规则文件。根据具体领域加载对应的规则文件获取详细说明和代码示例,不凭记忆编造 API 用法。40414. **执行 (Execute)**42根据领域加载对应的规则文件(见下方 "How to use" 和规则文件列表),应用其中的最佳实践和代码模式到用户的 Remotion 项目中。对于常见操作:43- **Captions/subtitles**: load `rules/subtitles.md`44- **FFmpeg operations** (trimming, silence detection): load `rules/ffmpeg.md`45- **Audio visualization** (spectrum, waveform, bass-reactive): load `rules/audio-visualization.md`46475. **验证 (Verify)**48验证 Remotion 代码:确认组件导入正确、props 类型匹配、时间计算(frame/fps)准确、资源路径有效。对于渲染问题,建议用户运行 `npx remotion render` 或 `npx remotion studio` 验证输出。49506. **交付 (Deliver)**51返回应用了最佳实践的 Remotion 代码或修改建议,引用对应的规则文件来源。对于多文件修改,总结每个文件的变更点。不保留临时文件。5253## Output5455Remotion code snippets, component implementations, or modification guidance based on the relevant rule files. Output includes: correct component usage, prop configurations, animation timing patterns, asset import statements, and references to the specific `rules/*.md` file that supports each recommendation. For FFmpeg operations, returns command-line instructions.5657## Captions5859When dealing with captions or subtitles, load the [./rules/subtitles.md](./rules/subtitles.md) file for more information.6061## Using FFmpeg6263For some video operations, such as trimming videos or detecting silence, FFmpeg should be used. Load the [./rules/ffmpeg.md](./rules/ffmpeg.md) file for more information.6465## Audio visualization6667When needing to visualize audio (spectrum bars, waveforms, bass-reactive effects), load the [./rules/audio-visualization.md](./rules/audio-visualization.md) file for more information.6869## How to use7071Read individual rule files for detailed explanations and code examples:7273- [rules/3d.md](rules/3d.md) - 3D content in Remotion using Three.js and React Three Fiber74- [rules/animations.md](rules/animations.md) - Fundamental animation skills for Remotion75- [rules/assets.md](rules/assets.md) - Importing images, videos, audio, and fonts into Remotion76- [rules/audio.md](rules/audio.md) - Using audio and sound in Remotion - importing, trimming, volume, speed, pitch77- [rules/calculate-metadata.md](rules/calculate-metadata.md) - Dynamically set composition duration, dimensions, and props78- [rules/can-decode.md](rules/can-decode.md) - Check if a video can be decoded by the browser using Mediabunny79- [rules/charts.md](rules/charts.md) - Chart and data visualization patterns for Remotion (bar, pie, line, stock charts)80- [rules/compositions.md](rules/compositions.md) - Defining compositions, stills, folders, default props and dynamic metadata81- [rules/extract-frames.md](rules/extract-frames.md) - Extract frames from videos at specific timestamps using Mediabunny82- [rules/fonts.md](rules/fonts.md) - Loading Google Fonts and local fonts in Remotion83- [rules/get-audio-duration.md](rules/get-audio-duration.md) - Getting the duration of an audio file in seconds with Mediabunny84- [rules/get-video-dimensions.md](rules/get-video-dimensions.md) - Getting the width and height of a video file with Mediabunny85- [rules/get-video-duration.md](rules/get-video-duration.md) - Getting the duration of a video file in seconds with Mediabunny86- [rules/gifs.md](rules/gifs.md) - Displaying GIFs synchronized with Remotion's timeline87- [rules/images.md](rules/images.md) - Embedding images in Remotion using the Img component88- [rules/light-leaks.md](rules/light-leaks.md) - Light leak overlay effects using @remotion/light-leaks89- [rules/lottie.md](rules/lottie.md) - Embedding Lottie animations in Remotion90- [rules/measuring-dom-nodes.md](rules/measuring-dom-nodes.md) - Measuring DOM element dimensions in Remotion91- [rules/measuring-text.md](rules/measuring-text.md) - Measuring text dimensions, fitting text to containers, and checking overflow92- [rules/sequencing.md](rules/sequencing.md) - Sequencing patterns for Remotion - delay, trim, limit duration of items93- [rules/tailwind.md](rules/tailwind.md) - Using TailwindCSS in Remotion94- [rules/text-animations.md](rules/text-animations.md) - Typography and text animation patterns for Remotion95- [rules/timing.md](rules/timing.md) - Interpolation curves in Remotion - linear, easing, spring animations96- [rules/transitions.md](rules/transitions.md) - Scene transition patterns for Remotion97- [rules/transparent-videos.md](rules/transparent-videos.md) - Rendering out a video with transparency98- [rules/trimming.md](rules/trimming.md) - Trimming patterns for Remotion - cut the beginning or end of animations99- [rules/videos.md](rules/videos.md) - Embedding videos in Remotion - trimming, volume, speed, looping, pitch100- [rules/parameters.md](rules/parameters.md) - Make a video parametrizable by adding a Zod schema101- [rules/maps.md](rules/maps.md) - Add a map using Mapbox and animate it102- [rules/voiceover.md](rules/voiceover.md) - Adding AI-generated voiceover to Remotion compositions using ElevenLabs TTS103104## Guardrails105106**Source & Attribution**107- This skill contains best practices for **Remotion** (https://www.remotion.dev/), a React-based framework for programmatic video creation, developed by Remotion GmbH.108- Rule files in `rules/` are derived from Remotion official documentation and community best practices.109- Some rule files reference **Mediabunny** (https://mediabunny.com/) for media processing operations.110- FFmpeg operations require the FFmpeg open-source tool (https://ffmpeg.org/) installed on the system.111- Users must have Remotion installed in their project (`npm i remotion @remotion/cli`).112113**Anti-patterns**114- NEVER bypass Remotion's rendering pipeline with direct DOM manipulation outside of components.115- Do NOT use `setTimeout` or `setInterval` for animations — use Remotion's `useCurrentFrame()` and `interpolate()`.116- NEVER hardcode frame numbers without considering FPS — always calculate based on `fps` prop.117- Do NOT load rule files that are not relevant to the user's task — only load on demand.118119**Constraints**120- Always load the specific `rules/*.md` file relevant to the user's task before providing code examples.121- Verify Remotion version compatibility — some APIs may differ between major versions.122- For FFmpeg operations, confirm ffmpeg is installed (`ffmpeg -version`) before providing commands.123- For Mediabunny operations, confirm the user has access to the Mediabunny API.124- Never modify or delete rule files in the `rules/` directory.125126## Related Skills127128- **gh-cli** — GitHub CLI reference for managing Remotion project repositories, releases, and CI/CD workflows.129- **find-skills** — Discover additional agent skills for video creation, animation, and media processing.130- **bright-data** — Web data extraction, useful for gathering data to visualize in Remotion charts.131132## About UniqueClub133134Part of the UniqueClub toolkit. This skill curates third-party Remotion best practices within the UniqueClub skill ecosystem.135🌐 https://uniqueclub.ai