Manim Video Production Pipeline
Creative Standard
This is educational cinema. Every frame teaches. Every animation reveals structure.
Before writing a single line of code, articulate the narrative arc. What misconception does this correct? What is the "aha moment"? What visual story takes the viewer from confusion to understanding? The user's prompt is a starting point — interpret it with pedagogical ambition.
Geometry before algebra. Show the shape first, the equation second. Visual memory encodes faster than symbolic memory. When the viewer sees the geometric pattern before the formula, the equation feels earned.
First-render excellence is non-negotiable. The output must be visually clear and aesthetically cohesive without revision rounds. If something looks cluttered, poorly timed, or like "AI-generated slides," it is wrong.
Opacity layering directs attention. Never show everything at full brightness. Primary elements at 1.0, contextual elements at 0.4, structural elements (axes, grids) at 0.15. The brain processes visual salience in layers.
Breathing room. Every animation needs self.wait() after it. The viewer needs time to absorb what just appeared. Never rush from one animation to the next. A 2-second pause after a key reveal is never wasted.
Cohesive visual language. All scenes share a color palette, consistent typography sizing, matching animation speeds. A technically correct video where every scene uses random different colors is an aesthetic failure.
Prerequisites
Run scripts/setup.sh to verify all dependencies. Requires: Python 3.10+, Manim Community Edition v0.20+ (pip install manim), LaTeX (texlive-full on Linux, mactex on macOS), and ffmpeg. Reference docs tested against Manim CE v0.20.1.
Modes
| Mode |
Input |
Output |
Reference |
| Concept explainer |
Topic/concept |
Animated explanation with geometric intuition |
references/scene-planning.md |
| Equation derivation |
Math expressions |
Step-by-step animated proof |
references/equations.md |
| Algorithm visualization |
Algorithm description |
Step-by-step execution with data structures |
references/graphs-and-data.md |
| Data story |
Data/metrics |
Animated charts, comparisons, counters |
references/graphs-and-data.md |
| Architecture diagram |
System description |
Components building up with connections |
references/mobjects.md |
| Paper explainer |
Research paper |
Key findings and methods animated |
references/scene-planning.md |
| 3D visualization |
3D concept |
Rotating surfaces, parametric curves, spatial geometry |
references/camera-and-3d.md |
Stack
Single Python script per project. No browser, no Node.js, no GPU required.
| Layer |
Tool |
Purpose |
| Core |
Manim Community Edition |
Scene rendering, animation engine |
| Math |
LaTeX (texlive/MiKTeX) |
Equation rendering via MathTex |
| Video I/O |
ffmpeg |
Scene stitching, format conversion, audio muxing |
| TTS |
ElevenLabs / Qwen3-TTS (optional) |
Narration voiceover |
Pipeline
PLAN --> CODE --> RENDER --> STITCH --> AUDIO (optional) --> REVIEW
- PLAN — Write
plan.md with narrative arc, scene list, visual elements, color palette, voiceover script
- CODE — Write
script.py with one class per scene, each independently renderable
- RENDER —
manim -ql script.py Scene1 Scene2 ... for draft, -qh for production
- STITCH — ffmpeg concat of scene clips into
final.mp4
- AUDIO (optional) — Add voiceover and/or background music via ffmpeg. See
references/rendering.md
- REVIEW — Render preview stills, verify against plan, adjust
Project Structure
project-name/
plan.md # Narrative arc, scene breakdown
script.py # All scenes in one file
concat.txt # ffmpeg scene list
final.mp4 # Stitched output
media/ # Auto-generated by Manim
videos/script/480p15/
Creative Direction
Color Palettes
| Palette |
Background |
Primary |
Secondary |
Accent |
Use case |
| Classic 3B1B |
#1C1C1C |
#58C4DD (BLUE) |
#83C167 (GREEN) |
#FFFF00 (YELLOW) |
General math/CS |
| Warm academic |
#2D2B55 |
#FF6B6B |
#FFD93D |
#6BCB77 |
Approachable |
| Neon tech |
#0A0A0A |
#00F5FF |
#FF00FF |
#39FF14 |
Systems, architecture |
| Monochrome |
#1A1A2E |
#EAEAEA |
#888888 |
#FFFFFF |
Minimalist |
Animation Speed
| Context |
run_time |
self.wait() after |
| Title/intro appear |
1.5s |
1.0s |
| Key equation reveal |
2.0s |
2.0s |
| Transform/morph |
1.5s |
1.5s |
| Supporting label |
0.8s |
0.5s |
| FadeOut cleanup |
0.5s |
0.3s |
| "Aha moment" reveal |
2.5s |
3.0s |
Typography Scale
| Role |
Font size |
Usage |
| Title |
48 |
Scene titles, opening text |
| Heading |
36 |
Section headers within a scene |
| Body |
30 |
Explanatory text |
| Label |
24 |
Annotations, axis labels |
| Caption |
20 |
Subtitles, fine print |
Fonts
Use monospace fonts for all text. Manim's Pango renderer produces broken kerning with proportional fonts at all sizes. See references/visual-design.md for full recommendations.
MONO = "Menlo" # define once at top of file
Text("Fourier Series", font_size=48, font=MONO, weight=BOLD) # titles
Text("n=1: sin(x)", font_size=20, font=MONO) # labels
MathTex(r"\nabla L") # math (uses LaTeX)
Minimum font_size=18 for readability.
Per-Scene Variation
Never use identical config for all scenes. For each scene:
- Different dominant color from the palette
- Different layout — don't always center everything
- Different animation entry — vary between Write, FadeIn, GrowFromCenter, Create
- Different visual weight — some scenes dense, others sparse
Workflow
Step 1: Plan (plan.md)
Before any code, write plan.md. See references/scene-planning.md for the comprehensive template.
Step 2: Code (script.py)
One class per scene. Every scene is independently renderable.
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)
Key patterns:
- Subtitles on every animation:
self.add_subcaption("text", duration=N) or subcaption="text" on self.play()
- Shared color constants at file top for cross-scene consistency
self.camera.background_color set in every scene
- Clean exits — FadeOut all mobjects at scene end:
self.play(FadeOut(Group(*self.mobjects)))
Step 3: Render
manim -ql script.py Scene1_Introduction Scene2_CoreConcept # draft
manim -qh script.py Scene1_Introduction Scene2_CoreConcept # production
Step 4: Stitch
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
Step 5: Review
manim -ql --format=png -s script.py Scene2_CoreConcept # preview still
Critical Implementation Notes
Raw Strings for LaTeX
# WRONG: MathTex("\frac{1}{2}")
# RIGHT:
MathTex(r"\frac{1}{2}")
buff >= 0.5 for Edge Text
label.to_edge(DOWN, buff=0.5) # never < 0.5
FadeOut Before Replacing Text
self.play(ReplacementTransform(note1, note2)) # not Write(note2) on top
Never Animate Non-Added Mobjects
self.play(Create(circle)) # must add first
self.play(circle.animate.set_color(RED)) # then animate
Performance Targets
| Quality |
Resolution |
FPS |
Speed |
-ql (draft) |
854x480 |
15 |
5-15s/scene |
-qm (medium) |
1280x720 |
30 |
15-60s/scene |
-qh (production) |
1920x1080 |
60 |
30-120s/scene |
Always iterate at -ql. Only render -qh for final output.
References
| File |
Contents |
references/animations.md |
Core animations, rate functions, composition, .animate syntax, timing patterns |
references/mobjects.md |
Text, shapes, VGroup/Group, positioning, styling, custom mobjects |
references/visual-design.md |
12 design principles, opacity layering, layout templates, color palettes |
references/equations.md |
LaTeX in Manim, TransformMatchingTex, derivation patterns |
references/graphs-and-data.md |
Axes, plotting, BarChart, animated data, algorithm visualization |
references/camera-and-3d.md |
MovingCameraScene, ThreeDScene, 3D surfaces, camera control |
references/scene-planning.md |
Narrative arcs, layout templates, scene transitions, planning template |
references/rendering.md |
CLI reference, quality presets, ffmpeg, voiceover workflow, GIF export |
references/troubleshooting.md |
LaTeX errors, animation errors, common mistakes, debugging |
references/animation-design-thinking.md |
When to animate vs show static, decomposition, pacing, narration sync |
references/updaters-and-trackers.md |
ValueTracker, add_updater, always_redraw, time-based updaters, patterns |
references/paper-explainer.md |
Turning research papers into animations — workflow, templates, domain patterns |
references/decorations.md |
SurroundingRectangle, Brace, arrows, DashedLine, Angle, annotation lifecycle |
references/production-quality.md |
Pre-code, pre-render, post-render checklists, spatial layout, color, tempo |
1---2name: manim-video3description: "Production pipeline for mathematical and technical animations using Manim Community Edition. Creates 3Blue1Brown-style explainer videos, algorithm visualizations, equation derivations, architecture diagrams, and data stories. Use when users request: animated explanations, math animations, concept visualizations, algorithm walkthroughs, technical explainers, 3Blue1Brown style videos, or any programmatic animation with geometric/mathematical content."4version: 1.0.05metadata:6 source: https://skillmd.com/skills/q2805187159/manim-video7---89# Manim Video Production Pipeline1011## Creative Standard1213This is educational cinema. Every frame teaches. Every animation reveals structure.1415**Before writing a single line of code**, articulate the narrative arc. What misconception does this correct? What is the "aha moment"? What visual story takes the viewer from confusion to understanding? The user's prompt is a starting point — interpret it with pedagogical ambition.1617**Geometry before algebra.** Show the shape first, the equation second. Visual memory encodes faster than symbolic memory. When the viewer sees the geometric pattern before the formula, the equation feels earned.1819**First-render excellence is non-negotiable.** The output must be visually clear and aesthetically cohesive without revision rounds. If something looks cluttered, poorly timed, or like "AI-generated slides," it is wrong.2021**Opacity layering directs attention.** Never show everything at full brightness. Primary elements at 1.0, contextual elements at 0.4, structural elements (axes, grids) at 0.15. The brain processes visual salience in layers.2223**Breathing room.** Every animation needs `self.wait()` after it. The viewer needs time to absorb what just appeared. Never rush from one animation to the next. A 2-second pause after a key reveal is never wasted.2425**Cohesive visual language.** All scenes share a color palette, consistent typography sizing, matching animation speeds. A technically correct video where every scene uses random different colors is an aesthetic failure.2627## Prerequisites2829Run `scripts/setup.sh` to verify all dependencies. Requires: Python 3.10+, Manim Community Edition v0.20+ (`pip install manim`), LaTeX (`texlive-full` on Linux, `mactex` on macOS), and ffmpeg. Reference docs tested against Manim CE v0.20.1.3031## Modes3233| Mode | Input | Output | Reference |34|------|-------|--------|-----------|35| **Concept explainer** | Topic/concept | Animated explanation with geometric intuition | `references/scene-planning.md` |36| **Equation derivation** | Math expressions | Step-by-step animated proof | `references/equations.md` |37| **Algorithm visualization** | Algorithm description | Step-by-step execution with data structures | `references/graphs-and-data.md` |38| **Data story** | Data/metrics | Animated charts, comparisons, counters | `references/graphs-and-data.md` |39| **Architecture diagram** | System description | Components building up with connections | `references/mobjects.md` |40| **Paper explainer** | Research paper | Key findings and methods animated | `references/scene-planning.md` |41| **3D visualization** | 3D concept | Rotating surfaces, parametric curves, spatial geometry | `references/camera-and-3d.md` |4243## Stack4445Single Python script per project. No browser, no Node.js, no GPU required.4647| Layer | Tool | Purpose |48|-------|------|---------|49| Core | Manim Community Edition | Scene rendering, animation engine |50| Math | LaTeX (texlive/MiKTeX) | Equation rendering via `MathTex` |51| Video I/O | ffmpeg | Scene stitching, format conversion, audio muxing |52| TTS | ElevenLabs / Qwen3-TTS (optional) | Narration voiceover |5354## Pipeline5556```57PLAN --> CODE --> RENDER --> STITCH --> AUDIO (optional) --> REVIEW58```59601. **PLAN** — Write `plan.md` with narrative arc, scene list, visual elements, color palette, voiceover script612. **CODE** — Write `script.py` with one class per scene, each independently renderable623. **RENDER** — `manim -ql script.py Scene1 Scene2 ...` for draft, `-qh` for production634. **STITCH** — ffmpeg concat of scene clips into `final.mp4`645. **AUDIO** (optional) — Add voiceover and/or background music via ffmpeg. See `references/rendering.md`656. **REVIEW** — Render preview stills, verify against plan, adjust6667## Project Structure6869```70project-name/71 plan.md # Narrative arc, scene breakdown72 script.py # All scenes in one file73 concat.txt # ffmpeg scene list74 final.mp4 # Stitched output75 media/ # Auto-generated by Manim76 videos/script/480p15/77```7879## Creative Direction8081### Color Palettes8283| Palette | Background | Primary | Secondary | Accent | Use case |84|---------|-----------|---------|-----------|--------|----------|85| **Classic 3B1B** | `#1C1C1C` | `#58C4DD` (BLUE) | `#83C167` (GREEN) | `#FFFF00` (YELLOW) | General math/CS |86| **Warm academic** | `#2D2B55` | `#FF6B6B` | `#FFD93D` | `#6BCB77` | Approachable |87| **Neon tech** | `#0A0A0A` | `#00F5FF` | `#FF00FF` | `#39FF14` | Systems, architecture |88| **Monochrome** | `#1A1A2E` | `#EAEAEA` | `#888888` | `#FFFFFF` | Minimalist |8990### Animation Speed9192| Context | run_time | self.wait() after |93|---------|----------|-------------------|94| Title/intro appear | 1.5s | 1.0s |95| Key equation reveal | 2.0s | 2.0s |96| Transform/morph | 1.5s | 1.5s |97| Supporting label | 0.8s | 0.5s |98| FadeOut cleanup | 0.5s | 0.3s |99| "Aha moment" reveal | 2.5s | 3.0s |100101### Typography Scale102103| Role | Font size | Usage |104|------|-----------|-------|105| Title | 48 | Scene titles, opening text |106| Heading | 36 | Section headers within a scene |107| Body | 30 | Explanatory text |108| Label | 24 | Annotations, axis labels |109| Caption | 20 | Subtitles, fine print |110111### Fonts112113**Use monospace fonts for all text.** Manim's Pango renderer produces broken kerning with proportional fonts at all sizes. See `references/visual-design.md` for full recommendations.114115```python116MONO = "Menlo" # define once at top of file117118Text("Fourier Series", font_size=48, font=MONO, weight=BOLD) # titles119Text("n=1: sin(x)", font_size=20, font=MONO) # labels120MathTex(r"\nabla L") # math (uses LaTeX)121```122123Minimum `font_size=18` for readability.124125### Per-Scene Variation126127Never use identical config for all scenes. For each scene:128- **Different dominant color** from the palette129- **Different layout** — don't always center everything130- **Different animation entry** — vary between Write, FadeIn, GrowFromCenter, Create131- **Different visual weight** — some scenes dense, others sparse132133## Workflow134135### Step 1: Plan (plan.md)136137Before any code, write `plan.md`. See `references/scene-planning.md` for the comprehensive template.138139### Step 2: Code (script.py)140141One class per scene. Every scene is independently renderable.142143```python144from manim import *145146BG = "#1C1C1C"147PRIMARY = "#58C4DD"148SECONDARY = "#83C167"149ACCENT = "#FFFF00"150MONO = "Menlo"151152class Scene1_Introduction(Scene):153 def construct(self):154 self.camera.background_color = BG155 title = Text("Why Does This Work?", font_size=48, color=PRIMARY, weight=BOLD, font=MONO)156 self.add_subcaption("Why does this work?", duration=2)157 self.play(Write(title), run_time=1.5)158 self.wait(1.0)159 self.play(FadeOut(title), run_time=0.5)160```161162Key patterns:163- **Subtitles** on every animation: `self.add_subcaption("text", duration=N)` or `subcaption="text"` on `self.play()`164- **Shared color constants** at file top for cross-scene consistency165- **`self.camera.background_color`** set in every scene166- **Clean exits** — FadeOut all mobjects at scene end: `self.play(FadeOut(Group(*self.mobjects)))`167168### Step 3: Render169170```bash171manim -ql script.py Scene1_Introduction Scene2_CoreConcept # draft172manim -qh script.py Scene1_Introduction Scene2_CoreConcept # production173```174175### Step 4: Stitch176177```bash178cat > concat.txt << 'EOF'179file 'media/videos/script/480p15/Scene1_Introduction.mp4'180file 'media/videos/script/480p15/Scene2_CoreConcept.mp4'181EOF182ffmpeg -y -f concat -safe 0 -i concat.txt -c copy final.mp4183```184185### Step 5: Review186187```bash188manim -ql --format=png -s script.py Scene2_CoreConcept # preview still189```190191## Critical Implementation Notes192193### Raw Strings for LaTeX194```python195# WRONG: MathTex("\frac{1}{2}")196# RIGHT:197MathTex(r"\frac{1}{2}")198```199200### buff >= 0.5 for Edge Text201```python202label.to_edge(DOWN, buff=0.5) # never < 0.5203```204205### FadeOut Before Replacing Text206```python207self.play(ReplacementTransform(note1, note2)) # not Write(note2) on top208```209210### Never Animate Non-Added Mobjects211```python212self.play(Create(circle)) # must add first213self.play(circle.animate.set_color(RED)) # then animate214```215216## Performance Targets217218| Quality | Resolution | FPS | Speed |219|---------|-----------|-----|-------|220| `-ql` (draft) | 854x480 | 15 | 5-15s/scene |221| `-qm` (medium) | 1280x720 | 30 | 15-60s/scene |222| `-qh` (production) | 1920x1080 | 60 | 30-120s/scene |223224Always iterate at `-ql`. Only render `-qh` for final output.225226## References227228| File | Contents |229|------|----------|230| `references/animations.md` | Core animations, rate functions, composition, `.animate` syntax, timing patterns |231| `references/mobjects.md` | Text, shapes, VGroup/Group, positioning, styling, custom mobjects |232| `references/visual-design.md` | 12 design principles, opacity layering, layout templates, color palettes |233| `references/equations.md` | LaTeX in Manim, TransformMatchingTex, derivation patterns |234| `references/graphs-and-data.md` | Axes, plotting, BarChart, animated data, algorithm visualization |235| `references/camera-and-3d.md` | MovingCameraScene, ThreeDScene, 3D surfaces, camera control |236| `references/scene-planning.md` | Narrative arcs, layout templates, scene transitions, planning template |237| `references/rendering.md` | CLI reference, quality presets, ffmpeg, voiceover workflow, GIF export |238| `references/troubleshooting.md` | LaTeX errors, animation errors, common mistakes, debugging |239| `references/animation-design-thinking.md` | When to animate vs show static, decomposition, pacing, narration sync |240| `references/updaters-and-trackers.md` | ValueTracker, add_updater, always_redraw, time-based updaters, patterns |241| `references/paper-explainer.md` | Turning research papers into animations — workflow, templates, domain patterns |242| `references/decorations.md` | SurroundingRectangle, Brace, arrows, DashedLine, Angle, annotation lifecycle |243| `references/production-quality.md` | Pre-code, pre-render, post-render checklists, spatial layout, color, tempo |