Skip to main content
Glama
Tarunls
by Tarunls

manim-storyboard

Manim のシーン内のすべてのアニメーションを、ラベル付きの一覧シートとして表示し、作成したストーリーボードと照合できます。

意図付きコンタクトシート

97ステップのシーンの最初の18ステップ。シアンはレンダリングされたもの、琥珀色はあなたがそうすべきだと言ったものです。

なぜ必要か

Manim はシーンがレンダリングされたことを教えてくれます。しかし、チャプタータイトルが右端からはみ出したことや、バナーがその下のテキストの上に重なったことは教えてくれません。それらは実際に見ることでのみ確認でき、見るためには mp4 をスクラブするか、タイムスタンプを推測して静止画を抽出する必要があります。

推測では多くのサンプルが無駄になります。2つのセクション間のフェードは黒フレームであり、手動で選んだタイムスタンプの約4分の1がそれにあたります。

より良い情報源があります。Manim は self.play() の呼び出しごとに1つのクリップpartial_movie_files/ に書き込み、それらを順にリストします。それぞれの最後のフレームを取得すれば、各アニメーションの整ったフレームが順番に、無駄なく得られます。これがこのアイデアの核心です。

インストール

pip install manim-storyboard

ffmpeg が PATH 上にあるか、FFMPEG_EXECUTABLEFFPROBE_EXECUTABLE がバイナリを指している必要があります。これは manim-mcp-server が使用しているのと同じ規約であるため、既存のセットアップがそのまま動作します。

使い方

シーン全体の1枚のシート:

manim-storyboard sheet scene.py MyScene
97 panels -> storyboard_MyScene.png

各パネルには、インデックス、最終ビデオ内での開始時刻、持続時間、および実際に実行されたアニメーションクラスが表示されます:

#012   0:08.5   1.33s
LaggedStart[Write, FadeIn x2]

グループは1レベル展開されるため、ファイルを開かなくても LaggedStart の中に何があるかを確認できます。self.wait() は、manim がそれを独自のクリップとしてレンダリングするため、独自のパネルを持ちます。

大きなシーンのページ:

manim-storyboard sheet scene.py MyScene --range 1-40 --columns 6

manim CLI で既にレンダリング済みで、シートだけが必要な場合:

manim-storyboard sheet scene.py --from-media media/videos/scene/480p15/partial_movie_files/MyScene

試してみる

examples/ には、LaTeX やアセットを含まない小さなシーンと、その完成したストーリーボードがあります:

manim-storyboard sheet examples/demo_scene.py DemoScene -s examples/storyboard.yaml
manim-storyboard check examples/demo_scene.py DemoScene -s examples/storyboard.yaml

デモコンタクトシート

ストーリーボード

ストーリーボードは、各ステップが何をすべきかを示す YAML ファイルです。シーンが存在する前に手動で作成するか、レンダリングからスキャフォールドします:

manim-storyboard plan scene.py MyScene            # scaffold from what rendered
manim-storyboard plan scene.py MyScene --blank 40 # 40 empty steps to fill in
scene: LarpGuide
steps:
  - at: 1
    section: cold open
    intent: the overheard question fades up on an empty frame
    expect: [FadeIn]
  - at: 7
    intent: the title writes on, RENT-A-GIRLFRIEND FAN
    expect: [Write]
  - at: 9
    intent: pink flash pops on the word FAN
    expect: [Flash]
  - at: 11
    intent: clear everything before chapter one
    expect: [FadeOut]

intent はあなたのための散文です。expect はそのステップで使用する予定のアニメーションタイプであり、これが検証される対象です:

manim-storyboard check scene.py MyScene -s storyboard.yaml
step 7: [drift] expected FadeIn but rendered Write
step 9: [drift] expected Circumscribe but rendered Flash
step 400: [missing] plan has step 400 but the render stopped at 97

ストーリーボードを sheet にフィードバックすると、すべてのパネルにその意図が印刷され、ずれたステップは赤で囲まれます:

manim-storyboard sheet scene.py MyScene -s storyboard.yaml

知っておくべきルール

カウントはオプトインです。 expect: [FadeOut] は「このステップは何かをフェードアウトする」ことを意味し、任意の数に対して合格します。ステージをクリアするヘルパーは、たまたまステージ上にあるモブジェクトをいくつでもフェードアウトするため、1つ追加するたびに計画を更新する必要はありません。正確な数が重要な場合は、expect: [FadeOut x6] と記述すると、比較が厳密になり、順序にも影響します。

部分的な計画でも問題ありません。 expect を宣言しているステップのみがチェックされます。計画は冒頭のみをカバーし、残りについては何も言及しないことができます。--strict を渡すと、計画で一度も言及されていないレンダリング済みのステップもフラグ付けされます。

散文のみの計画は決して失敗しません。 intent のみで expect がないステップは、シートのラベルであり、アサーションではありません。

グループの内容は無視されます。 expect: [LaggedStart]LaggedStart[Write, FadeIn x2] によって満たされます。ラッパーと一致させ、その子要素とは一致させないでください。

MCP

MCP 経由の同じ3つのツール。これにより、Manim を記述するエージェントが自身の出力を確認できます:

pip install "manim-storyboard[mcp]"
python -m manim_storyboard.mcp_server
{
  "mcpServers": {
    "manim-storyboard": {
      "command": "python",
      "args": ["-m", "manim_storyboard.mcp_server"],
      "env": {
        "FFMPEG_EXECUTABLE": "C:\\ffmpeg\\bin\\ffmpeg.exe",
        "FFPROBE_EXECUTABLE": "C:\\ffmpeg\\bin\\ffprobe.exe"
      }
    }
  }
}

storyboard_sheetstoryboard_planstoryboard_checkstoryboard_from_media を公開します。既に実行している manim MCP サーバーにこれらを追加するには:

from manim_storyboard.mcp_server import register
register(my_fastmcp_instance)

Python

from pathlib import Path
from manim_storyboard import record, build, load, check

take = record(Path("scene.py"), "MyScene", quality="low_quality")
plan = load(Path("storyboard.yaml"))

for issue in check(plan, take.steps):
    print(issue.index, issue.kind, issue.message)

build(take.steps, Path("sheet.png"), columns=6, plan=plan)

record() は、1回のレンダリングの間、Scene.play をラップするため、マニフェストがディスク上のクリップと正確に一致します。その後、レンダリングが例外を発生させた場合も含め、元のメソッドを復元します。

開発

pip install -e ".[dev]"
pytest

計画一致テストには、manim も ffmpeg も必要ありません。

ライセンス

MIT

-
license - not tested
-
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

  • OCR, transcription, file extraction, and image generation for AI agents via MCP.

  • Generate on-brand images from your AI agent: design, edit, and render templates over MCP.

  • MCP server for Clipkit — gives AI agents a video toolbox via the Clipkit schema.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Tarunls/manim-storyboard'

If you have feedback or need assistance with the MCP directory API, please join our Discord server