Community程式設計與開發github.com

Remotion Render

驅動渲染與迭代循環:將合成轉為 MP4,接收自然語言回饋,進行最小改動後重新渲染。

Remotion Render 是什麼?

此技能專門處理 Remotion 影片的渲染與迭代流程。它定義了一套嚴謹的操作程序,從收集輸入(合成 ID、目標規格、機器核心數)開始,執行基礎渲染指令,並根據需求調整解析度、FPS 與編解碼器(如 VP8/VP9 支援透明背景)。核心價值在於「手術刀式編輯」:使用者透過自然語言給予回饋,技能會將其轉化為對單一數值或屬性的精準修改(例如調整彈簧阻尼值、修改 CTA 文案、變更單一個十六進位色碼),而非重寫整個場景檔案,從而保留已通過的內容並加快迭代速度。對於批次變體,它使用 JSON 定義不同參數集合進行自動化渲染。當本地渲染成為瓶頸時,可升級至 AWS Lambda 以進行分散式運算。該技能適用於任何支援 SKILL.md 的 AI 代理平台,例如 Claude Code、Cursor 或 Codex,能有效防止常見渲染失敗(如幀數不匹配、靜態資源遺失、字型閃爍)。

相容平台✓Claude Code~Codex CLI~Cursor
npx skills add SkillMedev/skills

Installed? Explore more 程式設計與開發 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜歡的 AI 中提問

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

說明文件

Remotion Render 是做什麼的?

驅動渲染與迭代循環:將合成轉為 MP4,接收自然語言回饋,進行最小改動後重新渲染。昂貴的失敗模式是相反的循環——為了複製微調而重寫整個場景檔案,或為了每次檢查而以全品質重新渲染——這會破壞已批准的工作以及讓 Remotion 值得使用的迭代速度。

操作程序

步驟 1:收集輸入

  • 合成 ID(src/Root.tsx 中 <Composition> 上的 id,而非檔案名稱)以及進入點(呼叫 registerRoot 的檔案,通常為 src/index.ts)。
  • 目標:平台/比例(橫向 16:9、直向 9:16、方形)、解析度(預設 1080p;僅在要求時使用 4K),以及是否需要透明背景。
  • 機器核心數(用於並行度)以及這是單次渲染、迭代工作階段還是批次處理。

步驟 2:基礎渲染

npx remotion render src/index.ts <CompositionId> out/video.mp4

預設輸出為 H.264 MP4,使用合成自有的寬度/高度/幀率;Remotion 會視需要建立 out/ 目錄。

步驟 3:解析度、幀率與編解碼器預設

解析度和幀率位於 <Composition> 上(width/height/fps)——請在來源端修改。僅使用旗標進行縮放和容器設定:

# 1080p 橫向 - 合成設計為 1920x1080@30
npx remotion render src/index.ts ProductDemo out/1080p.mp4

# 4K - 將 1080p 畫布升頻而不觸及佈局
npx remotion render src/index.ts ProductDemo out/4k.mp4 --scale=2

# 9:16 直向 - 渲染設計為 1080x1920 的合成
npx remotion render src/index.ts ProductDemoVertical out/vertical.mp4

編解碼器規則:

  • 社交/網頁傳送維持 H.264 MP4(預設值)——相容性最佳。
  • 透明背景:--codec=vp8 或 vp9(WebM),或用於編輯管線的 --codec=prores 搭配 alpha。H.264 無法攜帶 alpha。
  • 真正的 60fps 意指 fps={60} 位於合成上,且幀數按比例縮放以匹配——僅透過旗標更改 fps 會使所有以幀計時的動畫不同步。

步驟 4:調整並行度

渲染是 CPU 密集型(每個影格都是一個無頭 Chromium 螢幕截圖)。預設約為核心數的一半;明確調整是本地最簡單的加速方式:

npx remotion render src/index.ts ProductDemo out/video.mp4 --concurrency=8

從實體核心數開始(--concurrency=50% 接受百分比);如果機器開始交換或出現熱節流則調降——超過最佳點後,更多的 Chromium 分頁會使其變慢,而非更快。

步驟 5:執行迭代調校循環

保持 Studio 開啟(npx remotion studio,http://localhost:3000),讓使用者能即時預覽;僅在驗收時才使用完整渲染。

  1. 使用者在 Studio 中預覽並以純文字提供回饋。
  2. 將其轉化為手術刀式編輯——僅更改相關數值:
    • "太快" → 擴大 interpolate 輸入範圍或提高彈簧 damping。
    • "Logo 應該更突出" → 降低彈簧 damping / 增加過衝。
    • "更改 CTA 文案" → 編輯 prop / defaultProps,不觸及其他部分。
    • "不同的強調色" → 在顏色物件中更改一個十六進位色碼。
    • "最後一個功能停留更久" → 調高該 <Sequence> 的 durationInFrames 並重新推導合成總 durationInFrames。
  3. 重新渲染,或讓 Studio 熱重載以進行視覺檢查。

手術刀式編輯 vs 重寫:當變更涉及單一數值、prop、顏色或一個場景的時間時,進行就地編輯;僅在場景結構改變時(新增/移除/重新排序場景)才重寫——並將結構性編寫工作導向 remotion-compose。預設為手術刀式:它保留所有已批准的內容。

步驟 6:批次變體

合成是由資料驅動的,因此 N 個變體 = JSON 檔案中的 N 組 props:

[
  { "out": "out/acme.mp4",   "props": { "logoText": "Acme",   "colors": { "accent": "#6C5CE7" }, "cta": "Try Acme" } },
  { "out": "out/globex.mp4", "props": { "logoText": "Globex", "colors": { "accent": "#00B894" }, "cta": "Try Globex" } }
]

--props 接受內聯 JSON 或檔案路徑;對於超過幾個變體的情況,撰寫一個讀取 JSON 並對每個條目執行 shell 命令的小型 Node 腳本,或使用 @remotion/renderer 的 renderMedia() 進行型別安全循環。透過編輯 JSON 即可完全實現本地化或 A/B 文案和顏色的變更。

步驟 7:當本機成為瓶頸時使用 Lambda

當單次渲染在本機需要數分鐘,或批次量很大時,才考慮使用 Lambda——它會將影格分散到無伺服器工作者上。否則,本地渲染更簡單且免費。

npx remotion lambda functions deploy            # 每個 AWS 帳戶/區域一次
npx remotion lambda sites create src/index.ts --site-name=product-demo
npx remotion lambda render product-demo ProductDemo --props='{"logoText":"Acme"}'

需要 AWS 憑證和 IAM 權限,請遵循 Remotion 的 Lambda 設定指南。

步驟 8:排解三種常見故障

  1. 幀數不匹配 - 動畫過早結束或片段結尾出現死尾。原因:<Sequence> 持續時間已更改但合成總數未更新。修復:使總數等於其序列的總和;每次編輯時間後重新計算。這是排名第一的渲染意外。
  2. 缺少 staticFile() 引用 - 渲染失敗或素材為空白。原因:素材透過路徑匯入或在 public/ 之外。修復:將其放入 public/assets/ 並引用 staticFile("assets/<name>")。
  3. 字型閃爍/後備 - 文字以錯誤字型渲染或發生偏移。原因:@remotion/google-fonts 的 loadFont() 缺失或呼叫過晚。修復:在模組頂層呼叫 loadFont() 並應用傳回的 fontFamily;渲染器會等待字型載入。

交付成果

位於 out/ 中的渲染檔案,符合要求的預設值,此外——對於迭代工作階段——提供循環選項:命名可調整的維度(節奏、文案、顏色、時間)並在收到回饋後重新渲染。對於批次處理,提供變體 JSON 以及每個變體的輸出。

請勿

  • 請勿為了一級數值變更而重寫場景檔案——手術刀式編輯可保留已批准的工作。
  • 請勿僅透過旗標更改 fps——應在合成上設定 fps 並重新縮放幀數。
  • 請勿更改 Sequence 持續時間而不重新推導合成總 durationInFrames。
  • 請勿每次迭代都進行完整渲染——Studio 熱重載是預覽循環;僅在驗收時渲染。
  • 請勿在機器正在交換或熱節流時將並行度推過實體核心數。
  • 請勿在本地渲染只需幾秒鐘時就使用 Lambda——這會無端增加 AWS 設定和成本。
  • 請勿在此撰寫新場景或重構合成——這是 remotion-compose 的職責。

品質標準

  • 輸出以要求的解析度/比例/幀率播放,無死尾且無過早結束(合成總幀數等於序列總和)。
  • 素材和字型在第一個影格正確渲染——無後備字型閃爍,無空白素材。
  • 迭代僅更改了回饋所需的行數;所有先前已批准的內容保持不變。
  • 批次輸出差異僅來自其 props 組合。

升級準則

場景編寫、動畫設計和元件結構請轉至 remotion-compose;專案腳手架請轉至 remotion-setup;評分和音訊時間請轉至 sound-and-music-sync。

Individual skills in this repo

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

SkillMedev/skills

Designs REST API surfaces - resource naming, HTTP method and status-code semantics, error shapes, pagination, and filtering - and delivers an endpoint spec a consumer can build against without asking questions. Use when someone asks "how should I name this endpoint", "what status code should this return", "should this be PUT or PATCH", "how do I paginate this list", or is reviewing an API before it ships to external consumers. Do NOT use for planning breaking-change rollouts and deprecation windows - use api-versioning-strategist instead; for GraphQL type and resolver design - use graphql-schema instead; for generating client SDKs from an existing spec - use api-client-generator instead; for designing inbound webhook endpoints - use webhook-receiver-hardener instead.

SkillMedev/skills

Produce an accurate, properly timed caption track (SRT or WebVTT) from a video's audio - transcribing or aligning to the voiceover script, timing cues to speech, and enforcing line-length and reading-speed rules so captions are readable and in sync. Use when someone says "generate captions", "make subtitles from the audio", "transcribe and caption this", "export an SRT or VTT", "the captions are out of sync", or "the subtitles flash by too fast to read". Do NOT use to burn-in, style, reframe, or position an existing caption track for a platform (9:16, brand styling, safe areas) - that is social-video-formatter; do NOT use to animate text word-by-word as a motion graphic - that is kinetic-typography; do NOT use to write the spoken script in the first place - that is narration-script.

SkillMedev/skills

Turns data and charts into a decision-driving narrative structured as headline finding, trend, implication, and recommended action - with finding-led chart titles, context for every number, annotation guidance, and honest flags on any conclusion the data cannot support. Use when someone says "turn these numbers into a story", "what's the takeaway from this data", "help me present these results to leadership", or has charts but no narrative. Do NOT use for compressing a long document into a one-pager - use executive-summary instead - or for running the analysis that produces the findings - use eda-playbook instead.

SkillMedev/skills

Use when a task needs live or historical money data - "convert USD to EUR", "current/past exchange rate", "FX rate on this date / over this range", or "current price of Bitcoin/Ethereum, market cap, 24h change". Frankfurter (ECB reference rates, no key) is the FX default; CoinGecko's free keyless tier covers crypto. Do NOT use for stock quotes or equities - no keyless stock API survives verification, say so instead of guessing; do NOT use for country economic indicators like GDP or inflation series - use government-open-data instead; if the request is a vague "I need live data", route through public-data-api-picker.

SkillMedev/skills

Builds a driver-based FP&A operating model linking business inputs to P&L, balance sheet, and cash flow outputs. Use when building an annual plan, preparing investor materials, running scenario analysis, or stress-testing the business.

SkillMedev/skills

Use when a task needs live geographic lookups - "geocode this address", "what's at these coordinates" (reverse geocoding), "lat/lon for this city", "which country/state is this ZIP or postal code in", or "country facts: capital, currency, population, flag". Nominatim (OpenStreetMap) is the geocoding default; Zippopotam for postal codes; APICountries for country facts. All keyless. Do NOT use for weather at a location - use weather-climate instead; do NOT use for country-level statistics over time (GDP, population trends) - use government-open-data instead; if the request is a vague "I need live data", route through public-data-api-picker.

SkillMedev/skills

Runs the full Getting Things Done loop - capture, clarify, organize, reflect, engage - building a trusted system of context lists, a projects list with defined next actions, and a weekly review habit. Use when someone says "I'm overwhelmed and things are slipping through the cracks", "set up GTD for me", "help me do a brain dump and organize it", or "my to-do list is a mess". Do NOT use for just running the weekly review ritual itself - use weekly-review instead - or for clearing an email backlog - use inbox-zero.

SkillMedev/skills

Processes any email backlog to zero using the 4Ds - Delete, Delegate, Defer, Do - with a mass-archive strategy for the obvious, a touch-each-email-once discipline, and a keep-it-clear system of batched processing windows, ruthless unsubscribing, filters, and a minimal folder setup. Use when someone says "I have 5,000 unread emails", "help me get to inbox zero", "email is eating my whole day", or treats their inbox as a to-do list. Do NOT use for drafting the reply emails themselves or prioritization rules for an ongoing support queue - use email-triage instead - or for protecting focus time around the email windows - use deep-work-planner instead.

SkillMedev/skills

Write landing-page copy section by section - hero, social proof, features-as-benefits, objections, CTA - leading with one promise and proving it down the page. Use when someone asks "write my landing page", "improve my hero headline", "what should the homepage say", "turn these features into benefits", or is shipping a new page for a launch or campaign. Do NOT use for testing and optimizing an existing page's conversion rate - use landing-page-cro instead; for the one-line claim itself use positioning-statement; for the full message ladder use messaging-hierarchy.

SkillMedev/skills

Improves an existing landing page's conversion rate through evidence-first CRO - audit heatmaps and recordings, write structured hypotheses, prioritize with ICE scoring, and run one-variable tests to statistical significance. Use when someone asks "why isn't my landing page converting", "audit this page before we scale spend", "which A/B test should we run first", or after a CVR drop or ahead of a paid-traffic push. Do NOT use for writing a new landing page from scratch - use landing-page-copy instead. Do NOT use for auditing the ad accounts sending the traffic - use paid-acquisition-audit instead. Do NOT use for reading the results of a finished experiment - use ab-test-analyzer instead.

SkillMedev/skills

Runs structured coaching sessions using values clarification and the GROW model, ending every session with one committed action, a deadline, and an if-then plan for the likely obstacle. Use when someone says "I feel stuck in my life", "help me figure out what I want", "hold me accountable to my goals", or "coach me through this decision". Do NOT use for building a stress toolkit - use stress-management instead - or a journaling practice - use journal-framework; for a standing goal-tracking system, use goals-accountability. Coaching, not therapy: signs of clinical distress route to a licensed professional.

SkillMedev/skills

Adapts English content for a target language and region - swapping idioms, setting the right formality register, replacing cultural references, converting dates, units, and currency - and delivers the localized text with a notes column explaining each adaptation and flagging what needs a native reviewer. Use when someone asks "localize this copy for the Japanese market", "adapt our marketing copy for the Mexican market", "make this translation sound native instead of literal", or a literal translation reads foreign, stiff, or risky. Do NOT use for auditing in-product UI text quality - use ux-writing-audit instead.

SkillMedev/skills

Turns a natural-language video brief into a complete, ready-to-preview Remotion composition - extracts duration, scenes, brand colors, aspect ratio, and real copy; plans the frame budget; and writes data-driven React/TypeScript using useCurrentFrame, interpolate, spring, AbsoluteFill, and Sequence, registered in Root.tsx. Use when someone says "build a 20-second product demo video", "animate a feature walkthrough", "write the Remotion code for this marketing clip", or wants a scene-by-scene composition they can scrub in Studio. Do NOT use for rendering, iterating, or batching the finished MP4 - use remotion-render instead - or for installing and scaffolding the project - use remotion-setup instead.

SkillMedev/skills

Scaffolds a new Remotion video project wired for Claude Code Agent Skills - Node check, create-video scaffold, skills install, folder conventions, Google Fonts, and a smoke-test render. Use whenever someone wants to start making videos with Remotion and Claude, even just "make product videos with Claude.

SkillMedev/skills

Classifies incident severity (SEV1-4) using impact, scope, and urgency signals and decides who to page. Use when an alert fires or a report comes in and a severity call must be made quickly.

SkillMedev/skills

Use the Skill Me catalog from inside any conversation - discover, install, and manage Claude skills through the Skill Me MCP, and load installed skills automatically each session.

SkillMedev/skills

Write one platform-native caption from a topic and brand voice, with a front-loaded hook, native length, and a single earned CTA. Use when the user gives a topic (and optionally brand voice or a described image/video) and asks for an Instagram, LinkedIn, X/Twitter, or TikTok caption. Do NOT use when the user wants a dedicated standalone LinkedIn post - use linkedin-post-writer instead; or a multi-post X thread - use tweet-thread-builder instead; or to adapt one existing piece of content into versions for several channels - use cross-platform-reformatter instead.

SkillMedev/skills

Reframe and export a finished video for social platforms - 9:16 ↔ 16:9 cropping, burned-in captions, a platform-native first frame, loop design, and per-platform specs (aspect, length, safe areas) for TikTok, Reels, Shorts, X, and LinkedIn. Use when someone says "make this vertical", "crop to 9:16", "format for TikTok/Reels/Shorts", "add captions/subtitles", "why is my video cut off on mobile", "resize for Instagram", or "export for social". Do NOT use when the question is about the storyboard or shot order before any video exists (use video-storyboard); the animation craft of how elements move (use motion-design-principles); animated word-by-word caption styling (use kinetic-typography); palette, contrast, or lighting (use motion-color-and-light); directing the product-demo content and screen choreography (use product-demo-director); or scoring, beat-syncing, or audio (use sound-and-music-sync) - this is the craft layer that decides WHAT to format for the feed, then hands a concrete spec to remotion-compo...

SkillMedev/skills

Writes and tunes PySpark jobs - join strategy and broadcast size limits, shuffle-partition sizing, skew diagnosis and salting, UDF avoidance, caching, and output file layout - with concrete size and skew thresholds. Use when someone asks "why is my Spark job slow", "should I broadcast this join", "one task takes forever while the rest finish", "my job OOMs during a join", or is writing a new PySpark ETL job. Do NOT use for Kafka topic, consumer-group, or streaming-pipeline design - use kafka-pipelines instead; do NOT use for single-machine dataframe work that fits in memory - use pandas-expert instead.

SkillMedev/skills

Builds clean, performant, accessible SwiftUI views with correct state ownership, scoped invalidation, and smooth list scrolling, and reviews existing SwiftUI code against a concrete frame-time and re-render budget. Use when someone asks "why does my SwiftUI list stutter", "should this be @State or @Observable", "my whole screen re-renders when one row changes", "how do I animate this transition", or wants a SwiftUI view built or refactored. Do NOT use for cross-platform React Native apps - use react-native-pro instead; do NOT use for Flutter widget trees - use flutter-widget-architect instead; do NOT use for Android Compose UIs - use jetpack-compose-builder instead.

相關技能