mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-05 02:31:47 +00:00
Production pipeline for creating 3Blue1Brown-style animated videos using Manim Community Edition. The agent handles the full workflow: creative planning, Python code generation, rendering, scene stitching, audio muxing, and iterative refinement. Modes: concept explainers, equation derivations, algorithm visualizations, data stories, architecture diagrams, paper explainers, 3D visualizations. 9 reference files, setup verification script, README. All API references verified against ManimCommunity/manim source.
2.4 KiB
2.4 KiB
Rendering Reference
Prerequisites
manim --version # Manim CE
pdflatex --version # LaTeX
ffmpeg -version # ffmpeg
CLI Reference
manim -ql script.py Scene1 Scene2 # draft (480p 15fps)
manim -qm script.py Scene1 # medium (720p 30fps)
manim -qh script.py Scene1 # production (1080p 60fps)
manim -ql --format=png -s script.py Scene1 # preview still (last frame)
manim -ql --format=gif script.py Scene1 # GIF output
Quality Presets
| Flag | Resolution | FPS | Use case |
|---|---|---|---|
-ql |
854x480 | 15 | Draft iteration (layout, timing) |
-qm |
1280x720 | 30 | Preview (use for text-heavy scenes) |
-qh |
1920x1080 | 60 | Production |
Text rendering quality: -ql (480p15) produces noticeably poor text kerning and readability. For scenes with significant text, preview stills at -qm to catch issues invisible at 480p. Use -ql only for testing layout and animation timing.
Output Structure
media/videos/script/480p15/Scene1_Intro.mp4
media/images/script/Scene1_Intro.png (from -s flag)
Stitching with ffmpeg
cat > concat.txt << 'EOF'
file 'media/videos/script/480p15/Scene1_Intro.mp4'
file 'media/videos/script/480p15/Scene2_Core.mp4'
EOF
ffmpeg -y -f concat -safe 0 -i concat.txt -c copy final.mp4
Add Voiceover
# Mux narration
ffmpeg -y -i final.mp4 -i narration.mp3 -c:v copy -c:a aac -b:a 192k -shortest final_narrated.mp4
# Concat per-scene audio first
cat > audio_concat.txt << 'EOF'
file 'audio/scene1.mp3'
file 'audio/scene2.mp3'
EOF
ffmpeg -y -f concat -safe 0 -i audio_concat.txt -c copy full_narration.mp3
Add Background Music
ffmpeg -y -i final.mp4 -i music.mp3 \
-filter_complex "[1:a]volume=0.15[bg];[0:a][bg]amix=inputs=2:duration=shortest" \
-c:v copy final_with_music.mp4
GIF Export
ffmpeg -y -i scene.mp4 \
-vf "fps=15,scale=640:-1:flags=lanczos,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" \
output.gif
Aspect Ratios
manim -ql --resolution 1080,1920 script.py Scene # 9:16 vertical
manim -ql --resolution 1080,1080 script.py Scene # 1:1 square
Render Workflow
- Draft render all scenes at
-ql - Preview stills at key moments (
-s) - Fix and re-render only broken scenes
- Stitch with ffmpeg
- Review stitched output
- Production render at
-qh - Re-stitch + add audio