Remotion Physics Explainer(remotion-physics-explainer)
概述
將任何物理概念、定律或問題轉化為沈浸式、影格同步的 1920×1080 30fps MP4 Remotion 解釋影片,採用單面板 Log2Base2 Studio 格式。
切勿將畫面分割為競爭的並排窗格或堆疊的文字卡片牆。每支影片皆使用一個統一的視覺舞台(<SinglePaneStage>):
- 極簡頂部欄(
44px,內建於SinglePaneStage中):- 左側顯示主題標題 + 活躍區段標籤;右側顯示細微的步驟計數器 + 細進度條。
- 一個統一的 Log2Base2 舞台(
SinglePaneStage— 100% 寬度):- 聚焦的單行重點標頭:以
borderBottom: "2px solid #FACC15"高亮目前口說的物理符號(F,m,a,E,B,λ,Ψ,ΔS)在活躍方程式行中(切勿添加水平內距),並在triggerFrame處加上一個緊湊的活躍呼叫標籤(符號→物理意義 + SI 單位)。 - 全寬沉浸式 SVG 畫布(
viewBox="0 0 1600 680"):寬敞的即時物理模擬——擺錘、拋物線軌跡、帶電粒子在 $\vec{B}$ 場中彎曲、干涉波前、能量棒傳遞與即時向量疊加——直接在同一開放畫布上動畫化。
- 聚焦的單行重點標頭:以
- 極簡底部字幕欄(
VoiceoverCaptionBar—68px):- 由精確的 TTS
WordBoundary時間戳驅動的乾淨居中卡拉 OK 逐字高亮字幕。
- 由精確的 TTS
相依性
remotion-best-practices(~/.gemini/skills/remotion/SKILL.md):必須遵守所有 Remotion 動畫規則(useCurrentFrame(),interpolate(),spring(),<Sequence premountFor>,<Audio>,@remotion/google-fonts,以及零 CSS 轉場)。uv(~/.gemini/config/plugins/science/skills/uv/SKILL.md):執行uv run --with edge-tts所需。
快速開始
# 1. 腳手架 Remotion 物理解釋器專案
uv run python3 \
~/.gemini/config/skills/remotion-physics-explainer/scripts/explainer_cli.py \
scaffold \
--project-dir "/path/to/project" \
--output "/path/to/project/scaffold-status.json"
# 2. 合成自然神經語音 + 精確 WordBoundary 時間戳
uv run --with edge-tts python3 \
~/.gemini/config/skills/remotion-physics-explainer/scripts/explainer_cli.py \
synthesize-voiceover \
--project-dir "/path/to/project" \
--beats-json "/path/to/project/beats.json" \
--voice "en-US-AndrewNeural" \
--rate "+2%" \
--pause-sec 0.40 \
--output "/path/to/project/public/voiceover/manifest.json"
# 3. 渲染最終 1080p 30fps MP4
uv run python3 \
~/.gemini/config/skills/remotion-physics-explainer/scripts/explainer_cli.py \
render-mp4 \
--project-dir "/path/to/project" \
--composition-id "PhysicsExplainer" \
--out-name "PhysicsExplainer.mp4" \
--concurrency 8 \
--output "/path/to/project/render-report.json"
沉浸式故事講述與工作流程
- 保持
snippet聚焦(2–4行),以便<SinglePaneStage>每次重點顯示一個活躍方程式和一個活躍符號呼叫標籤。 - 在包含連續物理運動(擺錘、波動、場、粒子)的節拍上設定
"motionStepFrames": 2。 - 展示,而非講述:在同一全寬
1600×680SVG 畫布內(使用<clipPath>處理移動圖表/波動),同時動畫化力、場、能量交換與即時運動圖表,切勿使用分割畫面框。 - 務必執行
npm run lint,使用read_file檢查代表性靜止影格(npx remotion still),並將最終.mp4儲存至out/、專案根目錄以及工作區根目錄。