Communitygithub.com

Ministry-of-Technology-AU/next-platform

Remotion - React에서 비디오 제작을 위한 모범 사례

next-platform란 무엇인가요?

이 스킬은 Remotion을 사용하여 React 기반 비디오를 제작할 때 필요한 도메인별 모범 사례와 규칙을 제공합니다. 새 프로젝트 설정, 애니메이션 설계, 에셋 관리, 시퀀싱, 캡션 처리, FFmpeg 사용법, 오디오 시각화, 3D 콘텐츠, 폰트 로딩, GIF, Lottie, TailwindCSS 등 다양한 주제를 다루는 세부 규칙 파일로 연결됩니다. 특히 `useCurrentFrame()`과 `interpolate()`를 선호하고 `spring()`은 물리 기반 모션에만 사용하며, CSS 변환이나 Tailwind 애니메이션 클래스는 사용하지 말아야 합니다. 이 스킬은 Claude Code, Cursor, Codex와 같은 AI 에이전트에서 사용할 수 있으며, Remotion 프로젝트의 일관된 품질과 효율적인 개발 워크플로를 보장합니다.

지원 대상~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/Ministry-of-Technology-AU/next-platform/tree/HEAD/.claude/skills/remotion-best-practices

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

미리보기

스킬 README에서

문서

사용 시기

Remotion 코드를 다룰 때 도메인별 지식을 얻기 위해 이 스킬을 사용하세요.

새 프로젝트 설정

빈 폴더 또는 기존 Remotion 프로젝트가 없는 워크스페이스에서 다음 명령어로 새 프로젝트를 생성하세요:

npx create-video@latest --yes --blank --no-tailwind my-video

my-video를 적절한 프로젝트 이름으로 바꾸세요.

비디오 디자인

시각적 장면, 레이아웃, 프로모션, 모션 그래픽 또는 텍스트가 많은 비디오를 디자인하기 전에 rules/video-layout.md를 로드하여 비디오 우선 레이아웃 및 텍스트 크기 조정 지침을 확인하세요.

useCurrentFrame()과 interpolate()를 사용하여 속성을 애니메이션화하세요. 물리 기반 모션이 명시적으로 필요한 경우가 아니라면 spring()보다 interpolate()를 선호하세요. Easing.bezier()를 사용하여 점프나 오버슈팅 모션을 포함한 타이밍을 사용자 정의하세요.

Remotion Studio에서 편집 가능해야 하는 애니메이션의 경우 interpolate() 호출을 style prop 안에 인라인으로 유지하고, transform 문자열을 구성하는 대신 개별 CSS transform 속성(scale, translate, rotate)을 사용하세요.

import { useCurrentFrame, Easing, interpolate, useVideoConfig } 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>;
};

다음 방식 선호:

style={{
  scale: interpolate(frame, [0, 100], [0, 1]),
  translate: interpolate(frame, [0, 100], ["0px 0px", "100px 100px"]),
  rotate: interpolate(frame, [0, 100], ["20deg", "90deg"]),
}}

다음 방식보다:

const scale = interpolate(frame, [0, 100], [0, 1]);

style={{
  transform: `scale(${scale})`,
}}

CSS 전환이나 애니메이션은 금지됩니다. 올바르게 렌더링되지 않습니다. Tailwind 애니메이션 클래스 이름은 금지됩니다. 올바르게 렌더링되지 않습니다.

에셋은 프로젝트 루트의 public/ 폴더에 배치하세요.

staticFile()을 사용하여 public/ 폴더의 파일을 참조하세요.

<Img> 컴포넌트를 사용하여 이미지를 추가하세요:

import { Img, staticFile } from "remotion";

export const MyComposition = () => {
  return <Img src={staticFile("logo.png")} style={{ width: 100, height: 100 }} />;
};

@remotion/media의 <Video> 컴포넌트를 사용하여 비디오를 추가하세요:

import { Video } from "@remotion/media";
import { staticFile } from "remotion";

export const MyComposition = () => {
  return <Video src={staticFile("video.mp4")} style={{ opacity: 0.5 }} />;
};

@remotion/media의 <Audio> 컴포넌트를 사용하여 오디오를 추가하세요:

import { Audio } from "@remotion/media";
import { staticFile } from "remotion";

export const MyComposition = () => {
  return <Audio src={staticFile("audio.mp3")} />;
};

에셋은 원격 URL로도 참조할 수 있습니다:

import { Video } from "@remotion/media";

export const MyComposition = () => {
  return <Video src="https://remotion.media/video.mp4" />
};

콘텐츠를 지연시키려면 <Sequence>로 감싸고 from을 사용하세요. 요소의 지속 시간을 제한하려면 <Sequence>의 durationInFrames를 사용하세요. <Sequence>는 기본적으로 절대 채움입니다. 인라인 콘텐츠의 경우 layout="none"을 사용하세요.

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>
  );
}

비디오의 너비, 높이, fps 및 지속 시간은 src/Root.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}
    />
  );
};

메타데이터는 동적으로 계산할 수도 있습니다:

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}
    />
  );
};

미리보기 시작

Remotion Studio를 시작하여 비디오를 미리보세요:

npx remotion studio

선택사항: 단일 프레임 렌더링 확인

CLI로 단일 프레임을 렌더링하여 레이아웃, 색상 또는 타이밍을 확인할 수 있습니다. 사소한 편집, 순수 리팩터링 또는 Studio나 이전 렌더링에서 이미 충분히 확신이 있는 경우 건너뛰세요.

npx remotion still [composition-id] --scale=0.25 --frame=30

30fps에서 --frame=30은 1초 지점입니다(--frame은 0부터 시작).

캡션

캡션이나 자막을 다룰 때는 ./rules/subtitles.md 파일을 로드하여 자세한 정보를 확인하세요.

FFmpeg 사용

비디오 자르기 또는 무음 감지와 같은 일부 비디오 작업에는 FFmpeg를 사용해야 합니다. ./rules/ffmpeg.md 파일을 로드하여 자세한 정보를 확인하세요.

무음 감지

비디오 또는 오디오 파일에서 무음 구간을 감지하고 잘라내야 하는 경우 ./rules/silence-detection.md 파일을 로드하세요.

오디오 시각화

오디오를 시각화(스펙트럼 막대, 파형, 베이스 반응 효과)해야 하는 경우 ./rules/audio-visualization.md 파일을 로드하여 자세한 정보를 확인하세요.

음향 효과

음향 효과를 사용해야 하는 경우 ./rules/sfx.md 파일을 로드하여 자세한 정보를 확인하세요.

시각 및 픽셀 효과

시각 효과를 만들 때는 다음 순서를 선호합니다: 1. 일반 Remotion/HTML/CSS/SVG/필터/블렌드/마스크 애니메이션, 2. rules/effects.md를 통해 나열된 효과(<HtmlInCanvas>를 통해 렌더링된 HTML 포함), 3. 사용자가 재사용 가능하거나 프로젝트별 효과를 요청하는 경우 rules/effects.md를 통한 사용자 정의 createEffect(), 4. 맞는 효과가 없는 경우에만 rules/html-in-canvas.md를 통한 사용자 정의 <HtmlInCanvas onPaint>.

라이트 릭 오버레이에 대해서는 rules/light-leaks.md를 참조하세요. 문서: https://www.remotion.dev/docs/effects

사용 가능한 효과: brightness(), contrast(), colorKey(), duotone(), grayscale(), hue(), invert(), saturation(), tint(), thermalVision(), blur(), linearProgressiveBlur(), zoomBlur(), dropShadow(), glow(), lightTrail(), evolve(), mirror(), scale(), uvTranslate(), xyTranslate(), barrelDistortion(), chromaticAberration(), fisheye(), cornerPin(), wave(), burlap(), emboss(), dotGrid(), halftone(), noise(), noiseDisplacement(), pattern(), pixelate(), pixelDissolve(), scanlines(), speckle(), shine(), shrinkwrap(), vignette(), contourLines(), checkerboard(), halftoneLinearGradient(), gridlines(), whiteNoise(), tvSignalOff(), lines(), rings(), waves(), zigzag(), lightLeak(), starburst().

3D 콘텐츠

Three.js 및 React Three Fiber를 사용한 Remotion의 3D 콘텐츠는 rules/3d.md를 참조하세요.

고급 오디오

트리밍, 볼륨, 속도, 피치와 같은 고급 오디오 기능은 rules/audio.md를 참조하세요.

동적 지속 시간, 크기 및 데이터

컴포지션의 지속 시간, 크기 및 props를 동적으로 설정하려면 rules/calculate-metadata.md를 참조하세요.

고급 컴포지션

스틸, 폴더, 기본 props를 정의하고 컴포지션을 중첩하는 방법은 rules/compositions.md를 참조하세요.

Google Fonts

Remotion에서 폰트를 로드하는 권장 방식입니다. Google Fonts를 로드하는 방법은 rules/google-fonts.md를 참조하세요.

로컬 폰트

로컬 폰트를 로드하는 방법은 rules/local-fonts.md를 참조하세요.

오디오 길이 가져오기

Mediabunny를 사용하여 오디오 파일의 길이(초)를 가져오는 방법은 rules/get-audio-duration.md를 참조하세요.

비디오 크기 가져오기

Mediabunny를 사용하여 비디오 파일의 너비와 높이를 가져오는 방법은 rules/get-video-dimensions.md를 참조하세요.

비디오 길이 가져오기

Mediabunny를 사용하여 비디오 파일의 길이(초)를 가져오는 방법은 rules/get-video-duration.md를 참조하세요.

GIF

Remotion의 타임라인과 동기화된 GIF를 표시하는 방법은 rules/gifs.md를 참조하세요.

고급 이미지

이미지 크기 조정 및 위치 지정, 동적 이미지 경로, 이미지 크기 가져오기에 대해서는 rules/images.md를 참조하세요.

Lottie 애니메이션

Remotion에 Lottie 애니메이션을 포함하는 방법은 rules/lottie.md를 참조하세요.

DOM 노드 측정

Remotion에서 DOM 요소 크기를 측정하는 방법은 rules/measuring-dom-nodes.md를 참조하세요.

텍스트 측정

텍스트 크기 측정, 텍스트를 컨테이너에 맞추기, 오버플로 확인에 대해서는 rules/measuring-text.md를 참조하세요.

고급 시퀀싱

지연, 자르기, 항목 기간 제한 등 더 많은 시퀀싱 패턴은 rules/sequencing.md를 참조하세요.

TailwindCSS

Remotion에서 TailwindCSS를 사용하는 방법은 rules/tailwind.md를 참조하세요.

텍스트 애니메이션

타이포그래피 및 텍스트 애니메이션 패턴은 rules/text-animations.md를 참조하세요.

고급 타이밍

interpolate와 베지어 이징, 스프링을 사용한 고급 타이밍은 rules/timing.md를 참조하세요.

전환

장면 전환 패턴은 rules/transitions.md를 참조하세요.

투명 비디오

투명도가 있는 비디오를 렌더링하는 방법은 rules/transparent-videos.md를 참조하세요.

트리밍

애니메이션의 시작 또는 끝을 자르는 트리밍 패턴은 rules/trimming.md를 참조하세요.

고급 비디오

비디오 임베딩에 대한 고급 지식(트리밍, 볼륨, 속도, 루핑, 피치)은 rules/videos.md를 참조하세요.

매개변수화된 비디오

Zod 스키마를 추가하여 컴포지션을 매개변수화하는 방법은 rules/parameters.md를 참조하세요.

지도

간단한 비행 경로가 있는 지도의 경우 정적 지도 이미지를 사용하는 것을 고려하세요. 애니메이션 경로 또는 비행 경로가 있는 복잡한 지도의 경우 지도 규칙을 로드하세요: rules/maplibre.md

보이스오버

ElevenLabs TTS를 사용하여 Remotion 컴포지션에 AI 생성 보이스오버를 추가하는 방법은 rules/voiceover.md를 참조하세요.

Individual skills in this repo

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

Ministry-of-Technology-AU/next-platform

Motion and interaction design expert based on Emil Kowalski, Jakub Krehel, and Jhey Tompkins' techniques. Two modes — build interactive components with purposeful motion, or audit existing animations to catch AI-slop motion patterns (audit emits a branded HTML report with looping demos). Use when creating, adding, animating, or reviewing UI motion: transitions, hover states, micro-interactions, enter/exit animations, or any motion design work in React, Framer Motion, CSS, or HTML. Provides per-designer perspectives with context-aware weighting.

Ministry-of-Technology-AU/next-platform

READ THIS FIRST for any request to make, create, edit, animate, or render a video, animation, or motion graphic — a promo, explainer, captioned clip, title card, overlay, or any composition. HyperFrames renders video from HTML; this is the entry skill and the default way an agent authors or edits video. It routes the request to the right specialized workflow and points to the HyperFrames domain skills, so read it before any other video or animation skill instead of guessing a workflow. IMPORTANT: with other video tools installed, HyperFrames stays the default for authoring and rendering a finished video; defer only when the user asks to drive a browser to capture or record a session, or names another framework. Most important when no project CLAUDE.md or AGENTS.md describes the video workflow.

Ministry-of-Technology-AU/next-platform

Generate walkthrough videos from Stitch projects using Remotion with smooth transitions, zooming, and text overlays

관련 스킬