Communitygithub.com

Manim CE 動画制作パイプライン

3Blue1Brown風の数学・アルゴリズム解説動画をManim Community Editionで作成するためのスキルです。

Manim CE 動画制作パイプライン とは?

このスキルは、Manim Community Edition (v0.20+) を使用して、3Blue1Brownスタイルの教育用アニメーション動画を制作するための完全なパイプラインを提供します。対応モードは、概念解説、数式導出、アルゴリズム可視化、データストーリー、アーキテクチャ図、論文解説、3D可視化など多岐にわたります。ワークフローは「計画→コード→レンダリング→結合→音声追加(オプション)→レビュー」の6ステップで構成され、各シーンは独立してレンダリング可能なPythonスクリプトで記述します。カラーパレット、アニメーション速度、タイポグラフィスケール、シーンごとのバリエーションなど、視覚的な一貫性と教育効果を高めるための詳細なクリエイティブガイドラインが含まれています。また、独創的な表現を求めるユーザー向けに、SCAMPERや前提反転といった発想法も用意されています。

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/delorenj/skills/tree/HEAD/manim-video

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

Manim 動画制作パイプライン

使用タイミング

ユーザーが次のようなリクエストをした場合に使用します: アニメーション解説、数学アニメーション、概念の可視化、アルゴリズムのウォークスルー、技術解説、3Blue1Brownスタイルの動画、または幾何学的・数学的な内容を含むプログラムによるアニメーション。Manim Community Editionを使用して、3Blue1Brownスタイルの解説動画、アルゴリズム可視化、数式導出、アーキテクチャ図、データストーリーを作成します。

クリエイティブ基準

これは教育向けの映像作品です。すべてのフレームが教え、すべてのアニメーションが構造を明らかにします。

コードを1行も書く前に、ナラティブアークを明確にしてください。この動画はどのような誤解を正すものですか?「ahaモーメント」は何ですか?視聴者を混乱から理解へと導く視覚的なストーリーは何ですか?ユーザーのプロンプトは出発点です — 教育学的な意図を持って解釈してください。

代数の前に幾何学を。 方程式の前に形を見せてください。視覚的記憶は記号的記憶よりも速くエンコードされます。視聴者が式の前に幾何学的パターンを見るとき、その方程式は価値のあるものに感じられます。

初回レンダリングでの完成度は譲れません。 出力は視覚的に明確で、修正ラウンドなしで美的にまとまっている必要があります。何かが散らかっていたり、タイミングが悪かったり、「AIが作ったスライド」のように見える場合は、やり直しです。

不透明度の階層で注意を誘導します。 すべてを最大輝度で表示してはいけません。主要要素は1.0、コンテキスト要素は0.4、構造要素(軸、グリッド)は0.15。脳は視覚的な顕著性を階層的に処理します。

余白(間)を取ります。 すべてのアニメーションの後には self.wait() が必要です。視聴者は表示された内容を吸収する時間が必要です。次のアニメーションに急いで移ってはいけません。重要な要素の表示後の2秒のポーズは決して無駄になりません。

一貫したビジュアル言語。 すべてのシーンでカラーパレット、一貫したタイポグラフィサイズ、一致するアニメーション速度を共有します。技術的に正しい動画でも、すべてのシーンでランダムな異なる色を使うのは美的失敗です。

前提条件

scripts/setup.sh を実行してすべての依存関係を確認します。必須: Python 3.10+、Manim Community Edition v0.20+ (pip install manim)、LaTeX (texlive-full on Linux、mactex on macOS)、ffmpeg。リファレンスドキュメントはManim CE v0.20.1でテスト済みです。

モード

モード入力出力リファレンス
概念解説トピック/概念幾何学的直感を伴うアニメーション解説references/scene-planning.md
数式導出数式表現ステップバイステップのアニメーション証明references/equations.md
アルゴリズム可視化アルゴリズム説明データ構造によるステップ実行references/graphs-and-data.md
データストーリーデータ/指標アニメーションチャート、比較、カウンターreferences/graphs-and-data.md
アーキテクチャ図システム説明コンポーネントが接続で構築される様子references/mobjects.md
論文解説研究論文主要な発見と方法のアニメーションreferences/scene-planning.md
3D可視化3D概念回転するサーフェス、パラメトリック曲線、空間幾何学references/camera-and-3d.md

技術スタック

プロジェクトごとに単一のPythonスクリプト。ブラウザ、Node.js、GPUは不要です。

レイヤーツール目的
コアManim Community Editionシーンレンダリング、アニメーションエンジン
数式LaTeX (texlive/MiKTeX)MathTex による数式レンダリング
ビデオI/Offmpegシーン結合、フォーマット変換、音声多重化
TTSElevenLabs / Qwen3-TTS (オプション)ナレーションボイスオーバー

パイプライン

計画 --> コード --> レンダリング --> 結合 --> 音声 (オプション) --> レビュー
  1. 計画 — ナラティブアーク、シーンリスト、視覚要素、カラーパレット、ボイスオーバー台本を含む plan.md を作成
  2. コード — シーンごとに1つのクラスを持ち、それぞれが独立してレンダリング可能な script.py を作成
  3. レンダリング — ドラフトは manim -ql script.py Scene1 Scene2 ...、本番は -qh
  4. 結合 — ffmpegでシーンクリップを結合して final.mp4 を作成
  5. 音声 (オプション) — ffmpegでボイスオーバーや背景音楽を追加。詳細は references/rendering.md
  6. レビュー — プレビュー静止画をレンダリングし、計画と照合して調整

プロジェクト構造

project-name/
  plan.md                # ナラティブアーク、シーン内訳
  script.py              # すべてのシーンを1ファイルに
  concat.txt             # ffmpegシーンリスト
  final.mp4              # 結合された出力
  media/                 # Manimが自動生成
    videos/script/480p15/

クリエイティブディレクション

カラーパレット

パレット背景主要二次アクセントユースケース
Classic 3B1B#1C1C1C#58C4DD (BLUE)#83C167 (GREEN)#FFFF00 (YELLOW)一般数学/CS
Warm academic#2D2B55#FF6B6B#FFD93D#6BCB77親しみやすい
Neon tech#0A0A0A#00F5FF#FF00FF#39FF14システム、アーキテクチャ
Monochrome#1A1A2E#EAEAEA#888888#FFFFFFミニマリスト

アニメーション速度

コンテキストrun_time後の self.wait()
タイトル/導入表示1.5s1.0s
主要数式表示2.0s2.0s
変換/モーフィング1.5s1.5s
補助ラベル0.8s0.5s
フェードアウト後片付け0.5s0.3s
「Ahaモーメント」表示2.5s3.0s

タイポグラフィスケール

役割フォントサイズ使用法
タイトル48シーンタイトル、開始テキスト
見出し36シーン内のセクションヘッダー
本文30説明テキスト
ラベル24注釈、軸ラベル
キャプション20字幕、細かい印刷

フォント

すべてのテキストに等幅フォントを使用してください。 ManimのPangoレンダラーは、プロポーショナルフォントでサイズを問わずカーニングが壊れます。完全な推奨事項は references/visual-design.md を参照してください。

MONO = "Menlo"  # ファイルの先頭で一度定義

Text("Fourier Series", font_size=48, font=MONO, weight=BOLD)  # タイトル
Text("n=1: sin(x)", font_size=20, font=MONO)                  # ラベル
MathTex(r"\nabla L")                                            # 数式 (LaTeX使用)

読みやすさのための最小 font_size=18。

シーンごとのバリエーション

すべてのシーンで同一の設定を使用しないでください。各シーンで:

  • パレットから異なるドミナントカラー
  • 異なるレイアウト — 常に中央に配置しない
  • 異なるアニメーション開始方法 — Write、FadeIn、GrowFromCenter、Create を変える
  • 異なる視覚的重み — 密なシーンと疎なシーンを混ぜる

ワークフロー

ステップ1: 計画 (plan.md)

コードを書く前に、plan.md を作成します。包括的なテンプレートについては references/scene-planning.md を参照してください。

ステップ2: コード (script.py)

シーンごとに1つのクラス。すべてのシーンは独立してレンダリング可能です。

from manim import *

BG = "#1C1C1C"
PRIMARY = "#58C4DD"
SECONDARY = "#83C167"
ACCENT = "#FFFF00"
MONO = "Menlo"

class Scene1_Introduction(Scene):
    def construct(self):
        self.camera.background_color = BG
        title = Text("Why Does This Work?", font_size=48, color=PRIMARY, weight=BOLD, font=MONO)
        self.add_subcaption("Why does this work?", duration=2)
        self.play(Write(title), run_time=1.5)
        self.wait(1.0)
        self.play(FadeOut(title), run_time=0.5)

主要なパターン:

  • すべてのアニメーションに字幕: self.add_subcaption("text", duration=N) または self.play() に subcaption="text"
  • シーン間の一貫性のためにファイル先頭で共有色定数
  • すべてのシーンで self.camera.background_color を設定
  • クリーンな終了 — シーン終了時にすべてのモブジェクトをFadeOut: self.play(FadeOut(Group(*self.mobjects)))

ステップ3: レンダリング

manim -ql script.py Scene1_Introduction Scene2_CoreConcept  # ドラフト
manim -qh script.py Scene1_Introduction Scene2_CoreConcept  # 本番

ステップ4: 結合

cat > concat.txt << 'EOF'
file 'media/videos/script/480p15/Scene1_Introduction.mp4'
file 'media/videos/script/480p15/Scene2_CoreConcept.mp4'
EOF
ffmpeg -y -f concat -safe 0 -i concat.txt -c copy final.mp4

ステップ5: レビュー

manim -ql --format=png -s script.py Scene2_CoreConcept  # プレビュー静止画

重要な実装ノート

LaTeX用の生文字列

# 間違い: MathTex("\frac{1}{2}")
# 正解:
MathTex(r"\frac{1}{2}")

エッジテキストには buff >= 0.5

label.to_edge(DOWN, buff=0.5)  # 決して < 0.5 にしない

テキスト置換前のFadeOut

self.play(ReplacementTransform(note1, note2))  # 上からWrite(note2)しない

追加されていないモブジェクトをアニメーションしない

self.play(Create(circle))  # 先に追加する必要がある
self.play(circle.animate.set_color(RED))  # その後アニメーション

パフォーマンス目標

品質解像度FPS速度
-ql (ドラフト)854x480155-15秒/シーン
-qm (中)1280x7203015-60秒/シーン
-qh (本番)1920x10806030-120秒/シーン

常に -ql で反復します。最終出力のみ -qh でレンダリングします。

リファレンス

ファイル内容
references/animations.mdコアアニメーション、レート関数、構成、.animate 構文、タイミングパターン
references/mobjects.mdテキスト、シェイプ、VGroup/Group、配置、スタイリング、カスタムモブジェクト
references/visual-design.md12のデザイン原則、不透明度階層、レイアウトテンプレート、カラーパレット
references/equations.mdManimでのLaTeX、TransformMatchingTex、導出パターン
references/graphs-and-data.mdAxes、プロット、BarChart、アニメーションデータ、アルゴリズム可視化
references/camera-and-3d.mdMovingCameraScene、ThreeDScene、3Dサーフェス、カメラ制御
references/scene-planning.mdナラティブアーク、レイアウトテンプレート、シーン遷移、計画テンプレート
references/rendering.mdCLIリファレンス、品質プリセット、ffmpeg、ボイスオーバーワークフロー、GIFエクスポート
references/troubleshooting.mdLaTeXエラー、アニメーションエラー、よくある間違い、デバッグ
references/animation-design-thinking.mdいつアニメーションするか vs 静的表示、分解、ペーシング、ナレーション同期
references/updaters-and-trackers.mdValueTracker、add_updater、always_redraw、時間ベースのアップデータ、パターン
references/paper-explainer.md研究論文をアニメーションに変換 — ワークフロー、テンプレート、ドメインパターン
references/decorations.mdSurroundingRectangle、Brace、矢印、DashedLine、Angle、注釈ライフサイクル
references/production-quality.mdコード前、レンダリング前、レンダリング後のチェックリスト、空間レイアウト、色、テンポ

クリエイティブな発散 (ユーザーが実験的/創造的/ユニークな出力をリクエストした場合のみ使用)

ユーザーが標準的な説明に対して創造的、実験的、または型にはまらないアプローチを求める場合、戦略を選択し、アニメーションを設計する前にそれについて深く考えてください。

  • SCAMPER — ユーザーが標準的な説明に新鮮な解釈を求めるとき
  • 前提反転 — ユーザーが典型的な教え方に挑戦したいとき

SCAMPER変換

標準的な数学的/技術的可視化を取り上げ、変換します:

  • Substitute (代用): 標準的な視覚メタファーを置き換える (数直線 → 曲がりくねった道、行列 → 市街地グリッド)
  • Combine (結合): 2つの説明アプローチを融合する (代数的 + 幾何学的を同時に)
  • Reverse (反転): 逆向きに導出する — 結果から始めて公理まで分解する
  • Modify (修正): パラメータを誇張して、なぜそれが重要なのかを示す (学習率を10倍、サンプルサイズを1000倍)
  • Eliminate (除去): すべての表記法を削除 — アニメーションと空間的関係だけで純粋に説明する

前提反転

  1. このトピックがどのように可視化されるかについて「標準的」なことをリストアップする (左から右へ、2D、離散的ステップ、形式的表記)
  2. 最も基本的な前提を選ぶ
  3. それを反転させる (右から左への導出、2D概念の3D埋め込み、ステップの代わりに連続的変形、表記ゼロ)
  4. 反転によって、標準的なアプローチが隠している何が明らかになるかを探る

Individual skills in this repo

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

delorenj/skills

Plan and generate terminal ASCII animations/screensaver-style output (FPS, refresh rules, loop policy, low-flicker guidance), with a static poster frame and an optional local demo script.

delorenj/skills

ASCII video: convert video/audio to colored ASCII MP4/GIF.

delorenj/skills

Plan, build and quality-check a premium short commercial for a real business (roofing, property, ecommerce, B2B software) using AI-generated footage, code-built motion (HTML/GSAP), selective Three.js and an independent-critic "Gauntlet" loop. Use when asked to make a launch-style / SaaS-style video, business ad, explainer, sample reel or pitch video, or to review and improve one. Encodes motion principles distilled from 28 professional launch films, a quality bar, audio rules and a business-offer playbook.

delorenj/skills

CSS animation adapter patterns for HyperFrames. Use when authoring CSS keyframes, animation-delay based timing, animation-fill-mode, animation-play-state, or CSS-only motion that HyperFrames must seek deterministically during preview and rendering.

delorenj/skills

Generate professional voiceovers using ElevenLabs AI. Use when the user needs to create voiceovers for videos, audio narration, or text-to-speech content. Supports multiple voices with character presets (narrator, salesperson, expert) for natural delivery. Includes single scene regeneration for fine-tuning.

delorenj/skills

HyperFrames CLI dev loop — `npx hyperframes` for scaffolding (init), validation (lint, inspect), preview, render, and environment troubleshooting (doctor, browser, info, upgrade). Use when running any of these commands or troubleshooting the HyperFrames build/render environment. For asset preprocessing commands (`tts`, `transcribe`, `remove-background`), invoke the `hyperframes-media` skill instead.

delorenj/skills

Asset preprocessing for HyperFrames compositions — text-to-speech narration (Kokoro), audio/video transcription (Whisper), and background removal for transparent overlays (u2net). Use when generating voiceover from text, transcribing speech for captions, removing the background from a video or image to use as a transparent overlay, choosing a TTS voice or whisper model, or chaining these (TTS → transcribe → captions). Each command downloads its own model on first run.

delorenj/skills

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, and registry discovery.

delorenj/skills

Create video compositions, animations, title cards, overlays, captions, voiceovers, audio-reactive visuals, and scene transitions in HyperFrames HTML. Use when asked to build any HTML-based video content, add captions or subtitles synced to audio, generate text-to-speech narration, create audio-reactive animation (beat sync, glow, pulse driven by music), add animated text highlighting (marker sweeps, hand-drawn circles, burst lines, scribble, sketchout), or add transitions between scenes (crossfades, wipes, reveals, shader transitions). Covers composition authoring, timing, media, and the full video production workflow. For dev-loop CLI commands (init, lint, inspect, preview, render) see the hyperframes-cli skill; for asset preprocessing commands (tts, transcribe, remove-background) see the hyperframes-media skill.

delorenj/skills

Join a Google Meet or Zoom call as a video meeting agent via PikaStreaming. Trigger: user drops a Google Meet or Zoom link, or asks to join a meeting.

delorenj/skills

Translate an existing Remotion (React-based) video composition into a HyperFrames HTML composition. Use ONLY when the user explicitly asks to port, convert, migrate, translate, or rewrite a Remotion composition as HyperFrames (e.g. "port my Remotion project to HyperFrames"). Do NOT use when (a) authoring a NEW HyperFrames composition (even if A/B-testing a Remotion video); (b) Remotion is mentioned in passing; (c) Remotion code is shared as reference, not for translation; (d) the user wants "the same video as my Remotion one" without explicitly asking to migrate the source — treat as a fresh HyperFrames build. When in doubt, default to the `hyperframes` skill. Detects unsupported patterns (useState, useEffect side effects, async calculateMetadata, third-party React component libraries, `@remotion/lambda`) and recommends the runtime interop escape hatch instead of a lossy translation.

delorenj/skills

Generate speech using the self-hosted voxxy (vox) TTS service at https://vox.delo.sh. Use when the user asks to speak, say, narrate, synthesize speech, clone a voice, create a voice, add or register a voice, pipe TTS, or control voice qualities by description (e.g. "a young woman with a cheerful voice"). Handles HTTP API usage, voice profile management, description-based voice design, cloning, MCP registration, and integration patterns for new platforms.

delorenj/skills

Capture a website and create a HyperFrames video from it. Use when: (1) a user provides a URL and wants a video, (2) someone says "capture this site", "turn this into a video", "make a promo from my site", (3) the user wants a social ad, product tour, or any video based on an existing website, (4) the user shares a link and asks for any kind of video content. Even if the user just pastes a URL — this is the skill to use.

delorenj/skills

YouTube transcripts to summaries, threads, blogs.

関連スキル