remotion-best-practices
/remotion-best-practices
Tworzy programowe wideo w Remotion i React: animowane kompozycje, renderowanie do MP4 i WebM, napisy, audio, animacje tekstu, przejścia i wizualizacje danych.
- Autor
- anolilab ↗
- Repozytorium
- lunora ↗
- Licencja
- Apache-2.0
- Ostatnia zmiana repozytorium
- 27.10.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 39
- Skrypty
- 3
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 2
Brak sygnałów. Repozytorium zmienione 27.10.2026, bez odwołań do wycofanych modeli i API.
Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.
- 3 skrypty w paczce. Przejrzyj je przed instalacją, bo Claude może je uruchomić.
Skrypty: rules/assets/charts-bar-chart.tsx, rules/assets/text-animations-typewriter.tsx, rules/assets/text-animations-word-highlight.tsx
Co robi i kiedy
Tworzy programowe wideo w Remotion i React: animowane kompozycje, renderowanie do MP4 i WebM, napisy, audio, animacje tekstu, przejścia i wizualizacje danych.
Oryginalny opis (EN)
Create programmatic videos with Remotion and React. Build animated compositions, render to MP4/WebM, configure frame rates and resolutions, add captions/subtitles, embed audio/video, and create text animations, transitions, and data visualizations. Use when the user mentions Remotion, programmatic video creation, React-based video rendering, or needs to build video from code.
Jak działa
- When to use
- Quick start
- Core workflow
- New project setup
- Designing a video
- Starting preview
- Optional: one-frame render check
- Captions
- Using FFmpeg
- Silence detection
Podgląd SKILL.md
---
name: remotion-best-practices
description: >
Create programmatic videos with Remotion and React. Build animated compositions, render to MP4/WebM,
configure frame rates and resolutions, add captions/subtitles, embed audio/video, and create
text animations, transitions, and data visualizations. Use when the user mentions Remotion,
programmatic video creation, React-based video rendering, or needs to build video from code.
metadata:
tags: remotion, video, react, animation, composition, render, mp4, webm, frames, timeline, interpolate, spring, captions, subtitles, audio, transitions
---
## When to use
Use this skill when working with Remotion code — creating video compositions, rendering animations, embedding media, adding captions, or building any programmatic video pipeline in React.
## Quick start
A minimal Remotion composition that fades in text over 2 seconds:
```tsx
import { useCurrentFrame, useVideoConfig, interpolate, AbsoluteFill } from "remotion";
export const FadeIn: React.FC = () => {
const frame = useCurrentFrame();
const { fps } = useVideoConfig();
const opacity = interpolate(frame, [0, 2 * fps], [0, 1], {
extrapolateRight: "clamp",
});
return (
<AbsoluteFill style={{ justifyContent: "center", alignItems: "center" }}>
<h1 style={{ fontSize: 80, color: "white", opacity }}>Hello World</h1>
</AbsoluteFill>
);
};
```
Register it in `src/Root.tsx`:
```tsx
import { Composition } from "remotion";
import { FadeIn } from "./FadeIn";
export const RemotionRoot = () => (
<Composition id="FadeIn" component={FadeIn} durationInFrames={90} fps={30} width={1920} height={1080} />
);
```
Render with: `npx remotion render src/index.ts FadeIn out/video.mp4`
## Core workflow
1. **Define compositions** in `src/Root.tsx` — set dimensions, fps, and duration
2. **Build components** using `useCurrentFrame()` and `interpolate()` for all animations (CSS animations are forbidden)
3. **Preview** with `npx remotion studio`
4. **Render** with `npx remotion render`
## New project setup
When in an empty folder or workspace with no existing Remotion project, scaffold one using:
```bash
npx create-video@latest --yes --blank --no-tailwind my-video
```
Replace `my-video` with a suitable project name.
## Designing a video
Animate properties using `useCurrentFrame()` and `interpolate()`. Use Easing to customize the timing of the animation.
```tsx
import { useCurrentFrame, Easing } from "remotion";
export const FadeIn = () => {
const frame = useCurrentFrame();
const { fps } = useVideoConfig();
const opacity = interpolate(frame, [0, 2 * fps], [0, 1], {
extrapolateRight: "clamp",
extrapolateLeft: "clamp",
easing: Easing.bezier(0.16, 1, 0.3, 1),
});
return <div style={{ opacity }}>Hello World!</div>;
};
```
CSS transitions or animations are FORBIDDEN - they will not render correctly.
Tailwind animation class names are FORBIDDEN - they will not render correctly.
Place assets in the `public/` folder at your project root.
Use `staticFile()` to reference files from the `public/` folder.
Add images using the `<Img>` component:
```tsx
import { Img, staticFile } from "remotion";
export const MyComposition = () => {
return <Img src={staticFile("logo.png")} style={{ width: 100, height: 100 }} />;
};
```
Add videos using the `<Video>` component from `@remotion/media`:
```tsx
import { Video } from "@remotion/media";
import { staticFile } from "remotion";
export const MyComposition = () => {
return <Video src={staticFile("video.mp4")} style={{ opacity: 0.5 }} />;
};
```
Add audio using the `<Audio>` component from `@remotion/media`:
```tsx
import { Audio } from "@remotion/media";
import { staticFile } from "remotion";
export const MyComposition = () => {
return <Audio src={staticFile("audio.mp3")} />;
};
```
Assets can be also referenced as remote URLs:
```tsx
import { Video } from "@remotion/media";
export const MyComposition = () => {
return <Video src="https://remotion.media/video.mp4" />
};
```
To delay content wrap it in `<Sequence>` and use `from`.
To limit the duration of an element, use `durationInFrames` of `<Sequence>`.
`<Sequence>` by default is an absolute fill. For inline content, use `layout="none"`.
```tsx
import { Sequence } from "remotion";
export const Title = () => {
const frame = useCurrentFrame();
const { fps } = useVideoConfig();
const opacity = interpolate(frame, [0, 2 * fps], [0, 1], {
extrapolateRight: "clamp",
extrapolateLeft: "clamp",
easing: Easing.bezier(0.16, 1, 0.3, 1),
});
return <div style={{ opacity }}>Title</div>;
};
export const Subtitle = () => {
return <div>Subtitle</div>;
};
const Main = () => {
const {fps} = useVideoConfig();
return (
<AbsoluteFill>
<Sequence>
<Background />
</Sequence>
<Sequence from={1 * fps} durationInFrames={2 * fps} layout="none">
<Title />
</Sequence>
<Sequence from={2 * fps} durationInFrames={2 * fps} layout="none">
<Subtitle />
</Sequence>
</AbsoluteFill>
);
}
```
The width, height, fps, and duration of a video is defined in `src/Root.tsx`:
```tsx
import { Composition } from "remotion";
import { MyComposition } from "./MyComposition";
export const RemotionRoot = () => {
return (
<Composition
id="MyComposition"
component={MyComposition}
durationInFrames={100}
fps={30}
width={1080}
height={1080}
/>
);
};
```
Metadata can also be calculated dynamically:
```tsx
import { Composition, CalculateMetadataFunction } from "remotion";
import { MyComposition, MyCompositionProps } from "./MyComposition";
const calculateMetadata: CalculateMetadataFunction<
MyCompositionProps
> = async ({ props, abortSignal }) => {
const data = await fetch(`https://api.example.com/video/${props.videoId}`, {
signal: abortSignal,
}).then((res) => res.json());
return {
durationInFrames: Math.ceil(data.duration * 30),
props: {
...props,
videoUrl: data.url,
},
width: 1080,
height: 1080,
};
};
export const RemotionRoot = () => {
return (
<Composition
id="MyComposition"
component={MyComposition}
fps={30}
width={1080}
height={1080}
defaultProps={{ videoId: "abc123" }}
calculateMetadata={calculateMetadata}
/>
);
};
```
## Starting preview
Start the Remotion Studio to preview a video:
```bash
npx remotion studio
```
## Optional: one-frame render check
You can render a single frame with the CLI to sanity-check layout, colors, or timing.
Skip it for trivial edits, pure refactors, or when you already have enough confidence from Studio or prior renders.
```bash
npx remotion still [composition-id] --scale=0.25 --frame=30
```
At 30 fps, `--frame=30` is the one-second mark (`--frame` is zero-based).
## Captions
When dealing with captions or subtitles, load the [./rules/subtitles.md](./rules/subtitles.md) file for more information.
For specific caption workflows, load the matching rule:
- Displaying captions (TikTok-style pages, word highlighting): [./rules/display-captions.md](./rules/display-captions.md)
- Importing `.srt` subtitle files with `@remotion/captions`: [./rules/import-srt-captions.md](./rules/import-srt-captions.md)
- Transcribing audio to generate captions: [./rules/transcribe-captions.md](./rules/transcribe-captions.md)
## Using FFmpeg
For 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.
## Silence detection
When needing to detect and trim silent segments from video or audio files, load the [./rules/silence-detection.md](./rules/silence-detection.md) file.
## Audio visualization
When needing to visualize audio (spectrum bars, waveforms, bass-reactive effects), load the [./rules/audio-visualization.md](./rules/audio-visualization.md) file for more information.
## Sound effects
When needing to use sound effects, load the [./rules/sfx.md](./rules/sfx.md) file for more information.
## 3D content
See [rules/3d.md](rules/3d.md) for 3D content in Remotion using Three.js and React Three Fiber.
## Advanced audio
See [rules/audio.md](rules/audio.md) for advanced audio features like trimming, volume, speed, pitch.
## Dynamic duration, dimensions and data
See [rules/calculate-metadata.md](rules/calculate-metadata.md) for dynamically set composition duration, dimensions, and props.
## Advanced compositions
See [rules/compositions.md](rules/compositions.md) for how to define stills, folders, default props and for how to nest compositions.
## Google Fonts
Is the recommended way to load fonts in Remotion. See [rules/google-fonts.md](rules/google-fonts.md) for how to load Google Fonts.
## Local fonts
See [rules/local-fonts.md](rules/local-fonts.md) for how to load local fonts.
## Getting audio duration
See [rules/get-audio-duration.md](rules/get-audio-duration.md) for getting the duration of an audio file in seconds with Mediabunny.
## Getting video dimensions
See [rules/get-video-dimensions.md](rules/get-video-dimensions.md) for getting the width and height of a video file with Mediabunny.
## Getting video duration
See [rules/get-video-duration.md](rules/get-video-duration.md) for getting the duration of a video file in seconds with Mediabunny.
## GIFs
See [rules/gifs.md](rules/gifs.md) for how to display GIFs synchronized with Remotion's timeline.
## Advanced Images
See [rules/images.md](rules/images.md) for sizing and positioning images, dynamic image paths, and getting image dimensions.
## Light leaks
See [rules/light-leaks.md](rules/light-leaks.md) for light leak overlay effects using `@remotion/light-leaks`.
## Lottie animations
See [rules/lottie.md](rules/lottie.md) for embedding Lottie animations in Remotion.
## HTML in canvas
See [rules/html-in-canvas.md](rules/html-in-canvas.md) if you need to render HTML into a `<canvas>` to apply 2D or WebGL effects via `<HtmlInCanvas>`.
## Measuring DOM nodes
See [rules/measuring-dom-nodes.md](rules/measuring-dom-nodes.md) for measuring DOM element dimensions in Remotion.
## Measuring text
See [rules/measuring-text.md](rules/measuring-text.md) for measuring text dimensions, fitting text to containers, and checking overflow.
## Advanced sequencing
See [rules/sequencing.md](rules/sequencing.md) for more sequencing patterns - delay, trim, limit duration of items.
## TailwindCSS
See [rules/tailwind.md](rules/tailwind.md) for using TailwindCSS in Remotion.
## Text animations
See [rules/text-animations.md](rules/text-animations.md) for typography and text animation patterns.
## Advanced timing
See [rules/timing.md](rules/timing.md) for advanced timing with `interpolate` and Bézier easing, and springs.
## Transitions
See [rules/transitions.md](rules/transitions.md) for scene transition patterns.
## Transparent videos
See [rules/transparent-videos.md](rules/transparent-videos.md) for rendering out a video with transparency.
## Trimming
See [rules/trimming.md](rules/trimming.md) for trimming patterns - cutting the beginning or end of animations.
## Advanced Videos
See [rules/videos.md](rules/videos.md) for advanced knowledge about embedding videos - trimming, volume, speed, looping, pitch.
## Parameterized videos
See [rules/parameters.md](rules/parameters.md) for making a composition parametrizable by adding a Zod schema.
## Maps
For simple maps with little flyovers, consider using static map images.
For complex maps with animated routes or flyovers, load the maps rule: [rules/maplibre.md](rules/maplibre.md)
## Voiceover
See [rules/voiceover.md](rules/voiceover.md) for adding AI-generated voiceover to Remotion compositions using ElevenLabs TTS.
Pliki w paczce (39)
- SKILL.md 12 KB
- rules/3d.md 2 KB
- rules/audio-visualization.md 5 KB
- rules/audio.md 4 KB
- rules/calculate-metadata.md 3 KB
- rules/compositions.md 3 KB
- rules/display-captions.md 5 KB
- rules/ffmpeg.md 1 KB
- rules/get-audio-duration.md 1 KB
- rules/get-video-dimensions.md 2 KB
- rules/get-video-duration.md 1 KB
- rules/gifs.md 4 KB
- rules/google-fonts.md 2 KB
- rules/html-in-canvas.md 4 KB
- rules/images.md 1 KB
- rules/import-srt-captions.md 2 KB
- rules/light-leaks.md 2 KB
- rules/local-fonts.md 1 KB
- rules/lottie.md 2 KB
- rules/maplibre.md 12 KB
- rules/measuring-dom-nodes.md 1 KB
- rules/measuring-text.md 3 KB
- rules/parameters.md 2 KB
- rules/sequencing.md 3 KB
- rules/sfx.md 1 KB
- rules/silence-detection.md 2 KB
- rules/subtitles.md 1 KB
- rules/tailwind.md 1 KB
- rules/text-animations.md 1 KB
- rules/timing.md 4 KB
- rules/transcribe-captions.md 2 KB
- rules/transitions.md 6 KB
- rules/transparent-videos.md 2 KB
- rules/trimming.md 1 KB
- rules/videos.md 3 KB
- rules/voiceover.md 3 KB
- rules/assets/charts-bar-chart.tsx 3 KB
- rules/assets/text-animations-typewriter.tsx 2 KB
- rules/assets/text-animations-word-highlight.tsx 2 KB
Wersje
| Repozytorium | Wynik | Licencja |
|---|---|---|
| Ta strona · anolilab/lunora | 100 | Apache-2.0 |
| MoizIbnYousaf/marketing-cli | 100 | MIT |
| guanyang/open-agent-hub | 90 | MIT |
| galyarderlabs/galyarder-framework | 90 | MIT |
| galyarderlabs/galyarder-framework | 90 | MIT |
| composio-community/open-claude-cowork | 84 | MIT |
Migawka bazy z 28.10.2026 · wersja paczki b222dc4f5b7e (skrót SHA-256 całej paczki)
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 100remotion
Zawiera bazę wiedzy o Remotion: programowe tworzenie wideo w React, renderowanie, kompozycje i animacje, np. do klipów społecznościowych. - 100remotion-video-creation
Zawiera 29 reguł dobrych praktyk Remotion do tworzenia wideo w React: 3D, animacje, audio, napisy, wykresy i przejścia. - 100remotion
Podaje dobre praktyki tworzenia wideo w Reactcie z Remotion: kompozycje, sekwencje i animacje. - 95Remotion
Tworzy wideo programowo w React przez Remotion: animacje, grafikę ruchomą i renderowanie wideo. - 95Remotion
Zamienia treści w animacje MP4 przez Remotion w React: kompozycje, motion graphics i nakładki wideo. - 100remotion-video-toolkit
Tworzy wideo programowo w React z Remotion: personalizowane filmy, animowane wizualizacje danych, napisy w stylu TikTok i renderowanie przez CLI, AWS Lambda lub Google Cloud Run.