Przejdź do treści
Biblioteka skilli
Marketing i treści · Budowanie i kod

remotion-programmatic-video

/remotion-programmatic-video

Buduje filmy jako kod React w Remotion: kompozycje, sekwencje, animacje i render do MP4, na przykład wykresy z danych lub szablony marki.

Licencja
MIT
Ostatnia zmiana repozytorium
11.11.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 11.11.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Buduje filmy jako kod React w Remotion: kompozycje, sekwencje, animacje i render do MP4, na przykład wykresy z danych lub szablony marki.

Oryginalny opis (EN)

Build videos as React code with Remotion - compositions, sequences, springs, interpolation, audio sync, data-driven props, studio preview and rendering to MP4. Use for explainers, product demos, release notes, data charts, branded templates, or any video that should be reproducible from code.

Jak działa

  1. Setup
  2. The mental model
  3. Composition
  4. Animation primitives
  5. Media
  6. Sync scenes to narration
  7. Transitions
  8. Fonts and brand
  9. Performance and rendering
  10. Common mistakes
Sekcje z nagłówków SKILL.md, w oryginale · 125 linii, 665 słów
Podgląd SKILL.md
---
name: remotion-programmatic-video
description: Build videos as React code with Remotion - compositions, sequences, springs, interpolation, audio sync, data-driven props, studio preview and rendering to MP4. Use for explainers, product demos, release notes, data charts, branded templates, or any video that should be reproducible from code.
---

# Remotion (Programmatic Video)

Remotion renders React components frame by frame. Every frame is a pure function of the frame number, so animation is deterministic and re-renderable.

> Remotion's API changes between major versions. Read the installed version (`npm ls remotion`) and the official docs at remotion.dev before using an API you are unsure about. Check Remotion's license terms for commercial use by companies.

## Setup

```bash
npx create-video@latest          # choose the blank template (TypeScript)
cd my-video && npm install
npx remotion studio              # live preview
npx remotion render MyComp out/video.mp4
npx remotion still MyComp out/thumb.png --frame=45
```

## The mental model

- `useCurrentFrame()` gives the current frame, starting at 0.
- `useVideoConfig()` gives `fps`, `width`, `height`, `durationInFrames`.
- Nothing animates by itself. You compute style from the frame.
- Never use CSS transitions, `setTimeout`, `Math.random()` or `Date.now()` for animation. They break render determinism. Use `random('seed')` from remotion instead.

## Composition

```tsx
// src/Root.tsx
import {Composition} from 'remotion';
import {Explainer} from './Explainer';

export const RemotionRoot = () => (
  <Composition
    id="Explainer"
    component={Explainer}
    durationInFrames={30 * 20}   // 20 s at 30 fps
    fps={30}
    width={1920}
    height={1080}
    defaultProps={{title: 'Hello'}}
  />
);
```

## Animation primitives

```tsx
import {AbsoluteFill, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig} from 'remotion';

export const Title: React.FC<{text: string}> = ({text}) => {
  const frame = useCurrentFrame();
  const {fps} = useVideoConfig();

  const opacity = interpolate(frame, [0, 15], [0, 1], {extrapolateRight: 'clamp'});
  const scale = spring({frame, fps, config: {damping: 200}});   // smooth, no bounce

  return (
    <AbsoluteFill style={{justifyContent: 'center', alignItems: 'center'}}>
      <h1 style={{opacity, transform: `scale(${0.9 + 0.1 * scale})`, fontSize: 96}}>{text}</h1>
    </AbsoluteFill>
  );
};

export const Explainer = () => (
  <AbsoluteFill style={{backgroundColor: '#0b1020', color: 'white'}}>
    <Sequence from={0} durationInFrames={90}><Title text="Intro" /></Sequence>
    <Sequence from={90} durationInFrames={120}><Title text="Main point" /></Sequence>
  </AbsoluteFill>
);
```

Always pass `extrapolateLeft/Right: 'clamp'` to `interpolate` unless you want values to run past the range.

## Media

```tsx
import {staticFile, Audio, OffthreadVideo, Img} from 'remotion';

<Audio src={staticFile('voiceover.mp3')} />
<Audio src={staticFile('music.mp3')} volume={0.12} />
<OffthreadVideo src={staticFile('demo.mp4')} />
<Img src={staticFile('logo.png')} />
```

Put assets in `public/` and reference them with `staticFile()`. Use `<Img>` rather than `<img>` so rendering waits for the image. Newer Remotion versions provide updated media components; check the docs for the installed version.

## Sync scenes to narration

Do not hardcode scene lengths. Derive them from the audio.

1. Generate per-scene voiceover files (`voiceover-tts` skill).
2. Measure each duration with `ffprobe` and write `scenes.json` with `{id, audio, seconds}`.
3. In the composition, convert with `Math.ceil((seconds + 0.5) * fps)` and lay out `<Sequence>` by cumulative offset.
4. Use `calculateMetadata` on the `<Composition>` to set the total `durationInFrames` from that data.

If the voice is re-recorded, the video retimes itself.

## Transitions

Install `@remotion/transitions` and use `TransitionSeries` with `fade()`, `slide()`, `wipe()`. A transition overlaps its two scenes, so total length shrinks by the transition duration. Keep transitions 12 to 20 frames at 30 fps.

## Fonts and brand

Load fonts with `@remotion/google-fonts` or `@remotion/fonts` so they are ready before the first frame. Keep colors, fonts and logo in one `brand.ts` so a rebrand is a one-file change.

## Performance and rendering

- Preview in the studio; render from the CLI.
- `--concurrency=50%` limits CPU use. `--codec=h264` is default; use `--codec=prores` for editing handoff.
- Heavy blur, shadows and large SVG filters are slow. Prefer pre-rendered assets for those.
- Use `<OffthreadVideo>` instead of `<video>` for source footage to get frame-accurate extraction.
- For quick drafts: `--scale=0.5` and a `--frames=0-90` range.

## Common mistakes

| Mistake | Fix |
|---|---|
| Flicker or missing image at render | Use `<Img>`, `staticFile`, and `delayRender` for async data |
| Animation differs between preview and render | Remove non-deterministic code (time, random) |
| Text overflows on different locales | Set explicit widths; test the longest string |
| Video too long after adding transitions | Subtract transition frames from the total |
| Audio is silent in render | Check the file path and that the `<Audio>` is inside an active `<Sequence>` |

Pair with `motion-design-craft` for timing and easing choices.

Wersje

W bazie nie ma innych skilli o nazwie remotion-programmatic-video.

Migawka bazy z 13.11.2026 · wersja paczki ca59d5f182fb (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 1 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100remotion-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.
  • 95Remotion
    Zamienia treści w animacje MP4 przez Remotion w React: kompozycje, motion graphics i nakładki wideo.
  • 100remotion
    Zawiera bazę wiedzy o Remotion: programowe tworzenie wideo w React, renderowanie, kompozycje i animacje, np. do klipów społecznościowych.
  • 100remotion-video-agent
    Tworzy i edytuje filmy Remotion, animacje wyjaśniające, grafiki motion, renderowane MP4 i GIF oraz szablony wideo w React.
  • 100remotion
    Podaje dobre praktyki tworzenia wideo w Reactcie z Remotion: kompozycje, sekwencje i animacje.
  • 100remotion-video
    Buduje kompozycje React w Remotion i renderuje je przez CLI lub @remotion/renderer: wideo sterowane danymi, MP4 i GIF z kodu, animacje, synchronizacja z dźwiękiem i szablony na rekord.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.