remotion-render

作者: 101-skills

通过inference.sh从React/Remotion组件代码渲染视频。传入TSX代码,获取MP4文件。支持所有Remotion API:useCurrentFrame、useVideoConfig、spring、interpolate、AbsoluteFill、Sequence。可配置分辨率、帧率、时长、编码器。用途:程序化视频生成、动画图形、动态设计、数据驱动视频、React动画转视频。触发词:remotion、从代码渲染视频、tsx转视频、react视频、程序化视频、remotion渲染、代码转视频、动画...

npx skills add https://github.com/101-skills/skills --skill remotion-render

Install the belt CLI skill: npx skills add belt-sh/cli

Remotion Render

Render videos from React/Remotion component code via inference.sh CLI.

Remotion Render

Quick Start

Requires inference.sh CLI (belt). Install instructions

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
}'

Input Schema

ParameterTypeRequiredDescription
codestringYesReact component TSX code. Must export default a component.
composition_idstringNoComposition ID to render
propsobjectNoProps passed to the component
widthnumberNoVideo width in pixels
heightnumberNoVideo height in pixels
fpsnumberNoFrames per second
duration_secondsnumberNoVideo duration in seconds
codecstringNoOutput codec

Available Imports

Your TSX code can import from remotion and react:

// Remotion APIs
import {
  useCurrentFrame,
  useVideoConfig,
  spring,
  interpolate,
  AbsoluteFill,
  Sequence,
  Audio,
  Video,
  Img
} from "remotion";

// React
import React, { useState, useEffect } from "react";

Examples

Fade-In Text

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
}'

Animated Counter

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
}'

Spring Animation

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
}'

With 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
}'

Sequence Animation

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"])

Streaming Progress

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']}")

Related Skills

# 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

Documentation

来自 101-skills 的更多技能

ai-avatar-video
101-skills
通过inference.sh CLI创建AI虚拟形象和说话头像视频。推荐:P-Video-Avatar(最快、最便宜、内置TTS)。其他选项:OmniHuman、Fabric、PixVerse。音频:Inworld TTS-2(支持100+语言、角色情感控制)、ElevenLabs、Kokoro。功能:音频驱动虚拟形象、文本转虚拟形象、唇形同步视频、说话头像生成、虚拟主持人、UGC内容。用途:AI主持人、解说视频、虚拟网红、配音、营销视频、UGC广告、游戏虚拟形象等。
creativevideomedia
ai-video-generation
101-skills
通过 inference.sh CLI,使用 Google Veo、Seedance 2.0、HappyHorse、Wan、Grok 及 40 多个模型生成 AI 视频。模型包括:Veo 3.1、Veo 3、Seedance 2.0、HappyHorse 1.0、Wan 2.5、Grok Imagine Video、OmniHuman、Fabric、HunyuanVideo。功能涵盖:文生视频、图生视频、参考视频生成、视频编辑、唇形同步、虚拟人动画、视频增强、拟音音效。适用于:社交媒体视频、营销内容、解说视频、产品演示、AI 虚拟人。触发词:视频生成、AI 视频……
creativevideomedia
ai-image-generation
101-skills
通过 inference.sh CLI 使用 GPT-Image-2、FLUX、Gemini、Grok、Seedream、Reve 及 50 多个模型生成 AI 图像。模型包括:GPT-Image-2、FLUX Dev LoRA、FLUX.2 Klein LoRA、Gemini 3 Pro Image、Grok Imagine、Seedream 4.5、Reve、ImagineArt。功能:文生图、图生图、图像修复、LoRA、图像编辑、图像放大、文本渲染。用途:AI 艺术、产品模型、概念艺术、社交媒体图形、营销视觉、插图。触发词:flux、图像生成、AI 图像、文本转...
creativemediaimage
web-search
101-skills
通过inference.sh CLI使用Tavily和Exa进行网络搜索与内容提取。应用:Tavily搜索、Tavily提取、Exa搜索、Exa回答、Exa提取。功能:AI驱动搜索、内容提取、直接回答、研究。用途:研究、RAG管道、事实核查、内容聚合、智能体。触发词:网络搜索、tavily、exa、搜索API、内容提取、研究、互联网搜索、AI搜索、搜索助手、网页抓取、rag、perplexity替代方案
researchweb-scrapingapi
agent-tools
101-skills
通过inference.sh CLI运行AI应用——图像生成、视频创作、大语言模型、搜索、3D、Twitter自动化。模型包括:FLUX、Veo、Gemini、Grok、Claude、Seedance、OmniHuman、Tavily、Exa、OpenRouter等众多模型。适用于运行AI应用、生成图像/视频、调用大语言模型、网络搜索或自动化Twitter操作。触发词:inference.sh、infsh、ai model、run ai、serverless ai、ai api、flux、veo、claude api、image generation、video generation、openrouter、tavily、exa search、twitter api、grok
infsh-cli
101-skills
通过 inference.sh CLI 运行 AI 应用——图像生成、视频创作、大语言模型、搜索、3D、Twitter 自动化。模型包括:FLUX、Veo、Gemini、Grok、Claude、Seedance、OmniHuman、Tavily、Exa、OpenRouter 等。适用于运行 AI 应用、生成图像/视频、调用大语言模型、网络搜索或自动化 Twitter 时使用。触发词:inference.sh、infsh、ai model、run ai、serverless ai、ai api、flux、veo、claude api、image generation、video generation、openrouter、tavily、exa search、twitter api、grok
landing-page-design
101-skills
着陆页转化优化,涵盖布局规则、首屏设计及CTA心理学。包含首屏公式、社交证明放置、移动端设计及F型阅读模式。适用场景:创业公司着陆页、产品页面、SaaS营销、转化优化。触发词:着陆页、首屏、首屏以上、转化优化、着陆页设计、CTA按钮、首屏图片、着陆页布局、SaaS着陆页、产品页面设计、转化率、着陆页……
designmarketingcreative
product-photography
101-skills
AI产品摄影,包含影棚灯光、生活场景拍摄及产品包装照规范。涵盖拍摄角度、背景选择、阴影类型、主视觉图及电商图片要求。适用于:产品照片、电商图片、亚马逊商品图、产品包装照、生活场景摄影。触发词:产品摄影、产品照片、产品包装照、电商摄影、产品特写、产品图片、影棚摄影、生活场景产品、亚马逊产品照片、商品列表图、主视觉图、产品效果图……
creativeecommerceimage