aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/build_blender.py
diff options
context:
space:
mode:
authorElvis Claros Castro <elvis@claros.ar>2026-09-26 20:50:41 -0300
committerElvis Claros Castro <elvis@claros.ar>2026-09-26 20:50:41 -0300
commitfafaebb051907a848a9406f9da19669c81a83a3b (patch)
treec30ea26e6b549e5523af2bae5c39569e9a946b12 /scripts/build_blender.py
parent59355909f2de9236af8168a26c70bcf6caa3b285 (diff)
download100cia-videos-fafaebb051907a848a9406f9da19669c81a83a3b.tar.gz
100cia-videos-fafaebb051907a848a9406f9da19669c81a83a3b.zip
Translate code, comments and logs to English; English README; configurable paths and env varsHEADmain
Identifiers, docstrings, comments and console messages are now in English. Narration, subtitles and on-screen text stay in Spanish (they are the video content). The Blender <-> Godot physics protocol uses English keys and body prefixes chosen to keep the original creation order, so cached simulations and renders stay bit-identical. The old Spanish environment variable names are still accepted.
Diffstat (limited to 'scripts/build_blender.py')
-rw-r--r--scripts/build_blender.py32
1 files changed, 16 insertions, 16 deletions
diff --git a/scripts/build_blender.py b/scripts/build_blender.py
index 41731cf..1a80d97 100644
--- a/scripts/build_blender.py
+++ b/scripts/build_blender.py
@@ -1,10 +1,10 @@
# -*- coding: utf-8 -*-
-"""Arma el video final de las escenas hechas en Blender.
+"""Builds the final video of the scenes made in Blender.
-Compone en una sola pasada de ffmpeg:
- fondo punteado + secuencia PNG con alfa (3D) + overlay de Manim + audio
-El overlay trae chip, barra de progreso y subtitulos, o sea que el estilo sale
-del mismo codigo que los videos de Manim.
+Composites in a single ffmpeg pass:
+ dotted background + PNG sequence with alpha (3D) + Manim overlay + audio
+The overlay carries the chip, progress bar and subtitles, so the style comes
+from the same code as the Manim videos.
"""
import glob, os, subprocess, sys
@@ -15,23 +15,23 @@ import build_video
FPS = 30
-def componer(name, con_musica=True):
- fondo = os.path.join(ROOT, "media", "images", "overlay", "fondo.png")
- carpeta = os.path.join(ROOT, "render", name)
- seq = os.path.join(carpeta, "f%04d.png")
+def compose(name, add_music=True):
+ background = os.path.join(ROOT, "media", "images", "overlay", "fondo.png")
+ folder = os.path.join(ROOT, "render", name)
+ seq = os.path.join(folder, "f%04d.png")
overlay = os.path.join(ROOT, "media", "videos", "overlay", "1920p30", f"{name}.mov")
- for p in (fondo, overlay):
+ for p in (background, overlay):
if not os.path.exists(p):
- raise SystemExit(f"falta {p}")
- n = len(glob.glob(os.path.join(carpeta, "f*.png")))
+ raise SystemExit(f"missing {p}")
+ n = len(glob.glob(os.path.join(folder, "f*.png")))
if n < 30:
- raise SystemExit(f"[{name}] solo hay {n} frames renderizados")
+ raise SystemExit(f"[{name}] only {n} frames rendered")
- wav = build_video.build_track(name, con_musica)
+ wav = build_video.build_track(name, add_music)
out = os.path.join(ROOT, "out", f"{name}.mp4")
cmd = [
"ffmpeg", "-v", "error", "-y",
- "-loop", "1", "-framerate", str(FPS), "-i", fondo,
+ "-loop", "1", "-framerate", str(FPS), "-i", background,
"-framerate", str(FPS), "-start_number", "1", "-i", seq,
"-i", overlay,
"-i", wav,
@@ -55,4 +55,4 @@ def componer(name, con_musica=True):
if __name__ == "__main__":
for n in (sys.argv[1:] or ["bolapeluda", "caos", "diferencial"]):
- componer(n)
+ compose(n)