remotion-render
Renders a Remotion composition to MP4 and runs the edit-and-re-render loop - CLI render commands, 1080p/4K/9:16 presets, concurrency tuning, codec selection, batch variants from a JSON data file, and Lambda for cloud rendering. Use when someone says "render this Remotion video", "export the composition to MP4", "the animation is too fast, fix and re-render", "batch render one video per customer", or "move rendering to Lambda". Do NOT use for authoring or restructuring scenes, animations, or components - use remotion-compose instead; do NOT use for project scaffolding and initial setup - use remotion-setup instead. This skill owns everything from a finished composition to a delivered file.
- License 许可
- MIT
- 最近更新
- 2026-10-14
- Stars
- ★ 25
- Forks
- 3
01 前言 Front Matter
- name
- remotion-render
- metadata
- { "title": "Remotion Render" }
- description
- Renders a Remotion composition to MP4 and runs the edit-and-re-render loop - CLI render commands, 1080p/4K/9:16 presets, concurrency tuning, codec selection, batch variants from a JSON data file, and Lambda for cloud rendering. Use when someone says "render this Remotion video", "export the composition to MP4", "the animation is too fast, fix and re-render", "batch render one video per customer", or "move rendering to Lambda". Do NOT use for authoring or restructuring scenes, animations, or components - use remotion-compose instead; do NOT use for project scaffolding and initial setup - use remotion-setup instead. This skill owns everything from a finished composition to a delivered file.
03 SKILL.md 正文
Remotion Render
Drive the render-and-iterate loop: turn a composition into an MP4, take natural-language feedback, make the smallest edit that satisfies it, and re-render. The costly failure mode is the opposite loop - rewriting whole scene files for a copy tweak, or re-rendering at full quality for every check - which destroys the approved work and the iteration speed that makes Remotion worth using.
Operating procedure
Step 1: Gather inputs
- Composition ID (the
idon the<Composition>insrc/Root.tsx, not a filename) and the entry point (the file callingregisterRoot, typicallysrc/index.ts). - Target: platform/aspect (landscape 16:9, vertical 9:16, square), resolution (1080p default; 4K only on request), and whether transparency is needed.
- Machine cores (for concurrency) and whether this is one render, an iteration session, or a batch.
Step 2: The base render
npx remotion render src/index.ts <CompositionId> out/video.mp4
Default output is H.264 MP4 at the composition's own width/height/fps; Remotion creates out/ if needed.
Step 3: Resolution, fps, and codec presets
Resolution and fps live on the <Composition> (width/height/fps) - change them at the source. Use flags only for scaling and container:
# 1080p landscape - Composition authored 1920x1080@30
npx remotion render src/index.ts ProductDemo out/1080p.mp4
# 4K - upscale the 1080p canvas without touching layout
npx remotion render src/index.ts ProductDemo out/4k.mp4 --scale=2
# 9:16 vertical - render a Composition authored at 1080x1920
npx remotion render src/index.ts ProductDemoVertical out/vertical.mp4
Codec rules:
- Social/web delivery stays H.264 MP4 (the default) - maximum compatibility.
- Transparency:
--codec=vp8orvp9(WebM), or--codec=proreswith alpha for editing pipelines. H.264 cannot carry alpha. - True 60fps means
fps={60}on the Composition with frame counts scaled to match - a flag-only fps change desyncs every animation timed in frames.
Step 4: Tune concurrency
Rendering is CPU-bound (each frame is a headless-Chromium screenshot). Default is roughly half the cores; explicit tuning is the easiest local speedup:
npx remotion render src/index.ts ProductDemo out/video.mp4 --concurrency=8
Start at the number of physical cores (--concurrency=50% accepts a percentage); back off if the machine swaps or thermal-throttles - past the sweet spot, more Chromium tabs make it slower, not faster.
Step 5: Run the iterative refinement loop
Keep Studio open (npx remotion studio, http://localhost:3000) so the user previews instantly; reserve full renders for sign-off.
- User previews in Studio and gives feedback in plain language.
- Translate it to a surgical edit - change only the relevant value:
- "Too fast" → widen the
interpolateinput range or raise springdamping. - "Logo should pop more" → lower spring
damping/ add overshoot. - "Change the CTA copy" → edit the prop /
defaultProps, touch nothing else. - "Different accent color" → change one hex in the colors object.
- "Hold the last feature longer" → bump that
<Sequence>'sdurationInFramesAND re-derive the Composition's totaldurationInFrames.
- "Too fast" → widen the
- Re-render, or let Studio hot-reload for the visual check.
Surgical edit vs rewrite: edit in place when the change is a value, prop, color, or one scene's timing; rewrite only when scene structure changes (adding/removing/reordering scenes - and route structural authoring to remotion-compose). Default to surgical: it preserves everything already approved.
Step 6: Batch variants
The composition is data-driven, so N variants = N prop sets in a JSON file:
[
{ "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 takes inline JSON or a file path; for more than a couple of variants, write a small Node script that reads the JSON and shells out per entry, or use @remotion/renderer's renderMedia() for a typed loop. Localize or A/B copy and colors entirely by editing the JSON.
Step 7: Lambda when local is the bottleneck
Reach for Lambda when a single render takes minutes locally or the batch is large - it fans frames out across serverless workers. Otherwise local is simpler and free.
npx remotion lambda functions deploy # one-time per AWS account/region
npx remotion lambda sites create src/index.ts --site-name=product-demo
npx remotion lambda render product-demo ProductDemo --props='{"logoText":"Acme"}'
Requires AWS credentials and IAM permissions per Remotion's Lambda setup.
Step 8: Troubleshoot the three common failures
- Frame-count mismatch - animation cuts off early or the clip has a dead tail. Cause: a
<Sequence>duration changed but the Composition total did not. Fix: make the total equal the sum of its sequences; recompute after every timing edit. This is the #1 render surprise. - Missing
staticFile()reference - render fails or an asset is blank. Cause: an asset imported by path or outsidepublic/. Fix: put it inpublic/assets/and referencestaticFile("assets/<name>"). - Font flash/fallback - text renders in the wrong font or shifts. Cause:
@remotion/google-fontsloadFont()missing or called too late. Fix: callloadFont()at module top level and apply the returnedfontFamily; the render then waits for the font.
Deliverable
A rendered file in out/ at the requested preset, plus - for iteration sessions - the loop offer: name the tweakable dimensions (pacing, copy, color, timing) and re-render on feedback. For batches, the variants JSON and the per-variant outputs.
Do NOT
- Do NOT rewrite a scene file for a value-level change - surgical edits preserve approved work.
- Do NOT change fps via flags alone - set it on the Composition and rescale frame counts.
- Do NOT change a Sequence duration without re-deriving the Composition's total
durationInFrames. - Do NOT full-render every iteration - Studio hot-reload is the preview loop; render at sign-off.
- Do NOT push concurrency past physical cores on a machine that is swapping or throttling.
- Do NOT reach for Lambda when local renders finish in seconds - it adds AWS setup and cost for nothing.
- Do NOT author new scenes or restructure the composition here - that is remotion-compose.
Quality bar
- The output plays at the requested resolution/aspect/fps with no dead tail and no early cutoff (Composition total matches sequence sum).
- Assets and fonts render correctly on the first frame - no fallback-font flash, no blank assets.
- An iteration changed only the lines the feedback required; everything previously approved is untouched.
- Batch outputs differ only by their prop sets.
Escalation
Scene authoring, animation design, and component structure go to remotion-compose; project scaffolding to remotion-setup; scoring and audio timing to sound-and-music-sync.
04 同仓库更多 Skills
有氧运动计划
zone-2-cardio-plan
当有人要求制定稳态有氧训练计划、进行有氧基础训练或达到第二区间、安排轻松或耐力型的每周有氧训练、按心率区间训练,或提高静息心率、最大摄氧量或耐力时,可以使用此方案。该方案构建了一个包含训练计划结构、训练方式选择和进度安排的心率区间有氧训练模块。本方案仅提供一般健身指导,不构成医疗建议。请勿用于设计力量或举重训练计划(请使用力量训练计划)、高强度间歇训练 (HIIT) 或循环训练(请使用体能训练和 HIIT 计划),或灵活性/柔韧性训练(请使用灵活性训练计划)。
youtube-script-writer
Writes retention-engineered long-form YouTube scripts on a hook/body/payoff architecture - a first-30-seconds hook that survives the retention cliff, a beat-sheet body with mini-hooks and bridges, timed pattern interrupts, and a payoff that over-delivers - with B-roll and editing cues marked inline. Use when someone says "script my next video", "my retention graph dies at the start", "tighten this draft", or "outline a video on X". Do NOT use for the 3-second opener of TikTok, Reels, or Shorts - use video-hook-writer instead; do NOT use for spoken voiceover synced to on-screen tutorial actions - use narration-script instead; do NOT use for a sales demo built on a buyer's discovery notes - use demo-script instead; do NOT use to design the thumbnail and title - use thumbnail-concept instead.
win-back-campaign
Designs segmented win-back email sequences for dormant users - dormancy tiers, a three-beat sequence with a single proportional incentive, and a suppression rule - and measures success by re-activation, not opens. Use when someone says "our users went quiet", "design a win-back campaign", "how do I re-engage lapsed customers", "should we email people who haven't logged in for months", or lifecycle messaging has stopped landing with a lapsed segment. Do NOT use for recovering an unfinished checkout - use abandoned-cart-sequence instead. Do NOT use for diagnosing and fixing why active customers cancel - use churn-reduction instead. Do NOT use for building always-on onboarding or nurture flows - use email-drip-builder instead.
wikipedia-style
Writes neutral, verifiable, encyclopedic prose following Wikipedia's core content policies and manual of style - NPOV, inline citations, notability-backed claims, and a strict ban on promotional language. Use when someone asks "write this like a Wikipedia article", "draft a Wikipedia page for this company or person", "make this neutral and encyclopedic", or "why does my article draft keep getting rejected". Do NOT use for persuasive or opinion writing - use op-ed-writer instead; for thesis-driven academic papers, use academic-essay; for verifying claims in existing text, use fact-checker.
whitepapers
Structures and writes authoritative B2B whitepapers - a standalone executive summary, a data-sized problem statement, methodology, evidence-driven findings, recommendations, and a soft call to action - flagging every claim that needs a real citation. Use when a marketer asks "write a whitepaper on this topic", "turn our research into a lead-gen asset", "make this credible enough for executives", or a draft reads like a product pitch instead of analysis. Do NOT use for customer-story-driven proof - use case-study-builder instead; for policy audiences, use policy-brief.
white-space-analysis
Finds unmet market gaps by ranking jobs-to-be-done on importance versus satisfaction, overlaying them against current solutions and workarounds, and validating that each gap is real, winnable, and worth winning. Use when someone asks "where are the gaps in this market", "what's underserved here", "where should we play next", or is hunting for product, feature, or market-entry opportunities. Do NOT use for profiling competitors and building battle cards - use competitive-intelligence instead; for putting a dollar figure on an identified opportunity - use market-sizing instead; for extracting jobs-to-be-done from raw customer interviews - use jtbd-extractor instead.