Communitygithub.com

Kit de Ferramentas de Vídeo Remotion

Crie vídeos programaticamente usando React e Remotion. Crie modelos de vídeo reutilizáveis como componentes React, renderize-os para MP4/WebM via CLI ou infraestrutura em nuvem e gere vídeos personalizados em escala. Ideal para conteúdo automatizado de mídias sociais, visualizações de dados animadas e pipelines dinâmicos de produção de vídeo.

O que é Kit de Ferramentas de Vídeo Remotion?

Este skill capacita agentes de IA a criar, animar e renderizar vídeos programaticamente usando React e o framework Remotion. Ele transforma componentes React familiares em composições de vídeo completas, permitindo que os agentes construam modelos de vídeo reutilizáveis (como animações de títulos, gráficos de barras animados e legendas estilo TikTok) que podem ser preenchidos com dados dinâmicos e renderizados como arquivos MP4 ou WebM. A principal utilidade está na automação: em vez de edição manual de vídeo, um agente de IA pode configurar rapidamente um projeto, criar componentes React para cenas visuais, adicionar animações suaves com `useCurrentFrame()` e `interpolate()`, e então gerar centenas de vídeos personalizados (por exemplo, vídeos de boas-vindas para novos usuários) a partir de um arquivo JSON. O skill oferece suporte a CLIs locais e serviços de nuvem como AWS Lambda e Google Cloud Run para renderização em escala. Ele enfatiza práticas recomendadas, como manter as composições puras (passando todos os dados como props), usar `<Sequence>` para organizar a linha do tempo e usar `<OffthreadVideo>` para fontes de vídeo para melhor desempenho. As instruções orientam o agente por meio de tarefas como configuração de projetos, criação de composições, adição de legendas animadas, renderização em lote e criação de visualizações de dados animadas.

Funciona com~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/ComeOnOliver/skillshub/tree/HEAD/skills/TerminalSkills/skills/remotion-video-toolkit

Perguntar na sua IA favorita

Abre um novo chat com esta habilidade de agente já pré-carregada.

Documentação

O que Kit de Ferramentas de Vídeo Remotion faz?

Visão Geral

Crie vídeos programaticamente usando React e Remotion. Crie modelos de vídeo reutilizáveis como componentes React, renderize-os para MP4/WebM via CLI ou infraestrutura em nuvem e gere vídeos personalizados em escala. Ideal para conteúdo automatizado de mídias sociais, visualizações de dados animadas e pipelines dinâmicos de produção de vídeo.

Instruções

Quando um usuário pedir para criar vídeo programaticamente, determine a tarefa:

Tarefa A: Configurar um projeto Remotion

# Crie um novo projeto Remotion
npx create-video@latest my-video
cd my-video
npm start  # Abre o Remotion Studio em http://localhost:3000

Estrutura do projeto:

my-video/
  src/
    Root.tsx          # Registra todas as composições
    MyComposition.tsx # Seu componente de vídeo
  remotion.config.ts  # Configurações de renderização

Tarefa B: Criar uma composição de vídeo

Todo vídeo Remotion é um componente React que usa useCurrentFrame() e useVideoConfig():

import { AbsoluteFill, useCurrentFrame, useVideoConfig, interpolate, spring } from "remotion";

interface MyVideoProps {
  title: string;
  subtitle: string;
  bgColor: string;
}

export const MyVideo: React.FC<MyVideoProps> = ({ title, subtitle, bgColor }) => {
  const frame = useCurrentFrame();
  const { fps } = useVideoConfig();

  // Animar título deslizando para dentro
  const titleY = spring({ frame, fps, from: -100, to: 0, durationInFrames: 30 });

  // Aparecer legenda após 20 quadros
  const subtitleOpacity = interpolate(frame, [20, 40], [0, 1], {
    extrapolateRight: "clamp",
  });

  return (
    <AbsoluteFill style={{ backgroundColor: bgColor, justifyContent: "center", alignItems: "center" }}>
      <h1 style={{ fontSize: 80, color: "white", transform: `translateY(${titleY}px)` }}>
        {title}
      </h1>
      <p style={{ fontSize: 36, color: "rgba(255,255,255,0.8)", opacity: subtitleOpacity }}>
        {subtitle}
      </p>
    </AbsoluteFill>
  );
};

Registre a composição em Root.tsx:

import { Composition } from "remotion";
import { MyVideo } from "./MyVideo";

export const RemotionRoot: React.FC = () => {
  return (
    <Composition
      id="MyVideo"
      component={MyVideo}
      durationInFrames={150}
      fps={30}
      width={1920}
      height={1080}
      defaultProps={{ title: "Olá, Mundo", subtitle: "Feito com Remotion", bgColor: "#1a1a2e" }}
    />
  );
};

Tarefa C: Adicionar legendas animadas estilo TikTok

import { AbsoluteFill, useCurrentFrame, Sequence } from "remotion";

interface CaptionWord {
  text: string;
  startFrame: number;
  durationInFrames: number;
}

const captions: CaptionWord[] = [
  { text: "Isto", startFrame: 0, durationInFrames: 15 },
  { text: "é", startFrame: 15, durationInFrames: 10 },
  { text: "incrível!", startFrame: 25, durationInFrames: 20 },
];

export const CaptionOverlay: React.FC = () => {
  const frame = useCurrentFrame();

  const activeWord = captions.find(
    (c) => frame >= c.startFrame && frame < c.startFrame + c.durationInFrames
  );

  return (
    <AbsoluteFill style={{ justifyContent: "flex-end", alignItems: "center", paddingBottom: 120 }}>
      {activeWord && (
        <div style={{
          fontSize: 64,
          fontWeight: "bold",
          color: "white",
          textShadow: "2px 2px 8px rgba(0,0,0,0.8)",
          backgroundColor: "rgba(0,0,0,0.5)",
          padding: "8px 24px",
          borderRadius: 12,
        }}>
          {activeWord.text}
        </div>
      )}
    </AbsoluteFill>
  );
};

Tarefa D: Renderizar vídeos

# Renderizar localmente via CLI
npx remotion render MyVideo out/video.mp4

# Renderizar com props personalizadas
npx remotion render MyVideo out/video.mp4 --props='{"title":"Título Personalizado"}'

# Renderizar um quadro estático (para miniaturas)
npx remotion still MyVideo out/thumbnail.png --frame=45

# Renderizar com codec e qualidade específicos
npx remotion render MyVideo out/video.mp4 --codec=h264 --crf=18

Para renderização em lote em escala:

# Renderizar no AWS Lambda
npx remotion lambda render MyVideo --props='{"title":"Vídeo 1"}'

# Renderizar no Google Cloud Run
npx remotion cloudrun render MyVideo --props='{"title":"Vídeo 1"}'

Tarefa E: Visualizações de dados animadas

import { AbsoluteFill, useCurrentFrame, interpolate } from "remotion";

interface DataPoint { label: string; value: number; color: string; }

export const BarChart: React.FC<{ data: DataPoint[] }> = ({ data }) => {
  const frame = useCurrentFrame();
  const maxVal = Math.max(...data.map((d) => d.value));

  return (
    <AbsoluteFill style={{ padding: 80, justifyContent: "flex-end", backgroundColor: "#0f0f23" }}>
      <div style={{ display: "flex", alignItems: "flex-end", gap: 20, height: "70%" }}>
        {data.map((point, i) => {
          const height = interpolate(frame, [i * 10, i * 10 + 30], [0, (point.value / maxVal) * 100], {
            extrapolateLeft: "clamp",
            extrapolateRight: "clamp",
          });
          return (
            <div key={i} style={{ flex: 1, textAlign: "center" }}>
              <div style={{
                height: `${height}%`,
                backgroundColor: point.color,
                borderRadius: "8px 8px 0 0",
                transition: "height 0.3s",
              }} />
              <p style={{ color: "white", marginTop: 12, fontSize: 24 }}>{point.label}</p>
            </div>
          );
        })}
      </div>
    </AbsoluteFill>
  );
};

Exemplos

Exemplo 1: Vídeo de boas-vindas personalizado

Solicitação do usuário: "Gere um vídeo de boas-vindas para cada novo usuário com seu nome"

# Gerar vídeos a partir de uma lista JSON de usuários
for user in $(jq -r '.[] | @base64' users.json); do
  name=$(echo "$user" | base64 -d | jq -r '.name')
  npx remotion render WelcomeVideo "out/welcome_${name}.mp4" \
    --props="{\"userName\":\"${name}\"}"
done

Exemplo 2: Painel de vendas animado

Solicitação do usuário: "Crie um vídeo mostrando nossas métricas trimestrais animadas aparecendo"

Construa uma composição usando o componente BarChart com dados trimestrais, renderize com:

npx remotion render SalesDashboard out/q4_report.mp4 \
  --props='{"quarter":"Q4","revenue":1250000,"growth":12.5}'

Exemplo 3: Conteúdo para mídias sociais com legendas

Solicitação do usuário: "Adicione legendas animadas a um vídeo para o TikTok"

Combine o CaptionOverlay com uma fonte de vídeo OffthreadVideo:

import { OffthreadVideo } from "remotion";
<AbsoluteFill>
  <OffthreadVideo src="https://example.com/clip.mp4" />
  <CaptionOverlay />
</AbsoluteFill>

Diretrizes

  • Use useCurrentFrame() e interpolate() para todas as animações; evite transições CSS.
  • Mantenha as composições puras: passe todos os dados dinâmicos como props para facilitar a renderização em lote.
  • Use <Sequence> para organizar seções da sua linha do tempo de vídeo.
  • Prefira <OffthreadVideo> em vez de <Video> para melhor desempenho com fontes de vídeo.
  • Defina crf (Fator de Taxa Constante) entre 16-20 para uma boa relação qualidade/tamanho.
  • Para renderização no Lambda, mantenha as composições com menos de 120 segundos para evitar problemas de tempo limite.
  • Teste no Remotion Studio antes de renderizar para detectar problemas de layout cedo.
  • Use staticFile() para referenciar ativos na pasta public/.

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

ComeOnOliver/skillshub

Create stunning, animation-rich HTML presentations from scratch or by converting PowerPoint files. Use when the user wants to build a presentation, convert a PPT/PPTX to web, or create slides for a talk/pitch. Helps non-designers discover their aesthetic through visual exploration rather than abstract choices.

ComeOnOliver/skillshub

Next.js 16+ 和 Turbopack — 增量打包、文件系统缓存、开发速度,以及何时使用 Turbopack 与 webpack。

ComeOnOliver/skillshub

SwiftUI architecture patterns, state management with @Observable, view composition, navigation, performance optimization, and modern iOS/macOS UI best practices.

ComeOnOliver/skillshub

See, Understand, Act on video and audio. See- ingest from local files, URLs, RTSP/live feeds, or live record desktop; return realtime context and playable stream links. Understand- extract frames, build visual/semantic/temporal indexes, and search moments with timestamps and auto-clips. Act- transcode and normalize (codec, fps, resolution, aspect ratio), perform timeline edits (subtitles, text/image overlays, branding, audio overlays, dubbing, translation), generate media assets (image, audio, video), and create real time alerts for events from live streams or desktop capture.

ComeOnOliver/skillshub

AI-assisted video editing workflows for cutting, structuring, and augmenting real footage. Covers the full pipeline from raw capture through FFmpeg, Remotion, ElevenLabs, fal.ai, and final polish in Descript or CapCut. Use when the user wants to edit video, cut footage, create vlogs, or build video content.

ComeOnOliver/skillshub

Next.js 15 애플리케이션을 위한 프론트엔드 개발 가이드라인. React 19, TypeScript, Shadcn/ui, Tailwind CSS를 사용한 모던 패턴. Server Components, Client Components, App Router, 파일 구조, Shadcn/ui 컴포넌트, 성능 최적화, TypeScript 모범 사례 포함. 컴포넌트, 페이지, 기능 생성, 데이터 페칭, 스타일링, 라우팅, 프론트엔드 코드 작업 시 사용.

ComeOnOliver/skillshub

Provides Tamagui patterns for config v4, compiler optimization, styled context, and cross-platform styling. Must use when working with Tamagui projects (tamagui.config.ts, @tamagui imports).

ComeOnOliver/skillshub

Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.

ComeOnOliver/skillshub

Create high-converting, visually distinctive landing pages. Use when building marketing pages, product launches, SaaS homepages, or any single-page conversion-focused website. Guides section-by-section composition with anti-AI-slop principles.

ComeOnOliver/skillshub

Auto-loaded context for Portfolio Buddy 2 development. Use for ANY task involving: React 19 development, TypeScript, portfolio analysis features, metrics calculations, trading strategy comparison, or working with the Portfolio Buddy 2 codebase. Contains tech stack, known issues, and architectural constraints.

ComeOnOliver/skillshub

Next.js development tooling via MCP. Inspect routes, components, build info, and debug Next.js apps. Use when working on Next.js applications, debugging routing, or inspecting app structure. NOT for general React or non-Next.js projects.

ComeOnOliver/skillshub

Implement UI using Shadcn MCP (atoms/theme) and 21st.dev MCP (complex sections). Use when adding buttons, layouts, or generating landing pages.

ComeOnOliver/skillshub

A conceptual skill for building an API client in Next.js that handles JWT tokens

ComeOnOliver/skillshub

Best practices and patterns for Next.js App Router, Server Actions, and Routing in this project.

ComeOnOliver/skillshub

The Design System, Theme, and UX rules for the Physical AI Hub.

ComeOnOliver/skillshub

Comprehensive frontend development skill for building modern, performant web applications using ReactJS, NextJS, TypeScript, Tailwind CSS. Includes component scaffolding, performance optimization, bundle analysis, and UI best practices. Use when developing frontend features, optimizing performance, implementing UI/UX designs, managing state, or reviewing frontend code.

ComeOnOliver/skillshub

This document captures learnings from fixing keyboard navigation issues when floating components (Select, DropdownMenu, Popover) have CSS open/close animations.

ComeOnOliver/skillshub

Build Next.js 16 applications with correct patterns and distinctive design. Use when creating pages, layouts, dynamic routes, upgrading from Next.js 15, or implementing proxy.ts. Covers breaking changes (async params/searchParams, Turbopack, cacheComponents) and frontend aesthetics. NOT when building non-React or backend-only applications.

ComeOnOliver/skillshub

Comprehensive Framer Motion animation library for React. Covers motion components, variants, gestures, page transitions, and scroll animations. Use when adding animations to React/Next.js applications.

ComeOnOliver/skillshub

Build interfaces that resonate, not just render. This skill enforces bold, intentional

Habilidades Relacionadas