showlab/Code2Video
Three-agent framework that turns teaching topics into editable Manim videos
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
Code2Video is a Python orchestration framework that turns a knowledge point into an editable scene program rather than generating video frames directly. Planner expands the topic into a storyboard, Coder synthesizes debuggable Manim code, and Critic uses visual anchors to refine layout. The scene program defines both spatial composition and timing, and Manim Community v0.19.0 renders it.
The source layout centers on src/agent.py, with separate shell launchers for single topics and benchmark runs. Prompt templates live under prompts/, topic lists and metadata under json_files/, and the suggested layout groups generated cases under CASES/ by FOLDER_PREFIX. The observed customization points are prompts, topic inputs, model selection, and generated scene code; neither a formal plugin contract nor an inbound service API is established.
Key Capabilities & Differentiators
The single-topic runner accepts --knowledge_point. The benchmark runner reads long_video_topics_list.json and provides controls for model selection (API), output grouping (FOLDER_PREFIX), topic count (MAX_CONCEPTS), and parallel groups (PARALLEL_GROUP_NUM). Claude-4-Opus is the named recommendation for Manim code quality, and gemini-2.5-pro-preview-05-06 for visual review. Those recommendations do not establish a compatibility matrix across providers or model versions.
MMMC contains 117 curated learning topics inspired by 3Blue1Brown. eval_TQ.py evaluates knowledge transfer through TeachQuiz, eval_AES.py covers aesthetic and structural quality, and generation efficiency is tracked through token usage and execution time. These measures answer different questions: a successful render or a strong layout score does not establish that the lesson teaches the concept correctly.
Trade-offs & Limitations
Compared with direct video generators such as Veo3 and Wan2.2, Code2Video gives teams a scene program they can inspect, patch, and rerender. That is useful for equations, diagrams, and stepwise explanations; it is less compelling for footage-like imagery. Compared with hand-written Manim, it automates storyboarding and the first implementation pass, but rendering success still leaves mathematical correctness, teaching quality, and layout to be checked.
A saved scene program gives you a more repeatable rendering input, not a guarantee that a fresh model run will generate the same code. Hosted calls introduce provider quotas, variable token cost, and model-version dependencies. For unattended use, isolate generated-code execution from API credentials and shared files. The MIT license covers repository software; verify model-service terms and third-party asset rights separately.
Hardware & Deployment Guide
From src/, install Python dependencies with pip install -r requirements.txt and set up Manim Community v0.19.0. Put LLM and Gemini credentials in api_config.json, then try sh run_agent_single.sh --knowledge_point "Linear transformations and matrices" before scaling to sh run_agent.sh. IconFinder is optional via ICONFINDER_API_KEY, with collected MMMC icons available as a fallback.
The orchestration and rendering can run on your own machine, but the documented model path uses external APIs. No Docker deployment, offline model path, or fixed GPU/VRAM requirement is established. Size workers using a representative render and measure memory, runtime, and provider usage before raising batch parallelism. There is no tagged release in the supplied metadata; dated project updates record dependency cleanup and the addition of the dataset-hosted icon fallback.
api_config.json holds provider credentials; the named quality recommendations are Claude-4-Opus and gemini-2.5-pro-preview-05-06.MAX_CONCEPTS limits topic count (-1 selects all), and PARALLEL_GROUP_NUM controls parallel groups.Educators and research teams prototyping diagram-heavy lessons that need editable scene code, or comparing generation workflows on the MMMC benchmark.
You need an offline pipeline out of the box, a turnkey production service, or photorealistic footage rather than programmatic visualization.
Quick Start & Installation
cd src/ pip install -r requirements.txt
Comparison vs. Top Voice, Vision & Video Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| Code2Video ★ | 2.5k | +35 | Python | MIT | Three-agent framework that turns teaching topics into editable Manim videos |
| ViMax | 13.1k | +59 | Python | MIT | Agentic video framework for turning ideas and scripts into reviewable multi-shot |
| whisperX | 26.5k | +472 | Python | BSD-2-Clause | Batched Whisper with forced alignment for word timings and optional speaker labe |
| hypit | 32.4k | +697 | TypeScript | — | An SVML framework and CLI for turning video references into reusable workflows |
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/showlab/Code2Video.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about Code2Video
How do I integrate Code2Video into an existing pipeline?
src/run_agent_single.sh for individual topics or src/run_agent.sh for a topic list. The outputs are grouped under CASES/ by FOLDER_PREFIX, and the generated Manim code is the artifact to inspect or modify. The configured APIs are upstream model and asset services; no inbound HTTP API is documented. If an application needs one, add a job wrapper and run generated code in isolated workers without access to provider credentials.Do I need a GPU, and how should I size a render worker?
PARALLEL_GROUP_NUM; scene complexity and concurrent jobs determine practical capacity.Can I use it commercially and keep the pipeline on my own infrastructure?
When is it a better fit than hand-written Manim or direct video generation?
Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy