azosi · 2026.7.29 01:45 · 조회 1
Remotion CLI Render
npx remotion render 명령으로 컴포지션을 mp4/mov로 출력하는 방법. 가장 단순·직관적인 렌더링 진입점이다.
🚀 기본 사용법
npx remotion render <entry> <comp-id> <output>
| 인자 | 예시 |
|---|---|
<entry> | src/index.ts (Remotion 엔트리) |
<comp-id> | MyComposition (<Composition id="...">) |
<output> | out.mp4 (출력 파일 경로) |
npx remotion render src/index.ts MyComposition out.mp4
🎛️ 자주 쓰는 옵션
Props 주입
npx remotion render src/index.ts MyComp out.mp4 --props='{"title":"Hello","color":"#f5576c"}'
동시성 조정
# 4개 동시 작업 (CPU 코어 수에 맞춰)
npx remotion render src/index.ts MyComp out.mp4 --concurrency=4
코덱 / 품질
# H.264, 고품질
npx remotion render src/index.ts MyComp out.mp4 --codec=h264 --crf=18
# ProRes (편집용)
npx remotion render src/index.ts MyComp out.mov --codec=prores
# VP9 (WebM)
npx remotion render src/index.ts MyComp out.webm --codec=vp9
PNG 시퀀스 (개별 프레임)
npx remotion render src/index.ts MyComp frames/ --sequence
frames/0001.png, 0002.png, ... 형식으로 저장된다.
스틸 (한 프레임만)
npx remotion still src/index.ts MyComp still.png --frame=30
🖼️ 미리보기 프레임 선택
특정 프레임만 렌더해 미리보기:
npx remotion render src/index.ts MyComp out.mp4 --frames=120-180
📌 0-indexed 프레임 번호. 5초 @ 30fps = 프레임 150
🐛 디버그 옵션
# 크롬 콘솔 로그 보기
npx remotion render src/index.ts MyComp out.mp4 --log=verbose
# 번들 경로 보존
npx remotion render src/index.ts MyComp out.mp4 --bundle-dest=./build
# 커스텀 Chrome
npx remotion render src/index.ts MyComp out.mp4 --browser-executable=/path/to/chrome
🧰 환경변수
| 환경변수 | 설명 |
|---|---|
REMOTION_CHROMIUM_EXECUTABLE_PATH | Chrome 경로 (Docker에서 유용) |
REMOTION_CONCURRENCY | 기본 동시성 |
REMOTION_OUTPUT_LOCATION | 출력 디렉터리 |
REMOTION_BROWSER_EXECUTABLE | 브라우저 경로 |
🔄 여러 영상 한 번에 렌더
JSON props를 바꿔가며 대량 렌더:
for i in {1..10}; do
npx remotion render src/index.ts MyComp "out-$i.mp4" --props="{"id":$i}"
done
또는 스크립트에서:
import { renderMedia } from "@remotion/renderer";
await renderMedia({
composition: { id: "MyComp" },
serveUrl: "https://...",
outputLocation: `out-${i}.mp4`,
inputProps: { id: i },
});
자세한 API: Remotion Server-side Rendering (SSR)
⚠️ 알아둘 점
- 첫 렌더는 느림 — Chrome 설치 + 번들 빌드 때문
- GPU 가속 — Chromium
--enable-gpu플래그로 일부 가속 가능 (정확도 트레이드오프) - 메모리 — 큰 해상도(4K) + 긴 영상은 RAM 8GB+ 권장
- License — 상업용 Remotion은 Remotion License 확인
📚 영역 구분
- 대량·자동화: Remotion Server-side Rendering (SSR)
- 브라우저 내 렌더: Remotion Client-side Rendering
- 클라우드: Remotion Lambda / Cloud Hosting
- 한글 hub: Remotion 렌더링
상위 문서: ← Remotion 렌더링 출처: Remotion 공식 문서 — CLI render 한글화 (2026-07-29) 공급사: Remotion AG
변경 이력
| 날짜 | 변경 |
|---|---|
| 2026-07-29 | 초판 작성 (공식 CLI render 가이드 한글화) |
| 2026-07-29 | 메타데이터 블록을 본문 하단으로 이동 |
댓글
아직 댓글이 없습니다.
댓글을 작성하려면 로그인이 필요합니다.