Communitygithub.com

Army161/OpenMontage

工具包專用的 Remotion 模式 — 自訂轉場、共享元件與專案慣例。關於核心 Remotion 框架知識(鉤子、動畫、渲染等),請參閱 `remotion-official` 技能。

OpenMontage 是什麼?

此技能專為 Remotion 開發者設計,提供工具包層級的自訂擴充功能,包括共享元件、自訂轉場以及專案最佳實踐。它補充了官方 remotion-official 技能,專注於實用、可直接整合的元件(如動畫背景、幻燈片轉場與浮動標籤)以及一系列創意轉場效果(如 glitch、lightLeak、clockWipe 等),讓影片場景切換更具視覺衝擊力。技能詳細說明了這些元件的引入方式、轉場參數配置、建議的幀數持續時間,以及專案中的計時慣例(例如標題 3-5 秒、概述 10-20 秒)。此外,它強調了以幀為基礎的動畫、使用 OffthreadVideo 提升效能、以及 delayRender 處理非同步資料等最佳實踐。適用於 Claude Code、Cursor 及其他支援技能導入的 AI 代理平台,開發者可直接將這些模式整合至 Remotion 影片專案中。

相容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/Army161/OpenMontage/tree/HEAD/.agents/skills/remotion

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

Remotion — 工具包擴充功能

核心 Remotion 知識存放在 .claude/skills/remotion-official/(從官方 remotion-dev/skills 倉庫同步)。本文檔僅涵蓋工具包專用的模式。

共享元件

lib/components/ 中的可重用影片元件。在模板中透過下列方式導入:

import { AnimatedBackground, SlideTransition, Label } from '../../../../lib/components';
元件用途
AnimatedBackground浮動形狀背景(變體:subtle、tech、warm、dark)
SlideTransition場景轉場(fade、zoom、slide-up、blur-fade)
Label浮動標籤徽章,可選 JIRA 參考
Vignette電影感邊緣暗化疊層
LogoWatermark角落 Logo 品牌標示
SplitScreen並排影片比較
NarratorPiP子母畫面(畫中畫)的簡報者疊層
Envelope3D 信封,附有開蓋動畫
PointingHand動畫手勢表情符號,附有滑入與脈衝效果
MazeDecoration動畫等距網格裝飾,用於角落

自訂轉場

工具包包含位於 lib/transitions/ 的轉場庫,提供超越官方 @remotion/transitions 套件的場景特效。

使用 TransitionSeries

import { TransitionSeries, linearTiming } from '@remotion/transitions';
// 從 lib 導入自訂轉場(根據專案位置調整路徑)
import { glitch, lightLeak, clockWipe, checkerboard } from '../../../../lib/transitions';
// 或從 @remotion/transitions 導入官方轉場
import { slide, fade } from '@remotion/transitions/slide';

<TransitionSeries>
  <TransitionSeries.Sequence durationInFrames={90}>
    <TitleSlide />
  </TransitionSeries.Sequence>
  <TransitionSeries.Transition
    presentation={glitch({ intensity: 0.8 })}
    timing={linearTiming({ durationInFrames: 30 })}
  />
  <TransitionSeries.Sequence durationInFrames={120}>
    <ContentSlide />
  </TransitionSeries.Sequence>
</TransitionSeries>

可用的自訂轉場

轉場選項最佳用途
glitch()intensity、slices、rgbShift技術展示、前衛揭露、賽博龐克
rgbSplit()direction、displacement現代科技、充滿活力的轉場
zoomBlur()direction、blurAmount行動呼籲、高能量時刻、衝擊效果
lightLeak()temperature、direction慶祝活動、電影美學、溫馨時刻
clockWipe()startAngle、direction、segments時間相關內容、趣味揭露
pixelate()maxBlockSize、gridSize、scanlines、glitchArtifacts、randomness復古/遊戲、數位轉換
checkerboard()gridSize、pattern、stagger、squareAnimation趣味揭露、結構化轉場

格子模式: sequential、random、diagonal、alternating、spiral、rows、columns、center-out、corners-in

轉場範例

// 技術/賽博龐克風格
glitch({ intensity: 0.8, slices: 8, rgbShift: true })

// 溫馨慶祝
lightLeak({ temperature: 'warm', direction: 'right' })

// 高能量縮放
zoomBlur({ direction: 'in', blurAmount: 20 })

// 色差
rgbSplit({ direction: 'diagonal', displacement: 30 })

// 時鐘掃描揭露
clockWipe({ direction: 'clockwise', startAngle: 0 })

// 復古像素化
pixelate({ maxBlockSize: 50, glitchArtifacts: true })

// 格子模式
checkerboard({ pattern: 'diagonal', gridSize: 8 })
checkerboard({ pattern: 'spiral', gridSize: 10 })
checkerboard({ pattern: 'center-out', squareAnimation: 'scale' })

轉場持續時間指南

類型幀數備註
快速切換15-20快速、有力
標準30-45最常用
戲劇性50-60緩慢揭露
故障效果20-30應感覺突然
漏光45-60需要時間掃描

預覽轉場

執行展示畫廊以查看所有轉場:

cd showcase/transitions && npm run studio

工具包最佳實踐

  1. 僅使用基於幀的動畫 — 避免使用 CSS 轉場/動畫;它們會在渲染時導致閃爍
  2. 使用 useVideoConfig() 中的 fps — 使動畫與幀率無關
  3. 限制插值範圍 — 使用 extrapolateRight: 'clamp' 防止數值失控
  4. 使用 OffthreadVideo — 對複雜組合提供比 <Video> 更佳的效能
  5. 非同步使用 delayRender — 務必等待資料準備好後再開始渲染
  6. 使用 staticFile 處理素材 — 正確引用 public/ 資料夾中的檔案
  7. 所有專案使用 30fps — 時間計算:幀數 = 秒數 × 30
  8. playbackRate 必須保持恆定 — 對於可變/極端速度,請先使用 FFmpeg 預處理

專案時間慣例

場景類型持續時間備註
標題3-5 秒 (90-150 幀)Logo + 標題行
概述10-20 秒3-5 個要點
示範10-30 秒調整 playbackRate 以符合時間
統計資料8-12 秒3-4 個統計卡片
致謝5-10 秒快速淡出

節奏: 旁白約每分鐘 150 字。旁白決定時間軸。

進階 API

如需所有鉤子、元件、渲染器、Lambda 及 Player API 的詳細文件,請參閱 reference.md。

授權說明

Remotion 有特殊的授權條款。企業可能需要取得授權才能商業使用。請查閱 https://remotion.dev/license


意見回饋與貢獻

如果此技能缺少資訊或可以改進:

  • 缺少某種模式? 請描述您需要的內容
  • 發現錯誤? 請告訴我哪裡有問題
  • 想要貢獻? 我可以協助您:
    1. 更新此技能以納入改進內容
    2. 建立 PR 到 github.com/digitalsamba/claude-code-video-toolkit

只需說 "improve this skill" 即可,我會引導您更新 .claude/skills/remotion/SKILL.md。

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

Army161/OpenMontage

Generate AI videos from text prompts using multiple provider gateways. Use when: (1) Generating videos from text descriptions, (2) Creating AI-generated video clips for content production, (3) Image-to-video generation with a reference image, (4) Choosing between video generation providers (VEO, Kling, Sora, Runway, Seedance, MiniMax). Supports two gateways: HeyGen API and fal.ai API.

Army161/OpenMontage

Create AI avatar videos with precise control over avatars, voices, scripts, scenes, and backgrounds using HeyGen's v2 API. Use when: (1) Choosing a specific avatar and voice for a video, (2) Writing exact scripts for an avatar to speak, (3) Building multi-scene videos with different backgrounds per scene, (4) Creating transparent WebM videos for compositing, (5) Using talking photos as video presenters, (6) Integrating HeyGen avatars with Remotion, (7) Batch video generation with exact specs, (8) Brand-consistent production videos with precise control.

Army161/OpenMontage

Use p5.js/canvas for local procedural character effects: particles, weather, squash/stretch, walk cycles, and environmental motion.

Army161/OpenMontage

Review local character animation with schema checks, Playwright browser previews, frame sampling, and FFmpeg/ffprobe final output checks.

Army161/OpenMontage

Create videos from a text prompt using HeyGen's Video Agent. Use when: (1) Creating a video from a description or idea, (2) Generating explainer, demo, or marketing videos from a prompt, (3) Making a video without specifying exact avatars, voices, or scenes, (4) Quick video prototyping or drafts, (5) One-shot prompt-to-video generation, (6) User says "make me a video" or "create a video about X".

Army161/OpenMontage

Generate Mandarin and multilingual narration with Volcengine Doubao Speech 2.0. Use when creating Chinese voiceovers, when the user prefers Doubao/Volcengine/火山引擎/豆包 TTS, or when narration needs character-level timestamp metadata for subtitles.

Army161/OpenMontage

Video and audio processing with FFmpeg. Use for format conversion, resizing, compression, audio extraction, and preparing assets for Remotion. Triggers include converting GIF to MP4, resizing video, extracting audio, compressing files, or any media transformation task.

Army161/OpenMontage

Use when implementing Disney's 12 animation principles with Framer Motion in React applications

Army161/OpenMontage

All animation knowledge for HyperFrames — atomic motion rules, multi-phase scene blueprints, scene transitions, broader motion-design techniques, AND the seven runtime adapters (GSAP default, plus Lottie, Three.js, Anime.js, CSS keyframes, Web Animations API, TypeGPU). Use for any motion or animation task: pick 2-4 rules and compose, or load a blueprint, or look up runtime-specific API (e.g. GSAP eases / Lottie player / Three.js mixer). HyperFrames-native: single paused timeline, seek-safe, deterministic.

Army161/OpenMontage

HyperFrames CLI dev loop. Use when running npx hyperframes init, add, catalog, capture, lint, validate, inspect, layout, snapshot, preview, play, render, publish, lambda, doctor, browser, info, upgrade, skills, compositions, docs, benchmark, telemetry, transcribe, tts, or remove-background, or when troubleshooting the HyperFrames build/render environment. Entry point for AWS Lambda cloud rendering (`hyperframes lambda deploy / render / progress / destroy / policies`).

Army161/OpenMontage

The HyperFrames composition contract — build one renderable project. Use for composition structure, the `data-*` timing attributes, `class="clip"`, tracks, sub-compositions, variables, framework-owned media playback, deterministic-render rules, and validation. Read before writing composition HTML.

Army161/OpenMontage

Non-animation creative direction for HyperFrames videos. Use for design spec (frame.md / design.md) handling, palettes, typography, narration, beat planning, audio-reactive visuals, composition patterns, and brand / style decisions. For atomic motion patterns and scene blueprints, use `hyperframes-animation`.

Army161/OpenMontage

Audio and media assets for HyperFrames compositions, produced by one shared audio engine (`scripts/audio.mjs`) — multi-provider TTS (HeyGen / ElevenLabs / Kokoro local), background music + sound effects (HeyGen audio-library retrieval by default, with local Lyria / MusicGen BGM generation and a bundled SFX library as the no-credential fallback), Whisper transcription, background removal, and caption authoring. Use for voiceover / TTS, BGM, SFX / sound effects, transcription, captions / subtitles / lyrics / karaoke / per-word styling, voice + provider selection, and music-mood prompting.

Army161/OpenMontage

Install and wire registry blocks and components into HyperFrames compositions. Use when running hyperframes add, installing a block or component, wiring an installed item into index.html, or working with hyperframes.json. Covers the add command, install locations, block sub-composition wiring, component snippet merging, registry discovery, and authoring a new block or component to contribute upstream (idea → scaffold → validate → PR).

Army161/OpenMontage

Use when the user wants a short, design-led motion graphic where motion is the message: kinetic typography, stat or number count-up, chart/data-viz hit, logo sting, brand lockup, lower-third, callout, social overlay, animated headline/tweet/news item, motion poster, or quick captured-page highlight. Usually under 10s and up to ~30s, with no narration arc, voice-over, or live-action subject. Can render to MP4 or transparent overlay. Not for longer, multi-scene, narrated, or brand-reel pieces (use general-video), narrated website videos (website-to-video), topic explainers (faceless-explainer), product promos (product-launch-video), PR videos (pr-to-video), or captions on existing footage (embedded-captions). When unsure whether it's a quick motion-first piece or a longer / narrated treatment, see /hyperframes.

Army161/OpenMontage

Use when the user has a music track (an audio file, or a video to pull audio from) and wants a beat-synced HyperFrames video, calm to hard-hitting. The music drives everything: one analyzer reads it once, the orchestrator lays out the frames and fills a per-frame plan, and one sub-agent builds each frame. Typography and templates are the floor — a complete video needs zero assets — but any images or videos the user supplies are cut into the frames on the same beat grid (beat-cut / ken-burns). The genre (lyric video, slideshow, kinetic promo) falls out of the per-frame choices; the pipeline never branches on it.

Army161/OpenMontage

Best practices for Remotion - Video creation in React

Army161/OpenMontage

Port an existing Remotion (React) composition to HyperFrames HTML. Use ONLY when the user explicitly asks to port/convert/migrate/translate a Remotion source. Do NOT use: (a) authoring a new HyperFrames composition; (b) Remotion mentioned in passing; (c) Remotion code shared as reference only; (d) "same video as my Remotion one" without explicit migrate request — treat as fresh build. Doubt → `/general-video`. One-way, Remotion-only: no reverse export (HyperFrames→Remotion or any framework), no non-Remotion source (After Effects, Framer Motion, plain React/CSS) → out of scope, re-create via `/general-video`. Flags unsupported patterns (useState, useEffect, async calculateMetadata, third-party React libs, `@remotion/lambda`) and recommends runtime interop over lossy translation. Unsure whether to port vs. build fresh, or only a passing Remotion mention? → /hyperframes.

Army161/OpenMontage

Animate SVG character rigs with GSAP, CSS transforms, Remotion frame control, and HyperFrames-compatible browser previews.

Army161/OpenMontage

Three.js animation - keyframe animation, skeletal animation, morph targets, animation mixing. Use when animating objects, playing GLTF animations, creating procedural motion, or blending animations.

相關技能