SuperAPI AI Directory

manim-video-teacher

Design & creation

View repository

Updated 10-16 00:00

About this skill

Manim Animated Instructional Videos

Quick Goal

Use the user's Chinese prompts to produce an executable Manim plan: script/storyboard/code/render commands, and explain key instructional design choices.

Minimum Information to Collect First

  • Topic and audience: what is being taught, who it is for
  • Duration and pacing: total duration, fast or slow, whether to divide into chapters
  • Visual style: blackboard style, clean linear style, whether to emphasize color scheme
  • Math/code content: formulas, pseudocode, or sample data

If the user does not provide them, first make reasonable defaults and state the assumptions.

Workflow

  1. Rewrite the user's prompt into an instructional script (structured paragraphs: introduction-core-summary).
  2. Provide a storyboard for each script segment (visual goal, key animations, narration points).
  3. Design the visual language (color/font size/alignment/highlighting rules) and keep it consistent.
  4. Generate Manim code (clear Scene structure, explicit variable naming).
  5. Provide render commands and parameter suggestions (resolution, fps, quality).
  6. Use scripts to generate narration audio, and optionally produce synchronized subtitles (SRT).
  7. Use scripts to composite video and audio, and embed subtitles into the output when necessary.
  8. Use scripts to generate a separate cover image (suitable for distribution/sharing platforms).
  9. Briefly explain key instructional design choices (why the storyboard/transitions/emphasis are done this way).

Instructional Script Template

Use short sentences and a speakable rhythm:

  1. Introduction: problem/phenomenon/motivation (1-2 sentences)
  2. Definition: core concept (1-3 sentences)
  3. Mechanism: key steps or derivation (divided into 2-5 steps)
  4. Example: verify with 1 concrete example
  5. Summary: tie back to the key point in one sentence

Storyboard Granularity Suggestions

  • One shot block every 15-30 seconds to avoid excessive information density
  • Each derivation step or key conclusion should be its own shot
  • Each shot should have at most 1-2 main visual objects

Manim Code Conventions

  • Use Scene or MovingCameraScene, and try to keep a single scene reusable.
  • Split complex animations into small functions (such as show_definition())。
  • Use VGroup to organize elements and unify alignment and spacing.
  • Use FadeIn/FadeOut/Transform/ReplacementTransform to convey logical transitions.
  • For text, use Tex/MathTex as much as possible to keep mathematical typesetting consistent; for pure Chinese explanations, use Text。

Default Technical Parameters

  • Resolution: 1920x1080
  • fps:30
  • Render quality:-qh as the default
  • Output: MP4

Visual and Pacing Defaults

  • Primary color: choose either blue or orange, and keep it consistent
  • Accent color: bright yellow or red, used only for key conclusions
  • Whitespace: leave a 10-15% safe area at the screen edges
  • Narration pace: 120-150 characters per minute

Script First

Prefer using the scripts under scripts/ to complete speech generation, compositing, and cover creation, without requiring the user to write commands manually.

Available scripts:

  • scripts/tts_generate.py: convert narration text to audio (edge-tts), available --subs-output subs.srt Output subtitles
  • scripts/concat_audio.py: Merge multiple narration segments (ffmpeg concat)
  • scripts/mux_av.py: Composite video and audio (ffmpeg), can use --subs subs.srt to embed subtitles
  • scripts/make_cover.py: Generate a 16:9 cover image (Pillow)
  • scripts/pipeline.py: One-click execution of speech, compositing, and cover generation
    • Optional parameters:--dry-run Do not execute the output command,--verbose show the execution command,--log-file record the command list (overwrite by default),--append-log append records
    • Subtitle parameters:--subs-output subs.srt(TTS-generated subtitles),--subs subs.srt(use existing subtitles)

If the script reports missing dependencies, prompt the user to install the corresponding dependencies (edge-tts, ffmpeg, Pillow).

Example (recommended):

python scripts/pipeline.py \\
  --video manim.mp4 \\
  --tts-file narration.txt \\
  --subs-output subs.srt \\
  --cover-title "二次函数顶点式" \\
  --cover-subtitle "60 秒掌握" \\
  --output output.mp4

Cover image specifications and recommendations

  • Aspect ratio: 16:9
  • Size: 1920x1080 (consistent with the main video)
  • Text hierarchy: 1 title line + 1 subtitle line (optional)
  • Information structure: large title on the left, diagram or key formula on the right
  • Colors: primary color + accent color, avoid more than 3 primary colors
  • Export: PNG, ensure clarity

Possible user trigger examples (Chinese)

  • "Use Manim to make a 60-second video explaining the vertex form of a quadratic function."
  • "Make a teaching animation explaining matrix multiplication, with a clean visual style."
  • "Explain this concept to high school students, and generate Manim code and rendering commands."

Output format recommendations

  • First provide the script and storyboard
  • Then provide the Manim code (directly runnable)
  • Provide scripts/pipeline.py usage (preferred)
  • If segmented compositing or a custom workflow is needed, provide the corresponding script usage (tts_generate.py/concat_audio.py/mux_av.py)
  • Provide cover image design suggestions and export specifications (corresponding to make_cover.py)
  • Finally provide rendering commands and parameter descriptions (Manim)
  • If the user wants narration, include voiceover lines and subtitles (SRT)

Common optimization points

  • Highlight important concepts with color/bold/enlargement
  • It is better to make the animation pace slower, leaving whitespace for easier understanding
  • Show formula derivations step by step, avoid stacking them all at once
  • Use Wait() to give the audience time to think

Quality checklist

  • Clear logical order, natural transitions between shots
  • Text is not too dense, no obvious screen clutter
  • Key steps are emphasized with color or animation
  • Rendering parameters match the target platform