remotion-render について
inference.sh の belt コマンドラインで React/Remotion のコンポーネントコードを動画にレンダリングするスキルです。アニメーション制作を行う開発者向けで、長さ、サイズ、フレームレート、コーデック、コンポーネントの props を指定できます。
主な機能
- 01React/Remotion コンポーネントコードをレンダリング
- 02動画の長さとフレームレートを設定
- 03出力サイズとコーデックを指定
- 04コンポーネントに props を渡す
- 05Remotion と React のインポートを使用
活用シーン
- 01アニメーションタイトルや文字のレンダリング
- 02カウンターやスプリングアニメーションの制作
- 03連続する動画シーンの構築
- 04カスタム props で合成動画をレンダリング
インストール
コマンドをコピーしてターミナルで実行します。
$
npx skills add https:/ / github.com/ inference-sh/ skills --skill remotion-renderインストール後、Claude Code で/remotion-renderを入力して読み込まれたか確認します。
詳細
belt CLI スキルをインストール:
npx skills add belt-sh/cli
Remotion のレンダリング
Inference.sh CLI を使用して、React/Remotion のコンポーネントコードから動画をレンダリングします。

クイックスタート
inference.sh CLI(
belt)が必要です。インストール手順
belt login
# Render a simple animation
belt app run infsh/remotion-render --input '{
"code": "import { useCurrentFrame, AbsoluteFill } from \"remotion\"; export default function Main() { const frame = useCurrentFrame(); return <AbsoluteFill style={{backgroundColor: \"#000\", display: \"flex\", justifyContent: \"center\", alignItems: \"center\"}}><h1 style={{color: \"white\", fontSize: 100, opacity: frame / 30}}>Hello World</h1></AbsoluteFill>; }",
"duration_seconds": 3,
"fps": 30,
"width": 1920,
"height": 1080
}'
入力スキーマ
| パラメーター | 型 | 必須 | 説明 |
|---|---|---|---|
code | string | はい | React コンポーネントの TSX コードです。コンポーネントをデフォルトエクスポートする必要があります。 |
composition_id | string | いいえ | レンダリングするコンポジション ID |
props | object | いいえ | コンポーネントに渡す props |
width | number | いいえ | 動画の幅(ピクセル) |
height | number | いいえ | 動画の高さ(ピクセル) |
fps | number | いいえ | 1 秒あたりのフレーム数 |
duration_seconds | number | いいえ | 動画の長さ(秒) |
codec | string | いいえ | 出力コーデック |
利用可能なインポート
TSX コードでは、remotion と react からインポートできます。
// Remotion APIs
import {
useCurrentFrame,
useVideoConfig,
spring,
interpolate,
AbsoluteFill,
Sequence,
Audio,
Video,
Img
} from "remotion";
// React
import React, { useState, useEffect } from "react";
例
フェードインテキスト
belt app run infsh/remotion-render --input '{
"code": "import { useCurrentFrame, AbsoluteFill, interpolate } from \"remotion\"; export default function Main() { const frame = useCurrentFrame(); const opacity = interpolate(frame, [0, 30], [0, 1]); return <AbsoluteFill style={{backgroundColor: \"#1a1a2e\", display: \"flex\", justifyContent: \"center\", alignItems: \"center\"}}><h1 style={{color: \"#eee\", fontSize: 80, opacity}}>Welcome</h1></AbsoluteFill>; }",
"duration_seconds": 2,
"fps": 30,
"width": 1920,
"height": 1080
}'
アニメーションカウンター
belt app run infsh/remotion-render --input '{
"code": "import { useCurrentFrame, useVideoConfig, AbsoluteFill } from \"remotion\"; export default function Main() { const frame = useCurrentFrame(); const { fps, durationInFrames } = useVideoConfig(); const progress = Math.floor((frame / durationInFrames) * 100); return <AbsoluteFill style={{backgroundColor: \"#000\", display: \"flex\", justifyContent: \"center\", alignItems: \"center\", flexDirection: \"column\"}}><h1 style={{color: \"#fff\", fontSize: 200}}>{progress}%</h1><p style={{color: \"#666\", fontSize: 30}}>Loading...</p></AbsoluteFill>; }",
"duration_seconds": 5,
"fps": 60,
"width": 1080,
"height": 1080
}'
スプリングアニメーション
belt app run infsh/remotion-render --input '{
"code": "import { useCurrentFrame, useVideoConfig, spring, AbsoluteFill } from \"remotion\"; export default function Main() { const frame = useCurrentFrame(); const { fps } = useVideoConfig(); const scale = spring({ frame, fps, config: { damping: 10, stiffness: 100 } }); return <AbsoluteFill style={{backgroundColor: \"#6366f1\", display: \"flex\", justifyContent: \"center\", alignItems: \"center\"}}><div style={{width: 200, height: 200, backgroundColor: \"white\", borderRadius: 20, transform: `scale(${scale})`}} /></AbsoluteFill>; }",
"duration_seconds": 2,
"fps": 60,
"width": 1080,
"height": 1080
}'
props を使用する場合
belt app run infsh/remotion-render --input '{
"code": "import { AbsoluteFill } from \"remotion\"; export default function Main({ title, subtitle }) { return <AbsoluteFill style={{backgroundColor: \"#000\", display: \"flex\", justifyContent: \"center\", alignItems: \"center\", flexDirection: \"column\"}}><h1 style={{color: \"#fff\", fontSize: 80}}>{title}</h1><p style={{color: \"#888\", fontSize: 40}}>{subtitle}</p></AbsoluteFill>; }",
"props": {"title": "My Video", "subtitle": "Created with Remotion"},
"duration_seconds": 3,
"fps": 30,
"width": 1920,
"height": 1080
}'
シーケンスアニメーション
belt app run infsh/remotion-render --input '{
"code": "import { useCurrentFrame, AbsoluteFill, Sequence, interpolate } from \"remotion\"; function FadeIn({ children }) { const frame = useCurrentFrame(); const opacity = interpolate(frame, [0, 20], [0, 1]); return <div style={{ opacity }}>{children}</div>; } export default function Main() { return <AbsoluteFill style={{backgroundColor: \"#000\", display: \"flex\", justifyContent: \"center\", alignItems: \"center\", flexDirection: \"column\", gap: 20}}><Sequence from={0}><FadeIn><h1 style={{color: \"#fff\", fontSize: 60}}>First</h1></FadeIn></Sequence><Sequence from={30}><FadeIn><h1 style={{color: \"#fff\", fontSize: 60}}>Second</h1></FadeIn></Sequence><Sequence from={60}><FadeIn><h1 style={{color: \"#fff\", fontSize: 60}}>Third</h1></FadeIn></Sequence></AbsoluteFill>; }",
"duration_seconds": 4,
"fps": 30,
"width": 1920,
"height": 1080
}'
Python SDK
from inferencesh import inference
client = inference()
result = client.run({
"app": "infsh/remotion-render",
"input": {
"code": """
import { useCurrentFrame, AbsoluteFill, interpolate } from "remotion";
export default function Main() {
const frame = useCurrentFrame();
const opacity = interpolate(frame, [0, 30], [0, 1]);
return (
<AbsoluteFill style={{
backgroundColor: "#1a1a2e",
display: "flex",
justifyContent: "center",
alignItems: "center"
}}>
<h1 style={{ color: "#eee", fontSize: 80, opacity }}>
Hello from Python
</h1>
</AbsoluteFill>
);
}
""",
"duration_seconds": 3,
"fps": 30,
"width": 1920,
"height": 1080
}
})
print(result["output"]["video"])
進行状況のストリーミング
for update in client.run({
"app": "infsh/remotion-render",
"input": {
"code": "...",
"duration_seconds": 10
}
}, stream=True):
if update.get("progress"):
print(f"Rendering: {update['progress']}%")
if update.get("output"):
print(f"Video: {update['output']['video']}")
関連スキル
# Remotion best practices (component patterns)
npx skills add remotion-dev/skills@remotion-best-practices
# AI video generation (for AI-generated clips)
npx skills add inference-sh/skills@ai-video-generation
# Image generation (for video assets)
npx skills add inference-sh/skills@ai-image-generation
# Python SDK reference
npx skills add inference-sh/skills@python-sdk
# Full platform skill
npx skills add inference-sh/skills@infsh-cli
ドキュメント
- Remotion のドキュメント - Remotion の公式ドキュメント
- アプリの実行 - CLI を使用してアプリを実行する方法
- 結果のストリーミング - リアルタイムの進行状況の更新
コメント
Markdown 対応