Skip to content

A local video studio for your coding agent. Describe a video in one sentence: your agent directs, your machine renders. Claude Code, Codex, Cursor, Devin and more. No API keys, no uploads.

showtime 0.4.1 (draft): all lanes, the last review's fixes, examples, version 0.4.1; CI fixes for Windows and arm64

Favio Vázquez2be5fbf05dec
diff --git a/skills/showtime/setup/setup.py b/skills/showtime/setup/setup.py
index 9682d12..350a3b6 100755
--- a/skills/showtime/setup/setup.py
+++ b/skills/showtime/setup/setup.py
@@ -1116,6 +1116,15 @@ class Installer:
h.update(("|".join(sorted(extra)) + "|" + python_request(self.key)).encode())
return h.hexdigest()[:16]
+ def _venv_says(self, code: str) -> Optional[str]:
+ """What the venv's python prints for `code`, or None when it cannot run: a half-deleted venv, or a
+ python.exe for another architecture (WinError 216) is a venv to recreate, not a setup crash."""
+ try:
+ cp = run([str(self.vpy), "-c", code], timeout=300)
+ except (OSError, subprocess.SubprocessError):
+ return None
+ return cp.stdout.strip() if cp.returncode == 0 else None
+
def step_python(self) -> Tuple[str, str]:
uv = self.find_uv()
if not uv:
@@ -1123,15 +1132,11 @@ class Installer:
venv = self.home / "venv"
env = dict(self.env_common)
env.setdefault("UV_PYTHON_DOWNLOADS", "automatic")
- pyv = None
- if self.vpy.exists():
- cp = run([str(self.vpy), "-c", "import sys; print('%d.%d' % sys.version_info[:2])"])
- pyv = cp.stdout.strip() if cp.returncode == 0 else None
- why = "--force" if self.args.force else ("python %s" % pyv if pyv != PY_VERSION else "")
+ pyv = self._venv_says("import sys; print('%d.%d' % sys.version_info[:2])") if self.vpy.exists() else None
+ why = "--force" if self.args.force else ("python %s" % (pyv or "unknown") if pyv != PY_VERSION else "")
want_plat = VENV_PLATFORM.get(self.key)
if not why and want_plat:
- cp = run([str(self.vpy), "-c", "import sysconfig; print(sysconfig.get_platform())"])
- have = cp.stdout.strip()
+ have = self._venv_says("import sysconfig; print(sysconfig.get_platform())")
if have != want_plat:
why = "%s Python, %s needed" % (have or "unknown", want_plat)
trash = self.home / "cache" / "trash"
diff --git a/skills/showtime/tests/test_os_install.py b/skills/showtime/tests/test_os_install.py
index e49ee57..cd103dd 100644
--- a/skills/showtime/tests/test_os_install.py
+++ b/skills/showtime/tests/test_os_install.py
@@ -200,6 +200,16 @@ class TestForceVenv(Tmp):
self.assertIn("a running showtime process uses it", detail)
self.assertIn("MCP server", detail)
+ def test_a_venv_python_that_cannot_start_is_recreated_not_a_crash(self):
+ # a half-deleted venv, or (Windows) a python.exe that is not a runnable binary: WinError 216
+ su = setup_mod()
+ home = self.tmp / "home"
+ args = su.parse_args(["--home", str(home)])
+ inst = su.Installer(args)
+ inst.vpy.parent.mkdir(parents=True)
+ inst.vpy.write_bytes(b"MZ") # not executable on POSIX, not a valid image on Windows
+ self.assertIsNone(inst._venv_says("print(1)"))
+
def test_launchers_run_setup_outside_the_venv(self):
cmd = (SKILL / "bin" / "showtime.cmd").read_text(encoding="utf-8")
self.assertLess(cmd.index('if /i "%~1"=="setup" goto findpy'), cmd.index('goto venv'))
diff --git a/skills/showtime/tests/test_poster_colour.py b/skills/showtime/tests/test_poster_colour.py
index 349a22d..fa463bf 100644
--- a/skills/showtime/tests/test_poster_colour.py
+++ b/skills/showtime/tests/test_poster_colour.py
@@ -119,8 +119,11 @@ class StillsFromAVideo(Tmp):
def test_the_source_and_the_video_frame(self):
self.assertPatches(self.src, "source PNG")
+ # the frame as showtime pulls a PNG still (ff.still_args): ffmpeg's default conversion out of 4:2:0 is
+ # not exact and differs by CPU (its plain C path, used on arm64 builds, reads each patch 2-3 levels darker
+ # than x86's SIMD path; with exact rounding both match)
png = self.tmp / "frame-out.png"
- ff.run_ffmpeg(["-ss", "0.5", "-i", self.video, "-frames:v", "1", png])
+ ff.run_ffmpeg(["-ss", "0.5", "-i", self.video, "-frames:v", "1"] + ff.still_args(png) + [png])
self.assertPatches(png, "video frame as PNG")
def test_deliver_poster_jpeg(self):