Rechercher

PythonReactSEOPDF
OpenClaw

remotion-cn

Remotion 视频创建框架 - React 编程创建视频(中文版)

guohongbin-git0 installations selon la source☆ 0 Étoiles du dépôt

Installation

Suivez les instructions du dépôt pour votre agent. Consultez les fichiers et dépendances avant l’installation.

SkillHub CLI

skillhub install guohongbin-git/remotion-cn

Examinez la source et la compatibilité, puis suivez les étapes d’installation.

Donnez le lien à votre agent et demandez-lui d’examiner instructions et dépendances avant d’expliquer les étapes.

Voir la source ↗Guides

Instructions

Remotion CN - React 视频创建框架

Remotion 是一个用 React 创建视频的强大框架。支持多种输出格式(MP4、WebM、GIF),可以在服务器端渲染视频。

功能

视频创建
  • 多输出格式 - MP4、WebM、GIF、PNG 序列
  • React 编程 - 用 JSX 创建动画
  • 高性能 - 服务器端渲染,比 Canvas 更快
  • 代码重用 - 组件化开发,可复用
动画类型
  • 变换 - 缩放、旋转、透明度
  • 时间轴 - 多轨同时播放
  • 音频 - 音轨支持
  • 3D - 基础 3D 变换(CSS 3D)

安装

创建新项目
# 使用 create-video
npx create-video@latest my-video
cd my-video

# 或使用 Vite
npx create-vite@latest my-video
cd my-video
npm install remotion
手动安装
npm install remotion @remotion/cli --save-dev

快速开始

示例 1:Hello World 视频
// src/App.tsx
import { Composition } from 'remotion';

export const RemotionRoot: React.FC = () => {
  return (
    <Composition>
      <HelloWorld />
    </Composition>
  );
};

export default RemotionRoot;
// src/HelloWorld.tsx
import { AbsoluteFill } from 'remotion';

export const HelloWorld: React.FC = () => {
  return (
    <AbsoluteFill style={{ backgroundColor: 'white' }}>
      <div style={{ fontSize: 120, color: 'black', fontFamily: 'sans-serif' }}>
        你好,Remotion!
      </div>
    </AbsoluteFill>
  );
};
渲染视频
# 渲染为 MP4
npx remotion render src/App.tsx out/video.mp4

# 在浏览器中预览
npx remotion studio src/App.tsx
示例 2:动画文本
import { AbsoluteFill, useCurrentFrame, useVideoConfig, Video } from 'remotion';

export const TextSlide: React.FC = () => {
  const frame = useCurrentFrame();

  return (
    <AbsoluteFill style={{ backgroundColor: '#1a1a2a' }}>
      <div style={{
        display: 'flex',
        justifyContent: 'center',
        alignItems: 'center',
        height: '100%'
      }}>
        <h1 style={{
          fontSize: 80,
          color: 'white',
          opacity: frame % 60, // 闪烁效果
          transform: `translateY(${Ma...

Informations sur la source

Source
github
Repository
openclaw/skills
Path
skills/guohongbin-git/remotion-cn
Version
—
Commit
0fa4e8ffac62abf97c31bbb5e394a6d25712f778
Source de classification
rules
Statut
active
Visibilité
public

Ces informations proviennent de l’analyse indexée et peuvent être anciennes. Vérifiez les fichiers actuels.

README

Remotion CN - 示例项目

这是一个简单的 Remotion 项目示例,展示如何用代码创建视频。

项目结构

remotion-cn-example/
├── package.json
├── tsconfig.json
├── remotion.config.ts
├── src/
│   ├── App.tsx
│   ├── HelloWorld.tsx
│   └── AnimatedText.tsx
└── public/
    └── index.html

安装

# 创建新项目
npx create-video@latest my-video

cd my-video

# 安装 Remotion
npm install remotion @remotion/cli

示例代码

1. Hello World
// src/HelloWorld.tsx
import { Composition } from 'remotion';

export const HelloWorld: React.FC = () => {
  return (
    <Composition>
      <HelloWorld />
    </Composition>
  );
};
2. 动画文本
// src/AnimatedText.tsx
import { AbsoluteFill, useCurrentFrame } from 'remotion';

export const AnimatedText: React.FC = () => {
  const frame = useCurrentFrame();

  return (
    <AbsoluteFill style={{ backgroundColor: '#1a1a2a' }}>
      <div style={{
        display: 'flex',
        justifyContent: 'center',
        alignItems: 'center',
        height: '100%',
        fontFamily: 'sans-serif',
        fontSize: 80,
        color: 'white',
        opacity: frame % 60, // 闪烁效果
        transform: `translateY(${Math.sin(frame * 0.1) * 20}px)`
      }}>
        Remotion + AI = 🎥
      </div>
    </AbsoluteFill>
  );
};
3. 图片动画
// src/AnimatedImage.tsx
import { AbsoluteFill, useCurrentFrame, Img } from 'remotion';

export const AnimatedImage: React.FC = () => {
  const frame = useCurrentFrame();

  return (
    <AbsoluteFill style={{ backgroundColor: 'black' }}>
      <Img
        src="https://github.com/remotion-dev/remotion/blob/main/packages/remotion/example/public/logo.png"
        style={{
          width: 400,
          height: 400,
          position: 'absolute',
          left: '50%',
          top: '50%',
          transform: `translate(-50%, -50%) rotate(${frame}deg)`
        }}
      />
    </AbsoluteFill>
  );
};

渲染命令

# 开发服务器(实时预览)
npx...

Contenu extrait

SKILL.md
# Remotion CN - React 视频创建框架

Remotion 是一个用 React 创建视频的强大框架。支持多种输出格式(MP4、WebM、GIF),可以在服务器端渲染视频。

## 功能

### 视频创建
- **多输出格式** - MP4、WebM、GIF、PNG 序列
- **React 编程** - 用 JSX 创建动画
- **高性能** - 服务器端渲染,比 Canvas 更快
- **代码重用** - 组件化开发,可复用

### 动画类型
- **变换** - 缩放、旋转、透明度
- **时间轴** - 多轨同时播放
- **音频** - 音轨支持
- **3D** - 基础 3D 变换(CSS 3D)

---

## 安装

### 创建新项目
```bash
# 使用 create-video
npx create-video@latest my-video
cd my-video

# 或使用 Vite
npx create-vite@latest my-video
cd my-video
npm install remotion
```

### 手动安装
```bash
npm install remotion @remotion/cli --save-dev
```

---

## 快速开始

### 示例 1:Hello World 视频
```tsx
// src/App.tsx
import { Composition } from 'remotion';

export const RemotionRoot: React.FC = () => {
  return (
    <Composition>
      <HelloWorld />
    </Composition>
  );
};

export default RemotionRoot;
```

```tsx
// src/HelloWorld.tsx
import { AbsoluteFill } from 'remotion';

export const HelloWorld: React.FC = () => {
  return (
    <AbsoluteFill style={{ backgroundColor: 'white' }}>
      <div style={{ fontSize: 120, color: 'black', fontFamily: 'sans-serif' }}>
        你好,Remotion!
      </div>
    </AbsoluteFill>
  );
};
```

### 渲染视频
```bash
# 渲染为 MP4
npx remotion render src/App.tsx out/video.mp4

# 在浏览器中预览
npx remotion studio src/App.tsx
```

### 示例 2:动画文本
```tsx
import { AbsoluteFill, useCurrentFrame, useVideoConfig, Video } from 'remotion';

export const TextSlide: React.FC = () => {
  const frame = useCurrentFrame();

  return (
    <AbsoluteFill style={{ backgroundColor: '#1a1a2a' }}>
      <div style={{
        display: 'flex',
        justifyContent: 'center',
        alignItems: 'center',
        height: '100%'
      }}>
        <h1 style={{
          fontSize: 80,
          color: 'white',
          opacity: frame % 60, // 闪烁效果
          transform: `translateY(${Ma...
README
# Remotion CN - 示例项目

这是一个简单的 Remotion 项目示例,展示如何用代码创建视频。

## 项目结构

```
remotion-cn-example/
├── package.json
├── tsconfig.json
├── remotion.config.ts
├── src/
│   ├── App.tsx
│   ├── HelloWorld.tsx
│   └── AnimatedText.tsx
└── public/
    └── index.html
```

## 安装

```bash
# 创建新项目
npx create-video@latest my-video

cd my-video

# 安装 Remotion
npm install remotion @remotion/cli
```

## 示例代码

### 1. Hello World

```tsx
// src/HelloWorld.tsx
import { Composition } from 'remotion';

export const HelloWorld: React.FC = () => {
  return (
    <Composition>
      <HelloWorld />
    </Composition>
  );
};
```

### 2. 动画文本

```tsx
// src/AnimatedText.tsx
import { AbsoluteFill, useCurrentFrame } from 'remotion';

export const AnimatedText: React.FC = () => {
  const frame = useCurrentFrame();

  return (
    <AbsoluteFill style={{ backgroundColor: '#1a1a2a' }}>
      <div style={{
        display: 'flex',
        justifyContent: 'center',
        alignItems: 'center',
        height: '100%',
        fontFamily: 'sans-serif',
        fontSize: 80,
        color: 'white',
        opacity: frame % 60, // 闪烁效果
        transform: `translateY(${Math.sin(frame * 0.1) * 20}px)`
      }}>
        Remotion + AI = 🎥
      </div>
    </AbsoluteFill>
  );
};
```

### 3. 图片动画

```tsx
// src/AnimatedImage.tsx
import { AbsoluteFill, useCurrentFrame, Img } from 'remotion';

export const AnimatedImage: React.FC = () => {
  const frame = useCurrentFrame();

  return (
    <AbsoluteFill style={{ backgroundColor: 'black' }}>
      <Img
        src="https://github.com/remotion-dev/remotion/blob/main/packages/remotion/example/public/logo.png"
        style={{
          width: 400,
          height: 400,
          position: 'absolute',
          left: '50%',
          top: '50%',
          transform: `translate(-50%, -50%) rotate(${frame}deg)`
        }}
      />
    </AbsoluteFill>
  );
};
```

## 渲染命令

```bash
# 开发服务器(实时预览)
npx...

Skills associés

OpenClaw

bambu-studio-ai

heyixuan2

Bambu Lab 3D printer control and automation. Activate when user mentions: printer status, 3D printing, slice, analyze model, generate 3D, AMS filament, print monitor, Bambu Lab, or any 3D printing task. Full pi...

OpenClaw

geo-optimization

capt-marbles

Generative Engine Optimization (GEO) for AI search visibility. Optimize content to appear in ChatGPT, Perplexity, Claude, and Google AI Overviews. Use when optimizing websites, pages, or content for LLM discove...

OpenClaw

0protocol

0isone

Agents can sign plugins, rotate credentials without losing identity, and publicly attest to behavior.