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 从公开仓库中收录这些内容。

举报或申请下架