Skip to content

The animation engine for agents: blazingly fast math and 3D videos with Manim's Python API, on a Rust GPU core.

Python

Add a self-contained five-scene engine benchmark

apoogdk5232738c078a
diff --git a/.gitignore b/.gitignore
index 3f11b4d7..52f9dcc6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -40,6 +40,7 @@ media/
*.mp4
*.mkv
*.wav
+*.storyboard*.png
!tests/integration/cases/*/*.wav
tests/**/_testoutput/
tests/**/_diffs/
diff --git a/scripts/benchmark/README.md b/scripts/benchmark/README.md
index ed2aaf16..7be0db5d 100644
--- a/scripts/benchmark/README.md
+++ b/scripts/benchmark/README.md
@@ -1,108 +1,93 @@
# Benchmarks
-manimgx, [Manim Community Edition](https://www.manim.community),
-[ManimGL](https://github.com/3b1b/manim) and [Blender](https://www.blender.org), rendering
-the same scenes to the same videos: 1920 × 1080 at 60 frames per second, H.264 in an MP4.
-
-<p align="center">
- <picture>
- <source media="(prefers-color-scheme: dark)" srcset="https://manimgx.academa.ai/images/benchmark-dark.svg">
- <source media="(prefers-color-scheme: light)" srcset="https://manimgx.academa.ai/images/benchmark-light.svg">
- <img alt="A bar chart of the render times of the orbit scene" src="https://manimgx.academa.ai/images/benchmark-light.svg" width="100%">
- </picture>
-</p>
+Five scenes rendered by ManimGX, ManimGL, ManimCE, Blender Workbench, and Blender EEVEE at 1920 × 1080 and 60 fps. Each engine exports an H.264 MP4 through its native renderer. The scene implementations and rendering adapters are in `scenes/`.
+
+## Scenes
+
+| Scene | Duration | Content |
+| --- | ---: | --- |
+| `orbit` | 10 s | A 48 × 48 surface, three axes, a progressively drawn curve, a moving sphere, and an orbiting camera. |
+| `matrix` | 7.2 s | A matrix-vector product, expanded arithmetic, and the resulting vector. |
+| `pendulums` | 13 s | Twelve pendulums with different lengths, animated rods and bobs, and a title. |
+| `hierarchy` | 3 s | Five planets and five moons moving around a central sphere, viewed by an orbiting camera. |
+| `linked_rings` | 3 s | Eight animated 32 × 8 torus links with an orbiting camera and a shared key-light direction. |
+
+Total video duration: 36.2 seconds. Geometry, animation, text, and shading use each engine's native APIs.
## Results
-The median time from launch to a finished MP4, and how many times manimgx's it is, on a
-MacBook Pro with an Apple M4 Pro (12 CPU cores, 16 GPU cores, 24 GB) under macOS 15.7, on
-2026-09-29, at commit 8e95dd39:
-
-| | orbit (3D) | morph (3D) | explainer (2D) |
-| --- | ---: | ---: | ---: |
-| **manimgx** 0.1.0 | **0.85 s** | **9.0 s** | **0.58 s** |
-| ManimGL 1.7.2 | 6.2 s (7.3×) | 73 s (8.1×) | 6.1 s (11×) |
-| Blender 5.2, Workbench | 18 s (22×) | 18 s (2.1×) | |
-| Blender 5.2, EEVEE | 3 min 59 s (281×) | 4 min 14 s (28×) | |
-| Manim CE 0.21.0 | 4 min 03 s (286×) | 11 min 42 s (78×) | 4.0 s (7.0×) |
-
-- **Its videos are larger.** manimgx encodes with x264's ultrafast preset at CRF 18: the
- orbit scene is 71.7 MB, where the other tools write 3 to 6 MB. Encoding as Manim CE and
- ManimGL do, with the medium preset at CRF 23, manimgx renders it in 3.2 s instead of
- 1.2 s (both measured in one session, on a busier machine than the table's), into 5.8 MB:
- still twice as fast as ManimGL, and six times as fast as Blender's Workbench.
-- **The morph scene is its hardest.** A surface rebuilt every frame costs manimgx 15 ms a
- frame, most of it spent refining the new surface in Python; Blender moves its mesh's
- points in place.
-- **Runs.** Manim CE's morph ran once (a run takes twelve minutes) and its orbit four
- times, Blender's EEVEE and ManimGL's morph three times, and everything else five times;
- `results.json` has every run, with its CPU time, peak memory and the load average it
- started at.
-
-## The scenes
-
-Each scene is written once per tool, in the tool's own idiom and as alike as the tools
-allow: manimgx's are three of its timed benchmarks' workloads, in
-[`tests/benchmarks/scenes/`](../../tests/benchmarks/scenes) (`<scene>.py`), so the scenes this
-page times are the ones every change is checked against; the others are in [`scenes/`](scenes)
-(`<scene>_<tool>.py`):
-
-- **orbit** (3D, 10 s): a 48 × 48 checkerboard surface, z = sin(x) cos(y), on 3D axes; a
- curve drawn across it over six seconds with a ball riding its tip; and the camera circling
- the whole time, so every frame is new.
-- **morph** (3D, 10 s): a 48 × 48 checkerboard ripple, z = 0.8 sin(2r − phase), rebuilt
- every frame, with the camera circling it. Manim's tools rebuild it with `always_redraw`;
- Blender moves its mesh's points from a frame-change handler with numpy.
-- **explainer** (2D, 9.5 s): a sine curve drawn on axes with a dot riding it, the area under
- its first arch, `y = \sin x` turning into its integral, then a tangent line sliding along
- the curve. Blender has no math typesetting, so it renders the 3D scenes only.
-
-The frames at 1, 3, 5, 7 and 9 seconds of each tool's video: the geometry, the camera and
-the timing are the same; the shading is each renderer's own.
-
-![The orbit scene's frames in each tool](frames-orbit.jpg)
-
-![The morph scene's frames in each tool](frames-morph.jpg)
-
-![The explainer scene's frames in each tool](frames-explainer.jpg)
-
-## How it was measured
-
-- A run is the tool's own command (`manimgx render`, `manim render -qh`, `manimgl -w --hd`,
- `blender -b`), in a fresh process and a fresh folder, with the tool's caches empty (Manim
- CE's and ManimGL's LaTeX, manimgx's Typst layouts): an agent's first render of a new scene.
-- Its time runs from launch to exit, when the MP4 is written. Its CPU time and peak memory
- are recorded too, in [`results.json`](results.json), with every run.
-- Each contender renders each scene once to warm up (a run of more than two minutes counts
- instead), then the contenders take turns until each has five runs: three if a run takes
- over a minute, one if it takes over ten. The table shows the medians.
-- Each video is checked for its length, then deleted.
-- Each tool encodes with its own defaults: manimgx with x264's ultrafast preset at CRF 18
- (larger files, a faster encoder), Manim CE and ManimGL with libx264's medium preset at
- CRF 23, and Blender with its H.264 "medium quality" at the "good" speed.
-- Blender renders with EEVEE, its default renderer, at its default 64 samples, and with
- Workbench, its fastest. ManimGL typesets with its minimal LaTeX template, `basic`.
-- The machine was shared with other work while the runs were timed; each run records the
- load average it started at.
-
-## Installing
-
-| | Installs | Needs besides |
-| --- | --- | --- |
-| manimgx | 140 MB with its dependencies (`pip install manimgx`) | nothing |
-| Manim CE | 250 MB with its dependencies | LaTeX for math (a TeX distribution: 0.4 GB for a basic one, several GB for a full one); Cairo and Pango on Linux |
-| ManimGL | 350 MB with its dependencies | LaTeX, FFmpeg |
-| Blender | a 0.9 GB application | |
-
-## Running it
+Measured October 7, 2026, on an Apple M4 Pro with 12 CPU cores and 24 GB memory, running macOS 15.7.9. Engine versions: ManimGX 0.1.0, ManimGL 1.7.2, ManimCE 0.21.0, and Blender 5.2.2 LTS. Times are in seconds.
+
+| Scene | ManimGX | ManimGL | ManimCE | Blender Workbench | Blender EEVEE |
+| --- | ---: | ---: | ---: | ---: | ---: |
+| Surface and orbiting camera | 1.184 | 6.463 | 211.809 | 16.563 | 220.242 |
+| Matrix-vector multiplication | 0.360 | 8.287 | 7.140 | 11.045 | 90.798 |
+| Twelve pendulums | 0.756 | 16.812 | 4.745 | 19.860 | 165.890 |
+| Planets and moons | 0.334 | 1.789 | 16.169 | 4.979 | 62.265 |
+| Linked rings | 0.443 | 1.933 | 38.962 | 5.163 | 62.200 |
+| Total | 3.078 | 35.284 | 278.826 | 57.611 | 601.395 |
+
+Values are arithmetic means of three runs per scene for GX and GL, and one run per scene for CE and each Blender renderer. Totals sum the five scene means. `results.json` contains all 45 measurements and their summaries. Lower is better.
+
+## Rendering settings
+
+GX, GL, and CE use x264's `ultrafast` preset with CRF 23. Blender uses `REALTIME`, its fastest available encoding preset, with custom CRF 23. Its encoded options correspond to x264 `superfast`. Video output uses `yuv420p`. EEVEE uses 64 samples; Workbench uses its native rasterizer.
+
+Each run starts a fresh process and uses a separate output and scene-cache directory. Wall time spans process launch through exit, including scene construction, rendering, encoding, and MP4 finalization. Full decoding, presentation-timestamp checks, resolution checks, and encoder-option verification run after the timer stops. GX's additional closing frame is permitted. Runs execute sequentially. Operating-system and GPU-driver caches remain available.
+
+## Run
+
+The runner supports macOS and Linux. Install this repository's environment with `just sync`. Install FFmpeg, including `ffprobe`, a LaTeX distribution for CE and GL, and Blender 5.2.2 LTS. GL requires an available OpenGL context.
+
+Create separate CE and GL environments from the repository root:
+
+```sh
+uv venv --python 3.13 .cache/benchmark-envs/ce
+uv pip install --python .cache/benchmark-envs/ce/bin/python 'manim==0.21.0'
+uv venv --python 3.12 .cache/benchmark-envs/gl
+uv pip install --python .cache/benchmark-envs/gl/bin/python 'manimgl==1.7.2' 'setuptools==80.9.0'
+```
+
+Run all five scenes and engines, supplying the Blender executable path:
+
+```sh
+uv run --frozen python -m scripts.benchmark.run \
+ --out .cache/comparison/five-scenes \
+ --ce-python .cache/benchmark-envs/ce/bin/python \
+ --manimgl .cache/benchmark-envs/gl/bin/manimgl \
+ --blender /path/to/blender
+```
+
+The output directory must not already exist. It receives every MP4, process log, command, validation result, and individual timing, with `results.json` checkpointed after each run. A failed, invalid, or timed-out run stops the command and remains recorded. A total is available only after all required runs for an engine complete.
+
+`--scenes orbit linked_rings` limits the scenes. `--tools manimgx manimgl` limits the engines. `--rounds 1` sets the number of runs for every engine. `--timeout 900` sets the timeout in seconds per render. `--dry-run` writes the command plan without starting renderers.
+
+## Chart
+
+Generate the dark and light SVG charts from the recorded results:
+
+```sh
+uv run --frozen python scripts/benchmark/chart.py
+```
+
+The chart divides every engine's total by GX's total, so GX equals one second. To chart a new complete run into a separate directory:
+
+```sh
+uv run --frozen python scripts/benchmark/chart.py \
+ --results .cache/comparison/five-scenes/results.json \
+ --out .cache/comparison/five-scenes/charts
+```
+
+## Quality images
+
+Render the linked-rings frame at 2.5 seconds:
```sh
-uv sync --group ce # manimgx, and Manim CE (the `ce` group)
-uv venv --python 3.12 /tmp/manimgl # ManimGL, in an environment of its own
-uv pip install --python /tmp/manimgl manimgl==1.7.2 setuptools
-uv run --frozen python scripts/benchmark/run.py --manimgl /tmp/manimgl --blender /path/to/blender
-uv run --frozen python scripts/benchmark/chart.py # the README's chart, from results.json
+uv run --frozen python -m scripts.benchmark.quality \
+ --out .cache/comparison/linked-rings-images \
+ --ce-python .cache/benchmark-envs/ce/bin/python \
+ --gl-python .cache/benchmark-envs/gl/bin/python \
+ --blender /path/to/blender
```
-`run.py --only orbit --tools manimgx,manimgl` runs a part of it. The numbers also stand in
-the README: change them together.
+`native/` contains each renderer's transparent 1920 × 1080 PNG and process log. `images/` contains the ten website PNGs: five with `#0B0C0F` backgrounds and five with `#FFFFFF` backgrounds, matching the website's dark and light themes. Both backgrounds use the same native frame. The still-image script supplies CE and GL material colors separately; each engine retains its native shading. The website displays the same viewport of every frame.
diff --git a/scripts/benchmark/chart.py b/scripts/benchmark/chart.py
index d5d1ddd6..780d9832 100644
--- a/scripts/benchmark/chart.py
+++ b/scripts/benchmark/chart.py
@@ -1,22 +1,30 @@
-"""The README's chart: the benchmark's 3D scene as a race of bars, a light SVG and a dark one.
+"""The README's chart: the five-scene suite as a race of bars, light and dark.
uv run --frozen python scripts/benchmark/chart.py
-Reads `results.json` (`run.py` writes it) and writes `docs/content/images/benchmark-light.svg`
+Reads `results.json` and writes `docs/content/images/benchmark-light.svg`
and `benchmark-dark.svg`, which the README shows from the docs site, each where its color
-scheme is. Each bar grows as its tool renders: in real time until manimgx is done and a
+scheme is. Times are divided by manimgx's suite total, so its bar finishes at one second.
+Each bar grows on this normalized clock until manimgx is done and a
moment more, then fast-forwarded (the chart says by how much) until the slowest is done;
the chart then holds, and starts again. Without motion (`prefers-reduced-motion`), it is
the finished chart.
"""
+import argparse
import json
import math
from pathlib import Path
HERE = Path(__file__).parent
IMAGES = HERE.parents[1] / "docs" / "content" / "images"
-SCENE = "orbit"
+LABELS = {
+ "manimgx": "ManimGX",
+ "manim_ce": "ManimCE",
+ "manimgl": "ManimGL",
+ "blender_workbench": "Blender (Workbench)",
+ "blender_eevee": "Blender (EEVEE)",
+}
FONT = "-apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif"
THEMES = {
"light": {
@@ -68,27 +76,38 @@ class Race:
def duration(seconds: float) -> str:
- """A time as the chart labels it: 0.85s, 6.2s, 27s, 4m 17s."""
- if seconds < 1:
- return f"{seconds:.2f}s"
- if seconds < 10:
- return f"{seconds:.1f}s"
- if seconds < 100:
- return f"{seconds:.0f}s"
- minutes, rest = divmod(round(seconds), 60)
- return f"{minutes}m {rest:02d}s"
+ """Normalized seconds, without unnecessary trailing zeros."""
+ return f"{seconds:.2f}".rstrip("0").rstrip(".") + "s"
+
+
+def normalized_rows(totals: dict[str, float]) -> list[tuple[str, float]]:
+ """Keep every engine's relative time while setting manimgx to one second."""
+ return sorted(
+ (
+ (LABELS[tool], seconds / totals["manimgx"])
+ for tool, seconds in totals.items()
+ ),
+ key=lambda row: row[1],
+ )
def chart(rows: list[tuple[str, float]], theme: dict[str, str]) -> str:
- """The bars, fastest first, on a scale of whole minutes, racing."""
+ """The bars, fastest first, on a normalized seconds scale, racing."""
slowest = max(seconds for _, seconds in rows)
race = Race(min(seconds for _, seconds in rows), slowest)
- minutes = int(slowest // 60) + 1
+ magnitude = 10 ** math.floor(math.log10(slowest / 6))
+ step = next(
+ factor * magnitude
+ for factor in (1, 2, 5, 10)
+ if factor * magnitude >= slowest / 6
+ )
+ ticks = math.ceil(slowest / step)
+ limit = ticks * step
span = WIDTH - LEFT - RIGHT
def x(seconds: float) -> float:
"""Where a time is on the chart."""
- return LEFT + span * seconds / (60 * minutes)
+ return LEFT + span * seconds / limit
def percent(t: float) -> str:
return f"{100 * t / race.period:.3f}%"
@@ -106,22 +125,25 @@ def chart(rows: list[tuple[str, float]], theme: dict[str, str]) -> str:
".clock{opacity:0}}"
),
]
- parts = []
+ parts = [
+ f'<text x="{LEFT}" y="18" fill="{theme["muted"]}" font-size="13">'
+ "Normalized: ManimGX = 1s</text>"
+ ]
bottom = TOP + ROW * len(rows)
- for minute in range(minutes + 1):
- at = x(60 * minute)
+ for tick in range(ticks + 1):
+ at = x(tick * step)
parts.append(
f'<line x1="{at:.1f}" y1="{TOP - 6}" x2="{at:.1f}" y2="{bottom}"'
f' stroke="{theme["grid"]}" stroke-width="1"/>'
)
- label = "0s" if minute == 0 else f"{minute}min"
+ label = duration(tick * step)
parts.append(
f'<text x="{at:.1f}" y="{bottom + 22}" fill="{theme["muted"]}"'
f' font-size="13" text-anchor="middle">{label}</text>'
)
for i, (name, seconds) in enumerate(rows):
y = TOP + ROW * i + (ROW - BAR) / 2
- ours = name == "manimgx"
+ ours = name == LABELS["manimgx"]
weight = ' font-weight="700"' if ours else ""
fill = "url(#manimgx)" if ours else theme["bar"]
width = max(x(seconds) - LEFT, 3)
@@ -157,8 +179,8 @@ def chart(rows: list[tuple[str, float]], theme: dict[str, str]) -> str:
f' fill="{theme["text"] if ours else theme["muted"]}"{weight}>'
f"{duration(seconds)}</text>"
)
- # the clock: in real time, then fast-forwarded, by how much
- captions = [("real time", 0.0)]
+ # The normalized clock, then fast-forwarded, by how much.
+ captions = [("", 0.0)]
for factor in SPEEDS:
t = race.live + math.log(factor / (race.growth * race.live)) / race.growth
if race.live < t < race.end:
@@ -189,13 +211,25 @@ def chart(rows: list[tuple[str, float]], theme: dict[str, str]) -> str:
def main() -> None:
- results = json.loads((HERE / "results.json").read_text(encoding="utf-8"))
- rows = sorted(
- ((row["label"], row["median"]) for row in results["scenes"][SCENE].values()),
- key=lambda row: row[1],
- )
+ parser = argparse.ArgumentParser(description="Draw normalized render-time charts.")
+ parser.add_argument("--results", type=Path, default=HERE / "results.json")
+ parser.add_argument("--out", type=Path, default=IMAGES)
+ args = parser.parse_args()
+ results = json.loads(args.results.read_text(encoding="utf-8"))
+ if not results.get("complete") or set(results["totals"]) != set(LABELS):
+ parser.error("The chart requires complete results for all five engines")
+ if set(results["settings"]["scenes"]) != {
+ "orbit",
+ "matrix",
+ "pendulums",
+ "hierarchy",
+ "linked_rings",
+ }:
+ parser.error("The chart requires all five scenes")
+ args.out.mkdir(parents=True, exist_ok=True)
+ rows = normalized_rows(results["totals"])
for name, theme in THEMES.items():
- path = IMAGES / f"benchmark-{name}.svg"
+ path = args.out / f"benchmark-{name}.svg"
path.write_text(chart(rows, theme), encoding="utf-8")
print(f"{path}: {path.stat().st_size / 1e3:.0f} KB")
diff --git a/scripts/benchmark/frames-explainer.jpg b/scripts/benchmark/frames-explainer.jpg
deleted file mode 100644
index ad4a7145..00000000
Binary files a/scripts/benchmark/frames-explainer.jpg and /dev/null differ
diff --git a/scripts/benchmark/frames-morph.jpg b/scripts/benchmark/frames-morph.jpg
deleted file mode 100644
index e3c78d45..00000000
Binary files a/scripts/benchmark/frames-morph.jpg and /dev/null differ
diff --git a/scripts/benchmark/frames-orbit.jpg b/scripts/benchmark/frames-orbit.jpg
deleted file mode 100644
index 26ec2446..00000000
Binary files a/scripts/benchmark/frames-orbit.jpg and /dev/null differ
diff --git a/scripts/benchmark/quality.py b/scripts/benchmark/quality.py
new file mode 100644
index 00000000..74fece5e
--- /dev/null
+++ b/scripts/benchmark/quality.py
@@ -0,0 +1,100 @@
+"""Render the linked-rings frame at 2.5 seconds on dark and light backgrounds."""
+
+import argparse
+import json
+import os
+import subprocess
+import sys
+from pathlib import Path
+
+from PIL import Image
+from scripts.benchmark.run import executable
+
+HERE = Path(__file__).resolve().parent
+SOURCES = HERE / "scenes"
+
+
+def main() -> None:
+ parser = argparse.ArgumentParser(description=__doc__)
+ parser.add_argument("--out", type=Path, required=True)
+ parser.add_argument("--gx-python", default=sys.executable)
+ parser.add_argument("--ce-python", default=sys.executable)
+ parser.add_argument("--gl-python", required=True)
+ parser.add_argument("--blender", default="blender")
+ args = parser.parse_args()
+ for option in ("gx_python", "ce_python", "gl_python", "blender"):
+ setattr(args, option, executable(getattr(args, option)))
+ args.out = args.out.resolve()
+ args.out.mkdir(parents=True, exist_ok=False)
+ native = args.out / "native"
+ native.mkdir()
+ images = args.out / "images"
+ images.mkdir()
+ env = os.environ | {"PYTHONPATH": str(SOURCES), "PYTHONDONTWRITEBYTECODE": "1"}
+ for engine in (
+ "manimgx",
+ "manim_ce",
+ "manimgl",
+ "blender_workbench",
+ "blender_eevee",
+ ):
+ target = native / f"{engine}.png"
+ if engine.startswith("blender_"):
+ command = [
+ args.blender,
+ "-b",
+ "--factory-startup",
+ "--python-exit-code",
+ "1",
+ "-P",
+ str(SOURCES / "linked_rings_blender.py"),
+ "--",
+ "--engine",
+ engine.removeprefix("blender_"),
+ "--out",
+ str(target),
+ ]
+ else:
+ python = {
+ "manimgx": args.gx_python,
+ "manim_ce": args.ce_python,
+ "manimgl": args.gl_python,
+ }[engine]
+ command = [
+ python,
+ str(SOURCES / "quality_manim.py"),
+ "--engine",
+ engine,
+ "--out",
+ str(target),
+ ]
+ print(engine, flush=True)
+ (native / f"{engine}-command.json").write_text(
+ json.dumps(command, indent=2) + "\n", encoding="utf-8"
+ )
+ with (native / f"{engine}.log").open("wb") as log:
+ subprocess.run(
+ command,
+ cwd=native,
+ env=env,
+ stdout=log,
+ stderr=subprocess.STDOUT,
+ check=True,
+ timeout=120,
+ )
+ with Image.open(target) as source:
+ foreground = source.convert("RGBA")
+ if (
+ foreground.size != (1920, 1080)
+ or foreground.getchannel("A").getextrema()[0] != 0
+ ):
+ raise ValueError(f"Expected a transparent 1080p frame: {target}")
+ for suffix, color in (("", "#0B0C0F"), ("-light", "#FFFFFF")):
+ background = Image.new("RGBA", foreground.size, color)
+ background.alpha_composite(foreground)
+ background.convert("RGB").save(images / f"{engine}{suffix}.png")
+ print(images)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/scripts/benchmark/results.json b/scripts/benchmark/results.json
index 4b23b365..339e3643 100644
--- a/scripts/benchmark/results.json
+++ b/scripts/benchmark/results.json
@@ -1,480 +1,1670 @@
{
- "date": "2026-09-29",
- "commit": "8e95dd392ce176848a956b0da17bfe21dd560743",
+ "date": "2026-10-07T01:14:22-0400",
"machine": {
- "os": "macOS 15.7.2",
- "cpus": "12",
- "cpu": "Apple M4 Pro",
- "memory": "24 GB"
+ "os": "macOS-15.7.9-arm64-arm-64bit-Mach-O",
+ "cpu": "arm",
+ "cpus": 12
},
- "versions": {
- "manimgx": "0.1.0",
- "manim_ce": "0.21.0",
- "manimgl": "1.7.2",
- "blender": "5.2.0 LTS"
+ "settings": {
+ "width": 1920,
+ "height": 1080,
+ "fps": 60,
+ "crf": 23,
+ "manim_preset": "ultrafast",
+ "blender_preset": "REALTIME",
+ "scenes": {
+ "orbit": 10.0,
+ "matrix": 7.2,
+ "pendulums": 13.0,
+ "hierarchy": 3.0,
+ "linked_rings": 3.0
+ },
+ "repeats": {
+ "manimgx": 3,
+ "manimgl": 3,
+ "manim_ce": 1,
+ "blender_workbench": 1,
+ "blender_eevee": 1
+ }
+ },
+ "source_sha256": {
+ "chart.py": "9e7f299d3fba57bf6f761ec3b3758b3778a4ddb0a167882e03a79d2cca24255b",
+ "quality.py": "2f1c66d590fbdea52ebb5423bc199e1ea83da42abc0791dcdf101630cf69dcf7",
+ "run.py": "a08724a45c3a6c372bd4b2e6893b8ca9afcb4192a9cb4f3ae8739e8bff778166",
+ "scenes/ce_cli.py": "7f0559c764a293807af6f42875c0016675952d3c437e458e93821051d908af73",
+ "scenes/ffmpeg.py": "146d074015a06a7da10e493ba4c1c5ad7c0134f7e57246ec661c16a729c0d957",
+ "scenes/lighting.py": "a1a0dada3d492a9544ba548917dd385a09aaebc1cc4cc5cfaa4fe50aae8f53c6",
+ "scenes/linked_rings_blender.py": "f0d0bc4c0cdc5a3c94498cb0f77abe6d5cf0b57bd7d6c823ea3032637a22a105",
+ "scenes/matrix_manim_ce.py": "d6380a2199bad4787c37a48987fe699fe6cbe92ff6ba68098aa935751d2d0d5d",
+ "scenes/matrix_manimgl.py": "e4da1ef5a1f99b9efa5401609fa708045b31e992691ae93dc5869758d1c81d62",
+ "scenes/matrix_manimgx.py": "11ad07fe96177bdd8e0fadc54114d0f5dae6897c67506cedcd0866879c9588e9",
+ "scenes/orbit_blender.py": "22e99b266d47529bab7e38b3a93d252663edb4238cd5bca861f0b0d7c7e3c688",
+ "scenes/orbit_manim_ce.py": "0588b15ff3e961816fd13674b4c5a8817202fa5a677391ca4525d12f22db8320",
+ "scenes/orbit_manimgl.py": "9246f6273156ca6560e9feba11eadfc578b35c9a0bbc3d004ef90dd83b6063e1",
+ "scenes/orbit_manimgx.py": "2cec6cc45ba2eb8d1917e1d8ebf9cad5411f946c912b1d4e4788a4adcee40aeb",
+ "scenes/pendulums_manim_ce.py": "b57d46a71b521238e19a39eec4d9d1349641659cba798a0bcaaf3582189b69d7",
+ "scenes/pendulums_manimgl.py": "90507a023135d6518571b5e3206d4fd854f9d85fc42955cad2f4a6633ca19019",
+ "scenes/pendulums_manimgx.py": "afc0acf1948f3ea659f66b47018c37869370d8f6d0c9688b2287827f1a47623e",
+ "scenes/quality_manim.py": "394100048bf6819cb14bbec8ed4da986c22cdf740a77ebaa996d60c2111b39d2",
+ "scenes/suite_blender.py": "45d2b897392735fd6baf8e47cafd10f4956288b2761fce05f400aa16b32f958f",
+ "scenes/suite_data.py": "aad0247751f5eae240f87bf87919367e87210eac645cd58a0b20cbaa1ae0a2c8",
+ "scenes/suite_manim.py": "bfc84687b2b9b44f2cfbf492956d1ef30c3029b85de0d5b5f949c55095f976ee",
+ "scenes/two_d_blender.py": "71062f6bd216a098ac90af9ed6e92a5c66969b3277f40f97ece24cb8a5f8c58b"
},
- "scenes": {
+ "per_scene": {
"orbit": {
"manimgx": {
- "label": "manimgx",
- "median": 0.85,
- "runs": [
- {
- "wall": 0.966,
- "cpu": 5.37,
- "memory_mb": 532,
- "video_mb": 71.7,
- "load": 34.14
- },
- {
- "wall": 0.858,
- "cpu": 5.1,
- "memory_mb": 520,
- "video_mb": 71.7,
- "load": 10.2
- },
- {
- "wall": 0.784,
- "cpu": 5.05,
- "memory_mb": 513,
- "video_mb": 71.7,
- "load": 15.59
- },
- {
- "wall": 0.854,
- "cpu": 5.17,
- "memory_mb": 504,
- "video_mb": 71.7,
- "load": 9.37
- },
- {
- "wall": 0.832,
- "cpu": 5.3,
- "memory_mb": 545,
- "video_mb": 71.7,
- "load": 9.31
- }
+ "mean_seconds": 1.1839671526492264,
+ "samples_seconds": [
+ 1.1549583750311285,
+ 1.1032197499880567,
+ 1.2937233329284936
]
},
"manimgl": {
- "label": "ManimGL",
- "median": 6.21,
- "runs": [
- {
- "wall": 6.924,
- "cpu": 18.04,
- "memory_mb": 893,
- "video_mb": 2.8,
- "load": 34.14
- },
- {
- "wall": 6.213,
- "cpu": 16.44,
- "memory_mb": 854,
- "video_mb": 2.8,
- "load": 10.59
- },
- {
- "wall": 6.087,
- "cpu": 16.36,
- "memory_mb": 844,
- "video_mb": 2.8,
- "load": 15.59
- },
- {
- "wall": 6.093,
- "cpu": 16.7,
- "memory_mb": 857,
- "video_mb": 2.8,
- "load": 9.37
- },
- {
- "wall": 6.376,
- "cpu": 16.83,
- "memory_mb": 876,
- "video_mb": 2.8,
- "load": 9.31
- }
+ "mean_seconds": 6.463257069660661,
+ "samples_seconds": [
+ 6.362686374923214,
+ 6.147806541994214,
+ 6.879278292064555
+ ]
+ },
+ "manim_ce": {
+ "mean_seconds": 211.80927754205186,
+ "samples_seconds": [
+ 211.80927754205186
]
},
"blender_workbench": {
- "label": "Blender (Workbench)",
- "median": 18.45,
- "runs": [
- {
- "wall": 20.585,
- "cpu": 57.89,
- "memory_mb": 1124,
- "video_mb": 3.2,
- "load": 52.42
- },
- {
- "wall": 17.85,
- "cpu": 54.46,
- "memory_mb": 1165,
- "video_mb": 3.2,
- "load": 11.74
- },
- {
- "wall": 18.411,
- "cpu": 55.29,
- "memory_mb": 1149,
- "video_mb": 3.2,
- "load": 15.72
- },
- {
- "wall": 18.447,
- "cpu": 57.62,
- "memory_mb": 1211,
- "video_mb": 3.2,
- "load": 8.92
- },
- {
- "wall": 19.217,
- "cpu": 55.35,
- "memory_mb": 1182,
- "video_mb": 3.2,
- "load": 8.97
- }
+ "mean_seconds": 16.563321500085294,
+ "samples_seconds": [
+ 16.563321500085294
]
},
"blender_eevee": {
- "label": "Blender (EEVEE)",
- "median": 238.9,
- "runs": [
- {
- "wall": 238.898,
- "cpu": 112.47,
- "memory_mb": 1070,
- "video_mb": 3.6,
- "load": 21.22
- },
- {
- "wall": 226.638,
- "cpu": 91.29,
- "memory_mb": 1131,
- "video_mb": 3.6,
- "load": 71.4
- },
- {
- "wall": 267.785,
- "cpu": 124.96,
- "memory_mb": 1227,
- "video_mb": 3.6,
- "load": 13.54
- }
+ "mean_seconds": 220.242049625027,
+ "samples_seconds": [
+ 220.242049625027
+ ]
+ }
+ },
+ "matrix": {
+ "manimgx": {
+ "mean_seconds": 0.3602115419926122,
+ "samples_seconds": [
+ 0.32985283399466425,
+ 0.3224517919588834,
+ 0.4283300000242889
+ ]
+ },
+ "manimgl": {
+ "mean_seconds": 8.28727691663274,
+ "samples_seconds": [
+ 8.176305125001818,
+ 8.14448562497273,
+ 8.541039999923669
]
},
"manim_ce": {
- "label": "Manim CE",
- "median": 243.46,
- "runs": [
- {
- "wall": 326.331,
- "cpu": 269.12,
- "memory_mb": 745,
- "video_mb": 5.5,
- "load": 9.81
- },
- {
- "wall": 223.805,
- "cpu": 237.8,
- "memory_mb": 952,
- "video_mb": 5.5,
- "load": 23.0
- },
- {
- "wall": 250.051,
- "cpu": 255.61,
- "memory_mb": 748,
- "video_mb": 5.5,
- "load": 8.0
- },
- {
- "wall": 236.86,
- "cpu": 250.72,
- "memory_mb": 798,
- "video_mb": 5.5,
- "load": 10.77
- }
+ "mean_seconds": 7.139898875029758,
+ "samples_seconds": [
+ 7.139898875029758
+ ]
+ },
+ "blender_workbench": {
+ "mean_seconds": 11.04514066700358,
+ "samples_seconds": [
+ 11.04514066700358
+ ]
+ },
+ "blender_eevee": {
+ "mean_seconds": 90.7981860000873,
+ "samples_seconds": [
+ 90.7981860000873
]
}
},
- "morph": {
+ "pendulums": {
"manimgx": {
- "label": "manimgx",
- "median": 8.98,
- "runs": [
- {
- "wall": 9.766,
- "cpu": 13.37,
- "memory_mb": 1790,
- "video_mb": 73.4,
- "load": 21.08
- },
- {
- "wall": 8.771,
- "cpu": 12.98,
- "memory_mb": 1796,
- "video_mb": 73.4,
- "load": 8.26
- },
- {
- "wall": 8.796,
- "cpu": 13.04,
- "memory_mb": 1836,
- "video_mb": 73.4,
- "load": 16.3
- },
- {
- "wall": 8.982,
- "cpu": 13.26,
- "memory_mb": 1738,
- "video_mb": 73.4,
- "load": 10.3
- },
- {
- "wall": 8.997,
- "cpu": 13.22,
- "memory_mb": 1792,
- "video_mb": 73.4,
- "load": 12.97
- }
+ "mean_seconds": 0.7559397220223522,
+ "samples_seconds": [
+ 0.7350382909644395,
+ 0.7372282500145957,
+ 0.7955526250880212
]
},
"manimgl": {
- "label": "ManimGL",
- "median": 73.09,
- "runs": [
- {
- "wall": 75.11,
- "cpu": 85.76,
- "memory_mb": 870,
- "video_mb": 3.6,
- "load": 20.98
- },
- {
- "wall": 72.924,
- "cpu": 84.65,
- "memory_mb": 872,
- "video_mb": 3.6,
- "load": 9.75
- },
- {
- "wall": 73.088,
- "cpu": 84.73,
- "memory_mb": 875,
- "video_mb": 3.6,
- "load": 16.62
- }
+ "mean_seconds": 16.81176720831233,
+ "samples_seconds": [
+ 16.556698707980104,
+ 16.64203266694676,
+ 17.236570250010118
+ ]
+ },
+ "manim_ce": {
+ "mean_seconds": 4.745277915964834,
+ "samples_seconds": [
+ 4.745277915964834
]
},
"blender_workbench": {
- "label": "Blender (Workbench)",
- "median": 18.45,
- "runs": [
- {
- "wall": 20.987,
- "cpu": 58.0,
- "memory_mb": 1158,
- "video_mb": 3.9,
- "load": 18.14
- },
- {
- "wall": 22.597,
- "cpu": 55.7,
- "memory_mb": 1127,
- "video_mb": 3.9,
- "load": 6.58
- },
- {
- "wall": 17.827,
- "cpu": 58.28,
- "memory_mb": 1135,
- "video_mb": 3.9,
- "load": 9.42
- },
- {
- "wall": 18.275,
- "cpu": 58.18,
- "memory_mb": 1155,
- "video_mb": 3.9,
- "load": 9.41
- },
- {
- "wall": 18.448,
- "cpu": 55.64,
- "memory_mb": 1146,
- "video_mb": 3.9,
- "load": 18.89
- }
+ "mean_seconds": 19.860451874905266,
+ "samples_seconds": [
+ 19.860451874905266
]
},
"blender_eevee": {
- "label": "Blender (EEVEE)",
- "median": 254.03,
- "runs": [
- {
- "wall": 254.035,
- "cpu": 103.79,
- "memory_mb": 1037,
- "video_mb": 4.3,
- "load": 8.83
- },
- {
- "wall": 244.75,
- "cpu": 110.85,
- "memory_mb": 1097,
- "video_mb": 4.3,
- "load": 17.03
- },
- {
- "wall": 265.86,
- "cpu": 119.06,
- "memory_mb": 986,
- "video_mb": 4.3,
- "load": 14.09
- }
+ "mean_seconds": 165.88973137491848,
+ "samples_seconds": [
+ 165.88973137491848
+ ]
+ }
+ },
+ "hierarchy": {
+ "manimgx": {
+ "mean_seconds": 0.33400323637761176,
+ "samples_seconds": [
+ 0.32685616705566645,
+ 0.3377790420781821,
+ 0.3373744999989867
+ ]
+ },
+ "manimgl": {
+ "mean_seconds": 1.7887499580392614,
+ "samples_seconds": [
+ 1.7833502501016483,
+ 1.7423528330400586,
+ 1.8405467909760773
]
},
"manim_ce": {
- "label": "Manim CE",
- "median": 701.95,
- "runs": [
- {
- "wall": 701.948,
- "cpu": 711.74,
- "memory_mb": 751,
- "video_mb": 7.1,
- "load": 11.26
- }
+ "mean_seconds": 16.169242208008654,
+ "samples_seconds": [
+ 16.169242208008654
+ ]
+ },
+ "blender_workbench": {
+ "mean_seconds": 4.979416083078831,
+ "samples_seconds": [
+ 4.979416083078831
+ ]
+ },
+ "blender_eevee": {
+ "mean_seconds": 62.26514262496494,
+ "samples_seconds": [
+ 62.26514262496494
]
}
},
- "explainer": {
+ "linked_rings": {
"manimgx": {
- "label": "manimgx",
- "median": 0.58,
- "runs": [
- {
- "wall": 0.62,
- "cpu": 2.37,
- "memory_mb": 465,
- "video_mb": 1.5,
- "load": 10.97
- },
- {
- "wall": 0.643,
- "cpu": 2.33,
- "memory_mb": 489,
- "video_mb": 1.5,
- "load": 15.6
- },
- {
- "wall": 0.577,
- "cpu": 2.38,
- "memory_mb": 477,
- "video_mb": 1.5,
- "load": 9.83
- },
- {
- "wall": 0.556,
- "cpu": 2.38,
- "memory_mb": 485,
- "video_mb": 1.5,
- "load": 8.79
- },
- {
- "wall": 0.556,
- "cpu": 2.35,
- "memory_mb": 479,
- "video_mb": 1.5,
- "load": 23.24
- }
+ "mean_seconds": 0.44338433366889757,
+ "samples_seconds": [
+ 0.43137791694607586,
+ 0.4366209590807557,
+ 0.4621541249798611
]
},
"manimgl": {
- "label": "ManimGL",
- "median": 6.13,
- "runs": [
- {
- "wall": 6.423,
- "cpu": 10.28,
- "memory_mb": 878,
- "video_mb": 0.3,
- "load": 10.97
- },
- {
- "wall": 6.385,
- "cpu": 10.02,
- "memory_mb": 875,
- "video_mb": 0.3,
- "load": 15.6
- },
- {
- "wall": 5.843,
- "cpu": 10.27,
- "memory_mb": 869,
- "video_mb": 0.3,
- "load": 9.83
- },
- {
- "wall": 5.863,
- "cpu": 10.27,
- "memory_mb": 869,
- "video_mb": 0.3,
- "load": 8.79
- },
- {
- "wall": 6.133,
- "cpu": 10.14,
- "memory_mb": 875,
- "video_mb": 0.3,
- "load": 23.24
- }
+ "mean_seconds": 1.9331649863161147,
+ "samples_seconds": [
+ 1.8965265000006184,
+ 1.9064397499896586,
+ 1.996528708958067
]
},
"manim_ce": {
- "label": "Manim CE",
- "median": 4.05,
- "runs": [
- {
- "wall": 4.052,
- "cpu": 9.64,
- "memory_mb": 1661,
- "video_mb": 0.4,
- "load": 10.2
- },
- {
- "wall": 4.05,
- "cpu": 9.44,
- "memory_mb": 1589,
- "video_mb": 0.4,
- "load": 15.55
- },
- {
- "wall": 3.853,
- "cpu": 9.47,
- "memory_mb": 1784,
- "video_mb": 0.4,
- "load": 9.92
- },
- {
- "wall": 3.873,
- "cpu": 9.53,
- "memory_mb": 1563,
- "video_mb": 0.4,
- "load": 9.6
- },
- {
- "wall": 4.665,
- "cpu": 10.23,
- "memory_mb": 2078,
- "video_mb": 0.4,
- "load": 22.18
- }
+ "mean_seconds": 38.962085749953985,
+ "samples_seconds": [
+ 38.962085749953985
]
+ },
+ "blender_workbench": {
+ "mean_seconds": 5.162881792057306,
+ "samples_seconds": [
+ 5.162881792057306
+ ]
+ },
+ "blender_eevee": {
+ "mean_seconds": 62.20007633406203,
+ "samples_seconds": [
+ 62.20007633406203
+ ]
+ }
+ }
+ },
+ "totals": {
+ "manimgx": 3.0775059867107,
+ "manimgl": 35.284216138961106,
+ "manim_ce": 278.8257822910091,
+ "blender_workbench": 57.61121191713028,
+ "blender_eevee": 601.3951859590597
+ },
+ "complete": true,
+ "runs": [
+ {
+ "scene": "orbit",
+ "tool": "manimgx",
+ "repeat": 1,
+ "command": [
+ "/Users/apoogdk/GIT/manimgx/.venv/bin/manimgx",
+ "render",
+ "/private/tmp/manimgx-crf23-20261007/benchmark/scenes/orbit_manimgx.py",
+ "Orbit",
+ "-o",
+ "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-idle/orbit/manimgx/1/out.mp4",
+ "--preset",
+ "ultrafast",
+ "--crf",
+ "23",
+ "--resolution",
+ "1920x1080",
+ "--fps",
+ "60"
+ ],
+ "status": "complete",
+ "wall_seconds": 1.1549583750311285,
+ "cpu_seconds": 4.986966,
+ "log": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-idle/orbit/manimgx/1/render.log",
+ "error": "",
+ "video": {
+ "path": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-idle/orbit/manimgx/1/out.mp4",
+ "decoded_frames": 601,
+ "timeline_frames": 601.0,
+ "bytes": 43769464,
+ "sha256": "ab65319844fd8e033eba89cd9b9f8c9dee5ff5bb09934b092ca65a84b6662620",
+ "encoder_evidence": "Explicit ultrafast / CRF 23 CLI arguments"
+ }
+ },
+ {
+ "scene": "orbit",
+ "tool": "manimgl",
+ "repeat": 1,
+ "command": [
+ "/private/tmp/manimgx-comparison-gl/bin/manimgl",
+ "/private/tmp/manimgx-crf23-20261007/benchmark/scenes/orbit_manimgl.py",
+ "Orbit",
+ "-w",
+ "--hd",
+ "--video_dir",
+ "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-idle/orbit/manimgl/1",
+ "--config_file",
+ "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-idle/orbit/manimgl/1/config.yml"
+ ],
+ "status": "complete",
+ "wall_seconds": 6.362686374923214,
+ "cpu_seconds": 9.075293,
+ "log": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-idle/orbit/manimgl/1/render.log",
+ "error": "",
+ "video": {
+ "path": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-idle/orbit/manimgl/1/Orbit.mp4",
+ "decoded_frames": 600,
+ "timeline_frames": 600.0,
+ "bytes": 23939383,
+ "sha256": "e70b8da70481af2b0a9c09ccfae6cce5c5fdf94e954db91260a5392cee89e0c9",
+ "encoder_evidence": "x264 - core 165 r3222 b35605a - H.264/MPEG-4 AVC codec - Copyleft 2003-2025 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=18 lookahead_threads=3 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=0 intra_refresh=0 rc=crf mbtree=0 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0"
+ }
+ },
+ {
+ "scene": "orbit",
+ "tool": "manimgx",
+ "repeat": 2,
+ "command": [
+ "/Users/apoogdk/GIT/manimgx/.venv/bin/manimgx",
+ "render",
+ "/private/tmp/manimgx-crf23-20261007/benchmark/scenes/orbit_manimgx.py",
+ "Orbit",
+ "-o",
+ "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-idle/orbit/manimgx/2/out.mp4",
+ "--preset",
+ "ultrafast",
+ "--crf",
+ "23",
+ "--resolution",
+ "1920x1080",
+ "--fps",
+ "60"
+ ],
+ "status": "complete",
+ "wall_seconds": 1.1032197499880567,
+ "cpu_seconds": 5.035039,
+ "log": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-idle/orbit/manimgx/2/render.log",
+ "error": "",
+ "video": {
+ "path": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-idle/orbit/manimgx/2/out.mp4",
+ "decoded_frames": 601,
+ "timeline_frames": 601.0,
+ "bytes": 43769464,
+ "sha256": "ab65319844fd8e033eba89cd9b9f8c9dee5ff5bb09934b092ca65a84b6662620",
+ "encoder_evidence": "Explicit ultrafast / CRF 23 CLI arguments"
+ }
+ },
+ {
+ "scene": "orbit",
+ "tool": "manimgl",
+ "repeat": 2,
+ "command": [
+ "/private/tmp/manimgx-comparison-gl/bin/manimgl",
+ "/private/tmp/manimgx-crf23-20261007/benchmark/scenes/orbit_manimgl.py",
+ "Orbit",
+ "-w",
+ "--hd",
+ "--video_dir",
+ "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-idle/orbit/manimgl/2",
+ "--config_file",
+ "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-idle/orbit/manimgl/2/config.yml"
+ ],
+ "status": "complete",
+ "wall_seconds": 6.147806541994214,
+ "cpu_seconds": 9.1868,
+ "log": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-idle/orbit/manimgl/2/render.log",
+ "error": "",
+ "video": {
+ "path": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-idle/orbit/manimgl/2/Orbit.mp4",
+ "decoded_frames": 600,
+ "timeline_frames": 600.0,
+ "bytes": 23939383,
+ "sha256": "e70b8da70481af2b0a9c09ccfae6cce5c5fdf94e954db91260a5392cee89e0c9",
+ "encoder_evidence": "x264 - core 165 r3222 b35605a - H.264/MPEG-4 AVC codec - Copyleft 2003-2025 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=18 lookahead_threads=3 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=0 intra_refresh=0 rc=crf mbtree=0 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0"
+ }
+ },
+ {
+ "scene": "matrix",
+ "tool": "manimgx",
+ "repeat": 1,
+ "command": [
+ "/Users/apoogdk/GIT/manimgx/.venv/bin/manimgx",
+ "render",
+ "/private/tmp/manimgx-crf23-20261007/benchmark/scenes/matrix_manimgx.py",
+ "TeacherScene",
+ "-o",
+ "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-idle/matrix/manimgx/1/out.mp4",
+ "--preset",
+ "ultrafast",
+ "--crf",
+ "23",
+ "--resolution",
+ "1920x1080",
+ "--fps",
+ "60"
+ ],
+ "status": "complete",
+ "wall_seconds": 0.32985283399466425,
+ "cpu_seconds": 1.133066,
+ "log": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-idle/matrix/manimgx/1/render.log",
+ "error": "",
+ "video": {
+ "path": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-idle/matrix/manimgx/1/out.mp4",
+ "decoded_frames": 243,
+ "timeline_frames": 433.0,
+ "bytes": 333761,
+ "sha256": "fba64cdeaa1d5f0f2f78814538245fed72acedcabe602b2bda25b69c67e1da21",
+ "encoder_evidence": "Explicit ultrafast / CRF 23 CLI arguments"
+ }
+ },
+ {
+ "scene": "matrix",
+ "tool": "manimgl",
+ "repeat": 1,
+ "command": [
+ "/private/tmp/manimgx-comparison-gl/bin/manimgl",
+ "/private/tmp/manimgx-crf23-20261007/benchmark/scenes/matrix_manimgl.py",
+ "TeacherScene",
+ "-w",
+ "--hd",
+ "--video_dir",
+ "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-idle/matrix/manimgl/1",
+ "--config_file",
+ "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-idle/matrix/manimgl/1/config.yml"
+ ],
+ "status": "complete",
+ "wall_seconds": 8.176305125001818,
+ "cpu_seconds": 10.124938,
+ "log": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-idle/matrix/manimgl/1/render.log",
+ "error": "",
+ "video": {
+ "path": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-idle/matrix/manimgl/1/TeacherScene.mp4",
+ "decoded_frames": 432,
+ "timeline_frames": 432.0,
+ "bytes": 324583,
+ "sha256": "9a528c2da5f474cb7f471b57bb0c3754f8bc3695a6f57e74b77619548aef74cc",
+ "encoder_evidence": "x264 - core 165 r3222 b35605a - H.264/MPEG-4 AVC codec - Copyleft 2003-2025 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=18 lookahead_threads=3 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=0 intra_refresh=0 rc=crf mbtree=0 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0"
+ }
+ },
+ {
+ "scene": "matrix",
+ "tool": "manimgx",
+ "repeat": 2,
+ "command": [
+ "/Users/apoogdk/GIT/manimgx/.venv/bin/manimgx",
+ "render",
+ "/private/tmp/manimgx-crf23-20261007/benchmark/scenes/matrix_manimgx.py",
+ "TeacherScene",
+ "-o",
+ "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-idle/matrix/manimgx/2/out.mp4",
+ "--preset",
+ "ultrafast",
+ "--crf",
+ "23",
+ "--resolution",
+ "1920x1080",
+ "--fps",
+ "60"
+ ],
+ "status": "complete",
+ "wall_seconds": 0.3224517919588834,
+ "cpu_seconds": 1.139669,
+ "log": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-idle/matrix/manimgx/2/render.log",
+ "error": "",
+ "video": {
+ "path": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-idle/matrix/manimgx/2/out.mp4",
+ "decoded_frames": 243,
+ "timeline_frames": 433.0,
+ "bytes": 333761,
+ "sha256": "fba64cdeaa1d5f0f2f78814538245fed72acedcabe602b2bda25b69c67e1da21",
+ "encoder_evidence": "Explicit ultrafast / CRF 23 CLI arguments"
+ }
+ },
+ {
+ "scene": "matrix",
+ "tool": "manimgl",
+ "repeat": 2,
+ "command": [
+ "/private/tmp/manimgx-comparison-gl/bin/manimgl",
+ "/private/tmp/manimgx-crf23-20261007/benchmark/scenes/matrix_manimgl.py",
+ "TeacherScene",
+ "-w",
+ "--hd",
+ "--video_dir",
+ "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-idle/matrix/manimgl/2",
+ "--config_file",
+ "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-idle/matrix/manimgl/2/config.yml"
+ ],
+ "status": "complete",
+ "wall_seconds": 8.14448562497273,
+ "cpu_seconds": 10.091675,
+ "log": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-idle/matrix/manimgl/2/render.log",
+ "error": "",
+ "video": {
+ "path": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-idle/matrix/manimgl/2/TeacherScene.mp4",
+ "decoded_frames": 432,
+ "timeline_frames": 432.0,
+ "bytes": 324583,
+ "sha256": "9a528c2da5f474cb7f471b57bb0c3754f8bc3695a6f57e74b77619548aef74cc",
+ "encoder_evidence": "x264 - core 165 r3222 b35605a - H.264/MPEG-4 AVC codec - Copyleft 2003-2025 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=18 lookahead_threads=3 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=0 intra_refresh=0 rc=crf mbtree=0 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0"
+ }
+ },
+ {
+ "scene": "pendulums",
+ "tool": "manimgx",
+ "repeat": 1,
+ "command": [
+ "/Users/apoogdk/GIT/manimgx/.venv/bin/manimgx",
+ "render",
+ "/private/tmp/manimgx-crf23-20261007/benchmark/scenes/pendulums_manimgx.py",
+ "TeacherScene",
+ "-o",
+ "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-idle/pendulums/manimgx/1/out.mp4",
+ "--preset",
+ "ultrafast",
+ "--crf",
+ "23",
+ "--resolution",
+ "1920x1080",
+ "--fps",
+ "60"
+ ],
+ "status": "complete",
+ "wall_seconds": 0.7350382909644395,
+ "cpu_seconds": 3.299182,
+ "log": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-idle/pendulums/manimgx/1/render.log",
+ "error": "",
+ "video": {
+ "path": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-idle/pendulums/manimgx/1/out.mp4",
+ "decoded_frames": 721,
+ "timeline_frames": 781.0,
+ "bytes": 7183498,
+ "sha256": "27f2469328aef4f5eaac23f50961c92ea34fad38176149a4ff732eed4516defa",
+ "encoder_evidence": "Explicit ultrafast / CRF 23 CLI arguments"
+ }
+ },
+ {
+ "scene": "pendulums",
+ "tool": "manimgl",
+ "repeat": 1,
+ "command": [
+ "/private/tmp/manimgx-comparison-gl/bin/manimgl",
+ "/private/tmp/manimgx-crf23-20261007/benchmark/scenes/pendulums_manimgl.py",
+ "TeacherScene",
+ "-w",
+ "--hd",
+ "--video_dir",
+ "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-idle/pendulums/manimgl/1",
+ "--config_file",
+ "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-idle/pendulums/manimgl/1/config.yml"
+ ],
+ "status": "complete",
+ "wall_seconds": 16.556698707980104,
+ "cpu_seconds": 18.432412,
+ "log": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-idle/pendulums/manimgl/1/render.log",
+ "error": "",
+ "video": {
+ "path": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-idle/pendulums/manimgl/1/TeacherScene.mp4",
+ "decoded_frames": 780,
+ "timeline_frames": 780.0,
+ "bytes": 6662220,
+ "sha256": "b76fbedabc3fe9377f0843ba2c7eb1031509647d2b701e30a02830412a7dac5e",
+ "encoder_evidence": "x264 - core 165 r3222 b35605a - H.264/MPEG-4 AVC codec - Copyleft 2003-2025 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=18 lookahead_threads=3 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=0 intra_refresh=0 rc=crf mbtree=0 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0"
+ }
+ },
+ {
+ "scene": "pendulums",
+ "tool": "manimgx",
+ "repeat": 2,
+ "command": [
+ "/Users/apoogdk/GIT/manimgx/.venv/bin/manimgx",
+ "render",
+ "/private/tmp/manimgx-crf23-20261007/benchmark/scenes/pendulums_manimgx.py",
+ "TeacherScene",
+ "-o",
+ "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-idle/pendulums/manimgx/2/out.mp4",
+ "--preset",
+ "ultrafast",
+ "--crf",
+ "23",
+ "--resolution",
+ "1920x1080",
+ "--fps",
+ "60"
+ ],
+ "status": "complete",
+ "wall_seconds": 0.7372282500145957,
+ "cpu_seconds": 3.317985,
+ "log": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-idle/pendulums/manimgx/2/render.log",
+ "error": "",
+ "video": {
+ "path": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-idle/pendulums/manimgx/2/out.mp4",
+ "decoded_frames": 721,
+ "timeline_frames": 781.0,
+ "bytes": 7183498,
+ "sha256": "27f2469328aef4f5eaac23f50961c92ea34fad38176149a4ff732eed4516defa",
+ "encoder_evidence": "Explicit ultrafast / CRF 23 CLI arguments"
+ }
+ },
+ {
+ "scene": "pendulums",
+ "tool": "manimgl",
+ "repeat": 2,
+ "command": [
+ "/private/tmp/manimgx-comparison-gl/bin/manimgl",
+ "/private/tmp/manimgx-crf23-20261007/benchmark/scenes/pendulums_manimgl.py",
+ "TeacherScene",
+ "-w",
+ "--hd",
+ "--video_dir",
+ "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-idle/pendulums/manimgl/2",
+ "--config_file",
+ "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-idle/pendulums/manimgl/2/config.yml"
+ ],
+ "status": "complete",
+ "wall_seconds": 16.64203266694676,
+ "cpu_seconds": 18.592612000000003,
+ "log": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-idle/pendulums/manimgl/2/render.log",
+ "error": "",
+ "video": {
+ "path": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-idle/pendulums/manimgl/2/TeacherScene.mp4",
+ "decoded_frames": 780,
+ "timeline_frames": 780.0,
+ "bytes": 6662220,
+ "sha256": "b76fbedabc3fe9377f0843ba2c7eb1031509647d2b701e30a02830412a7dac5e",
+ "encoder_evidence": "x264 - core 165 r3222 b35605a - H.264/MPEG-4 AVC codec - Copyleft 2003-2025 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=18 lookahead_threads=3 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=0 intra_refresh=0 rc=crf mbtree=0 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0"
+ }
+ },
+ {
+ "scene": "hierarchy",
+ "tool": "manimgx",
+ "repeat": 1,
+ "command": [
+ "/Users/apoogdk/GIT/manimgx/.venv/bin/manimgx",
+ "render",
+ "/private/tmp/manimgx-crf23-20261007/benchmark/scenes/suite_manim.py",
+ "Benchmark",
+ "-o",
+ "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-idle/hierarchy/manimgx/1/out.mp4",
+ "--preset",
+ "ultrafast",
+ "--crf",
+ "23",
+ "--resolution",
+ "1920x1080",
+ "--fps",
+ "60"
+ ],
+ "status": "complete",
+ "wall_seconds": 0.32685616705566645,
+ "cpu_seconds": 1.214933,
+ "log": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-idle/hierarchy/manimgx/1/render.log",
+ "error": "",
+ "video": {
+ "path": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-idle/hierarchy/manimgx/1/out.mp4",
+ "decoded_frames": 181,
+ "timeline_frames": 181.0,
+ "bytes": 852479,
+ "sha256": "bfe196ac6786f614134f5ea63df7b03fd89f0f0bb11d31c2e5310e1dfa464acc",
+ "encoder_evidence": "Explicit ultrafast / CRF 23 CLI arguments"
+ }
+ },
+ {
+ "scene": "hierarchy",
+ "tool": "manimgl",
+ "repeat": 1,
+ "command": [
+ "/private/tmp/manimgx-comparison-gl/bin/manimgl",
+ "/private/tmp/manimgx-crf23-20261007/benchmark/scenes/suite_manim.py",
+ "Benchmark",
+ "-w",
+ "--hd",
+ "--video_dir",
+ "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-idle/hierarchy/manimgl/1",
+ "--config_file",
+ "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-idle/hierarchy/manimgl/1/config.yml"
+ ],
+ "status": "complete",
+ "wall_seconds": 1.7833502501016483,
+ "cpu_seconds": 2.8002640000000003,
+ "log": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-idle/hierarchy/manimgl/1/render.log",
+ "error": "",
+ "video": {
+ "path": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-idle/hierarchy/manimgl/1/Benchmark.mp4",
+ "decoded_frames": 180,
+ "timeline_frames": 180.0,
+ "bytes": 847100,
+ "sha256": "89986302c298eb1cf9334787f879b941766abe344adc17892544d529ec529083",
+ "encoder_evidence": "x264 - core 165 r3222 b35605a - H.264/MPEG-4 AVC codec - Copyleft 2003-2025 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=18 lookahead_threads=3 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=0 intra_refresh=0 rc=crf mbtree=0 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0"
+ }
+ },
+ {
+ "scene": "hierarchy",
+ "tool": "manimgx",
+ "repeat": 2,
+ "command": [
+ "/Users/apoogdk/GIT/manimgx/.venv/bin/manimgx",
+ "render",
+ "/private/tmp/manimgx-crf23-20261007/benchmark/scenes/suite_manim.py",
+ "Benchmark",
+ "-o",
+ "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-idle/hierarchy/manimgx/2/out.mp4",
+ "--preset",
+ "ultrafast",
+ "--crf",
+ "23",
+ "--resolution",
+ "1920x1080",
+ "--fps",
+ "60"
+ ],
+ "status": "complete",
+ "wall_seconds": 0.3377790420781821,
+ "cpu_seconds": 1.248132,
+ "log": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-idle/hierarchy/manimgx/2/render.log",
+ "error": "",
+ "video": {
+ "path": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-idle/hierarchy/manimgx/2/out.mp4",
+ "decoded_frames": 181,
+ "timeline_frames": 181.0,
+ "bytes": 852479,
+ "sha256": "bfe196ac6786f614134f5ea63df7b03fd89f0f0bb11d31c2e5310e1dfa464acc",
+ "encoder_evidence": "Explicit ultrafast / CRF 23 CLI arguments"
+ }
+ },
+ {
+ "scene": "hierarchy",
+ "tool": "manimgl",
+ "repeat": 2,
+ "command": [
+ "/private/tmp/manimgx-comparison-gl/bin/manimgl",
+ "/private/tmp/manimgx-crf23-20261007/benchmark/scenes/suite_manim.py",
+ "Benchmark",
+ "-w",
+ "--hd",
+ "--video_dir",
+ "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-idle/hierarchy/manimgl/2",
+ "--config_file",
+ "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-idle/hierarchy/manimgl/2/config.yml"
+ ],
+ "status": "complete",
+ "wall_seconds": 1.7423528330400586,
+ "cpu_seconds": 2.7407369999999998,
+ "log": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-idle/hierarchy/manimgl/2/render.log",
+ "error": "",
+ "video": {
+ "path": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-idle/hierarchy/manimgl/2/Benchmark.mp4",
+ "decoded_frames": 180,
+ "timeline_frames": 180.0,
+ "bytes": 847100,
+ "sha256": "89986302c298eb1cf9334787f879b941766abe344adc17892544d529ec529083",
+ "encoder_evidence": "x264 - core 165 r3222 b35605a - H.264/MPEG-4 AVC codec - Copyleft 2003-2025 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=18 lookahead_threads=3 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=0 intra_refresh=0 rc=crf mbtree=0 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0"
+ }
+ },
+ {
+ "scene": "linked_rings",
+ "tool": "manimgx",
+ "repeat": 1,
+ "command": [
+ "/Users/apoogdk/GIT/manimgx/.venv/bin/manimgx",
+ "render",
+ "/private/tmp/manimgx-crf23-20261007/benchmark/scenes/suite_manim.py",
+ "Benchmark",
+ "-o",
+ "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-idle/linked_rings/manimgx/1/out.mp4",
+ "--preset",
+ "ultrafast",
+ "--crf",
+ "23",
+ "--resolution",
+ "1920x1080",
+ "--fps",
+ "60"
+ ],
+ "status": "complete",
+ "wall_seconds": 0.43137791694607586,
+ "cpu_seconds": 1.309997,
+ "log": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-idle/linked_rings/manimgx/1/render.log",
+ "error": "",
+ "video": {
+ "path": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-idle/linked_rings/manimgx/1/out.mp4",
+ "decoded_frames": 181,
+ "timeline_frames": 181.0,
+ "bytes": 1560175,
+ "sha256": "15ba143a782cfebd6337432abb2f651462410ae9fbfa960df4050e5723d50334",
+ "encoder_evidence": "Explicit ultrafast / CRF 23 CLI arguments"
+ }
+ },
+ {
+ "scene": "linked_rings",
+ "tool": "manimgl",
+ "repeat": 1,
+ "command": [
+ "/private/tmp/manimgx-comparison-gl/bin/manimgl",
+ "/private/tmp/manimgx-crf23-20261007/benchmark/scenes/suite_manim.py",
+ "Benchmark",
+ "-w",
+ "--hd",
+ "--video_dir",
+ "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-idle/linked_rings/manimgl/1",
+ "--config_file",
+ "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-idle/linked_rings/manimgl/1/config.yml"
+ ],
+ "status": "complete",
+ "wall_seconds": 1.8965265000006184,
+ "cpu_seconds": 2.963858,
+ "log": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-idle/linked_rings/manimgl/1/render.log",
+ "error": "",
+ "video": {
+ "path": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-idle/linked_rings/manimgl/1/Benchmark.mp4",
+ "decoded_frames": 180,
+ "timeline_frames": 180.0,
+ "bytes": 1612753,
+ "sha256": "0bc24683c86d1c8db1680484fb7c663e2abd3822dd2e0c67e1b02342777766c7",
+ "encoder_evidence": "x264 - core 165 r3222 b35605a - H.264/MPEG-4 AVC codec - Copyleft 2003-2025 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=18 lookahead_threads=3 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=0 intra_refresh=0 rc=crf mbtree=0 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0"
+ }
+ },
+ {
+ "scene": "linked_rings",
+ "tool": "manimgx",
+ "repeat": 2,
+ "command": [
+ "/Users/apoogdk/GIT/manimgx/.venv/bin/manimgx",
+ "render",
+ "/private/tmp/manimgx-crf23-20261007/benchmark/scenes/suite_manim.py",
+ "Benchmark",
+ "-o",
+ "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-idle/linked_rings/manimgx/2/out.mp4",
+ "--preset",
+ "ultrafast",
+ "--crf",
+ "23",
+ "--resolution",
+ "1920x1080",
+ "--fps",
+ "60"
+ ],
+ "status": "complete",
+ "wall_seconds": 0.4366209590807557,
+ "cpu_seconds": 1.336935,
+ "log": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-idle/linked_rings/manimgx/2/render.log",
+ "error": "",
+ "video": {
+ "path": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-idle/linked_rings/manimgx/2/out.mp4",
+ "decoded_frames": 181,
+ "timeline_frames": 181.0,
+ "bytes": 1560175,
+ "sha256": "15ba143a782cfebd6337432abb2f651462410ae9fbfa960df4050e5723d50334",
+ "encoder_evidence": "Explicit ultrafast / CRF 23 CLI arguments"
+ }
+ },
+ {
+ "scene": "linked_rings",
+ "tool": "manimgl",
+ "repeat": 2,
+ "command": [
+ "/private/tmp/manimgx-comparison-gl/bin/manimgl",
+ "/private/tmp/manimgx-crf23-20261007/benchmark/scenes/suite_manim.py",
+ "Benchmark",
+ "-w",
+ "--hd",
+ "--video_dir",
+ "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-idle/linked_rings/manimgl/2",
+ "--config_file",
+ "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-idle/linked_rings/manimgl/2/config.yml"
+ ],
+ "status": "complete",
+ "wall_seconds": 1.9064397499896586,
+ "cpu_seconds": 2.963388,
+ "log": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-idle/linked_rings/manimgl/2/render.log",
+ "error": "",
+ "video": {
+ "path": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-idle/linked_rings/manimgl/2/Benchmark.mp4",
+ "decoded_frames": 180,
+ "timeline_frames": 180.0,
+ "bytes": 1612753,
+ "sha256": "0bc24683c86d1c8db1680484fb7c663e2abd3822dd2e0c67e1b02342777766c7",
+ "encoder_evidence": "x264 - core 165 r3222 b35605a - H.264/MPEG-4 AVC codec - Copyleft 2003-2025 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=18 lookahead_threads=3 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=0 intra_refresh=0 rc=crf mbtree=0 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0"
+ }
+ },
+ {
+ "scene": "orbit",
+ "tool": "manim_ce",
+ "repeat": 1,
+ "command": [
+ "/private/tmp/manimgx-comparison-ce/bin/python",
+ "/private/tmp/manimgx-crf23-20261007/benchmark/scenes/ce_cli.py",
+ "render",
+ "-qh",
+ "--disable_caching",
+ "--media_dir",
+ "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-ce-blender/orbit/manim_ce/1",
+ "/private/tmp/manimgx-crf23-20261007/benchmark/scenes/orbit_manim_ce.py",
+ "Orbit"
+ ],
+ "status": "complete",
+ "wall_seconds": 211.80927754205186,
+ "cpu_seconds": 220.696687,
+ "log": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-ce-blender/orbit/manim_ce/1/render.log",
+ "error": "",
+ "video": {
+ "path": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-ce-blender/orbit/manim_ce/1/videos/orbit_manim_ce/1080p60/Orbit.mp4",
+ "decoded_frames": 600,
+ "timeline_frames": 600.0,
+ "bytes": 44491959,
+ "sha256": "3ffcbbbbe4c97233acd4320271a95829553892125b3c4cd1ae75f8798f997acb",
+ "encoder_evidence": "x264 - core 165 - H.264/MPEG-4 AVC codec - Copyleft 2003-2025 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=12 lookahead_threads=12 sliced_threads=1 slices=12 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=0 intra_refresh=0 rc=crf mbtree=0 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0"
+ }
+ },
+ {
+ "scene": "orbit",
+ "tool": "blender_workbench",
+ "repeat": 1,
+ "command": [
+ "/Users/apoogdk/GIT/manimgx/.cache/comparison/tools/Blender.app/Contents/MacOS/Blender",
+ "-b",
+ "--factory-startup",
+ "--python-exit-code",
+ "1",
+ "-P",
+ "/private/tmp/manimgx-crf23-20261007/benchmark/scenes/orbit_blender.py",
+ "--",
+ "--engine",
+ "WORKBENCH",
+ "--out",
+ "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-ce-blender/orbit/blender_workbench/1/out.mp4"
+ ],
+ "status": "complete",
+ "wall_seconds": 16.563321500085294,
+ "cpu_seconds": 51.751888,
+ "log": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-ce-blender/orbit/blender_workbench/1/render.log",
+ "error": "",
+ "video": {
+ "path": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-ce-blender/orbit/blender_workbench/1/out.mp4",
+ "decoded_frames": 600,
+ "timeline_frames": 600.0,
+ "bytes": 6516294,
+ "sha256": "54ce2c83f10bde312323aaca8204856e565106d3fbc9286acf359df59affc675",
+ "encoder_evidence": "x264 - core 164 - H.264/MPEG-4 AVC codec - Copyleft 2003-2022 - http://www.videolan.org/x264.html - options: cabac=1 ref=1 deblock=1:0:0 analyse=0x3:0x3 me=dia subme=1 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=18 lookahead_threads=3 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=1 keyint=18 keyint_min=1 scenecut=40 intra_refresh=0 rc=crf mbtree=0 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00"
+ }
+ },
+ {
+ "scene": "orbit",
+ "tool": "blender_eevee",
+ "repeat": 1,
+ "command": [
+ "/Users/apoogdk/GIT/manimgx/.cache/comparison/tools/Blender.app/Contents/MacOS/Blender",
+ "-b",
+ "--factory-startup",
+ "--python-exit-code",
+ "1",
+ "-P",
+ "/private/tmp/manimgx-crf23-20261007/benchmark/scenes/orbit_blender.py",
+ "--",
+ "--engine",
+ "EEVEE",
+ "--out",
+ "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-ce-blender/orbit/blender_eevee/1/out.mp4"
+ ],
+ "status": "complete",
+ "wall_seconds": 220.242049625027,
+ "cpu_seconds": 126.05103600000001,
+ "log": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-ce-blender/orbit/blender_eevee/1/render.log",
+ "error": "",
+ "video": {
+ "path": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-ce-blender/orbit/blender_eevee/1/out.mp4",
+ "decoded_frames": 600,
+ "timeline_frames": 600.0,
+ "bytes": 6546919,
+ "sha256": "35b31cfeb863332b92540de1c30d89f78da1fbb86ec7fe69289e5ceac1c7f2cf",
+ "encoder_evidence": "x264 - core 164 - H.264/MPEG-4 AVC codec - Copyleft 2003-2022 - http://www.videolan.org/x264.html - options: cabac=1 ref=1 deblock=1:0:0 analyse=0x3:0x3 me=dia subme=1 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=18 lookahead_threads=3 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=1 keyint=18 keyint_min=1 scenecut=40 intra_refresh=0 rc=crf mbtree=0 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00"
+ }
+ },
+ {
+ "scene": "matrix",
+ "tool": "manim_ce",
+ "repeat": 1,
+ "command": [
+ "/private/tmp/manimgx-comparison-ce/bin/python",
+ "/private/tmp/manimgx-crf23-20261007/benchmark/scenes/ce_cli.py",
+ "render",
+ "-qh",
+ "--disable_caching",
+ "--media_dir",
+ "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-ce-blender/matrix/manim_ce/1",
+ "/private/tmp/manimgx-crf23-20261007/benchmark/scenes/matrix_manim_ce.py",
+ "TeacherScene"
+ ],
+ "status": "complete",
+ "wall_seconds": 7.139898875029758,
+ "cpu_seconds": 9.801266,
+ "log": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-ce-blender/matrix/manim_ce/1/render.log",
+ "error": "",
+ "video": {
+ "path": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-ce-blender/matrix/manim_ce/1/videos/matrix_manim_ce/1080p60/TeacherScene.mp4",
+ "decoded_frames": 432,
+ "timeline_frames": 432.0,
+ "bytes": 490964,
+ "sha256": "08f3527dba079201178e6f5c2710c9a2b74c8470eb4cf3c224304e1fc7b3b183",
+ "encoder_evidence": "x264 - core 165 - H.264/MPEG-4 AVC codec - Copyleft 2003-2025 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=12 lookahead_threads=12 sliced_threads=1 slices=12 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=0 intra_refresh=0 rc=crf mbtree=0 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0"
+ }
+ },
+ {
+ "scene": "matrix",
+ "tool": "blender_workbench",
+ "repeat": 1,
+ "command": [
+ "/Users/apoogdk/GIT/manimgx/.cache/comparison/tools/Blender.app/Contents/MacOS/Blender",
+ "-b",
+ "--factory-startup",
+ "--python-exit-code",
+ "1",
+ "-P",
+ "/private/tmp/manimgx-crf23-20261007/benchmark/scenes/two_d_blender.py",
+ "--",
+ "--engine",
+ "workbench",
+ "--out",
+ "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-ce-blender/matrix/blender_workbench/1/out.mp4",
+ "--scene",
+ "matrix"
+ ],
+ "status": "complete",
+ "wall_seconds": 11.04514066700358,
+ "cpu_seconds": 36.942752,
+ "log": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-ce-blender/matrix/blender_workbench/1/render.log",
+ "error": "",
+ "video": {
+ "path": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-ce-blender/matrix/blender_workbench/1/out.mp4",
+ "decoded_frames": 432,
+ "timeline_frames": 432.0,
+ "bytes": 140573,
+ "sha256": "c6f3e93334c69a40e392856def3641325eb6f0bb2df766a8a7a51d7dd9f3bd82",
+ "encoder_evidence": "x264 - core 164 - H.264/MPEG-4 AVC codec - Copyleft 2003-2022 - http://www.videolan.org/x264.html - options: cabac=1 ref=1 deblock=1:0:0 analyse=0x3:0x3 me=dia subme=1 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=18 lookahead_threads=3 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=1 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc=crf mbtree=0 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00"
+ }
+ },
+ {
+ "scene": "matrix",
+ "tool": "blender_eevee",
+ "repeat": 1,
+ "command": [
+ "/Users/apoogdk/GIT/manimgx/.cache/comparison/tools/Blender.app/Contents/MacOS/Blender",
+ "-b",
+ "--factory-startup",
+ "--python-exit-code",
+ "1",
+ "-P",
+ "/private/tmp/manimgx-crf23-20261007/benchmark/scenes/two_d_blender.py",
+ "--",
+ "--engine",
+ "eevee",
+ "--out",
+ "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-ce-blender/matrix/blender_eevee/1/out.mp4",
+ "--scene",
+ "matrix"
+ ],
+ "status": "complete",
+ "wall_seconds": 90.7981860000873,
+ "cpu_seconds": 81.127381,
+ "log": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-ce-blender/matrix/blender_eevee/1/render.log",
+ "error": "",
+ "video": {
+ "path": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-ce-blender/matrix/blender_eevee/1/out.mp4",
+ "decoded_frames": 432,
+ "timeline_frames": 432.0,
+ "bytes": 285436,
+ "sha256": "a9529e1bf90723e70677d93e91784ca6337dd4efc86212a9e068c45e27f1f37e",
+ "encoder_evidence": "x264 - core 164 - H.264/MPEG-4 AVC codec - Copyleft 2003-2022 - http://www.videolan.org/x264.html - options: cabac=1 ref=1 deblock=1:0:0 analyse=0x3:0x3 me=dia subme=1 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=18 lookahead_threads=3 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=1 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc=crf mbtree=0 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00"
+ }
+ },
+ {
+ "scene": "pendulums",
+ "tool": "manim_ce",
+ "repeat": 1,
+ "command": [
+ "/private/tmp/manimgx-comparison-ce/bin/python",
+ "/private/tmp/manimgx-crf23-20261007/benchmark/scenes/ce_cli.py",
+ "render",
+ "-qh",
+ "--disable_caching",
+ "--media_dir",
+ "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-ce-blender/pendulums/manim_ce/1",
+ "/private/tmp/manimgx-crf23-20261007/benchmark/scenes/pendulums_manim_ce.py",
+ "TeacherScene"
+ ],
+ "status": "complete",
+ "wall_seconds": 4.745277915964834,
+ "cpu_seconds": 10.849732,
+ "log": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-ce-blender/pendulums/manim_ce/1/render.log",
+ "error": "",
+ "video": {
+ "path": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-ce-blender/pendulums/manim_ce/1/videos/pendulums_manim_ce/1080p60/TeacherScene.mp4",
+ "decoded_frames": 780,
+ "timeline_frames": 780.0,
+ "bytes": 7789689,
+ "sha256": "d2cb82a6d04646d91cc79496fe3d3ca986287be82960a9cd5021c63dcc6e3fee",
+ "encoder_evidence": "x264 - core 165 - H.264/MPEG-4 AVC codec - Copyleft 2003-2025 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=12 lookahead_threads=12 sliced_threads=1 slices=12 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=0 intra_refresh=0 rc=crf mbtree=0 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0"
+ }
+ },
+ {
+ "scene": "pendulums",
+ "tool": "blender_workbench",
+ "repeat": 1,
+ "command": [
+ "/Users/apoogdk/GIT/manimgx/.cache/comparison/tools/Blender.app/Contents/MacOS/Blender",
+ "-b",
+ "--factory-startup",
+ "--python-exit-code",
+ "1",
+ "-P",
+ "/private/tmp/manimgx-crf23-20261007/benchmark/scenes/two_d_blender.py",
+ "--",
+ "--engine",
+ "workbench",
+ "--out",
+ "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-ce-blender/pendulums/blender_workbench/1/out.mp4",
+ "--scene",
+ "pendulums"
+ ],
+ "status": "complete",
+ "wall_seconds": 19.860451874905266,
+ "cpu_seconds": 68.022811,
+ "log": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-ce-blender/pendulums/blender_workbench/1/render.log",
+ "error": "",
+ "video": {
+ "path": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-ce-blender/pendulums/blender_workbench/1/out.mp4",
+ "decoded_frames": 780,
+ "timeline_frames": 780.0,
+ "bytes": 4490281,
+ "sha256": "c1e3a2f7ab28048b964c5ec23c20ba606ad0e7d8c3ceecccfc861b253c5dab2e",
+ "encoder_evidence": "x264 - core 164 - H.264/MPEG-4 AVC codec - Copyleft 2003-2022 - http://www.videolan.org/x264.html - options: cabac=1 ref=1 deblock=1:0:0 analyse=0x3:0x3 me=dia subme=1 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=18 lookahead_threads=3 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=1 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc=crf mbtree=0 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00"
+ }
+ },
+ {
+ "scene": "pendulums",
+ "tool": "blender_eevee",
+ "repeat": 1,
+ "command": [
+ "/Users/apoogdk/GIT/manimgx/.cache/comparison/tools/Blender.app/Contents/MacOS/Blender",
+ "-b",
+ "--factory-startup",
+ "--python-exit-code",
+ "1",
+ "-P",
+ "/private/tmp/manimgx-crf23-20261007/benchmark/scenes/two_d_blender.py",
+ "--",
+ "--engine",
+ "eevee",
+ "--out",
+ "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-ce-blender/pendulums/blender_eevee/1/out.mp4",
+ "--scene",
+ "pendulums"
+ ],
+ "status": "complete",
+ "wall_seconds": 165.88973137491848,
+ "cpu_seconds": 151.14148799999998,
+ "log": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-ce-blender/pendulums/blender_eevee/1/render.log",
+ "error": "",
+ "video": {
+ "path": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-ce-blender/pendulums/blender_eevee/1/out.mp4",
+ "decoded_frames": 780,
+ "timeline_frames": 780.0,
+ "bytes": 2741967,
+ "sha256": "6d1318a1650c7a83f398f097b648269ded0c84dabc6261af22683da8f64aff2c",
+ "encoder_evidence": "x264 - core 164 - H.264/MPEG-4 AVC codec - Copyleft 2003-2022 - http://www.videolan.org/x264.html - options: cabac=1 ref=1 deblock=1:0:0 analyse=0x3:0x3 me=dia subme=1 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=18 lookahead_threads=3 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=1 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc=crf mbtree=0 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00"
+ }
+ },
+ {
+ "scene": "hierarchy",
+ "tool": "manim_ce",
+ "repeat": 1,
+ "command": [
+ "/private/tmp/manimgx-comparison-ce/bin/python",
+ "/private/tmp/manimgx-crf23-20261007/benchmark/scenes/ce_cli.py",
+ "render",
+ "-qh",
+ "--disable_caching",
+ "--media_dir",
+ "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-ce-blender/hierarchy/manim_ce/1",
+ "/private/tmp/manimgx-crf23-20261007/benchmark/scenes/suite_manim.py",
+ "Benchmark"
+ ],
+ "status": "complete",
+ "wall_seconds": 16.169242208008654,
+ "cpu_seconds": 17.711809,
+ "log": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-ce-blender/hierarchy/manim_ce/1/render.log",
+ "error": "",
+ "video": {
+ "path": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-ce-blender/hierarchy/manim_ce/1/videos/suite_manim/1080p60/Benchmark.mp4",
+ "decoded_frames": 180,
+ "timeline_frames": 180.0,
+ "bytes": 1219162,
+ "sha256": "737f154481ac7b3e61ec02fd438f8d4000d2c56cc5dee62f04b9ebd075a0d043",
+ "encoder_evidence": "x264 - core 165 - H.264/MPEG-4 AVC codec - Copyleft 2003-2025 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=12 lookahead_threads=12 sliced_threads=1 slices=12 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=0 intra_refresh=0 rc=crf mbtree=0 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0"
+ }
+ },
+ {
+ "scene": "hierarchy",
+ "tool": "blender_workbench",
+ "repeat": 1,
+ "command": [
+ "/Users/apoogdk/GIT/manimgx/.cache/comparison/tools/Blender.app/Contents/MacOS/Blender",
+ "-b",
+ "--factory-startup",
+ "--python-exit-code",
+ "1",
+ "-P",
+ "/private/tmp/manimgx-crf23-20261007/benchmark/scenes/suite_blender.py",
+ "--",
+ "--engine",
+ "workbench",
+ "--out",
+ "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-ce-blender/hierarchy/blender_workbench/1/out.mp4",
+ "--scene",
+ "hierarchy"
+ ],
+ "status": "complete",
+ "wall_seconds": 4.979416083078831,
+ "cpu_seconds": 15.76909,
+ "log": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-ce-blender/hierarchy/blender_workbench/1/render.log",
+ "error": "",
+ "video": {
+ "path": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-ce-blender/hierarchy/blender_workbench/1/out.mp4",
+ "decoded_frames": 180,
+ "timeline_frames": 180.0,
+ "bytes": 215495,
+ "sha256": "06d5415e9190328bb398f50f99c030ee1ffd2d093f77ac60680d4bd9716b9ee9",
+ "encoder_evidence": "x264 - core 164 - H.264/MPEG-4 AVC codec - Copyleft 2003-2022 - http://www.videolan.org/x264.html - options: cabac=1 ref=1 deblock=1:0:0 analyse=0x3:0x3 me=dia subme=1 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=18 lookahead_threads=3 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=1 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc=crf mbtree=0 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00"
+ }
+ },
+ {
+ "scene": "hierarchy",
+ "tool": "blender_eevee",
+ "repeat": 1,
+ "command": [
+ "/Users/apoogdk/GIT/manimgx/.cache/comparison/tools/Blender.app/Contents/MacOS/Blender",
+ "-b",
+ "--factory-startup",
+ "--python-exit-code",
+ "1",
+ "-P",
+ "/private/tmp/manimgx-crf23-20261007/benchmark/scenes/suite_blender.py",
+ "--",
+ "--engine",
+ "eevee",
+ "--out",
+ "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-ce-blender/hierarchy/blender_eevee/1/out.mp4",
+ "--scene",
+ "hierarchy"
+ ],
+ "status": "complete",
+ "wall_seconds": 62.26514262496494,
+ "cpu_seconds": 42.975503,
+ "log": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-ce-blender/hierarchy/blender_eevee/1/render.log",
+ "error": "",
+ "video": {
+ "path": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-ce-blender/hierarchy/blender_eevee/1/out.mp4",
+ "decoded_frames": 180,
+ "timeline_frames": 180.0,
+ "bytes": 214581,
+ "sha256": "9fa8a7863fd3bc6e56fa5ac9fa15cb46bc3e863f792a66e3fc6a6c7c48968fe7",
+ "encoder_evidence": "x264 - core 164 - H.264/MPEG-4 AVC codec - Copyleft 2003-2022 - http://www.videolan.org/x264.html - options: cabac=1 ref=1 deblock=1:0:0 analyse=0x3:0x3 me=dia subme=1 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=18 lookahead_threads=3 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=1 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc=crf mbtree=0 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00"
+ }
+ },
+ {
+ "scene": "linked_rings",
+ "tool": "manim_ce",
+ "repeat": 1,
+ "command": [
+ "/private/tmp/manimgx-comparison-ce/bin/python",
+ "/private/tmp/manimgx-crf23-20261007/benchmark/scenes/ce_cli.py",
+ "render",
+ "-qh",
+ "--disable_caching",
+ "--media_dir",
+ "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-ce-blender/linked_rings/manim_ce/1",
+ "/private/tmp/manimgx-crf23-20261007/benchmark/scenes/suite_manim.py",
+ "Benchmark"
+ ],
+ "status": "complete",
+ "wall_seconds": 38.962085749953985,
+ "cpu_seconds": 40.193416,
+ "log": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-ce-blender/linked_rings/manim_ce/1/render.log",
+ "error": "",
+ "video": {
+ "path": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-ce-blender/linked_rings/manim_ce/1/videos/suite_manim/1080p60/Benchmark.mp4",
+ "decoded_frames": 180,
+ "timeline_frames": 180.0,
+ "bytes": 2815689,
+ "sha256": "1a6ee56f2971ee3aa405de1ed5401369e2500307c204c15da330b9eeb842a812",
+ "encoder_evidence": "x264 - core 165 - H.264/MPEG-4 AVC codec - Copyleft 2003-2025 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=12 lookahead_threads=12 sliced_threads=1 slices=12 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=0 intra_refresh=0 rc=crf mbtree=0 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0"
+ }
+ },
+ {
+ "scene": "linked_rings",
+ "tool": "blender_workbench",
+ "repeat": 1,
+ "command": [
+ "/Users/apoogdk/GIT/manimgx/.cache/comparison/tools/Blender.app/Contents/MacOS/Blender",
+ "-b",
+ "--factory-startup",
+ "--python-exit-code",
+ "1",
+ "-P",
+ "/private/tmp/manimgx-crf23-20261007/benchmark/scenes/linked_rings_blender.py",
+ "--",
+ "--engine",
+ "workbench",
+ "--out",
+ "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-ce-blender/linked_rings/blender_workbench/1/out.mp4",
+ "--animate"
+ ],
+ "status": "complete",
+ "wall_seconds": 5.162881792057306,
+ "cpu_seconds": 15.865897,
+ "log": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-ce-blender/linked_rings/blender_workbench/1/render.log",
+ "error": "",
+ "video": {
+ "path": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-ce-blender/linked_rings/blender_workbench/1/out.mp4",
+ "decoded_frames": 180,
+ "timeline_frames": 180.0,
+ "bytes": 454550,
+ "sha256": "744439e824ca1b95bebec3fe1de2b6e4bc5d84856e5e35fbe27bd7e0563ffe5a",
+ "encoder_evidence": "x264 - core 164 - H.264/MPEG-4 AVC codec - Copyleft 2003-2022 - http://www.videolan.org/x264.html - options: cabac=1 ref=1 deblock=1:0:0 analyse=0x3:0x3 me=dia subme=1 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=18 lookahead_threads=3 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=1 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc=crf mbtree=0 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00"
+ }
+ },
+ {
+ "scene": "linked_rings",
+ "tool": "blender_eevee",
+ "repeat": 1,
+ "command": [
+ "/Users/apoogdk/GIT/manimgx/.cache/comparison/tools/Blender.app/Contents/MacOS/Blender",
+ "-b",
+ "--factory-startup",
+ "--python-exit-code",
+ "1",
+ "-P",
+ "/private/tmp/manimgx-crf23-20261007/benchmark/scenes/linked_rings_blender.py",
+ "--",
+ "--engine",
+ "eevee",
+ "--out",
+ "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-ce-blender/linked_rings/blender_eevee/1/out.mp4",
+ "--animate"
+ ],
+ "status": "complete",
+ "wall_seconds": 62.20007633406203,
+ "cpu_seconds": 42.583943000000005,
+ "log": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-ce-blender/linked_rings/blender_eevee/1/render.log",
+ "error": "",
+ "video": {
+ "path": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-ce-blender/linked_rings/blender_eevee/1/out.mp4",
+ "decoded_frames": 180,
+ "timeline_frames": 180.0,
+ "bytes": 372884,
+ "sha256": "fc280d3595328724c01db83f895a8f14120cab003cf5721f806eb6f6739c1e81",
+ "encoder_evidence": "x264 - core 164 - H.264/MPEG-4 AVC codec - Copyleft 2003-2022 - http://www.videolan.org/x264.html - options: cabac=1 ref=1 deblock=1:0:0 analyse=0x3:0x3 me=dia subme=1 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=18 lookahead_threads=3 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=1 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc=crf mbtree=0 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00"
+ }
+ },
+ {
+ "scene": "orbit",
+ "tool": "manimgx",
+ "repeat": 3,
+ "command": [
+ "/Users/apoogdk/GIT/manimgx/.venv/bin/manimgx",
+ "render",
+ "/private/tmp/manimgx-crf23-20261007/benchmark/scenes/orbit_manimgx.py",
+ "Orbit",
+ "-o",
+ "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-third/orbit/manimgx/3/out.mp4",
+ "--preset",
+ "ultrafast",
+ "--crf",
+ "23",
+ "--resolution",
+ "1920x1080",
+ "--fps",
+ "60"
+ ],
+ "status": "complete",
+ "wall_seconds": 1.2937233329284936,
+ "cpu_seconds": 5.275916,
+ "log": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-third/orbit/manimgx/3/render.log",
+ "error": "",
+ "video": {
+ "path": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-third/orbit/manimgx/3/out.mp4",
+ "decoded_frames": 601,
+ "timeline_frames": 601.0,
+ "bytes": 43769464,
+ "sha256": "ab65319844fd8e033eba89cd9b9f8c9dee5ff5bb09934b092ca65a84b6662620",
+ "encoder_evidence": "Explicit ultrafast / CRF 23 CLI arguments"
+ }
+ },
+ {
+ "scene": "orbit",
+ "tool": "manimgl",
+ "repeat": 3,
+ "command": [
+ "/private/tmp/manimgx-comparison-gl/bin/manimgl",
+ "/private/tmp/manimgx-crf23-20261007/benchmark/scenes/orbit_manimgl.py",
+ "Orbit",
+ "-w",
+ "--hd",
+ "--video_dir",
+ "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-third/orbit/manimgl/3",
+ "--config_file",
+ "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-third/orbit/manimgl/3/config.yml"
+ ],
+ "status": "complete",
+ "wall_seconds": 6.879278292064555,
+ "cpu_seconds": 9.64502,
+ "log": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-third/orbit/manimgl/3/render.log",
+ "error": "",
+ "video": {
+ "path": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-third/orbit/manimgl/3/Orbit.mp4",
+ "decoded_frames": 600,
+ "timeline_frames": 600.0,
+ "bytes": 23939383,
+ "sha256": "e70b8da70481af2b0a9c09ccfae6cce5c5fdf94e954db91260a5392cee89e0c9",
+ "encoder_evidence": "x264 - core 165 r3222 b35605a - H.264/MPEG-4 AVC codec - Copyleft 2003-2025 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=18 lookahead_threads=3 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=0 intra_refresh=0 rc=crf mbtree=0 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0"
+ }
+ },
+ {
+ "scene": "matrix",
+ "tool": "manimgx",
+ "repeat": 3,
+ "command": [
+ "/Users/apoogdk/GIT/manimgx/.venv/bin/manimgx",
+ "render",
+ "/private/tmp/manimgx-crf23-20261007/benchmark/scenes/matrix_manimgx.py",
+ "TeacherScene",
+ "-o",
+ "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-third/matrix/manimgx/3/out.mp4",
+ "--preset",
+ "ultrafast",
+ "--crf",
+ "23",
+ "--resolution",
+ "1920x1080",
+ "--fps",
+ "60"
+ ],
+ "status": "complete",
+ "wall_seconds": 0.4283300000242889,
+ "cpu_seconds": 1.147804,
+ "log": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-third/matrix/manimgx/3/render.log",
+ "error": "",
+ "video": {
+ "path": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-third/matrix/manimgx/3/out.mp4",
+ "decoded_frames": 243,
+ "timeline_frames": 433.0,
+ "bytes": 333761,
+ "sha256": "fba64cdeaa1d5f0f2f78814538245fed72acedcabe602b2bda25b69c67e1da21",
+ "encoder_evidence": "Explicit ultrafast / CRF 23 CLI arguments"
+ }
+ },
+ {
+ "scene": "matrix",
+ "tool": "manimgl",
+ "repeat": 3,
+ "command": [
+ "/private/tmp/manimgx-comparison-gl/bin/manimgl",
+ "/private/tmp/manimgx-crf23-20261007/benchmark/scenes/matrix_manimgl.py",
+ "TeacherScene",
+ "-w",
+ "--hd",
+ "--video_dir",
+ "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-third/matrix/manimgl/3",
+ "--config_file",
+ "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-third/matrix/manimgl/3/config.yml"
+ ],
+ "status": "complete",
+ "wall_seconds": 8.541039999923669,
+ "cpu_seconds": 10.526752,
+ "log": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-third/matrix/manimgl/3/render.log",
+ "error": "",
+ "video": {
+ "path": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-third/matrix/manimgl/3/TeacherScene.mp4",
+ "decoded_frames": 432,
+ "timeline_frames": 432.0,
+ "bytes": 324583,
+ "sha256": "9a528c2da5f474cb7f471b57bb0c3754f8bc3695a6f57e74b77619548aef74cc",
+ "encoder_evidence": "x264 - core 165 r3222 b35605a - H.264/MPEG-4 AVC codec - Copyleft 2003-2025 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=18 lookahead_threads=3 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=0 intra_refresh=0 rc=crf mbtree=0 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0"
+ }
+ },
+ {
+ "scene": "pendulums",
+ "tool": "manimgx",
+ "repeat": 3,
+ "command": [
+ "/Users/apoogdk/GIT/manimgx/.venv/bin/manimgx",
+ "render",
+ "/private/tmp/manimgx-crf23-20261007/benchmark/scenes/pendulums_manimgx.py",
+ "TeacherScene",
+ "-o",
+ "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-third/pendulums/manimgx/3/out.mp4",
+ "--preset",
+ "ultrafast",
+ "--crf",
+ "23",
+ "--resolution",
+ "1920x1080",
+ "--fps",
+ "60"
+ ],
+ "status": "complete",
+ "wall_seconds": 0.7955526250880212,
+ "cpu_seconds": 3.432343,
+ "log": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-third/pendulums/manimgx/3/render.log",
+ "error": "",
+ "video": {
+ "path": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-third/pendulums/manimgx/3/out.mp4",
+ "decoded_frames": 721,
+ "timeline_frames": 781.0,
+ "bytes": 7183498,
+ "sha256": "27f2469328aef4f5eaac23f50961c92ea34fad38176149a4ff732eed4516defa",
+ "encoder_evidence": "Explicit ultrafast / CRF 23 CLI arguments"
+ }
+ },
+ {
+ "scene": "pendulums",
+ "tool": "manimgl",
+ "repeat": 3,
+ "command": [
+ "/private/tmp/manimgx-comparison-gl/bin/manimgl",
+ "/private/tmp/manimgx-crf23-20261007/benchmark/scenes/pendulums_manimgl.py",
+ "TeacherScene",
+ "-w",
+ "--hd",
+ "--video_dir",
+ "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-third/pendulums/manimgl/3",
+ "--config_file",
+ "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-third/pendulums/manimgl/3/config.yml"
+ ],
+ "status": "complete",
+ "wall_seconds": 17.236570250010118,
+ "cpu_seconds": 19.056472,
+ "log": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-third/pendulums/manimgl/3/render.log",
+ "error": "",
+ "video": {
+ "path": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-third/pendulums/manimgl/3/TeacherScene.mp4",
+ "decoded_frames": 780,
+ "timeline_frames": 780.0,
+ "bytes": 6662220,
+ "sha256": "b76fbedabc3fe9377f0843ba2c7eb1031509647d2b701e30a02830412a7dac5e",
+ "encoder_evidence": "x264 - core 165 r3222 b35605a - H.264/MPEG-4 AVC codec - Copyleft 2003-2025 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=18 lookahead_threads=3 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=0 intra_refresh=0 rc=crf mbtree=0 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0"
+ }
+ },
+ {
+ "scene": "hierarchy",
+ "tool": "manimgx",
+ "repeat": 3,
+ "command": [
+ "/Users/apoogdk/GIT/manimgx/.venv/bin/manimgx",
+ "render",
+ "/private/tmp/manimgx-crf23-20261007/benchmark/scenes/suite_manim.py",
+ "Benchmark",
+ "-o",
+ "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-third/hierarchy/manimgx/3/out.mp4",
+ "--preset",
+ "ultrafast",
+ "--crf",
+ "23",
+ "--resolution",
+ "1920x1080",
+ "--fps",
+ "60"
+ ],
+ "status": "complete",
+ "wall_seconds": 0.3373744999989867,
+ "cpu_seconds": 1.264108,
+ "log": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-third/hierarchy/manimgx/3/render.log",
+ "error": "",
+ "video": {
+ "path": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-third/hierarchy/manimgx/3/out.mp4",
+ "decoded_frames": 181,
+ "timeline_frames": 181.0,
+ "bytes": 852479,
+ "sha256": "bfe196ac6786f614134f5ea63df7b03fd89f0f0bb11d31c2e5310e1dfa464acc",
+ "encoder_evidence": "Explicit ultrafast / CRF 23 CLI arguments"
+ }
+ },
+ {
+ "scene": "hierarchy",
+ "tool": "manimgl",
+ "repeat": 3,
+ "command": [
+ "/private/tmp/manimgx-comparison-gl/bin/manimgl",
+ "/private/tmp/manimgx-crf23-20261007/benchmark/scenes/suite_manim.py",
+ "Benchmark",
+ "-w",
+ "--hd",
+ "--video_dir",
+ "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-third/hierarchy/manimgl/3",
+ "--config_file",
+ "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-third/hierarchy/manimgl/3/config.yml"
+ ],
+ "status": "complete",
+ "wall_seconds": 1.8405467909760773,
+ "cpu_seconds": 2.8272209999999998,
+ "log": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-third/hierarchy/manimgl/3/render.log",
+ "error": "",
+ "video": {
+ "path": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-third/hierarchy/manimgl/3/Benchmark.mp4",
+ "decoded_frames": 180,
+ "timeline_frames": 180.0,
+ "bytes": 847100,
+ "sha256": "89986302c298eb1cf9334787f879b941766abe344adc17892544d529ec529083",
+ "encoder_evidence": "x264 - core 165 r3222 b35605a - H.264/MPEG-4 AVC codec - Copyleft 2003-2025 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=18 lookahead_threads=3 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=0 intra_refresh=0 rc=crf mbtree=0 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0"
+ }
+ },
+ {
+ "scene": "linked_rings",
+ "tool": "manimgx",
+ "repeat": 3,
+ "command": [
+ "/Users/apoogdk/GIT/manimgx/.venv/bin/manimgx",
+ "render",
+ "/private/tmp/manimgx-crf23-20261007/benchmark/scenes/suite_manim.py",
+ "Benchmark",
+ "-o",
+ "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-third/linked_rings/manimgx/3/out.mp4",
+ "--preset",
+ "ultrafast",
+ "--crf",
+ "23",
+ "--resolution",
+ "1920x1080",
+ "--fps",
+ "60"
+ ],
+ "status": "complete",
+ "wall_seconds": 0.4621541249798611,
+ "cpu_seconds": 1.381076,
+ "log": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-third/linked_rings/manimgx/3/render.log",
+ "error": "",
+ "video": {
+ "path": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-third/linked_rings/manimgx/3/out.mp4",
+ "decoded_frames": 181,
+ "timeline_frames": 181.0,
+ "bytes": 1560175,
+ "sha256": "15ba143a782cfebd6337432abb2f651462410ae9fbfa960df4050e5723d50334",
+ "encoder_evidence": "Explicit ultrafast / CRF 23 CLI arguments"
+ }
+ },
+ {
+ "scene": "linked_rings",
+ "tool": "manimgl",
+ "repeat": 3,
+ "command": [
+ "/private/tmp/manimgx-comparison-gl/bin/manimgl",
+ "/private/tmp/manimgx-crf23-20261007/benchmark/scenes/suite_manim.py",
+ "Benchmark",
+ "-w",
+ "--hd",
+ "--video_dir",
+ "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-third/linked_rings/manimgl/3",
+ "--config_file",
+ "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-third/linked_rings/manimgl/3/config.yml"
+ ],
+ "status": "complete",
+ "wall_seconds": 1.996528708958067,
+ "cpu_seconds": 3.02868,
+ "log": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-third/linked_rings/manimgl/3/render.log",
+ "error": "",
+ "video": {
+ "path": "/Users/apoogdk/GIT/manimgx/.cache/comparison/20261007-five-scenes-fastest23-gx-gl-third/linked_rings/manimgl/3/Benchmark.mp4",
+ "decoded_frames": 180,
+ "timeline_frames": 180.0,
+ "bytes": 1612753,
+ "sha256": "0bc24683c86d1c8db1680484fb7c663e2abd3822dd2e0c67e1b02342777766c7",
+ "encoder_evidence": "x264 - core 165 r3222 b35605a - H.264/MPEG-4 AVC codec - Copyleft 2003-2025 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=18 lookahead_threads=3 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=0 intra_refresh=0 rc=crf mbtree=0 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0"
}
}
- }
+ ]
}
diff --git a/scripts/benchmark/run.py b/scripts/benchmark/run.py
index 325d3c94..cf0a037c 100644
--- a/scripts/benchmark/run.py
+++ b/scripts/benchmark/run.py
@@ -1,309 +1,402 @@
-"""Time manimgx, Manim Community Edition, ManimGL and Blender on the same scenes.
-
- uv run --frozen python scripts/benchmark/run.py [--runs 5] [--only orbit,morph] [--tools manimgx,blender_workbench]
-
-Each scene is the same film in each tool's own idiom: 1920 x 1080 at 60 fps, written to an
-H.264 MP4 with the tool's own encoder settings. manimgx's are the timed benchmarks' workloads
-(`tests/benchmarks/scenes/<scene>.py`); the others are here (`scenes/<scene>_<tool>.py`). A
-run is the tool's command, in a fresh process and a fresh folder (its caches with it: Manim
-CE's and ManimGL's LaTeX, manimgx's Typst layouts), timed from launch to exit, when the MP4
-is written. Each contender renders a scene once to warm up (unless that takes over two
-minutes: it counts then), then again, the contenders taking turns, until it has five runs
-(three if a run takes over a minute, one if over ten). The medians go to `results.json`,
-with every run, the versions and the machine; each MP4 is checked for its length, then
-deleted.
-
-The tools:
-- manimgx and Manim CE (0.21.0): this repository's environment, with the `ce` group
- (`uv sync --group ce`).
-- ManimGL (1.7.2): its own environment, e.g. `uv venv --python 3.12 ENV` and
- `uv pip install --python ENV manimgl==1.7.2 setuptools` (`--manimgl ENV`); its LaTeX
- template is its minimal one, "basic".
-- Blender (5.2 LTS), headless, twice: with EEVEE, its default renderer, and with Workbench,
- its fastest (`--blender PATH`). It has no math typesetting, so it renders the 3D scenes.
-"""
+"""Render five scenes sequentially through the engines' native MP4 exporters."""
import argparse
+import contextlib
+import hashlib
import json
import os
import platform
+import re
import shutil
+import signal
import statistics
import subprocess
import sys
-import tempfile
import time
-from dataclasses import dataclass
+from dataclasses import asdict, dataclass, field
+from fractions import Fraction
from pathlib import Path
+from threading import Timer
-HERE = Path(__file__).parent
-ROOT = HERE.parents[1]
-SCENES = HERE / "scenes"
-WORKLOADS = ROOT / "tests" / "benchmarks" / "scenes" # manimgx's scenes
-BIN = ROOT / ".venv" / "bin"
-SCENE_CLASSES = {"orbit": "Orbit", "morph": "Morph", "explainer": "Explainer"}
-SECONDS = {"orbit": 10.0, "morph": 10.0, "explainer": 9.5}
-WARM_LIMIT, SLOW, SLOWER = 120.0, 60.0, 600.0
+from scripts.benchmark.scenes.suite_data import DURATIONS, FPS, HEIGHT, WIDTH
+HERE = Path(__file__).resolve().parent
+SOURCES = HERE / "scenes"
+TOOLS = ("manimgx", "manimgl", "manim_ce", "blender_workbench", "blender_eevee")
+REPEATS = {tool: 3 if tool in ("manimgx", "manimgl") else 1 for tool in TOOLS}
-@dataclass(frozen=True)
-class Contender:
- """A tool, as the chart names it, and how it renders a scene into a folder."""
- name: str
- label: str
- scenes: tuple[str, ...]
+@dataclass
+class Run:
+ scene: str
+ tool: str
+ repeat: int
+ command: list[str]
+ status: str = "pending"
+ wall_seconds: float = 0
+ cpu_seconds: float = 0
+ log: str = ""
+ error: str = ""
+ video: dict[str, str | int | float] = field(default_factory=dict)
- def command(self, scene: str, folder: Path, args: argparse.Namespace) -> list[str]:
- """The command that renders `scene` into `folder`."""
- mine = self.tool == "manimgx"
- file = str(
- WORKLOADS / f"{scene}.py" if mine else SCENES / f"{scene}_{self.tool}.py"
- )
- cls = SCENE_CLASSES[scene]
- if mine:
- return [str(BIN / "manimgx"), "render", file, "-o", str(folder / "out.mp4")]
- if self.tool == "manim_ce":
- return [
- str(BIN / "manim"),
- "render",
- "-qh",
- "--disable_caching",
- "--media_dir",
- str(folder),
- file,
- cls,
- ]
- if self.tool == "manimgl":
- config = folder / "config.yml"
- config.write_text(
- f'directories:\n cache: "{folder / "cache"}"\n'
- 'camera:\n fps: 60\ntex:\n template: "basic"\n',
- encoding="utf-8",
- )
- return [
- str(Path(args.manimgl) / "bin" / "manimgl"),
- file,
- cls,
- "-w",
- "--hd", # 60 fps comes from the config (its --fps flag passes a string)
- "--video_dir",
- str(folder),
- "--config_file",
- str(config),
- ]
- engine = self.name.removeprefix("blender_").upper()
+
+def executable(value: str) -> str:
+ path = shutil.which(value)
+ if path is None:
+ raise FileNotFoundError(f"Executable not found: {value}")
+ return str(Path(path).absolute())
+
+
+def command(tool: str, scene: str, folder: Path, args: argparse.Namespace) -> list[str]:
+ source = SOURCES / (
+ f"{scene}_{tool}.py"
+ if scene in ("orbit", "matrix", "pendulums")
+ else "suite_manim.py"
+ )
+ cls = (
+ "Orbit"
+ if scene == "orbit"
+ else "TeacherScene"
+ if scene in ("matrix", "pendulums")
+ else "Benchmark"
+ )
+ if tool == "manimgx":
return [
- args.blender,
- "-b",
- "--factory-startup",
- "--python-exit-code",
- "1",
- "-P",
- file,
- "--",
- "--engine",
- engine,
- "--out",
+ args.gx,
+ "render",
+ str(source),
+ cls,
+ "-o",
str(folder / "out.mp4"),
+ "--preset",
+ "ultrafast",
+ "--crf",
+ "23",
+ "--resolution",
+ f"{WIDTH}x{HEIGHT}",
+ "--fps",
+ str(FPS),
]
+ if tool == "manim_ce":
+ return [
+ args.ce_python,
+ str(SOURCES / "ce_cli.py"),
+ "render",
+ "-qh",
+ "--disable_caching",
+ "--media_dir",
+ str(folder),
+ str(source),
+ cls,
+ ]
+ if tool == "manimgl":
+ config = folder / "config.yml"
+ config.write_text(
+ f'directories:\n cache: {json.dumps(str(folder / "cache"))}\ncamera:\n background_color: "#000000"\n fps: {FPS}\ntex:\n template: "basic"\nfile_writer:\n ffmpeg_bin: {json.dumps(str(SOURCES / "ffmpeg.py"))}\n',
+ encoding="utf-8",
+ )
+ return [
+ args.manimgl,
+ str(source),
+ cls,
+ "-w",
+ "--hd",
+ "--video_dir",
+ str(folder),
+ "--config_file",
+ str(config),
+ ]
+ name = (
+ "orbit_blender.py"
+ if scene == "orbit"
+ else "two_d_blender.py"
+ if scene in ("matrix", "pendulums")
+ else "linked_rings_blender.py"
+ if scene == "linked_rings"
+ else "suite_blender.py"
+ )
+ engine = tool.removeprefix("blender_")
+ cmd = [
+ args.blender,
+ "-b",
+ "--factory-startup",
+ "--python-exit-code",
+ "1",
+ "-P",
+ str(SOURCES / name),
+ "--",
+ "--engine",
+ engine.upper() if scene == "orbit" else engine,
+ "--out",
+ str(folder / "out.mp4"),
+ ]
+ if scene == "linked_rings":
+ cmd += ["--animate"]
+ elif scene != "orbit":
+ cmd += ["--scene", scene]
+ return cmd
- @property
- def tool(self) -> str:
- """The tool whose scene files it runs."""
- return "blender" if self.name.startswith("blender") else self.name
+def encoder_evidence(path: Path, tool: str) -> str:
+ match = re.search(rb"x264 - core [^\x00]{1,3000}", path.read_bytes())
+ if match is None and tool == "manimgx":
+ return "Explicit ultrafast / CRF 23 CLI arguments"
+ evidence = match.group().decode("ascii", errors="replace") if match else ""
+ required = (
+ ("crf=23.0", "subme=1", "me=dia", "bframes=0")
+ if tool.startswith("blender_")
+ else ("crf=23.0", "cabac=0", "subme=0", "bframes=0")
+ )
+ if not all(
+ re.search(rf"\b{re.escape(value)}(?:\s|$)", evidence) for value in required
+ ):
+ raise ValueError(f"Unexpected encoder options: {evidence}")
+ return evidence
-CONTENDERS = [
- Contender("manimgx", "manimgx", ("orbit", "morph", "explainer")),
- Contender("manimgl", "ManimGL", ("orbit", "morph", "explainer")),
- Contender("blender_workbench", "Blender (Workbench)", ("orbit", "morph")),
- Contender("blender_eevee", "Blender (EEVEE)", ("orbit", "morph")),
- Contender("manim_ce", "Manim CE", ("orbit", "morph", "explainer")),
-]
+def validate(path: Path, tool: str, duration: float) -> dict[str, str | int | float]:
+ """Decode the complete video and check its timeline and encoder settings."""
+ import av
-def run(contender: Contender, scene: str, args: argparse.Namespace) -> dict[str, float]:
- """Render once, in a fresh folder, and measure it; the MP4 is checked, then deleted."""
- folder = Path(tempfile.mkdtemp(prefix=f"bench-{scene}-{contender.name}-"))
- # a TMPDIR of its own: manimgx caches Typst's layouts there
- env = os.environ | {"TMPDIR": str(folder)}
- load = os.getloadavg()[0]
- log = folder / "stderr.txt"
- with log.open("wb") as stderr:
- start = time.perf_counter()
- pid = subprocess.Popen(
- contender.command(scene, folder, args),
- cwd=folder,
- env=env,
- stdout=subprocess.DEVNULL,
- stderr=stderr,
- ).pid
- _, status, usage = os.wait4(pid, 0) # its CPU time, its children's included
- wall = time.perf_counter() - start
- if status:
- errors = log.read_text(encoding="utf-8", errors="replace")[-3000:]
- sys.exit(f"{contender.name} failed on {scene}:\n{errors}")
- unit = 1024 if platform.system() == "Darwin" else 1 # ru_maxrss: bytes, or KiB
- videos = [p for p in folder.rglob("*.mp4") if "partial_movie_files" not in p.parts]
- if len(videos) != 1:
- sys.exit(f"{contender.name} wrote {len(videos)} videos for {scene}")
probe = json.loads(
- subprocess.run(
+ subprocess.check_output(
[
"ffprobe",
"-v",
"error",
+ "-select_streams",
+ "v:0",
"-show_entries",
- "format=duration,size",
+ "stream=r_frame_rate",
"-of",
"json",
- str(videos[0]),
+ str(path),
],
- capture_output=True,
- check=True,
- ).stdout
- )["format"]
- duration = float(probe["duration"])
- if abs(duration - SECONDS[scene]) > 0.1:
- sys.exit(f"{contender.name}'s {scene} lasts {duration:.2f} s")
- if args.keep:
- kept = Path(args.keep) / f"{scene}_{contender.name}.mp4"
- kept.parent.mkdir(parents=True, exist_ok=True)
- if not kept.exists():
- shutil.copyfile(videos[0], kept)
- shutil.rmtree(folder)
+ text=True,
+ )
+ )
+ if Fraction(probe["streams"][0]["r_frame_rate"]) != FPS:
+ raise ValueError("Unexpected frame rate")
+ with av.open(str(path)) as container:
+ stream = container.streams.video[0]
+ if stream.codec_context.name != "h264" or stream.time_base is None:
+ raise ValueError("Expected H.264 with presentation timestamps")
+ stream.thread_type = "AUTO"
+ stream.codec_context.thread_count = 2
+ previous, end, decoded = -1, 0, 0
+ for frame in container.decode(stream):
+ if (frame.width, frame.height, frame.format.name) != (
+ WIDTH,
+ HEIGHT,
+ "yuv420p",
+ ):
+ raise ValueError("Unexpected resolution or pixel format")
+ if (
+ frame.pts is None
+ or frame.pts <= previous
+ or (decoded == 0 and frame.pts != 0)
+ ):
+ raise ValueError("Invalid presentation timestamps")
+ previous, end = frame.pts, frame.pts + frame.duration
+ decoded += 1
+ timeline = end * stream.time_base * FPS
+ if not decoded or end <= previous or abs(timeline - round(duration * FPS)) > 1:
+ raise ValueError(f"Unexpected video timeline: {timeline} frames")
return {
- "wall": round(wall, 3),
- "cpu": round(usage.ru_utime + usage.ru_stime, 2),
- "memory_mb": round(usage.ru_maxrss / unit / 1024),
- "video_mb": round(int(probe["size"]) / 1e6, 1),
- "load": round(load, 2),
+ "path": str(path),
+ "decoded_frames": decoded,
+ "timeline_frames": float(timeline),
+ "bytes": path.stat().st_size,
+ "sha256": hashlib.sha256(path.read_bytes()).hexdigest(),
+ "encoder_evidence": encoder_evidence(path, tool),
}
-def versions(tools: list[str], args: argparse.Namespace) -> dict[str, str]:
- """The version of each tool that ran."""
-
- def output(*command: str) -> str:
- return subprocess.run(command, capture_output=True, text=True).stdout.strip()
-
- found = {}
- if "manimgx" in tools:
- found["manimgx"] = output(str(BIN / "manimgx"), "--version").split()[-1]
- if "manim_ce" in tools:
- found["manim_ce"] = output(
- str(BIN / "python"), "-c", "import manim; print(manim.__version__)"
- )
- if "manimgl" in tools:
- python = str(Path(args.manimgl) / "bin" / "python")
- found["manimgl"] = output(
- python, "-c", "import importlib.metadata as m; print(m.version('manimgl'))"
- )
- if any(tool.startswith("blender") for tool in tools):
- found["blender"] = (
- output(args.blender, "--version").splitlines()[0].removeprefix("Blender ")
+def run_one(tool: str, scene: str, repeat: int, args: argparse.Namespace) -> Run:
+ folder = args.out / scene / tool / str(repeat)
+ folder.mkdir(parents=True, exist_ok=False)
+ cmd = command(tool, scene, folder, args)
+ result = Run(scene, tool, repeat, cmd, log=str(folder / "render.log"))
+ if args.dry_run:
+ result.status = "planned"
+ return result
+ env = os.environ | {
+ "BENCH_ENGINE": tool,
+ "BENCH_SCENE": scene,
+ "BENCH_DURATION": str(DURATIONS[scene]),
+ "PYTHONPATH": str(SOURCES),
+ "PYTHONHASHSEED": "0",
+ "PYTHONDONTWRITEBYTECODE": "1",
+ "TMPDIR": str(folder),
+ "MANIMGX_BENCH_PRESET": "ultrafast",
+ "MANIMGX_BENCH_CRF": "23",
+ "MANIMGX_BENCH_FFMPEG_LOG": str(folder / "ffmpeg-command.json"),
+ }
+ timed_out = False
+ with Path(result.log).open("wb") as log:
+ start = time.perf_counter()
+ process = subprocess.Popen(
+ cmd,
+ cwd=folder,
+ env=env,
+ stdout=log,
+ stderr=subprocess.STDOUT,
+ start_new_session=True,
)
- return found
+ def expire() -> None:
+ nonlocal timed_out
+ timed_out = True
+ with contextlib.suppress(ProcessLookupError):
+ os.killpg(process.pid, signal.SIGKILL)
-def sysctl(key: str) -> str:
- """A value of macOS's kernel settings."""
- command = ["sysctl", "-n", key]
- return subprocess.run(command, capture_output=True, text=True).stdout.strip()
+ watchdog = Timer(args.timeout, expire)
+ watchdog.start()
+ try:
+ _, status, usage = os.wait4(process.pid, 0)
+ finally:
+ result.wall_seconds = time.perf_counter() - start
+ watchdog.cancel()
+ watchdog.join()
+ process.returncode = os.waitstatus_to_exitcode(status)
+ result.cpu_seconds = usage.ru_utime + usage.ru_stime
+ if timed_out or process.returncode:
+ with contextlib.suppress(ProcessLookupError):
+ os.killpg(process.pid, signal.SIGKILL)
+ result.status = "timeout" if timed_out else "failed"
+ result.error = Path(result.log).read_text(errors="replace")[-4000:]
+ return result
+ try:
+ videos = [
+ p for p in folder.rglob("*.mp4") if "partial_movie_files" not in p.parts
+ ]
+ if len(videos) != 1:
+ raise ValueError(f"Expected one MP4, found {len(videos)}")
+ result.video = validate(videos[0], tool, DURATIONS[scene])
+ result.status = "complete"
+ except Exception as error:
+ result.status, result.error = "invalid", str(error)
+ return result
-def machine() -> dict[str, str]:
- """The machine the runs were on."""
- info = {
- "os": f"{platform.system()} {platform.release()}",
- "cpus": str(os.cpu_count()),
+def summarize(
+ runs: list[Run], scenes: list[str], repeats: dict[str, int]
+) -> dict[str, object]:
+ per_scene = {}
+ for scene in scenes:
+ per_scene[scene] = {}
+ for tool in repeats:
+ samples = [
+ r.wall_seconds
+ for r in runs
+ if r.scene == scene and r.tool == tool and r.status == "complete"
+ ]
+ if len(samples) == repeats[tool]:
+ per_scene[scene][tool] = {
+ "mean_seconds": statistics.mean(samples),
+ "samples_seconds": samples,
+ }
+ totals = {
+ tool: sum(per_scene[scene][tool]["mean_seconds"] for scene in scenes)
+ for tool in repeats
+ if all(tool in per_scene[scene] for scene in scenes)
+ }
+ return {
+ "per_scene": per_scene,
+ "totals": totals,
+ "complete": len(totals) == len(repeats),
}
- if platform.system() == "Darwin":
- info |= {
- "cpu": sysctl("machdep.cpu.brand_string"),
- "memory": f"{int(sysctl('hw.memsize')) // 2**30} GB",
- "os": f"macOS {platform.mac_ver()[0]}",
- }
- return info
def main() -> None:
- parser = argparse.ArgumentParser(description=__doc__.splitlines()[0])
- parser.add_argument("--runs", type=int, default=5)
- parser.add_argument("--only", default=",".join(SCENE_CLASSES))
- parser.add_argument("--tools", default=",".join(c.name for c in CONTENDERS))
- parser.add_argument("--manimgl", help="ManimGL's environment")
+ parser = argparse.ArgumentParser(description=__doc__)
+ parser.add_argument("--out", type=Path, required=True)
+ parser.add_argument("--tools", nargs="+", choices=TOOLS, default=list(TOOLS))
+ parser.add_argument(
+ "--scenes", nargs="+", choices=DURATIONS, default=list(DURATIONS)
+ )
+ parser.add_argument(
+ "--rounds",
+ type=int,
+ help="Runs per scene and engine; default: three for GX/GL, one for CE/Blender",
+ )
+ parser.add_argument("--gx", default=str(Path(sys.executable).parent / "manimgx"))
+ parser.add_argument("--ce-python", default=sys.executable)
+ parser.add_argument("--manimgl", default="manimgl")
+ parser.add_argument("--blender", default="blender")
+ parser.add_argument("--timeout", type=float, default=900)
parser.add_argument(
- "--blender",
- default=shutil.which("blender")
- or "/Applications/Blender.app/Contents/MacOS/Blender",
+ "--dry-run",
+ action="store_true",
+ help="Write commands without starting renderers",
)
- parser.add_argument("--keep", help="a folder to keep each contender's first MP4 in")
- parser.add_argument("--out", default=str(HERE / "results.json"))
args = parser.parse_args()
- scenes, tools = args.only.split(","), args.tools.split(",")
- if "manimgl" in tools and not args.manimgl:
- parser.error(
- "ManimGL needs its environment: --manimgl ENV (or leave it out of --tools)"
- )
- pairs = [
- (c, s) for s in scenes for c in CONTENDERS if c.name in tools and s in c.scenes
- ]
- runs: dict[tuple[str, str], list[dict[str, float]]] = {
- (c.name, s): [] for c, s in pairs
+ if (args.rounds is not None and args.rounds < 1) or args.timeout <= 0:
+ parser.error("Rounds and timeout must be positive")
+ args.scenes, args.tools = (
+ list(dict.fromkeys(args.scenes)),
+ list(dict.fromkeys(args.tools)),
+ )
+ if not args.dry_run:
+ for tool, option in (
+ ("manimgx", "gx"),
+ ("manim_ce", "ce_python"),
+ ("manimgl", "manimgl"),
+ ("blender", "blender"),
+ ):
+ if any(name.startswith(tool) for name in args.tools):
+ setattr(args, option, executable(getattr(args, option)))
+ executable("ffmpeg")
+ executable("ffprobe")
+ args.out = args.out.resolve()
+ args.out.mkdir(parents=True, exist_ok=False)
+ repeats = {tool: args.rounds or REPEATS[tool] for tool in args.tools}
+ manifest = {
+ "date": time.strftime("%Y-%m-%dT%H:%M:%S%z"),
+ "machine": {
+ "os": platform.platform(),
+ "cpu": platform.processor(),
+ "cpus": os.cpu_count(),
+ },
+ "settings": {
+ "width": WIDTH,
+ "height": HEIGHT,
+ "fps": FPS,
+ "crf": 23,
+ "manim_preset": "ultrafast",
+ "blender_preset": "REALTIME",
+ "scenes": {s: DURATIONS[s] for s in args.scenes},
+ "repeats": repeats,
+ },
+ "source_sha256": {
+ str(p.relative_to(HERE)): hashlib.sha256(p.read_bytes()).hexdigest()
+ for p in sorted(HERE.rglob("*.py"))
+ },
}
- wanted: dict[tuple[str, str], int] = {}
- commit = subprocess.run(
- ["git", "rev-parse", "HEAD"], cwd=ROOT, capture_output=True, text=True
- ).stdout.strip()
- for contender, scene in pairs: # the warm-up
- first = run(contender, scene, args)
- slow = first["wall"] > WARM_LIMIT
- wanted[contender.name, scene] = (
- args.runs if first["wall"] < SLOW else 3 if first["wall"] < SLOWER else 1
- )
- if slow:
- runs[contender.name, scene].append(first)
- print(
- f"warm-up {scene:9} {contender.label:20} {first['wall']:8.2f} s", flush=True
- )
- while any(len(runs[k]) < wanted[k] for k in runs):
- for contender, scene in pairs:
- if len(runs[contender.name, scene]) < wanted[contender.name, scene]:
- result = run(contender, scene, args)
- runs[contender.name, scene].append(result)
+ runs: list[Run] = []
+ for scene in args.scenes:
+ for repeat in range(1, max(repeats.values()) + 1):
+ for tool in args.tools:
+ if repeat > repeats[tool]:
+ continue
+ print(f"{scene}: {tool}, run {repeat}", flush=True)
+ row = run_one(tool, scene, repeat, args)
+ runs.append(row)
+ result = (
+ manifest
+ | summarize(runs, args.scenes, repeats)
+ | {"runs": [asdict(r) for r in runs]}
+ )
+ temp = args.out / "results.tmp"
+ temp.write_text(json.dumps(result, indent=2) + "\n", encoding="utf-8")
+ temp.replace(args.out / "results.json")
print(
- f"{scene:9} {contender.label:20} {result['wall']:8.2f} s load"
- f" {result['load']}",
+ f" {row.status}"
+ + (f" {row.wall_seconds:.3f}s" if not args.dry_run else ""),
flush=True,
)
- medians = {
- key: statistics.median(r["wall"] for r in rows) for key, rows in runs.items()
- }
- results = {
- "date": time.strftime("%Y-%m-%d"),
- "commit": commit,
- "machine": machine(),
- "versions": versions(tools, args),
- "scenes": {
- scene: {
- c.name: {
- "label": c.label,
- "median": round(medians[c.name, scene], 2),
- "runs": runs[c.name, scene],
- }
- for c, s in pairs
- if s == scene
- }
- for scene in scenes
- },
- }
- Path(args.out).write_text(json.dumps(results, indent=2) + "\n", encoding="utf-8")
- for contender, scene in pairs:
- median, base = medians[contender.name, scene], medians.get(("manimgx", scene))
- times = f"×{median / base:.1f}" if base else ""
- print(f"{scene:9} {contender.label:20} {median:8.2f} s {times}")
+ if row.status not in ("complete", "planned"):
+ raise SystemExit(row.error or row.status)
if __name__ == "__main__":
diff --git a/scripts/benchmark/scenes/ce_cli.py b/scripts/benchmark/scenes/ce_cli.py
new file mode 100644
index 00000000..3c11d3dc
--- /dev/null
+++ b/scripts/benchmark/scenes/ce_cli.py
@@ -0,0 +1,21 @@
+"""Set x264 options on each CE partial stream before any frames are submitted."""
+
+import os
+
+from manim.__main__ import main
+from manim.scene.scene_file_writer import SceneFileWriter
+
+original = SceneFileWriter.open_partial_movie_stream
+
+
+def open_stream(self, file_path=None):
+ original(self, file_path)
+ stream = self._current_encode_job.stream
+ stream.options = dict(stream.options) | {
+ "preset": os.environ.get("MANIMGX_BENCH_PRESET", "ultrafast"),
+ "crf": "23",
+ }
+
+
+SceneFileWriter.open_partial_movie_stream = open_stream
+main()
diff --git a/scripts/benchmark/scenes/explainer_manim_ce.py b/scripts/benchmark/scenes/explainer_manim_ce.py
deleted file mode 100644
index ec23eb0d..00000000
--- a/scripts/benchmark/scenes/explainer_manim_ce.py
+++ /dev/null
@@ -1,27 +0,0 @@
-"""A classic explainer: a curve drawn on axes, its area and its integral, then a tangent
-line sliding along it. (Manim Community Edition.)"""
-
-from manim import *
-
-
-class Explainer(Scene):
- def construct(self) -> None:
- axes = Axes(x_range=[0, 2 * np.pi, np.pi / 2], y_range=[-1.5, 1.5, 1])
- sine = axes.plot(np.sin, color=BLUE, stroke_width=6)
- dot = Dot(axes.i2gp(0, sine), radius=0.12, color=YELLOW)
- area = axes.get_area(sine, x_range=(0, np.pi), color=BLUE, opacity=0.4)
- label = MathTex(r"y = \sin x", font_size=72).to_corner(UR)
- integral = MathTex(r"\int_0^\pi \sin x \, dx = 2", font_size=72).to_corner(UR)
- self.play(Create(axes), Write(label))
- self.play(Create(sine), MoveAlongPath(dot, sine), run_time=2.5)
- self.play(FadeIn(area), TransformMatchingTex(label, integral))
- along = ValueTracker(0)
- tangent = always_redraw(
- lambda: TangentLine(sine, alpha=along.get_value(), length=3, color=YELLOW)
- )
- dot.add_updater(
- lambda d: d.move_to(sine.point_from_proportion(along.get_value()))
- )
- self.add(tangent, dot)
- self.play(along.animate.set_value(1), run_time=4)
- self.wait()
diff --git a/scripts/benchmark/scenes/explainer_manimgl.py b/scripts/benchmark/scenes/explainer_manimgl.py
deleted file mode 100644
index 6c2a84a5..00000000
--- a/scripts/benchmark/scenes/explainer_manimgl.py
+++ /dev/null
@@ -1,46 +0,0 @@
-"""A classic explainer: a curve drawn on axes, its area and its integral, then a tangent
-line sliding along it. (ManimGL.)"""
-
-import numpy as np
-from manimlib import *
-
-YELLOW = "#F7D96F" # Manim CE's color, where ManimGL's differs
-
-
-class Explainer(Scene):
- default_camera_config = {"background_color": BLACK}
-
- def construct(self) -> None:
- axes = Axes(
- x_range=(0, 2 * np.pi, np.pi / 2),
- y_range=(-1.5, 1.5, 1),
- width=12,
- height=6,
- axis_config={"include_tip": True}, # Manim CE's defaults
- )
- # The graph's x_range is given without a step: get_area_under_graph fails on one
- # with a step (ManimGL 1.7.2).
- sine = axes.get_graph(
- np.sin, x_range=(0, 2 * np.pi), color=BLUE, stroke_width=6
- )
- dot = Dot(axes.i2gp(0, sine), radius=0.12, fill_color=YELLOW)
- area = axes.get_area_under_graph(
- sine, x_range=(0, np.pi), fill_color=BLUE, fill_opacity=0.4
- )
- label = Tex(r"y = \sin x", font_size=72).to_corner(UR)
- integral = Tex(r"\int_0^\pi \sin x \, dx = 2", font_size=72).to_corner(UR)
- self.play(ShowCreation(axes), Write(label))
- self.play(ShowCreation(sine), MoveAlongPath(dot, sine), run_time=2.5)
- self.play(
- FadeIn(area), TransformMatchingTex(label, integral, run_time=1)
- ) # 2 s by default
- along = ValueTracker(0)
- tangent = always_redraw(
- lambda: TangentLine(sine, alpha=along.get_value(), length=3, color=YELLOW)
- )
- dot.add_updater(
- lambda d: d.move_to(sine.point_from_proportion(along.get_value()))
- )
- self.add(tangent, dot)
- self.play(along.animate.set_value(1), run_time=4)
- self.wait()
diff --git a/scripts/benchmark/scenes/ffmpeg.py b/scripts/benchmark/scenes/ffmpeg.py
new file mode 100755
index 00000000..34012c82
--- /dev/null
+++ b/scripts/benchmark/scenes/ffmpeg.py
@@ -0,0 +1,24 @@
+#!/usr/bin/env python3
+"""Pass explicit x264 settings to the FFmpeg process used by ManimGL."""
+
+import json
+import os
+import sys
+from pathlib import Path
+
+args = sys.argv[1:]
+assert "libx264" in args, args
+assert "rawvideo" in args, args
+command = [
+ "ffmpeg",
+ *args[:-1],
+ "-preset",
+ "ultrafast",
+ "-crf",
+ "23",
+ args[-1],
+]
+Path(os.environ["MANIMGX_BENCH_FFMPEG_LOG"]).write_text(
+ json.dumps(command, indent=2) + "\n"
+)
+os.execvp(command[0], command)
diff --git a/scripts/benchmark/scenes/lighting.py b/scripts/benchmark/scenes/lighting.py
new file mode 100644
index 00000000..c66564ec
--- /dev/null
+++ b/scripts/benchmark/scenes/lighting.py
@@ -0,0 +1,22 @@
+"""Linked-rings camera, material and key light."""
+
+import math
+
+import numpy as np
+
+TIME = 2.5
+PHI = math.radians(65)
+THETA = math.radians(-45) + 0.24 * TIME
+VIEW = np.array(
+ [math.sin(PHI) * math.cos(THETA), math.sin(PHI) * math.sin(THETA), math.cos(PHI)]
+)
+RIGHT = np.array([-math.sin(THETA), math.cos(THETA), 0])
+UP = np.cross(VIEW, RIGHT)
+
+
+def unit(value):
+ return value / np.linalg.norm(value)
+
+
+LIGHTS = [(unit(0.8 * VIEW + 0.9 * UP - 0.6 * RIGHT), 1.0, True)]
+ROUGHNESS = 0.5
diff --git a/scripts/benchmark/scenes/linked_rings_blender.py b/scripts/benchmark/scenes/linked_rings_blender.py
new file mode 100644
index 00000000..ebe54452
--- /dev/null
+++ b/scripts/benchmark/scenes/linked_rings_blender.py
@@ -0,0 +1,152 @@
+import argparse
+import sys
+from pathlib import Path
+
+import bpy
+from mathutils import Matrix, Vector
+
+sys.path.insert(0, str(Path(__file__).parent))
+import math
+
+import numpy as np
+from lighting import LIGHTS, PHI, ROUGHNESS, TIME, VIEW
+from suite_data import COLORS, ring_pose
+
+parser = argparse.ArgumentParser()
+parser.add_argument("--engine", required=True, choices=["workbench", "eevee"])
+parser.add_argument("--out", required=True)
+parser.add_argument("--animate", action="store_true")
+args = parser.parse_args(sys.argv[sys.argv.index("--") + 1 :])
+bpy.ops.wm.read_factory_settings(use_empty=True)
+scene = bpy.context.scene
+scene.render.engine = {"workbench": "BLENDER_WORKBENCH", "eevee": "BLENDER_EEVEE"}[
+ args.engine
+]
+scene.render.resolution_x, scene.render.resolution_y = 1920, 1080
+scene.render.resolution_percentage = 100
+scene.render.film_transparent = True
+scene.render.image_settings.file_format = "PNG"
+scene.render.image_settings.color_mode = "RGBA"
+scene.render.filepath = args.out
+scene.render.use_file_extension = False
+scene.view_settings.view_transform = "Standard"
+scene.view_settings.look = "None"
+scene.view_settings.exposure = 0
+scene.view_settings.gamma = 1
+scene.world = bpy.data.worlds.new("world")
+scene.world.color = (0, 0, 0)
+scene.world.use_nodes = True
+scene.world.node_tree.nodes["Background"].inputs["Color"].default_value = (0, 0, 0, 1)
+scene.world.node_tree.nodes["Background"].inputs["Strength"].default_value = 0
+data = bpy.data.cameras.new("camera")
+data.sensor_fit = "VERTICAL"
+data.angle = 2 * math.atan(4 / 20)
+camera = bpy.data.objects.new("camera", data)
+bpy.context.collection.objects.link(camera)
+camera.location = 20 * Vector(VIEW)
+camera.rotation_euler = (-camera.location).to_track_quat("-Z", "Y").to_euler()
+scene.camera = camera
+rings = []
+for i in range(8):
+ bpy.ops.mesh.primitive_torus_add(
+ major_segments=32, minor_segments=8, major_radius=0.58, minor_radius=0.11
+ )
+ obj = bpy.context.object
+ rings.append(obj)
+ rotation, position = ring_pose(i, TIME)
+ obj.rotation_euler = Matrix(rotation.tolist()).to_euler()
+ obj.location = position
+ for face in obj.data.polygons:
+ face.use_smooth = True
+ color = COLORS[i % 5]
+ rgb = [int(color[k : k + 2], 16) / 255 for k in (1, 3, 5)]
+ rgb = [c / 12.92 if c <= 0.04045 else ((c + 0.055) / 1.055) ** 2.4 for c in rgb]
+ mat = bpy.data.materials.new(color)
+ mat.diffuse_color = (*rgb, 1)
+ mat.use_nodes = True
+ bsdf = mat.node_tree.nodes["Principled BSDF"]
+ bsdf.inputs["Base Color"].default_value = (*rgb, 1)
+ bsdf.inputs["Metallic"].default_value = 0
+ bsdf.inputs["Roughness"].default_value = ROUGHNESS
+ bsdf.inputs["IOR"].default_value = 1.5
+ obj.data.materials.append(mat)
+for i, (direction, intensity, shadows) in enumerate(LIGHTS):
+ data = bpy.data.lights.new(f"light-{i}", "SUN")
+ data.energy = math.pi * intensity
+ data.color = (1, 1, 1)
+ data.angle = 0
+ data.use_shadow = shadows
+ light = bpy.data.objects.new(data.name, data)
+ light.rotation_euler = (-Vector(direction)).to_track_quat("-Z", "Y").to_euler()
+ bpy.context.collection.objects.link(light)
+if args.engine == "eevee":
+ scene.eevee.taa_render_samples = 64
+ scene.eevee.use_shadows = True
+else:
+ studio = Path(args.out).with_suffix(".sl")
+ lines = [
+ "version 1",
+ "light_ambient.x 0.15",
+ "light_ambient.y 0.15",
+ "light_ambient.z 0.15",
+ ]
+ for i in range(4):
+ direction, intensity, _ = (
+ LIGHTS[i] if i < len(LIGHTS) else (np.zeros(3), 0, False)
+ )
+ lines += [f"light[{i}].flag {int(i < len(LIGHTS))}", f"light[{i}].smooth 0.25"]
+ # Workbench studio coordinates are Y-up; its world-orientation transform maps (x,y,z) to (x,-z,y).
+ direction = (direction[0], direction[2], -direction[1])
+ for axis, v in zip("xyz", direction):
+ lines += [
+ f"light[{i}].vec.{axis} {v:.8f}",
+ f"light[{i}].col.{axis} {intensity:.8f}",
+ f"light[{i}].spec.{axis} {0.12 * intensity:.8f}",
+ ]
+ studio.write_text("\n".join(lines) + "\n")
+ loaded = bpy.context.preferences.studio_lights.load(str(studio), "STUDIO")
+ shading = scene.display.shading
+ shading.light = "STUDIO"
+ shading.studio_light = loaded.name
+ shading.use_world_space_lighting = True
+ shading.studiolight_rotate_z = 0
+ shading.color_type = "MATERIAL"
+ shading.background_type = "WORLD"
+ shading.show_shadows = True
+ d = LIGHTS[0][0]
+ scene.display.light_direction = (d[0], d[2], -d[1])
+ scene.display.render_aa = "8"
+if args.animate:
+ scene.render.film_transparent = False
+ scene.render.fps = 60
+ scene.frame_start, scene.frame_end = 1, 180
+ scene.render.image_settings.media_type = "VIDEO"
+ scene.render.image_settings.file_format = "FFMPEG"
+ scene.render.ffmpeg.format = "MPEG4"
+ scene.render.ffmpeg.codec = "H264"
+ scene.render.ffmpeg.constant_rate_factor = "CUSTOM"
+ scene.render.ffmpeg.custom_constant_rate_factor = 23
+ scene.render.ffmpeg.ffmpeg_preset = "REALTIME"
+ scene.render.ffmpeg.gopsize = 250
+ scene.render.ffmpeg.use_max_b_frames = False
+ scene.render.ffmpeg.max_b_frames = 0
+
+ def frame(current, *_):
+ t = (current.frame_current - 1) / 60
+ theta = math.radians(-45) + 0.24 * t
+ camera.location = (
+ 20 * math.sin(PHI) * math.cos(theta),
+ 20 * math.sin(PHI) * math.sin(theta),
+ 20 * math.cos(PHI),
+ )
+ camera.rotation_euler = (-camera.location).to_track_quat("-Z", "Y").to_euler()
+ for i, obj in enumerate(rings):
+ rotation, position = ring_pose(i, t)
+ obj.rotation_euler = Matrix(rotation.tolist()).to_euler()
+ obj.location = position
+
+ bpy.app.handlers.frame_change_pre.append(frame)
+ scene.frame_set(1)
+ bpy.ops.render.render(animation=True)
+else:
+ bpy.ops.render.render(write_still=True)
diff --git a/scripts/benchmark/scenes/matrix_manim_ce.py b/scripts/benchmark/scenes/matrix_manim_ce.py
new file mode 100644
index 00000000..da41b654
--- /dev/null
+++ b/scripts/benchmark/scenes/matrix_manim_ce.py
@@ -0,0 +1,30 @@
+import manim as m
+
+
+class TeacherScene(m.Scene):
+ def construct(self) -> None:
+ matrix = m.Matrix([[1, 2], [3, 1]]).scale(1.0)
+ vec = m.Matrix([[2], [1]]).scale(1.0)
+ equals = m.MathTex("=").scale(1.2)
+ _line = (
+ m.VGroup(matrix, vec, equals).arrange(m.RIGHT, buff=0.3).shift(m.UP * 0.6)
+ )
+
+ self.play(m.Write(matrix), m.Write(vec), m.Write(equals))
+ self.wait(0.4)
+
+ step = (
+ m.Matrix(
+ [["1 \\cdot 2 + 2 \\cdot 1"], ["3 \\cdot 2 + 1 \\cdot 1"]],
+ h_buff=2.4,
+ )
+ .scale(0.85)
+ .next_to(equals, m.RIGHT, buff=0.3)
+ )
+ self.play(m.Write(step))
+ self.wait(0.8)
+
+ result = m.Matrix([[4], [7]]).scale(1.1).next_to(equals, m.RIGHT, buff=0.3)
+ result.set_color(m.YELLOW)
+ self.play(m.Transform(step, result))
+ self.wait(2.0)
diff --git a/scripts/benchmark/scenes/matrix_manimgl.py b/scripts/benchmark/scenes/matrix_manimgl.py
new file mode 100644
index 00000000..efcb1191
--- /dev/null
+++ b/scripts/benchmark/scenes/matrix_manimgl.py
@@ -0,0 +1,36 @@
+import types
+
+import manimlib
+
+m = types.SimpleNamespace(**vars(manimlib))
+m.MathTex = manimlib.Tex
+m.Tex = manimlib.TexText
+
+
+class TeacherScene(m.Scene):
+ def construct(self) -> None:
+ matrix = m.Matrix([[1, 2], [3, 1]]).scale(1.0)
+ vec = m.Matrix([[2], [1]]).scale(1.0)
+ equals = m.MathTex("=").scale(1.2)
+ _line = (
+ m.VGroup(matrix, vec, equals).arrange(m.RIGHT, buff=0.3).shift(m.UP * 0.6)
+ )
+
+ self.play(m.Write(matrix), m.Write(vec), m.Write(equals))
+ self.wait(0.4)
+
+ step = (
+ m.Matrix(
+ [["1 \\cdot 2 + 2 \\cdot 1"], ["3 \\cdot 2 + 1 \\cdot 1"]],
+ h_buff=2.4,
+ )
+ .scale(0.85)
+ .next_to(equals, m.RIGHT, buff=0.3)
+ )
+ self.play(m.Write(step))
+ self.wait(0.8)
+
+ result = m.Matrix([[4], [7]]).scale(1.1).next_to(equals, m.RIGHT, buff=0.3)
+ result.set_color(m.YELLOW)
+ self.play(m.Transform(step, result))
+ self.wait(2.0)
diff --git a/scripts/benchmark/scenes/matrix_manimgx.py b/scripts/benchmark/scenes/matrix_manimgx.py
new file mode 100644
index 00000000..9a78ec54
--- /dev/null
+++ b/scripts/benchmark/scenes/matrix_manimgx.py
@@ -0,0 +1,30 @@
+import manimgx as m
+
+
+class TeacherScene(m.Scene):
+ def construct(self) -> None:
+ matrix = m.Matrix([[1, 2], [3, 1]]).scale(1.0)
+ vec = m.Matrix([[2], [1]]).scale(1.0)
+ equals = m.MathTex("=").scale(1.2)
+ _line = (
+ m.VGroup(matrix, vec, equals).arrange(m.RIGHT, buff=0.3).shift(m.UP * 0.6)
+ )
+
+ self.play(m.Write(matrix), m.Write(vec), m.Write(equals))
+ self.wait(0.4)
+
+ step = (
+ m.Matrix(
+ [["1 \\cdot 2 + 2 \\cdot 1"], ["3 \\cdot 2 + 1 \\cdot 1"]],
+ h_buff=2.4,
+ )
+ .scale(0.85)
+ .next_to(equals, m.RIGHT, buff=0.3)
+ )
+ self.play(m.Write(step))
+ self.wait(0.8)
+
+ result = m.Matrix([[4], [7]]).scale(1.1).next_to(equals, m.RIGHT, buff=0.3)
+ result.set_color(m.YELLOW)
+ self.play(m.Transform(step, result))
+ self.wait(2.0)
diff --git a/scripts/benchmark/scenes/morph_blender.py b/scripts/benchmark/scenes/morph_blender.py
deleted file mode 100644
index 71189ea6..00000000
--- a/scripts/benchmark/scenes/morph_blender.py
+++ /dev/null
@@ -1,183 +0,0 @@
-"""A rippling surface, rebuilt every frame, with the camera circling it. (Blender, run
-headless: `blender -b --factory-startup -P morph_blender.py -- --engine EEVEE|WORKBENCH
---out FILE`.)
-
-The axes, camera, light and output are orbit_blender.py's. The surface's points are
-recomputed with numpy on every frame by a frame-change handler and written with
-foreach_set, the fastest way to move a mesh from Python.
-"""
-
-import argparse
-import math
-import sys
-
-import bpy
-import numpy as np
-
-FPS, SECONDS = 60, 10
-BLUE_D, BLUE_E, AXES = "#29ABCA", "#236B8E", "#FFFFFF"
-# scene units per axis unit, as ThreeDAxes(x_length=7, z_length=4) has them
-X, Z = 7 / 6, 1.0
-N = 48
-U, V = np.meshgrid(np.linspace(-3, 3, N + 1), np.linspace(-3, 3, N + 1), indexing="ij")
-
-
-def c2p(u: np.ndarray, v: np.ndarray, w: np.ndarray) -> np.ndarray:
- """Axis coordinates to scene points."""
- return np.stack([X * u, X * v, Z * w], -1)
-
-
-def material(name: str, color: str) -> bpy.types.Material:
- """A plain material of a color given in hex (sRGB)."""
- rgb = [int(color[i : i + 2], 16) / 255 for i in (1, 3, 5)]
- linear = [c / 12.92 if c <= 0.04045 else ((c + 0.055) / 1.055) ** 2.4 for c in rgb]
- mat = bpy.data.materials.new(name)
- mat.diffuse_color = (*linear, 1) # Workbench's color
- mat.use_nodes = True
- mat.node_tree.nodes["Principled BSDF"].inputs["Base Color"].default_value = (
- *linear,
- 1,
- )
- return mat
-
-
-def points(frame: int) -> np.ndarray:
- """The ripple's points at a frame, flat: z = 0.8 sin(2r - phase), the phase from 0 to
- 4 pi over the ten seconds."""
- phase = 4 * np.pi * (frame - 1) / (SECONDS * FPS)
- return c2p(U, V, 0.8 * np.sin(2 * np.hypot(U, V) - phase)).ravel()
-
-
-def surface() -> None:
- """The 48 x 48 checkerboard ripple, as one mesh whose points follow the frame."""
- i, j = np.meshgrid(np.arange(N), np.arange(N), indexing="ij")
- corner = (i * (N + 1) + j).ravel()
- quads = np.stack([corner, corner + N + 1, corner + N + 2, corner + 1], -1)
- mesh = bpy.data.meshes.new("surface")
- mesh.from_pydata(points(1).reshape(-1, 3).tolist(), [], quads.tolist())
- mesh.polygons.foreach_set("material_index", ((i + j) % 2).ravel().astype(np.int32))
- mesh.polygons.foreach_set("use_smooth", np.ones(N * N, bool))
- mesh.materials.append(material("blue_d", BLUE_D))
- mesh.materials.append(material("blue_e", BLUE_E))
- bpy.context.collection.objects.link(bpy.data.objects.new("surface", mesh))
-
- def move(scene: bpy.types.Scene, *_: object) -> None:
- mesh.vertices.foreach_set("co", points(scene.frame_current))
- mesh.update()
-
- bpy.app.handlers.frame_change_pre.append(move)
-
-
-def axes() -> None:
- """Three thin shafts with cone tips, from -3 to 3 (x, y) and -2 to 2 (z)."""
- white = material("axes", AXES)
- for axis, (low, high) in enumerate(
- [(-3 * X, 3 * X), (-3 * X, 3 * X), (-2 * Z, 2 * Z)]
- ):
- rotation = [(0, math.pi / 2, 0), (-math.pi / 2, 0, 0), (0, 0, 0)][axis]
- center = [0.0, 0.0, 0.0]
- center[axis] = (low + high) / 2
- bpy.ops.mesh.primitive_cylinder_add(
- radius=0.01,
- depth=high - low,
- location=center,
- rotation=rotation,
- vertices=12,
- )
- bpy.context.object.data.materials.append(white)
- tip = [0.0, 0.0, 0.0]
- tip[axis] = high
- bpy.ops.mesh.primitive_cone_add(
- radius1=0.06, depth=0.18, location=tip, rotation=rotation, vertices=16
- )
- bpy.context.object.data.materials.append(white)
-
-
-def camera() -> None:
- """Manim's camera: 20 units from the origin, 8 units of frame height there, at
- phi = 65 degrees, orbiting from theta = -45 degrees at 0.3 rad/s."""
- pivot = bpy.data.objects.new("pivot", None)
- bpy.context.collection.objects.link(pivot)
- data = bpy.data.cameras.new("camera")
- data.sensor_fit = "VERTICAL"
- data.angle = 2 * math.atan(4 / 20)
- data.clip_end = 100
- cam = bpy.data.objects.new("camera", data)
- bpy.context.collection.objects.link(cam)
- phi, theta = math.radians(65), math.radians(-45)
- cam.location = (
- 20 * math.sin(phi) * math.cos(theta),
- 20 * math.sin(phi) * math.sin(theta),
- 20 * math.cos(phi),
- )
- track = cam.constraints.new("TRACK_TO")
- track.target, track.track_axis, track.up_axis = pivot, "TRACK_NEGATIVE_Z", "UP_Y"
- cam.parent = pivot
- pivot.keyframe_insert("rotation_euler", index=2, frame=1)
- pivot.rotation_euler = (0, 0, 0.3 * SECONDS)
- pivot.keyframe_insert("rotation_euler", index=2, frame=1 + SECONDS * FPS)
- bpy.context.scene.camera = cam
-
-
-def light() -> None:
- """A sun from above the camera's side, for shading in EEVEE."""
- sun = bpy.data.objects.new("sun", bpy.data.lights.new("sun", "SUN"))
- sun.data.energy = 3
- sun.rotation_euler = (math.radians(40), 0, math.radians(-30))
- bpy.context.collection.objects.link(sun)
-
-
-def output(engine: str, path: str) -> None:
- """1920 x 1080 at 60 fps, 600 frames, straight to an H.264 MP4 with Blender's
- settings for it; black background and the Standard view (colors as sRGB)."""
- scene = bpy.context.scene
- scene.render.engine = {"EEVEE": "BLENDER_EEVEE", "WORKBENCH": "BLENDER_WORKBENCH"}[
- engine
- ]
- scene.render.resolution_x, scene.render.resolution_y = 1920, 1080
- scene.render.resolution_percentage = 100
- scene.render.fps = FPS
- scene.frame_start, scene.frame_end = 1, SECONDS * FPS
- scene.view_settings.view_transform = "Standard"
- scene.world = scene.world or bpy.data.worlds.new("world")
- scene.world.color = (0, 0, 0)
- scene.world.use_nodes = True
- scene.world.node_tree.nodes["Background"].inputs["Color"].default_value = (
- 0,
- 0,
- 0,
- 1,
- )
- scene.display.shading.light = "STUDIO"
- scene.display.shading.color_type = "MATERIAL"
- settings = scene.render.image_settings
- settings.media_type = "VIDEO"
- settings.file_format = "FFMPEG"
- scene.render.ffmpeg.format = "MPEG4"
- scene.render.ffmpeg.codec = "H264"
- scene.render.ffmpeg.constant_rate_factor = "MEDIUM"
- scene.render.ffmpeg.ffmpeg_preset = "GOOD"
- scene.render.filepath = path
- scene.render.use_file_extension = False
-
-
-def main() -> None:
- parser = argparse.ArgumentParser()
- parser.add_argument("--engine", choices=["EEVEE", "WORKBENCH"], default="EEVEE")
- parser.add_argument("--out", default="morph.mp4")
- parser.add_argument("--frames", type=int, default=SECONDS * FPS) # fewer, to try it
- args = parser.parse_args(
- sys.argv[sys.argv.index("--") + 1 :] if "--" in sys.argv else []
- )
- bpy.ops.wm.read_factory_settings(use_empty=True)
- bpy.context.preferences.edit.keyframe_new_interpolation_type = "LINEAR"
- surface()
- axes()
- camera()
- light()
- output(args.engine, args.out)
- bpy.context.scene.frame_end = args.frames
- bpy.ops.render.render(animation=True)
-
-
-main()
diff --git a/scripts/benchmark/scenes/morph_manim_ce.py b/scripts/benchmark/scenes/morph_manim_ce.py
deleted file mode 100644
index 8cc65799..00000000
--- a/scripts/benchmark/scenes/morph_manim_ce.py
+++ /dev/null
@@ -1,32 +0,0 @@
-"""A rippling surface, rebuilt every frame, with the camera circling it. (Manim Community
-Edition.)"""
-
-from manim import *
-
-
-class Morph(ThreeDScene):
- def construct(self) -> None:
- axes = ThreeDAxes(
- x_range=[-3, 3, 1],
- y_range=[-3, 3, 1],
- z_range=[-2, 2, 1],
- x_length=7,
- y_length=7,
- z_length=4,
- )
- phase = ValueTracker(0)
- surface = always_redraw(
- lambda: Surface(
- lambda u, v: axes.c2p(
- u, v, 0.8 * np.sin(2 * np.hypot(u, v) - phase.get_value())
- ),
- u_range=[-3, 3],
- v_range=[-3, 3],
- resolution=(48, 48),
- checkerboard_colors=[BLUE_D, BLUE_E],
- )
- )
- self.set_camera_orientation(phi=65 * DEGREES, theta=-45 * DEGREES)
- self.add(axes, surface)
- self.begin_ambient_camera_rotation(rate=0.3)
- self.play(phase.animate.set_value(4 * np.pi), run_time=10, rate_func=linear)
diff --git a/scripts/benchmark/scenes/morph_manimgl.py b/scripts/benchmark/scenes/morph_manimgl.py
deleted file mode 100644
index d4305a45..00000000
--- a/scripts/benchmark/scenes/morph_manimgl.py
+++ /dev/null
@@ -1,55 +0,0 @@
-"""A rippling surface, rebuilt every frame, with the camera circling it. (ManimGL.)"""
-
-import tempfile
-
-import numpy as np
-from manimlib import *
-from PIL import Image
-
-BLUE_E = "#236B8E" # Manim CE's color, where ManimGL's differs
-
-
-def checkerboard(colors: list[str], cells: int = 48, px: int = 16) -> str:
- """A PNG of `cells` x `cells` squares: ManimGL's surfaces take one color, so the
- checkerboard is painted on as a texture (face (i, j) gets colors[(i + j) % 2])."""
- a, b = (color_to_int_rgb(c) for c in colors)
- rows, cols = np.indices((cells, cells))
- image = np.where(((rows + cols + 1) % 2 == 0)[..., None], a, b).astype(np.uint8)
- path = f"{tempfile.gettempdir()}/checkerboard.png"
- Image.fromarray(image.repeat(px, 0).repeat(px, 1)).save(path)
- return path
-
-
-class Morph(ThreeDScene):
- default_camera_config = {"background_color": BLACK}
-
- def construct(self) -> None:
- axes = ThreeDAxes(
- x_range=(-3, 3, 1),
- y_range=(-3, 3, 1),
- z_range=(-2, 2, 1),
- width=7,
- height=7,
- depth=4,
- axis_config={"include_tip": True},
- )
- phase = ValueTracker(0)
- texture = checkerboard([BLUE_D, BLUE_E])
- surface = always_redraw(
- lambda: TexturedSurface(
- ParametricSurface(
- lambda u, v: axes.c2p(
- u, v, 0.8 * np.sin(2 * np.hypot(u, v) - phase.get_value())
- ),
- u_range=(-3, 3),
- v_range=(-3, 3),
- resolution=(49, 49), # sample points: 48 x 48 squares
- ),
- texture,
- )
- )
- self.frame.reorient(45, 65) # ManimGL's theta is Manim CE's plus 90 degrees
- self.frame.set_focal_distance(20) # Manim CE's camera distance
- self.add(axes, surface)
- self.frame.add_updater(lambda frame, dt: frame.increment_theta(0.3 * dt))
- self.play(phase.animate.set_value(4 * np.pi), run_time=10, rate_func=linear)
diff --git a/scripts/benchmark/scenes/orbit_blender.py b/scripts/benchmark/scenes/orbit_blender.py
index 8624ce89..24055b5c 100644
--- a/scripts/benchmark/scenes/orbit_blender.py
+++ b/scripts/benchmark/scenes/orbit_blender.py
@@ -195,8 +195,9 @@ def output(engine: str, path: str) -> None:
settings.file_format = "FFMPEG"
scene.render.ffmpeg.format = "MPEG4"
scene.render.ffmpeg.codec = "H264"
- scene.render.ffmpeg.constant_rate_factor = "MEDIUM"
- scene.render.ffmpeg.ffmpeg_preset = "GOOD"
+ scene.render.ffmpeg.constant_rate_factor = "CUSTOM"
+ scene.render.ffmpeg.custom_constant_rate_factor = 23
+ scene.render.ffmpeg.ffmpeg_preset = "REALTIME"
scene.render.filepath = path
scene.render.use_file_extension = False
diff --git a/scripts/benchmark/scenes/orbit_manimgx.py b/scripts/benchmark/scenes/orbit_manimgx.py
new file mode 100644
index 00000000..d1457cb9
--- /dev/null
+++ b/scripts/benchmark/scenes/orbit_manimgx.py
@@ -0,0 +1,46 @@
+"""A surface plot on 3D axes, a curve drawn across it with a ball riding its tip, and the
+camera circling the whole time: every frame is new."""
+
+import numpy as np
+
+import manimgx as m
+
+
+class Orbit(m.ThreeDScene):
+ def construct(self) -> None:
+ axes = m.ThreeDAxes(
+ x_range=[-3, 3, 1],
+ y_range=[-3, 3, 1],
+ z_range=[-2, 2, 1],
+ x_length=7,
+ y_length=7,
+ z_length=4,
+ )
+ surface = m.Surface(
+ lambda u, v: axes.c2p(u, v, np.sin(u) * np.cos(v)),
+ u_range=[-3, 3],
+ v_range=[-3, 3],
+ resolution=(48, 48),
+ checkerboard_colors=[m.BLUE_D, m.BLUE_E],
+ )
+ curve = m.ParametricFunction(
+ lambda t: axes.c2p(
+ 2.4 * np.cos(t),
+ 2.4 * np.sin(t),
+ np.sin(2.4 * np.cos(t)) * np.cos(2.4 * np.sin(t)) + 0.08,
+ ),
+ t_range=[0, 2 * np.pi],
+ color=m.YELLOW,
+ stroke_width=6,
+ )
+ ball = m.Dot3D(curve.get_start(), radius=0.12, color=m.YELLOW)
+ self.set_camera_orientation(phi=65 * m.DEGREES, theta=-45 * m.DEGREES)
+ self.add(axes, surface, ball)
+ self.begin_ambient_camera_rotation(rate=0.3)
+ self.play(
+ m.Create(curve),
+ m.MoveAlongPath(ball, curve),
+ run_time=6,
+ rate_func=m.linear,
+ )
+ self.wait(4)
diff --git a/scripts/benchmark/scenes/pendulums_manim_ce.py b/scripts/benchmark/scenes/pendulums_manim_ce.py
new file mode 100644
index 00000000..aa5d5ec4
--- /dev/null
+++ b/scripts/benchmark/scenes/pendulums_manim_ce.py
@@ -0,0 +1,40 @@
+import math
+
+import manim as m
+import numpy as np
+
+NUM = 12
+G = 9.8
+
+
+class TeacherScene(m.Scene):
+ def construct(self) -> None:
+ title = m.Tex("Pendulums of varying lengths").to_edge(m.UP, buff=0.3)
+ self.play(m.Write(title))
+
+ t = m.ValueTracker(0.0)
+
+ def make_pendulum(i: int, length: float, pivot: np.ndarray):
+ freq = math.sqrt(G / length)
+
+ def bob_pos() -> np.ndarray:
+ theta = 0.55 * math.cos(freq * t.get_value())
+ return pivot + length * np.array(
+ [math.sin(theta), -math.cos(theta), 0.0]
+ )
+
+ return (
+ m.always_redraw(
+ lambda: m.Line(pivot, bob_pos(), color=m.WHITE, stroke_width=1.5)
+ ),
+ m.always_redraw(lambda: m.Dot(bob_pos(), color=m.YELLOW, radius=0.08)),
+ )
+
+ for i in range(NUM):
+ length = 1.5 + i * 0.15
+ pivot = np.array([-5.0 + i * 0.85, 2.5, 0.0])
+ rod, dot = make_pendulum(i, length, pivot)
+ self.add(rod, dot)
+
+ self.play(t.animate.set_value(14.0), run_time=10.0, rate_func=m.linear)
+ self.wait(1.0)
diff --git a/scripts/benchmark/scenes/pendulums_manimgl.py b/scripts/benchmark/scenes/pendulums_manimgl.py
new file mode 100644
index 00000000..0ade99fe
--- /dev/null
+++ b/scripts/benchmark/scenes/pendulums_manimgl.py
@@ -0,0 +1,45 @@
+import math
+import types
+
+import manimlib
+import numpy as np
+
+m = types.SimpleNamespace(**vars(manimlib))
+m.MathTex = manimlib.Tex
+m.Tex = manimlib.TexText
+
+NUM = 12
+G = 9.8
+
+
+class TeacherScene(m.Scene):
+ def construct(self) -> None:
+ title = m.Tex("Pendulums of varying lengths").to_edge(m.UP, buff=0.3)
+ self.play(m.Write(title))
+
+ t = m.ValueTracker(0.0)
+
+ def make_pendulum(i: int, length: float, pivot: np.ndarray):
+ freq = math.sqrt(G / length)
+
+ def bob_pos() -> np.ndarray:
+ theta = 0.55 * math.cos(freq * t.get_value())
+ return pivot + length * np.array(
+ [math.sin(theta), -math.cos(theta), 0.0]
+ )
+
+ return (
+ m.always_redraw(
+ lambda: m.Line(pivot, bob_pos(), color=m.WHITE, stroke_width=1.5)
+ ),
+ m.always_redraw(lambda: m.Dot(bob_pos(), color=m.YELLOW, radius=0.08)),
+ )
+
+ for i in range(NUM):
+ length = 1.5 + i * 0.15
+ pivot = np.array([-5.0 + i * 0.85, 2.5, 0.0])
+ rod, dot = make_pendulum(i, length, pivot)
+ self.add(rod, dot)
+
+ self.play(t.animate.set_value(14.0), run_time=10.0, rate_func=m.linear)
+ self.wait(1.0)
diff --git a/scripts/benchmark/scenes/pendulums_manimgx.py b/scripts/benchmark/scenes/pendulums_manimgx.py
new file mode 100644
index 00000000..f87bc5d0
--- /dev/null
+++ b/scripts/benchmark/scenes/pendulums_manimgx.py
@@ -0,0 +1,41 @@
+import math
+
+import numpy as np
+
+import manimgx as m
+
+NUM = 12
+G = 9.8
+
+
+class TeacherScene(m.Scene):
+ def construct(self) -> None:
+ title = m.Tex("Pendulums of varying lengths").to_edge(m.UP, buff=0.3)
+ self.play(m.Write(title))
+
+ t = m.ValueTracker(0.0)
+
+ def make_pendulum(i: int, length: float, pivot: np.ndarray):
+ freq = math.sqrt(G / length)
+
+ def bob_pos() -> np.ndarray:
+ theta = 0.55 * math.cos(freq * t.get_value())
+ return pivot + length * np.array(
+ [math.sin(theta), -math.cos(theta), 0.0]
+ )
+
+ return (
+ m.always_redraw(
+ lambda: m.Line(pivot, bob_pos(), color=m.WHITE, stroke_width=1.5)
+ ),
+ m.always_redraw(lambda: m.Dot(bob_pos(), color=m.YELLOW, radius=0.08)),
+ )
+
+ for i in range(NUM):
+ length = 1.5 + i * 0.15
+ pivot = np.array([-5.0 + i * 0.85, 2.5, 0.0])
+ rod, dot = make_pendulum(i, length, pivot)
+ self.add(rod, dot)
+
+ self.play(t.animate.set_value(14.0), run_time=10.0, rate_func=m.linear)
+ self.wait(1.0)
diff --git a/scripts/benchmark/scenes/quality_manim.py b/scripts/benchmark/scenes/quality_manim.py
new file mode 100644
index 00000000..8e40d3b8
--- /dev/null
+++ b/scripts/benchmark/scenes/quality_manim.py
@@ -0,0 +1,116 @@
+import argparse
+import math
+import sys
+from pathlib import Path
+
+import numpy as np
+from lighting import LIGHTS, PHI, ROUGHNESS, THETA, TIME
+from PIL import Image
+from suite_data import COLORS, ring_pose, torus_point
+
+parser = argparse.ArgumentParser()
+parser.add_argument("--engine", required=True)
+parser.add_argument("--out", type=Path, required=True)
+args = parser.parse_args()
+sys.argv = [sys.argv[0]]
+
+if args.engine == "manimgl":
+ import manimlib as m
+elif args.engine == "manim_ce":
+ import manim as m
+else:
+ import manimgx as m
+
+GL = args.engine == "manimgl"
+GX = args.engine == "manimgx"
+if not GL:
+ m.config.pixel_width, m.config.pixel_height = 1920, 1080
+ m.config.frame_rate = 60
+ m.config.background_color = "#000000"
+ m.config.background_opacity = 0
+
+
+class Still(m.ThreeDScene):
+ def construct(self):
+ if GL:
+ self.frame.reorient(math.degrees(THETA) + 90, math.degrees(PHI))
+ self.frame.set_focal_distance(20)
+ else:
+ self.set_camera_orientation(phi=PHI, theta=THETA, focal_distance=20)
+ self.camera.light_source.move_to(LIGHTS[0][0] * 10000)
+ for i in range(8):
+ if GL:
+ obj = m.ParametricSurface(
+ torus_point,
+ u_range=(0, 2 * np.pi),
+ v_range=(0, 2 * np.pi),
+ resolution=(33, 9),
+ color=m.Color(
+ rgb=np.clip(
+ np.array(m.Color(COLORS[i % 5]).get_rgb()) - 0.18, 0, 1
+ )
+ ),
+ )
+ else:
+ obj = m.Surface(
+ torus_point,
+ u_range=(0, 2 * np.pi),
+ v_range=(0, 2 * np.pi),
+ resolution=(32, 8),
+ fill_color=COLORS[i % 5]
+ if GX
+ else m.ManimColor(
+ np.clip(m.ManimColor(COLORS[i % 5]).to_rgb() - 0.24, 0, 1)
+ ),
+ fill_opacity=1,
+ stroke_width=0,
+ checkerboard_colors=False,
+ )
+ rotation, position = ring_pose(i, TIME)
+ obj.apply_matrix(rotation).move_to(position)
+ if GX:
+ obj.set_material(
+ m.Material(metallic=0, roughness=ROUGHNESS, reflectance=0.5)
+ )
+ self.add(obj)
+ if GX:
+ self.camera.tone_mapping = "linear"
+ self.camera.exposure = 1
+ self.camera.bloom = 0
+ self.camera.ambient_occlusion = 0
+ for direction, intensity, shadows in LIGHTS:
+ self.add(m.SunLight(direction, intensity=intensity, shadows=shadows))
+ self.wait(1 / 60)
+
+
+args.out.parent.mkdir(parents=True, exist_ok=True)
+if GX:
+
+ def keep(frame):
+ pixels = np.frombuffer(frame.pixels(), np.uint8).reshape(1080, 1920, 4)
+ Image.fromarray(pixels).save(args.out)
+
+ Still().render(None, frames=keep)
+elif GL:
+ scene = Still(
+ window=None,
+ camera_config={
+ "resolution": (1920, 1080),
+ "fps": 60,
+ "background_color": "#000000",
+ "background_opacity": 0,
+ },
+ file_writer_config={"write_to_movie": False, "save_last_frame": False},
+ )
+ scene.construct()
+ scene.update_frame(force_draw=True)
+ scene.get_image().save(args.out)
+else:
+ m.config.media_dir = str(args.out.parent / "ce-media")
+ m.config.disable_caching = True
+ m.config.write_to_movie = False
+ scene = Still()
+ scene.construct()
+ scene.renderer.update_frame(scene)
+ Image.fromarray(scene.renderer.get_frame()).save(args.out)
+print(args.out)
diff --git a/scripts/benchmark/scenes/suite_blender.py b/scripts/benchmark/scenes/suite_blender.py
new file mode 100644
index 00000000..a99241a8
--- /dev/null
+++ b/scripts/benchmark/scenes/suite_blender.py
@@ -0,0 +1,184 @@
+"""Blender geometry utilities and orbiting planets."""
+
+import argparse
+import math
+import sys
+from pathlib import Path
+
+import bpy
+import numpy as np
+
+sys.path.insert(0, str(Path(__file__).parent))
+from suite_data import (
+ COLORS,
+ FPS,
+ HEIGHT,
+ SECONDS,
+ WIDTH,
+ moon_position,
+ planet_position,
+)
+
+
+def material(color):
+ if color in bpy.data.materials:
+ return bpy.data.materials[color]
+ rgb = [int(color[i : i + 2], 16) / 255 for i in (1, 3, 5)]
+ rgb = [v / 12.92 if v <= 0.04045 else ((v + 0.055) / 1.055) ** 2.4 for v in rgb]
+ result = bpy.data.materials.new(color)
+ result.diffuse_color = (*rgb, 1)
+ result.use_nodes = True
+ result.node_tree.nodes["Principled BSDF"].inputs["Base Color"].default_value = (
+ *rgb,
+ 1,
+ )
+ result.node_tree.nodes["Principled BSDF"].inputs["Roughness"].default_value = 0.45
+ return result
+
+
+def finish(color, smooth=False):
+ obj = bpy.context.object
+ obj.data.materials.append(material(color))
+ if smooth:
+ for face in obj.data.polygons:
+ face.use_smooth = True
+ return obj
+
+
+def sphere(radius, color, resolution=(16, 8)):
+ bpy.ops.mesh.primitive_uv_sphere_add(
+ segments=resolution[0], ring_count=resolution[1], radius=radius
+ )
+ return finish(color, True)
+
+
+def line(points, color, width=4):
+ data = bpy.data.curves.new("stroke", "CURVE")
+ data.dimensions = "3D"
+ data.bevel_depth, data.bevel_resolution = (width * 0.005, 1)
+ spline = data.splines.new("POLY")
+ spline.points.add(len(points) - 1)
+ obj = bpy.data.objects.new("stroke", data)
+ bpy.context.collection.objects.link(obj)
+ data.materials.append(material(color))
+ update_line(obj, points)
+ return obj
+
+
+def update_line(obj, points):
+ points = np.asarray(points)
+ obj.data.splines[0].points.foreach_set(
+ "co", np.column_stack([points, np.ones(len(points))]).ravel()
+ )
+
+
+def make_scene(name):
+ updates = []
+ sphere(0.65, COLORS[3])
+ for i in range(5):
+ planet, moon = (sphere(0.28, COLORS[i]), sphere(0.1, "#DDDDDD", (8, 4)))
+ updates.extend(
+ [
+ lambda t, obj=planet, i=i: setattr(
+ obj, "location", planet_position(i, t)
+ ),
+ lambda t, obj=moon, i=i: setattr(obj, "location", moon_position(i, t)),
+ ]
+ )
+ return updates
+
+
+def setup(args):
+ bpy.ops.wm.read_factory_settings(use_empty=True)
+ scene = bpy.context.scene
+ scene.render.engine = {"workbench": "BLENDER_WORKBENCH", "eevee": "BLENDER_EEVEE"}[
+ args.engine
+ ]
+ scene.render.resolution_x, scene.render.resolution_y = (args.width, args.height)
+ scene.render.resolution_percentage = 100
+ scene.render.fps = args.fps
+ scene.frame_start, scene.frame_end = (1, round(args.duration * args.fps))
+ scene.render.image_settings.media_type = "VIDEO"
+ scene.render.image_settings.file_format = "FFMPEG"
+ scene.render.ffmpeg.format = "MPEG4"
+ scene.render.ffmpeg.codec = "H264"
+ scene.render.ffmpeg.constant_rate_factor = "CUSTOM"
+ scene.render.ffmpeg.custom_constant_rate_factor = 23
+ scene.render.ffmpeg.ffmpeg_preset = "REALTIME"
+ scene.render.ffmpeg.gopsize = 250
+ scene.render.ffmpeg.use_max_b_frames = False
+ scene.render.ffmpeg.max_b_frames = 0
+ scene.render.filepath = args.out
+ scene.render.use_file_extension = False
+ scene.view_settings.view_transform = "Standard"
+ scene.world = bpy.data.worlds.new("world")
+ scene.world.color = (0, 0, 0)
+ scene.world.use_nodes = True
+ scene.world.node_tree.nodes["Background"].inputs["Color"].default_value = (
+ 0,
+ 0,
+ 0,
+ 1,
+ )
+ scene.display.shading.light = "STUDIO"
+ scene.display.shading.color_type = "MATERIAL"
+ scene.display.shading.background_type = "WORLD"
+ scene.display.render_aa = "8"
+ data = bpy.data.cameras.new("camera")
+ data.sensor_fit = "VERTICAL"
+ data.angle = 2 * math.atan(4 / 20)
+ data.clip_end = 100
+ camera = bpy.data.objects.new("camera", data)
+ bpy.context.collection.objects.link(camera)
+ scene.camera = camera
+ light = bpy.data.objects.new("sun", bpy.data.lights.new("sun", "SUN"))
+ light.data.energy = 3
+ light.rotation_euler = (math.radians(40), 0, math.radians(-30))
+ bpy.context.collection.objects.link(light)
+ for name, energy, angles in (
+ ("fill", 0.9, (55, 0, 150)),
+ ("lower_fill", 0.6, (150, 0, 60)),
+ ):
+ fill = bpy.data.objects.new(name, bpy.data.lights.new(name, "SUN"))
+ fill.data.energy = energy
+ fill.data.use_shadow = False
+ fill.rotation_euler = tuple(math.radians(value) for value in angles)
+ bpy.context.collection.objects.link(fill)
+ updates = make_scene(args.scene)
+
+ def frame(current, *_):
+ t = (current.frame_current - 1) / args.fps
+ phi, theta = (math.radians(65), math.radians(-45) + 0.24 * t)
+ camera.location = (
+ 20 * math.sin(phi) * math.cos(theta),
+ 20 * math.sin(phi) * math.sin(theta),
+ 20 * math.cos(phi),
+ )
+ camera.rotation_euler = (-camera.location).to_track_quat("-Z", "Y").to_euler()
+ for update in updates:
+ update(t)
+
+ bpy.app.handlers.frame_change_pre.append(frame)
+ scene.frame_set(1)
+ if args.validate:
+ for number in (1, max(1, scene.frame_end // 2), scene.frame_end):
+ scene.frame_set(number)
+ print(
+ f"Validated scene construction: {args.scene}, {len(scene.objects)} objects; no rendering"
+ )
+ else:
+ bpy.ops.render.render(animation=True)
+
+
+if __name__ == "__main__":
+ parser = argparse.ArgumentParser()
+ parser.add_argument("--scene", choices=["hierarchy"], required=True)
+ parser.add_argument("--engine", choices=["workbench", "eevee"], required=True)
+ parser.add_argument("--out", required=True)
+ parser.add_argument("--width", type=int, default=WIDTH)
+ parser.add_argument("--height", type=int, default=HEIGHT)
+ parser.add_argument("--fps", type=int, default=FPS)
+ parser.add_argument("--duration", type=float, default=SECONDS)
+ parser.add_argument("--validate", action="store_true")
+ ARGS = parser.parse_args(sys.argv[sys.argv.index("--") + 1 :])
+ setup(ARGS)
diff --git a/scripts/benchmark/scenes/suite_data.py b/scripts/benchmark/scenes/suite_data.py
new file mode 100644
index 00000000..85476610
--- /dev/null
+++ b/scripts/benchmark/scenes/suite_data.py
@@ -0,0 +1,46 @@
+"""Geometry and output settings for the five animation scenes."""
+
+import numpy as np
+
+SECONDS = 3.0
+WIDTH, HEIGHT, FPS = 1920, 1080, 60
+COLORS = ("#58C4DD", "#FC6255", "#83C167", "#FFFF00", "#9A72AC")
+DURATIONS = {
+ "orbit": 10.0,
+ "matrix": 7.2,
+ "pendulums": 13.0,
+ "hierarchy": 3.0,
+ "linked_rings": 3.0,
+}
+
+
+def planet_position(i, t):
+ angle = 2 * np.pi * i / 5 + (0.45 + 0.08 * i) * t
+ return np.array(
+ [2.5 * np.cos(angle), 2.5 * np.sin(angle), 0.35 * np.sin(2 * angle)]
+ )
+
+
+def moon_position(i, t):
+ angle = 2.4 * t + i
+ return planet_position(i, t) + 0.5 * np.array(
+ [np.cos(angle), np.sin(angle), np.sin(angle)]
+ )
+
+
+def torus_point(u, v):
+ radius = 0.58 + 0.11 * np.cos(v)
+ return np.array([radius * np.cos(u), radius * np.sin(u), 0.11 * np.sin(v)])
+
+
+def rotation_x(angle):
+ c, s = (np.cos(angle), np.sin(angle))
+ return np.array([[1, 0, 0], [0, c, -s], [0, s, c]])
+
+
+def ring_pose(i, t):
+ rotation = rotation_x(i % 2 * np.pi / 2 + 0.12 * np.sin(t + i * 0.3))
+ position = np.array(
+ [0.75 * (i - 3.5), 0.12 * np.sin(t + i * 0.3), 0.2 * np.sin(0.8 * t + i * 0.5)]
+ )
+ return (rotation, position)
diff --git a/scripts/benchmark/scenes/suite_manim.py b/scripts/benchmark/scenes/suite_manim.py
new file mode 100644
index 00000000..bc680bf2
--- /dev/null
+++ b/scripts/benchmark/scenes/suite_manim.py
@@ -0,0 +1,127 @@
+"""Orbiting planets and animated linked rings in the native Manim APIs."""
+
+import os
+
+import numpy as np
+from lighting import LIGHTS, ROUGHNESS
+from suite_data import (
+ COLORS,
+ SECONDS,
+ moon_position,
+ planet_position,
+ ring_pose,
+ torus_point,
+)
+
+ENGINE = os.environ.get("BENCH_ENGINE", "manimgx")
+if ENGINE == "manimgl":
+ import manimlib as m
+elif ENGINE == "manim_ce":
+ import manim as m
+else:
+ import manimgx as m
+GL = ENGINE == "manimgl"
+
+
+def sphere(radius, color, resolution=(16, 8)):
+ if GL:
+ return m.Sphere(
+ radius=radius, color=color, resolution=tuple(n + 1 for n in resolution)
+ )
+ return m.Sphere(
+ radius=radius,
+ resolution=resolution,
+ color=color,
+ fill_color=color,
+ fill_opacity=1,
+ stroke_width=0,
+ checkerboard_colors=False,
+ )
+
+
+def torus(color):
+ if GL:
+ return m.ParametricSurface(
+ torus_point,
+ u_range=(0, 2 * np.pi),
+ v_range=(0, 2 * np.pi),
+ resolution=(33, 9),
+ color=color,
+ )
+ obj = m.Surface(
+ torus_point,
+ u_range=(0, 2 * np.pi),
+ v_range=(0, 2 * np.pi),
+ resolution=(32, 8),
+ fill_color=color,
+ fill_opacity=1,
+ checkerboard_colors=False,
+ stroke_width=0,
+ )
+ if ENGINE == "manimgx":
+ obj.set_material(m.Material(metallic=0, roughness=ROUGHNESS, reflectance=0.5))
+ return obj
+
+
+def build_objects(name, duration=SECONDS):
+ objects, updates = ([], [])
+ if name == "hierarchy":
+ objects.append(sphere(0.65, COLORS[3]))
+ for i in range(5):
+ planet, moon = (sphere(0.28, COLORS[i]), sphere(0.1, "#DDDDDD", (8, 4)))
+ objects.extend([planet, moon])
+ updates.extend(
+ [
+ (planet, lambda obj, t, i=i: obj.move_to(planet_position(i, t))),
+ (moon, lambda obj, t, i=i: obj.move_to(moon_position(i, t))),
+ ]
+ )
+ else:
+ for i in range(8):
+ base = torus(COLORS[i % 5])
+ obj = base.copy()
+ objects.append(obj)
+
+ def update_pose(obj, t, i=i, base=base):
+ rotation, position = ring_pose(i, t)
+ obj.become(base.copy().apply_matrix(rotation).shift(position))
+
+ updates.append((obj, update_pose))
+ return (objects, updates)
+
+
+class Benchmark(m.ThreeDScene):
+ def construct(self):
+ name = os.environ["BENCH_SCENE"]
+ duration = float(os.environ.get("BENCH_DURATION", SECONDS))
+ timer = m.ValueTracker(0)
+ if GL:
+ self.frame.reorient(45, 65)
+ self.frame.set_focal_distance(20)
+ self.frame.add_updater(lambda frame, dt: frame.increment_theta(0.24 * dt))
+ else:
+ self.set_camera_orientation(phi=65 * m.DEGREES, theta=-45 * m.DEGREES)
+ self.begin_ambient_camera_rotation(rate=0.24)
+ if name == "linked_rings":
+ self.camera.light_source.move_to(LIGHTS[0][0] * 10000)
+ if ENGINE == "manimgx":
+ self.camera.tone_mapping = "linear"
+ self.camera.exposure = 1
+ self.camera.bloom = 0
+ self.camera.ambient_occlusion = 0
+ for direction, intensity, shadows in LIGHTS:
+ self.add(
+ m.SunLight(direction, intensity=intensity, shadows=shadows)
+ )
+ objects, updates = build_objects(name, duration)
+
+ def update_all(_):
+ for obj, update in updates:
+ update(obj, timer.get_value())
+
+ update_all(timer)
+ driver = m.Mobject().add_updater(update_all)
+ self.add(*objects, timer, driver)
+ self.play(
+ timer.animate.set_value(duration), run_time=duration, rate_func=m.linear
+ )
diff --git a/scripts/benchmark/scenes/two_d_blender.py b/scripts/benchmark/scenes/two_d_blender.py
new file mode 100644
index 00000000..5a291d40
--- /dev/null
+++ b/scripts/benchmark/scenes/two_d_blender.py
@@ -0,0 +1,187 @@
+"""Matrix multiplication and twelve pendulums in Blender."""
+
+import argparse
+import math
+import sys
+from pathlib import Path
+
+import bpy
+
+sys.path.insert(0, str(Path(__file__).parent))
+import suite_blender as base
+
+WHITE = "#FFFFFF"
+YELLOW = "#FFFF00"
+
+
+def flat_material(color):
+ mat = base.material(color)
+ nodes = mat.node_tree.nodes
+ nodes.clear()
+ emission = nodes.new("ShaderNodeEmission")
+ emission.inputs["Color"].default_value = mat.diffuse_color
+ output = nodes.new("ShaderNodeOutputMaterial")
+ mat.node_tree.links.new(emission.outputs[0], output.inputs["Surface"])
+ return mat
+
+
+def text(value, x, y, size=0.5, color=WHITE):
+ data = bpy.data.curves.new(value, "FONT")
+ data.body, data.size = value, size
+ data.align_x, data.align_y = "CENTER", "CENTER"
+ data.resolution_u = 12
+ data.materials.append(flat_material(color))
+ obj = bpy.data.objects.new(value, data)
+ bpy.context.collection.objects.link(obj)
+ obj.location = (x, y, 0.01)
+ return obj
+
+
+def stroke(points, width=0.015, color=WHITE):
+ obj = base.line([(x, y, 0) for x, y in points], color, width / 0.005)
+ obj.data.materials.clear()
+ obj.data.materials.append(flat_material(color))
+ return obj
+
+
+def brackets(left, right, center=0.6, height=1.65):
+ top, bottom = center + height / 2, center - height / 2
+ return [
+ stroke(
+ [(left + 0.12, top), (left, top), (left, bottom), (left + 0.12, bottom)]
+ ),
+ stroke(
+ [(right - 0.12, top), (right, top), (right, bottom), (right - 0.12, bottom)]
+ ),
+ ]
+
+
+def reveal(objects, alpha):
+ for i, obj in enumerate(objects):
+ local = max(0.0, min(1.0, alpha * len(objects) - i))
+ obj.hide_render = local <= 0
+ obj.scale = (max(0.001, local),) * 3
+
+
+def build_matrix():
+ first = brackets(-2.1, 0.1)
+ first += [
+ text(str(n), x, y)
+ for n, x, y in [(1, -1.6, 1), (2, -0.4, 1), (3, -1.6, 0.2), (1, -0.4, 0.2)]
+ ]
+ first += brackets(0.4, 1.35)
+ first += [text("2", 0.875, 1), text("1", 0.875, 0.2), text("=", 1.85, 0.6, 0.6)]
+ step = brackets(2.35, 5.95)
+ for row, formula in enumerate(("1 · 2 + 2 · 1", "3 · 2 + 1 · 1")):
+ for i, char in enumerate(formula):
+ if char != " ":
+ step.append(text(char, 2.65 + i * 0.25, 1 - row * 0.8, 0.425))
+ result = brackets(2.35, 3.25)
+ result += [text("4", 2.8, 1, 0.55, YELLOW), text("7", 2.8, 0.2, 0.55, YELLOW)]
+ for obj in result[:2]:
+ obj.data.materials.clear()
+ obj.data.materials.append(flat_material(YELLOW))
+
+ def update(t):
+ reveal(first, min(1, t))
+ alpha = max(0, min(1, (t - 4.2)))
+ reveal(step, max(0, min(1, (t - 1.4) / 2)))
+ if t >= 4.2:
+ for obj in step:
+ obj.hide_render = alpha >= 1
+ obj.scale = (max(0.001, 1 - alpha),) * 3
+ reveal(result, alpha)
+
+ return update
+
+
+def build_pendulums():
+ title_string = "Pendulums of varying lengths"
+ title = [
+ text(c, (i - (len(title_string) - 1) / 2) * 0.25, 3.45, 0.5)
+ for i, c in enumerate(title_string)
+ ]
+ objects = []
+ for i in range(12):
+ rod = stroke([(0, 0), (0, 1)], 0.0075)
+ bpy.ops.mesh.primitive_circle_add(vertices=32, radius=0.08, fill_type="NGON")
+ dot = bpy.context.object
+ dot.data.materials.append(flat_material(YELLOW))
+ objects.append((rod, dot))
+
+ def update(t):
+ reveal(title, min(1, t / 2))
+ clock = max(0, min(14, (t - 2) * 1.4))
+ for i, (rod, dot) in enumerate(objects):
+ length = 1.5 + i * 0.15
+ theta = 0.55 * math.cos(math.sqrt(9.8 / length) * clock)
+ pivot = (-5 + i * 0.85, 2.5, 0)
+ bob = (
+ pivot[0] + length * math.sin(theta),
+ pivot[1] - length * math.cos(theta),
+ 0,
+ )
+ rod.hide_render = dot.hide_render = t < 2
+ base.update_line(rod, [pivot, bob])
+ dot.location = bob
+
+ return update
+
+
+parser = argparse.ArgumentParser()
+parser.add_argument("--scene", required=True, choices=["matrix", "pendulums"])
+parser.add_argument("--engine", required=True, choices=["workbench", "eevee"])
+parser.add_argument("--out", required=True)
+parser.add_argument("--preview", type=float)
+args = parser.parse_args(sys.argv[sys.argv.index("--") + 1 :])
+bpy.ops.wm.read_factory_settings(use_empty=True)
+scene = bpy.context.scene
+scene.render.engine = {"workbench": "BLENDER_WORKBENCH", "eevee": "BLENDER_EEVEE"}[
+ args.engine
+]
+scene.render.resolution_x, scene.render.resolution_y = 1920, 1080
+scene.render.resolution_percentage = 100
+scene.render.fps = 60
+scene.frame_start = 1
+scene.frame_end = 432 if args.scene == "matrix" else 780
+scene.view_settings.view_transform = "Standard"
+scene.world = bpy.data.worlds.new("world")
+scene.world.color = (0, 0, 0)
+scene.display.shading.light = "FLAT"
+scene.display.shading.color_type = "MATERIAL"
+scene.display.shading.background_type = "WORLD"
+scene.display.render_aa = "8"
+data = bpy.data.cameras.new("camera")
+data.type = "ORTHO"
+data.ortho_scale = 128 / 9
+camera = bpy.data.objects.new("camera", data)
+bpy.context.collection.objects.link(camera)
+camera.location = (0, 0, 20)
+scene.camera = camera
+update = build_matrix() if args.scene == "matrix" else build_pendulums()
+
+
+def frame(current, *_):
+ update((current.frame_current - 1) / 60)
+
+
+bpy.app.handlers.frame_change_pre.append(frame)
+scene.frame_set(1)
+scene.render.filepath = args.out
+scene.render.use_file_extension = False
+if args.preview is not None:
+ scene.frame_set(round(args.preview * 60) + 1)
+ scene.render.image_settings.file_format = "PNG"
+ bpy.ops.render.render(write_still=True)
+else:
+ scene.render.image_settings.media_type = "VIDEO"
+ scene.render.image_settings.file_format = "FFMPEG"
+ scene.render.ffmpeg.format = "MPEG4"
+ scene.render.ffmpeg.codec = "H264"
+ scene.render.ffmpeg.constant_rate_factor = "CUSTOM"
+ scene.render.ffmpeg.custom_constant_rate_factor = 23
+ scene.render.ffmpeg.ffmpeg_preset = "REALTIME"
+ scene.render.ffmpeg.gopsize = 250
+ scene.render.ffmpeg.use_max_b_frames = False
+ scene.render.ffmpeg.max_b_frames = 0
+ bpy.ops.render.render(animation=True)
diff --git a/tests/benchmarks/test_comparison.py b/tests/benchmarks/test_comparison.py
new file mode 100644
index 00000000..28e9e436
--- /dev/null
+++ b/tests/benchmarks/test_comparison.py
@@ -0,0 +1,126 @@
+"""Process isolation, video validation, aggregation and chart scaling."""
+
+import argparse
+import json
+import sys
+from pathlib import Path
+
+import numpy as np
+import pytest
+from scripts.benchmark import chart, run
+from scripts.benchmark.scenes.suite_data import ring_pose
+
+
[email protected]("timeout", [False, True])
+def test_unsuccessful_processes_are_retained(
+ tmp_path: Path, monkeypatch: pytest.MonkeyPatch, timeout: bool
+) -> None:
+ code = (
+ "import time; print('started', flush=True); time.sleep(30)"
+ if timeout
+ else "import sys; print('failed deliberately', flush=True); sys.exit(7)"
+ )
+ monkeypatch.setattr(run, "command", lambda *args: [sys.executable, "-c", code])
+ args = argparse.Namespace(out=tmp_path, timeout=0.5, dry_run=False)
+ result = run.run_one("manimgx", "linked_rings", 1, args)
+ assert result.status == ("timeout" if timeout else "failed")
+ assert result.wall_seconds < 5
+ assert not result.video
+ assert Path(result.log).exists()
+ assert ("started" if timeout else "failed deliberately") in result.error
+
+
+def test_a_run_never_overwrites_an_existing_run(tmp_path: Path) -> None:
+ folder = tmp_path / "linked_rings/manimgx/1"
+ folder.mkdir(parents=True)
+ marker = folder / "retained.txt"
+ marker.write_text("measurement", encoding="utf-8")
+ with pytest.raises(FileExistsError):
+ run.run_one("manimgx", "linked_rings", 1, argparse.Namespace(out=tmp_path))
+ assert marker.read_text(encoding="utf-8") == "measurement"
+
+
[email protected]("tool", run.TOOLS)
+def test_encoder_options_must_match_fastest_preset_and_crf18(
+ tmp_path: Path, tool: str
+) -> None:
+ path = tmp_path / "out.mp4"
+ options = (
+ "crf=18.0 subme=1 me=dia bframes=0"
+ if tool.startswith("blender_")
+ else "crf=18.0 cabac=0 subme=0 bframes=0"
+ )
+ path.write_bytes(f"x264 - core 165 - options: {options}\x00".encode())
+ assert "crf=18.0" in run.encoder_evidence(path, tool)
+ path.write_bytes(path.read_bytes().replace(b"crf=18.0", b"crf=23.0"))
+ with pytest.raises(ValueError, match="Unexpected encoder"):
+ run.encoder_evidence(path, tool)
+
+
+def test_only_gx_can_use_explicit_cli_encoding_evidence(tmp_path: Path) -> None:
+ path = tmp_path / "out.mp4"
+ path.write_bytes(b"no x264 options")
+ assert "Explicit ultrafast" in run.encoder_evidence(path, "manimgx")
+ for tool in run.TOOLS[1:]:
+ with pytest.raises(ValueError, match="Unexpected encoder"):
+ run.encoder_evidence(path, tool)
+
+
+def test_totals_require_every_scene_and_repeat() -> None:
+ samples = [
+ run.Run("orbit", "manimgx", i, [], status="complete", wall_seconds=value)
+ for i, value in enumerate((1, 3), 1)
+ ]
+ result = run.summarize(samples, ["orbit", "linked_rings"], {"manimgx": 2})
+ assert not result["complete"]
+ assert result["totals"] == {}
+ samples += [
+ run.Run("linked_rings", "manimgx", i, [], status="complete", wall_seconds=value)
+ for i, value in enumerate((2, 8), 1)
+ ]
+ assert run.summarize(samples, ["orbit", "linked_rings"], {"manimgx": 2})[
+ "totals"
+ ] == {"manimgx": 7}
+ samples[-1].status = "invalid"
+ assert not run.summarize(samples, ["orbit", "linked_rings"], {"manimgx": 2})[
+ "complete"
+ ]
+
+
+def test_recorded_totals_match_every_run() -> None:
+ data = json.loads((run.HERE / "results.json").read_text())
+ rows = [
+ run.Run(
+ r["scene"],
+ r["tool"],
+ r["repeat"],
+ [],
+ status=r["status"],
+ wall_seconds=r["wall_seconds"],
+ )
+ for r in data["runs"]
+ ]
+ result = run.summarize(rows, list(run.DURATIONS), run.REPEATS)
+ assert len(rows) == 45
+ assert result["complete"]
+ assert result["totals"] == data["totals"]
+ assert result["per_scene"] == data["per_scene"]
+
+
+def test_normalized_chart_preserves_ratios() -> None:
+ totals = {"manimgx": 2.0, "manimgl": 10.0, "manim_ce": 20.0}
+ rows = chart.normalized_rows(totals)
+ assert rows == [("ManimGX", 1), ("ManimGL", 5), ("ManimCE", 10)]
+ assert (
+ chart.normalized_rows({tool: seconds * 10 for tool, seconds in totals.items()})
+ == rows
+ )
+
+
[email protected]("t", [0, 0.75, 1.5, 2.25, 3])
+def test_ring_poses_remain_rigid(t: float) -> None:
+ for i in range(8):
+ rotation, position = ring_pose(i, t)
+ np.testing.assert_allclose(rotation.T @ rotation, np.eye(3), atol=1e-12)
+ assert np.linalg.det(rotation) == pytest.approx(1)
+ assert np.isfinite(position).all()