Remotion Claude Skill 문서
개요
Remotion Claude Skill은 Claude AI 내에서 직접 프로그래매틱 방식으로 비디오를 생성하고 렌더링할 수 있는 종합적인 TypeScript 모듈입니다. React 컴포넌트를 사용하여 비디오 구성을 생성, 관리 및 렌더링하는 직관적인 API를 제공합니다.
기능
- ✅ 비디오 구성 생성 - React 컴포넌트로 비디오 프로젝트 정의
- ✅ 구성 관리 - 비디오 구성 등록, 검색 및 구성
- ✅ 렌더 대기열 관리 - 구성을 배치 렌더링을 위해 대기열에 추가
- ✅ 다양한 출력 포맷 - h264, h265, VP8, VP9, ProRes, PNG 시퀀스 지원
- ✅ 템플릿 시스템 - 일반적인 비디오 패턴을 위한 사전 구축 템플릿
- ✅ 컴포넌트 라이브러리 - TextOverlay 및 애니메이션과 같은 즉시 사용 가능한 컴포넌트
- ✅ 타입 안전성 - 포괄적인 인터페이스를 갖춘 완벽한 TypeScript 지원
설치
# Remotion 저장소 클론
git clone https://github.com/remotion-dev/remotion.git
cd remotion
# 의존성 설치
bun install
# 스킬은 다음 경로에서 사용 가능:
packages/skills-evals/remotion-claude-skill.ts
빠른 시작
1. 스킬 인스턴스 생성
import { createRemotionSkill } from './remotion-claude-skill';
const skill = createRemotionSkill({
projectName: 'my-video-project',
width: 1920,
height: 1080,
fps: 30,
durationInFrames: 150,
});
2. React 컴포넌트 생성
import React from 'react';
export const MyVideo: React.FC<{ title: string }> = ({ title }) => {
return (
<div style={{
flex: 1,
backgroundColor: '#000',
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
fontSize: 100,
color: '#fff',
fontWeight: 'bold',
}}>
{title}
</div>
);
};
3. 구성 등록
skill.createComposition(
'my-video',
'My Video Title',
MyVideo,
{
durationInFrames: 150,
fps: 30,
width: 1920,
height: 1080,
defaultProps: { title: 'Hello World' },
}
);
4. 렌더링 대기열에 추가
skill.queueForRender('my-video', {
codec: 'h264',
outputLocation: './output/my-video.mp4',
overwrite: true,
});
5. 메타데이터 가져오기
const metadata = skill.getMetadata();
console.log(metadata);
// {
// name: 'Remotion Claude Skill',
// version: '1.0.0',
// compositionsCount: 1,
// queueLength: 1,
// ...
// }
API 참조
RemotionClaudeSkill 클래스
생성자
constructor(config: RemotionSkillConfig)
제공된 구성으로 새 스킬 인스턴스를 생성합니다.
매개변수:
config: width, height, fps, durationInFrames, projectName이 포함된 구성 객체
메서드
createComposition(id, name, component, options?): CompositionDefinition
새 구성을 생성하고 등록합니다.
skill.createComposition(
'intro',
'Intro Sequence',
IntroComponent,
{
durationInFrames: 200,
fps: 60,
width: 1920,
height: 1080,
defaultProps: { subtitle: 'My Project' },
}
);
registerComposition(definition): void
이미 정의된 구성을 등록합니다.
const composition: CompositionDefinition = {
id: 'outro',
name: 'Outro Sequence',
component: OutroComponent,
durationInFrames: 150,
fps: 30,
width: 1920,
height: 1080,
};
skill.registerComposition(composition);
getCompositions(): CompositionDefinition[]
등록된 모든 구성을 반환합니다.
const all = skill.getCompositions();
console.log(`Total compositions: ${all.length}`);
getComposition(id): CompositionDefinition | undefined
특정 구성을 ID로 가져옵니다.
const intro = skill.getComposition('intro');
if (intro) {
console.log(`Found: ${intro.name}`);
}
queueForRender(compositionId, options): void
렌더링을 위해 구성을 대기열에 추가합니다.
skill.queueForRender('intro', {
codec: 'h264',
outputLocation: './videos/intro.mp4',
crf: 18,
concurrency: 4,
overwrite: true,
});
getRenderQueue(): RenderOptions[]
대기열에 있는 모든 렌더 작업을 반환합니다.
const queue = skill.getRenderQueue();
console.log(`Queued jobs: ${queue.length}`);
clearRenderQueue(): void
대기열에 있는 모든 렌더 작업을 지웁니다.
skill.clearRenderQueue();
getMetadata(): object
스킬 메타데이터와 통계를 반환합니다.
const metadata = skill.getMetadata();
console.log(metadata.capabilities);
generateTemplate(type?): string
비디오 컴포넌트에 대한 템플릿을 생성합니다.
// 옵션: 'intro' | 'animation' | 'slideshow'
const template = skill.generateTemplate('animation');
console.log(template);
인터페이스
RemotionSkillConfig
interface RemotionSkillConfig {
projectName: string;
width: number;
height: number;
fps: number;
durationInFrames: number;
}
CompositionDefinition
interface CompositionDefinition {
id: string;
name: string;
component: React.ComponentType;
durationInFrames: number;
fps: number;
width: number;
height: number;
defaultProps?: Record<string, unknown>;
}
RenderOptions
interface RenderOptions {
codec: 'h264' | 'h265' | 'vp8' | 'vp9' | 'prores' | 'png';
pixelFormat?: 'yuv420p' | 'yuv422p' | 'yuv444p';
crf?: number;
audioBitrate?: string;
videoBitrate?: string;
outputLocation: string;
concurrency?: number;
overwrite?: boolean;
logFn?: (message: string) => void;
errorFn?: (error: Error) => void;
}
내장 컴포넌트
TextOverlay
간단한 텍스트 오버레이 컴포넌트입니다.
import { TextOverlay } from './remotion-claude-skill';
export const MyVideo = () => (
<TextOverlay
text="Hello Claude!"
fontSize={80}
color="#fff"
backgroundColor="rgba(0,0,0,0.7)"
/>
);
애니메이션 유틸리티
createFadeInAnimation
페이드 인 애니메이션을 위한 CSS를 생성합니다.
import { createFadeInAnimation } from './remotion-claude-skill';
const animation = createFadeInAnimation(150, 30);
// 반환값: "@keyframes fadeIn { ... }"
템플릿
소개 템플릿
const template = skill.generateTemplate('intro');
검은 배경에 표시되는 간단한 텍스트 제목을 생성합니다.
애니메이션 템플릿
const template = skill.generateTemplate('animation');
스프링 애니메이션과 크기 조절 효과를 보여줍니다.
슬라이드쇼 템플릿
const template = skill.generateTemplate('slideshow');
슬라이드쇼 효과를 위한 여러 시퀀스를 만드는 방법을 보여줍니다.
전체 예제
import React from 'react';
import { createRemotionSkill, TextOverlay } from './remotion-claude-skill';
import { useCurrentFrame, useVideoConfig } from 'remotion';
// 스킬 인스턴스 생성
const skill = createRemotionSkill({
projectName: 'demo',
width: 1920,
height: 1080,
fps: 30,
durationInFrames: 300,
});
// 컴포넌트 정의
const DemoVideo: React.FC<{ message: string }> = ({ message }) => {
const frame = useCurrentFrame();
const { durationInFrames, fps } = useVideoConfig();
const progress = frame / durationInFrames;
const opacity = Math.min(progress * 2, 1);
return (
<div style={{
flex: 1,
backgroundColor: '#1a1a2e',
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
opacity,
}}>
<TextOverlay
text={message}
fontSize={100}
color="#00d4ff"
backgroundColor="rgba(0,0,0,0.8)"
/>
</div>
);
};
// 구성 등록
skill.createComposition('demo', 'Demo Video', DemoVideo, {
durationInFrames: 300,
fps: 30,
width: 1920,
height: 1080,
defaultProps: { message: 'Welcome to Remotion + Claude' },
});
// 렌더링 대기열에 추가
skill.queueForRender('demo', {
codec: 'h264',
outputLocation: './output/demo.mp4',
crf: 18,
overwrite: true,
});
// 메타데이터 확인
console.log(skill.getMetadata());
고급 기능
여러 구성
skill.createComposition('intro', 'Intro', IntroComponent, {...});
skill.createComposition('main', 'Main Content', MainComponent, {...});
skill.createComposition('outro', 'Outro', OutroComponent, {...});
// 모두 렌더링 대기열에 추가
for (const comp of skill.getCompositions()) {
skill.queueForRender(comp.id, {
codec: 'h264',
outputLocation: `./videos/${comp.id}.mp4`,
overwrite: true,
});
}
사용자 정의 Props
interface VideoProps {
title: string;
subtitle: string;
duration: number;
}
const MyVideo: React.FC<VideoProps> = ({ title, subtitle, duration }) => {
// 컴포넌트 코드
};
skill.createComposition('custom', 'Custom Video', MyVideo, {
defaultProps: {
title: 'My Title',
subtitle: 'My Subtitle',
duration: 5,
},
});
조건부 렌더링
const ConditionalVideo: React.FC<{ showSubtitle?: boolean }> = ({ showSubtitle }) => {
return (
<div>
<h1>Main Content</h1>
{showSubtitle && <h2>Subtitle</h2>}
</div>
);
};
모범 사례
- TypeScript 사용 - 컴포넌트와 Props에 대한 완전한 타입 안전성 활용
- 재사용 가능한 컴포넌트 생성 - 일반적인 패턴을 위한 컴포넌트 라이브러리 구축
- 성능 최적화 - 무거운 계산에는 메모이제이션 사용
- 배치 렌더링 - 시작 오버헤드를 줄이기 위해 여러 구성을 대기열에 추가
- 오류 처리 - RenderOptions의
errorFn을 사용한 오류 처리 - Props 검증 - Default props와 사용자 입력 항상 검증
문제 해결
구성을 찾을 수 없음
try {
skill.queueForRender('nonexistent', {...});
} catch (error) {
console.error('Composition not found:', error.message);
}
렌더 대기열 관리
// 새 작업을 추가하기 전에 대기열 지우기
skill.clearRenderQueue();
// 대기열 길이 확인
console.log(`Pending renders: ${skill.getRenderQueue().length}`);
구성 검증
const config = skill.getMetadata();
console.log('Current Configuration:');
console.log(`- Resolution: ${config.config.width}x${config.config.height}`);
console.log(`- FPS: ${config.config.fps}`);
console.log(`- Duration: ${config.config.durationInFrames} frames`);
Claude와의 통합
Claude 대화에서
- 스킬을 참조하여 대화형으로 비디오 생성
- 실시간으로 컴포넌트 수정
- 비교를 위해 여러 버전을 대기열에 추가
- 구성을 JSON으로 내보내기
Claude 상호작용 예시
User: "Create an intro video for my podcast"
Claude: I'll create an intro video using the Remotion Claude Skill.
skill.createComposition('podcast-intro', 'Podcast Intro', PodcastIntro, {
durationInFrames: 180,
fps: 30,
width: 1920,
height: 1080,
defaultProps: {
podcastName: 'Your Podcast Name',
tagline: 'Conversations that Matter',
},
});
리소스 링크
라이선스
이 스킬은 Remotion과 동일한 라이선스를 따릅니다. 자세한 내용은 LICENSE.md를 참조하세요.
기여
이 스킬 개선에 기여하려면:
- 저장소를 포크하세요
- 기능 브랜치를 만드세요
- 변경 사항을 적용하세요
- 풀 리퀘스트를 제출하세요
자세한 내용은 CONTRIBUTING.md를 참조하세요.
지원
- 📖 문서
- 💬 Discord 커뮤니티
- 🐛 이슈 트래커
- 🌐 웹사이트