Remotion

作者 vercel-labsfc2a696a50a3無授權條款18K 個星標收錄於 2026年10月8日更新於 2026年10月8日儲存庫昨天更新

Remotion renderer for json-render that turns JSON timeline specs into videos. Use when working with @json-render/remotion, building video compositions from JSON, creating video catalogs, or rendering AI-generated video timelines.

精選僅含說明Design & Creative
AI 產生的概覽

Remotion 渲染器,使用 @json-render/remotion 將 JSON 時間軸規格轉換為影片合成。

功能
此技能說明 @json-render/remotion 渲染器,它能將 JSON 時間軸規格轉換成 Remotion 影片合成。內容涵蓋如何用 Player 與 Renderer 渲染規格、依標準元件、轉場與效果定義建立目錄,以及註冊自訂片段元件。它也說明包含 composition、tracks、clips 與 audio 的時間軸規格結構,並列出標準元件與主要匯出項目。
適用情境
適用於使用 @json-render/remotion、從 JSON 建立影片合成、建立影片目錄,或渲染 AI 生成的影片時間軸時。
執行需求
需要 @json-render/remotion、@json-render/core 與 @remotion/player 套件,自訂元件屬性還需要 zod。此技能未附指令碼,僅為說明文件。

@json-render/remotion

Remotion renderer that converts JSON timeline specs into video compositions.

Quick Start

typescript
import { Player } from "@remotion/player";import { Renderer, type TimelineSpec } from "@json-render/remotion";
function VideoPlayer({ spec }: { spec: TimelineSpec }) {  return (    <Player      component={Renderer}      inputProps={{ spec }}      durationInFrames={spec.composition.durationInFrames}      fps={spec.composition.fps}      compositionWidth={spec.composition.width}      compositionHeight={spec.composition.height}      controls    />  );}

Using Standard Components

typescript
import { defineCatalog } from "@json-render/core";import {  schema,  standardComponentDefinitions,  standardTransitionDefinitions,  standardEffectDefinitions,} from "@json-render/remotion";
export const videoCatalog = defineCatalog(schema, {  components: standardComponentDefinitions,  transitions: standardTransitionDefinitions,  effects: standardEffectDefinitions,});

Adding Custom Components

typescript
import { z } from "zod";
const catalog = defineCatalog(schema, {  components: {    ...standardComponentDefinitions,    MyCustomClip: {      props: z.object({ text: z.string() }),      type: "scene",      defaultDuration: 90,      description: "My custom video clip",    },  },});
// Pass custom component to Renderer<Player  component={Renderer}  inputProps={{    spec,    components: { MyCustomClip: MyCustomComponent },  }}/>

Timeline Spec Structure

json
{  "composition": { "id": "video", "fps": 30, "width": 1920, "height": 1080, "durationInFrames": 300 },  "tracks": [{ "id": "main", "name": "Main", "type": "video", "enabled": true }],  "clips": [    { "id": "clip-1", "trackId": "main", "component": "TitleCard", "props": { "title": "Hello" }, "from": 0, "durationInFrames": 90 }  ],  "audio": { "tracks": [] }}

Standard Components

ComponentTypeDescription
TitleCardsceneFull-screen title with subtitle
TypingTextsceneTerminal-style typing animation
ImageSlideimageFull-screen image display
SplitScreensceneTwo-panel comparison
QuoteCardsceneQuote with attribution
StatCardsceneAnimated statistic display
TextOverlayoverlayText overlay
LowerThirdoverlayName/title overlay

Key Exports

ExportPurpose
RendererRender spec to Remotion composition
schemaTimeline schema
standardComponentsPre-built component registry
standardComponentDefinitionsCatalog definitions
useTransitionTransition animation hook
ClipWrapperWrap clips with transitions

來源與署名

來源:vercel-labs/json-render位於skills/remotion提交fc2a696

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架