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.
Python agent-skillsai-agentscaptionsclaude-codeclaude-code-pluginclaude-skillscodexcursorexplainer-videoffmpegheadless-chromekokoro-ttslocal-firstmanimmcp-servermotion-graphicstext-to-speechvideovideo-editingvideo-generation
showtime 0.3.2
Favio Vázquez015c2d9a1075
diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.jsonindex 79f64ed..eaceae9 100644--- a/.claude-plugin/marketplace.json+++ b/.claude-plugin/marketplace.json@@ -5,14 +5,14 @@},"metadata": {"description": "showtime: a local video studio for your coding agent",- "version": "0.3.1"+ "version": "0.3.2"},"plugins": [{"name": "showtime","source": "./","description": "A local video studio for your coding agent. Describe a video. Your agent directs. Your machine renders. Motion graphics, voice-over, music, footage editing, captions and platform-ready exports, with no cloud AI services or API keys.",- "version": "0.3.1",+ "version": "0.3.2","author": {"name": "Favio Vazquez"},diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.jsonindex 3689fc3..5fde098 100644--- a/.claude-plugin/plugin.json+++ b/.claude-plugin/plugin.json@@ -1,6 +1,6 @@{"name": "showtime",- "version": "0.3.1",+ "version": "0.3.2","description": "A local video studio for your coding agent. Describe a video. Your agent directs. Your machine renders. Motion graphics rendered frame-exactly, voice-over, music and sound design, footage editing from transcripts, captions and platform-ready exports. Everything runs on your machine.","author": {"name": "Favio Vazquez"diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 321a93d..ce06889 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -5,6 +5,109 @@ All notable changes to showtime. Each entry says what changed and why, so this f`skills/showtime/lib/st/__init__.py` and `python3 scripts/check_release.py` keeps the plugin manifests, the registry files and`setup/package.json` in sync with it.+## 0.3.2 (2026-09-30)++- **The music catalog widens beyond its two main composers: 48 new tracks (249 to 297), 11 of them new artists.**+ Alexandr Zhelanov (13), Matthew Pablo (11), Of Far Different Nature, Zane Little, TAD, The Cynic Project,+ Clement Panchout, tcarisland, Machine, FoxSynergy and omfgdude from their own OpenGameArt pages (a new+ `opengameart` source: CC BY 3.0/4.0 or CC0 as each page states, fetched one file at a time, 10 s apart as the+ site's robots.txt asks), plus three more Komiku tracks (Internet Archive) and three more of Kimiko Ishizaka's Open+ Goldberg Variations (Wikimedia Commons). Every file was downloaded once, measured and passed the quality gate;+ tracks that clipped, were mono or had a dead gap were left out. Sascha Ende's library was not added: ende.app+ needs an account to download and limits bots.+- **Music rotates between videos.** The catalog ranking was the same for every similar brief, so most videos got the+ same few tracks, mostly by the same two composers. Each finished job's music (track, composer, shelf; a composed+ bed's style and seed) is now kept in the local look history, and `audio music pick`/`search` and+ `{"catalog": {"use": ...}}` rank tracks heard in the last 8 jobs lower, composers of the last 3 a little lower, and+ choose among near-equal tracks with a seed that changes with every finished job (a recorded job keeps its track).+ Lists never give one composer more than 2 of 5 places in a row when another scores close. `showtime history check`+ warns when a track or composer repeats a recent job and names two alternatives by other composers. An explicit id+ always wins; `showtime history off` or `SHOWTIME_MUSIC_ROTATION=off` turns rotation off.+- **Every film project gets its own score.** Videos made from the film template all played the template's+ worked-example score (D major, 80 bpm, one motif). `showtime new film` now writes score.js from a signature picked+ from curated tables for the brief's mood (calm, upbeat, tension, playful, cinematic): key and mode, a tempo and+ meter that keep the cues on bar lines, a progression, a motif, the instruments and the drums, away from the scores+ of recent jobs. The look history records it, `showtime history check` warns on a repeated score (or an unchanged+ score.js), and `showtime audio film-score <dir> [--mood M]` writes another. The music guide now says a produced+ track is the usual bed for a mood piece "with music".+- **Composed beds vary per project.** A compose track with `"seed": "auto"` takes its seed from the project and,+ unless a key is given, moves the style's key by up to a fourth; the dom, data and short templates use it, so two+ videos started from one template no longer share a bed. `audio music check` now also refuses tracks without a+ `verified` date or that fail the gate's length or lead-in silence limits, so new tracks can be added as data only.+- **No bulk downloads from creators who ask for none.** `showtime setup --full` (and `audio music fetch --all`,+ `--for`, `--shelf`) pre-fetched every catalog track, including all of Scott Buckley's from his own site, whose+ terms ask for one track per request and never bulk. A source can now say `"bulk": false`; a bulk pre-fetch skips+ its tracks (unless a `--seed` folder has them) and says they download on first use. Tracks named by id still+ download. `--full` is about 1.5 GB smaller.+- **`review-pack` works on a silent video.** Packing a video without an audio track stopped at "file not found:+ loudness.json"; the pack now skips the loudness plot. Two other places that meant "no file, no settings"+ (a project without showtime.json, a job without job.json) no longer stop on the missing file either.+- **A model mirror for sandboxes.** In the Claude app, `showtime setup` ran but the sandbox's proxy answered 403 for+ Hugging Face and GitHub LFS, so the Kokoro voice model and the YuNet face detector never arrived and voice-over+ and reframing failed. The shared downloader (setup, first-use fetches, the word aligner) now tries the primary+ host, then the mirror bases listed in `lib/st/mirror.json` (release assets under the `models-v1` tag of this+ repository) when the primary refuses (403/407, a proxy's block page, a failed tunnel, no route); after one refusal+ a host's later files go straight to the mirror. Every copy is sha256-verified, and a mismatch is never kept.+ `SHOWTIME_MODEL_MIRROR` adds a mirror (a base URL, or a local folder checked before any network; `off` disables+ them), and when every source fails the error names the blocked hosts and the file to provide. The mirror covers+ the default install and first-use models (18 files, 1.35 GB); opt-in extras and Piper voices are not mirrored.+ `scripts/stage_model_mirror.py` downloads and verifies the files, writes LICENSES.txt and prints the+ `gh release` commands. `showtime doctor` reports a blocked Hugging Face with a reachable mirror as a warning,+ not a failure. docs/agents.md has a Claude app section.+- **The receipt reads Devin's usage.** Under Devin (or `showtime receipt --transcript <sessions.db> --host devin`)+ the receipt opens the Devin CLI's session database read-only and selects only each request's model id, time and+ token metrics, from the sessions that worked in the job's folder; a message stored in several nodes counts once.+ It names the agent, the models (a Fusion session lists the lead and the sidekick with their share of the tokens)+ and the request count. Devin reports tokens, not dollars, so the cost is an estimate at its listed per-token+ prices (dated) and is labelled "est., at listed prices".+- **Pairwise rounds count both orders.** A pairwise round keeps one FINDINGS.md per order (order-1/, order-2/);+ the receipt counted neither. It now counts the round as answered when both orders are, and lists the number of+ FINDINGS files and pairwise rounds.+- **The receipt flags a lead self-review.** Findings saved in a session where no sub-agent ran (the lead model+ reviewing its own or its sidekick's build) now read "not an independent critic".+- **qa judges a footage edit by its own length.** In a footage job whose `cards/` sub-project is the job's project,+ qa compared the 30 s edit with the cards' 5.5 s and failed it. An edit render is now checked against its edit+ render report, a sub-project's render.json that names another video is ignored, and the sub-project's settings+ no longer apply to the edit.+- **qa compares the poster still with its video frame.** New `poster_mismatch` WARN: the render's poster differs+ from the video frame at its time by more than 4 mean luma levels, or its PNG carries colour chunks (gAMA, cHRM,+ cICP, iCCP) that make browsers draw it darker than the video.+- **Stills match the video's brightness.** PNG stills from `showtime snap` and `look` (and posters from+ `showtime deliver poster`) no longer carry cICP/cHRM/gAMA/iCCP/sRGB colour chunks. Chrome colour-managed them+ and drew a still from a BT.709 video about 13 levels darker than the same frame in `<video>`.+- **`showtime check`: decorative text is not short_text.** Text inside `data-st-decor` (and its descendants), or+ drawn as `F.decor`, no longer triggers `short_text` or counts toward the one-word-per-beat note.+- **Chart: a positive `yMin` sets the axis floor.** Ticks start there and bars grow from it; it was clamped to 0.+- **`export html` packs every image of a per-frame sequence.** The export's probe seeks every 0.5 s, so a page that+ swaps a numbered image per frame (`f_0030.png`, `f_0031.png`, ...) shipped only the few it landed on. Around the+ times a numbered image sequence was requested, the probe now visits every frame.+- **The quality floor.** A 30 s clip made from a screen recording passed `showtime qa` and won a blind pairwise+ round against the previous pass, yet looked cheap at full size: two-line captions in stepped boxes, a web+ player's controls in the footage, a small recording inside big empty borders. The critic had marked the+ captions should-fix, and the video shipped anyway because the pairwise only asks "better than the last version?".+ - **An absolute verdict.** Every critic answer (CRITIC.md, the pairwise briefs, the crew brief) now carries+ `WOULD I POST THIS: yes | no -- one reason`, judged on the video alone (pairwise: one line per video). In+ quality mode a "no" (for a pairwise round: either critic's "no" for the winning render) keeps the review+ pending like "not ready", even when the pairwise preferred the render; a missing line keeps the round+ pending too. `review-verdict` records it (`would_post` in verdict.json, VERDICT.md, its printout), and the+ review state (`status`, `qa`, the receipt) carries it per round. The bar is "a stranger would not call it+ cheap, broken or wrong", not "flawless": worded first as a plain "would you post it", the critic said no to+ all 8 videos the author had rated, 4 of them approved; with the bar spelled out it agreed with the author on+ 5 of those 8 and on 5 of 6 held-out videos it was never tuned on. The misses were mostly audio,+ which a critic reading images cannot hear.+ - **A caption should-fix cannot ship silently.** A should-fix or blocker that names captions or subtitles+ stays open until a later round's critic writes a line naming the captions with `fixed`, or the maker writes+ `won't fix: <reason>` about them in `review/round-N/RESPONSE.md` (plain word matching). Quality mode: the+ review stays pending; lean mode: `showtime qa` prints a WARN. Later-round critics answer each earlier+ finding under `PREVIOUS` (`fixed:` / `not fixed:`).+ - **Four new qa warnings** (`st/qa/floor.py`, up to 20 sampled frames at delivery size, WARN only):+ `player_chrome` (a progress bar with control glyphs at both ends on a dark control overlay, in the same place on 2+ frames),+ `soft_footage` (edge sharpness under 0.75 on most detailed parts of half the frames: re-record at 2x device+ scale), `caption_boxes` (stacked caption boxes of different widths), `empty_borders` (a solid picture filling+ under 70 % of the frame inside flat borders for over 30 % of the video). The footage-only ones skip projects+ whose page plays no `<video>`. On the clip above, qa now warns on three of the four; the owner-approved+ re-cut and every shipped example stay clean.+## 0.3.1 (2026-09-30)- **The plugin's end-of-turn hook no longer fails before setup.** Installing the plugin and working a few turns beforediff --git a/README.md b/README.mdindex ea29d84..0e79d20 100644--- a/README.md+++ b/README.md@@ -685,7 +685,7 @@ render. Press <kbd>?</kbd> in the player for the key map.<table><tr><td width="33%" valign="top"><picture><source media="(prefers-color-scheme: dark)" srcset="assets/readme/icons/voice-dark.svg"><img src="assets/readme/icons/voice-light.svg" width="44" alt=""></picture><br><b>Voice-over</b><br><sub>Kokoro, Piper and Supertonic voices, English, Spanish and 30+ more languages, with exact word timings for captions and kinetic type.</sub></td>-<td width="33%" valign="top"><picture><source media="(prefers-color-scheme: dark)" srcset="assets/readme/icons/music-dark.svg"><img src="assets/readme/icons/music-light.svg" width="44" alt=""></picture><br><b>Music and sound</b><br><sub>249 produced tracks (Scott Buckley, Kevin MacLeod, public-domain recordings) with the credit written for you, a composer that hits exact lengths, 56 synthesized effect types, 1,334 permissively licensed sounds, beat grids, ducking, mastering.</sub></td>+<td width="33%" valign="top"><picture><source media="(prefers-color-scheme: dark)" srcset="assets/readme/icons/music-dark.svg"><img src="assets/readme/icons/music-light.svg" width="44" alt=""></picture><br><b>Music and sound</b><br><sub>297 produced tracks (Scott Buckley, Kevin MacLeod, a dozen more composers, public-domain recordings) with the credit written for you, a composer that hits exact lengths, 56 synthesized effect types, 1,334 permissively licensed sounds, beat grids, ducking, mastering.</sub></td><td width="33%" valign="top"><picture><source media="(prefers-color-scheme: dark)" srcset="assets/readme/icons/captions-dark.svg"><img src="assets/readme/icons/captions-light.svg" width="44" alt=""></picture><br><b>Captions</b><br><sub>Five styles, burned in or as SRT/VTT, placed inside each platform's safe zone; karaoke from the voice's word times.</sub></td></tr><tr>@@ -755,7 +755,7 @@ attribution writes itself into `credits.txt`. Catalog tracks are downloaded from|---|---|| `audio compose` | procedural music to an exact length in 18 styles, with stems, MIDI and a beat map; restrained beds for explainers and data, livelier styles on request || `audio sfx` | 56 synthesized effect types (whooshes, hits, UI clicks, risers), with the hit time printed |-| `audio music` | the produced-music catalog: 249 tracks, each measured for quality and tagged by mood, energy and tempo; `audio music pick --for launch --dur 45` chooses one, and the credit lands in `credits.txt` and the post copy by itself |+| `audio music` | the produced-music catalog: 297 tracks, each measured for quality and tagged by mood, energy and tempo; `audio music pick --for launch --dur 45` chooses one, and the credit lands in `credits.txt` and the post copy by itself || `audio lib` | the local library, 1,334 sounds: CC0 effects and ambiences, CC-BY music beds credited automatically, and beds rendered on your machine; `audio packs` adds 35 more sound packs (34 CC0, 1 CC BY) on demand || `audio beats` | beats, downbeats, onsets, energy, sections and key, so cuts land on the music || `audio fit` | loops or trims music to a length on bar lines |@@ -868,7 +868,8 @@ by this agent". The full list is in the [changelog](CHANGELOG.md).default install (the transcription model, Manim, the audio library beyond its 41 MB starter, browser and iconextras) is fetched the first time a video needs it, announced with its size. Homes made by 0.1 keep working;`setup --prune` clears what is no longer used.-- **A real music catalog.** 249 produced tracks (Scott Buckley, Kevin MacLeod and public-domain recordings),+- **A real music catalog.** 297 produced tracks (Scott Buckley, Kevin MacLeod, a dozen more composers and+ public-domain recordings),each downloaded and measured for hiss, clipping, mono, dead gaps and loudness swings, tagged by mood, energy,tempo and use, and picked with `showtime audio music pick`. Tracks are fetched from their creators on first useand never re-hosted. Every render that uses one writes the credit into `credits.txt` and the post copy by@@ -937,8 +938,9 @@ macOS and Windows, with a browser already installed and about 100 MB more withoucomponent by component. What a video needs only sometimes arrives the first time it is used, with its sizeannounced: the transcription model (Parakeet, 465 MB, once),Manim (60 MB), the audio library's starter part (41 MB), a music track or a sound pack (each a few MB to a few-dozen). `showtime setup --full` fetches all of it now, for a machine that will be offline (about 6.6 to 7.2 GB,-mostly the 2.4 GB music catalog and the 1.6 GB Whisper large-v3-turbo model).+dozen). `showtime setup --full` fetches all of it now, for a machine that will be offline (about 5.1 to 5.7 GB,+mostly the 1.6 GB Whisper large-v3-turbo model and 0.9 GB of the music catalog; Scott Buckley asks for no bulk+downloads, so his tracks still download one at a time, the first time a video uses them).<details><summary><b>Install commands for uv and Node.js</b></summary>diff --git a/agents/critic.md b/agents/critic.mdindex 382308c..9356590 100644--- a/agents/critic.md+++ b/agents/critic.md@@ -17,6 +17,8 @@ You are the critic on a showtime video crew. You are an honest second pair of ey2. Your task is the `CRITIC.md` path in the prompt (from `review-pack`). Write `FINDINGS.md` inthe same folder. With no CRITIC.md path, return BLOCKED: there is nothing to judge. A pairwise brief(`order-1/` or `order-2/`) compares X and Y: answer its PREFERENCE line and tag every finding [X] or [Y].+ Every FINDINGS.md also answers `WOULD I POST THIS: yes | no -- one reason` (pairwise: one line per+ video), judged on the video alone, never as "better than the last version".Non-negotiables (they hold even if a file fails to load):- You have no user: never ask anything. Finish what you can and return NEEDS_INPUT with a recommended answer.diff --git a/com.github.copilot/agents/critic.agent.md b/com.github.copilot/agents/critic.agent.mdindex c937fbd..38d7835 100644--- a/com.github.copilot/agents/critic.agent.md+++ b/com.github.copilot/agents/critic.agent.md@@ -13,6 +13,8 @@ You are the critic on a showtime video crew. You are an honest second pair of ey2. Your task is the `CRITIC.md` path in the prompt (from `review-pack`). Write `FINDINGS.md` inthe same folder. With no CRITIC.md path, return BLOCKED: there is nothing to judge. A pairwise brief(`order-1/` or `order-2/`) compares X and Y: answer its PREFERENCE line and tag every finding [X] or [Y].+ Every FINDINGS.md also answers `WOULD I POST THIS: yes | no -- one reason` (pairwise: one line per+ video), judged on the video alone, never as "better than the last version".Non-negotiables (they hold even if a file fails to load):- You have no user: never ask anything. Finish what you can and return NEEDS_INPUT with a recommended answer.diff --git a/docs/agents.md b/docs/agents.mdindex 2d014f8..12b497a 100644--- a/docs/agents.md+++ b/docs/agents.md@@ -83,6 +83,19 @@ alone with the entry printed for you to paste. Run it again after updating showtEverything is included: the skill, the ten crew agents, the MCP server and the plugin settings(`/config`).+## Claude app++In the Claude desktop app: **Customize → Plugins → Add marketplace**, enter `FavioVazquez/showtime`,+then install showtime from it. Commands run in the app's sandbox, behind a proxy that can answer 403+for Hugging Face and GitHub LFS. `showtime setup` works there anyway: when a model's+own host is blocked, the file comes from showtime's model mirror (release assets under the `models-v1`+tag of this repository) and is checked against the same sha256. The mirror holds the default install's+and first-use models (Kokoro, YuNet, Whisper small.en, Parakeet v3, the word aligner, Silero VAD, the+denoise models, the default SoundFont); opt-in extras such as `--with asr-turbo` and Piper voices are+not mirrored. `SHOWTIME_MODEL_MIRROR` points at another mirror: a base URL, or a folder holding the+files under their mirror names (`skills/showtime/lib/st/mirror.json` lists them); `off` turns the+mirror off.+## OpenAI Codex```bashdiff --git a/gemini-extension.json b/gemini-extension.jsonindex a5e7917..3a5f9d9 100644--- a/gemini-extension.json+++ b/gemini-extension.json@@ -1,6 +1,6 @@{"name": "showtime",- "version": "0.3.1",+ "version": "0.3.2","description": "A local video studio for your coding agent. Describe a video. Your agent directs. Your machine renders. Motion graphics, voice-over, music, footage editing, captions and platform-ready exports, with no cloud AI services or API keys.","mcpServers": {"showtime": {diff --git a/packages/npm/package.json b/packages/npm/package.jsonindex e0ef2b6..0cf2cdd 100644--- a/packages/npm/package.json+++ b/packages/npm/package.json@@ -1,6 +1,6 @@{"name": "@faviovazquez/showtime-mcp",- "version": "0.3.1",+ "version": "0.3.2","mcpName": "io.github.FavioVazquez/showtime","description": "A local video studio for your coding agent: showtime's MCP server and command line. Describe a video. Your agent directs. Your machine renders.","license": "MIT",diff --git a/plugin.json b/plugin.jsonindex c06d395..c7738fd 100644--- a/plugin.json+++ b/plugin.json@@ -1,7 +1,7 @@{"$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json","name": "showtime",- "version": "0.3.1",+ "version": "0.3.2","description": "A local video studio for your coding agent. Describe a video. Your agent directs. Your machine renders. Motion graphics, voice-over, music, footage editing, captions and platform-ready exports, with no cloud AI services or API keys.","author": {"name": "Favio Vazquez",diff --git a/scripts/stage_model_mirror.py b/scripts/stage_model_mirror.pynew file mode 100644index 0000000..8993a37--- /dev/null+++ b/scripts/stage_model_mirror.py@@ -0,0 +1,163 @@+#!/usr/bin/env python3+"""Stage the model mirror's release assets (stdlib only, any OS, Python 3.8+).++skills/showtime/lib/st/mirror.json lists the model files the default install and first-use features+download, each with its primary URL, its file name on the mirror, size, sha256 and license. This script+downloads every one of them from its primary into a folder under its mirror name, verifies size and+sha256 (the installer's own fetcher: resumable, retried; mirrors are off here), writes LICENSES.txt+(each model's license, source and attribution, then the license texts) and SHA256SUMS, and prints the+`gh release create` / `gh release upload` commands. It uploads nothing: a person runs those commands.++ python scripts/stage_model_mirror.py # into ./model-mirror+ python scripts/stage_model_mirror.py --out /tmp/mm --only 'yunet--*'+ python scripts/stage_model_mirror.py --seed ~/.showtime # reuse verified copies from an install+ python scripts/stage_model_mirror.py --fill # write missing size/sha256 into mirror.json++Exit code 0 = every file staged and verified, 1 = a file failed, 2 = bad usage.+"""+from __future__ import annotations++import argparse+import fnmatch+import hashlib+import importlib.util+import json+import os+import ssl+import sys+import urllib.request+from pathlib import Path+from typing import Any, Dict, List++REPO = Path(__file__).resolve().parents[1]+SKILL = REPO / "skills" / "showtime"+MIRROR_JSON = SKILL / "lib" / "st" / "mirror.json"+GH_REPO = "FavioVazquez/showtime"+SPDX_TEXT = "https://raw.githubusercontent.com/spdx/license-list-data/main/text/%s.txt"+++def _setup_module():+ os.environ["SHOWTIME_MODEL_MIRROR"] = "off" # stage from the primaries only+ spec = importlib.util.spec_from_file_location("showtime_setup_stage", str(SKILL / "setup" / "setup.py"))+ mod = importlib.util.module_from_spec(spec) # type: ignore[arg-type]+ spec.loader.exec_module(mod) # type: ignore[union-attr]+ return mod+++def _sha256(p: Path) -> str:+ h = hashlib.sha256()+ with open(p, "rb") as f:+ for chunk in iter(lambda: f.read(1 << 20), b""):+ h.update(chunk)+ return h.hexdigest()+++def _spdx_ids(expr: str) -> List[str]:+ return [t for t in expr.replace("(", " ").replace(")", " ").split() if t not in ("AND", "OR", "WITH")]+++def _license_text(spdx: str) -> str:+ try:+ ctx = ssl.create_default_context()+ req = urllib.request.Request(SPDX_TEXT % spdx, headers={"User-Agent": "showtime-stage-mirror"})+ with urllib.request.urlopen(req, timeout=30, context=ctx) as r:+ return r.read().decode("utf-8", "replace").strip()+ except Exception as e: # noqa: BLE001+ return "(text not fetched: %s; see https://spdx.org/licenses/%s.html)" % (e, spdx)+++def licenses_txt(files: List[Dict[str, Any]], data: Dict[str, Any]) -> str:+ out = ["showtime model mirror (%s)" % data.get("tag", "models-v1"), "",+ "These files are unmodified copies of third-party model files, mirrored so showtime can install",+ "them where their own hosts are blocked. Each keeps its own license, listed below with its source",+ "and attribution. The full license texts follow; files whose upstream ships its own license",+ "notice also carry it as a separate asset (the *--LICENSE* and *_License.md files).", ""]+ for f in files:+ out += ["%s" % f["file"],+ " model: %s" % f["item"],+ " license: %s (%s)" % (f["license"], f["license_url"]),+ " attribution: %s" % f["attribution"],+ " source: %s" % f["source"],+ " original: %s" % f["url"],+ " size: %d bytes" % f["size"],+ " sha256: %s" % f["sha256"], ""]+ ids = sorted({i for f in files for i in _spdx_ids(f["license"])})+ for i in ids:+ out += ["=" * 78, i, "=" * 78, ""]+ if i.startswith("LicenseRef-"):+ out += ["Released into the public domain by its author; no license terms apply. See the source",+ "links above.", ""]+ else:+ out += [_license_text(i), ""]+ return "\n".join(out) + "\n"+++def commands(out_dir: Path, names: List[str], tag: str) -> List[str]:+ q = (lambda s: '"%s"' % s) if os.name == "nt" else (lambda s: "'%s'" % s)+ notes = ("Unmodified third-party model files (see LICENSES.txt) that showtime downloads when Hugging Face or "+ "GitHub LFS is blocked. Not a showtime release.")+ create = ("gh release create %s --repo %s --title %s --notes %s --latest=false"+ % (tag, GH_REPO, q("showtime model mirror (%s)" % tag), q(notes)))+ upload = "gh release upload %s --repo %s --clobber %s" % (tag, GH_REPO, " ".join(q(n) for n in names))+ return ["cd %s" % q(str(out_dir)), create, upload]+++def main(argv=None) -> int:+ ap = argparse.ArgumentParser(description=__doc__.split("\n\n")[0],+ formatter_class=argparse.RawDescriptionHelpFormatter)+ ap.add_argument("--out", default="model-mirror", help="staging folder (default ./model-mirror)")+ ap.add_argument("--only", action="append", default=[], metavar="GLOB", help="only mirror files matching")+ ap.add_argument("--seed", action="append", default=[], metavar="DIR",+ help="reuse sha256-verified copies from DIR (e.g. an existing ~/.showtime)")+ ap.add_argument("--fill", action="store_true", help="write missing size/sha256 values into mirror.json")+ a = ap.parse_args(argv)+ data = json.loads(MIRROR_JSON.read_text(encoding="utf-8"))+ files = [f for f in data["files"] if not a.only or any(fnmatch.fnmatch(f["file"], g) for g in a.only)]+ if not files:+ print("no mirror file matches %s" % a.only, file=sys.stderr)+ return 2+ out_dir = Path(a.out).expanduser().resolve()+ out_dir.mkdir(parents=True, exist_ok=True)+ su = _setup_module()+ seeds = su.Seeds([os.path.expanduser(s) for s in a.seed])+ failed, filled = [], False+ for f in files:+ dest = out_dir / f["file"]+ try:+ how = su.fetch(f["url"], dest, f.get("sha256") or None, f.get("size") or None, seeds, f["file"], verify=True)+ except Exception as e: # noqa: BLE001+ print("FAIL %s: %s" % (f["file"], e), file=sys.stderr)+ failed.append(f["file"])+ continue+ size, sha = dest.stat().st_size, _sha256(dest)+ if f.get("size") and f.get("sha256") and (size, sha) != (f["size"], f["sha256"]):+ print("FAIL %s: staged copy differs from mirror.json" % f["file"], file=sys.stderr)+ failed.append(f["file"])+ continue+ if not f.get("size") or not f.get("sha256"):+ f["size"], f["sha256"], filled = size, sha, True+ print("ok %-72s %11d %s" % (f["file"], size, how))+ if filled and a.fill:+ MIRROR_JSON.write_text(json.dumps(data, indent=1, ensure_ascii=False) + "\n", encoding="utf-8")+ print("wrote sizes and checksums into %s" % MIRROR_JSON)+ if failed:+ print("\n%d file(s) failed: %s" % (len(failed), ", ".join(failed)), file=sys.stderr)+ return 1+ staged = [f for f in files if (out_dir / f["file"]).is_file()]+ (out_dir / "LICENSES.txt").write_text(licenses_txt(staged, data), encoding="utf-8")+ (out_dir / "SHA256SUMS").write_text("".join("%s %s\n" % (f["sha256"], f["file"]) for f in staged),+ encoding="utf-8")+ total = sum(f["size"] for f in staged)+ big = [f["file"] for f in staged if f["size"] > 1_000_000_000]+ print("\nstaged %d files, %.1f MB, in %s%s" % (len(staged), total / 1e6, out_dir,+ ("; over 1 GB: " + ", ".join(big)) if big else ""))+ if a.only:+ print("(a subset: stage every file before uploading)")+ print("\nTo publish (a person runs these; nothing was uploaded):\n")+ for c in commands(out_dir, [f["file"] for f in staged] + ["LICENSES.txt", "SHA256SUMS"], data.get("tag", "models-v1")):+ print(c + "\n")+ return 0+++if __name__ == "__main__":+ sys.exit(main())diff --git a/server.json b/server.jsonindex 8f9cbd6..7df4ffb 100644--- a/server.json+++ b/server.json@@ -3,7 +3,7 @@"name": "io.github.FavioVazquez/showtime","title": "showtime","description": "Local video studio for your coding agent: scenes, voice, music and captions, on your machine.",- "version": "0.3.1",+ "version": "0.3.2","websiteUrl": "https://faviovazquez.github.io/showtime/","repository": {"url": "https://github.com/FavioVazquez/showtime",@@ -26,7 +26,7 @@"registryType": "npm","registryBaseUrl": "https://registry.npmjs.org","identifier": "@faviovazquez/showtime-mcp",- "version": "0.3.1",+ "version": "0.3.2","runtimeHint": "npx","transport": {"type": "stdio"diff --git a/skills/showtime/lib/st/__init__.py b/skills/showtime/lib/st/__init__.pyindex 815c9d3..0552b62 100644--- a/skills/showtime/lib/st/__init__.py+++ b/skills/showtime/lib/st/__init__.py@@ -5,4 +5,4 @@ launcher, installer and doctor import (st.platform, st.common, st.ff,st.doctor) are stdlib-only and Python 3.8+ compatible; everything else runsinside the showtime virtualenv (~/.showtime/venv, Python 3.12)."""-__version__ = "0.3.1"+__version__ = "0.3.2"diff --git a/skills/showtime/lib/st/audio/compose.py b/skills/showtime/lib/st/audio/compose.pyindex 3bfbf6f..fe424e1 100644--- a/skills/showtime/lib/st/audio/compose.py+++ b/skills/showtime/lib/st/audio/compose.py@@ -231,6 +231,16 @@ def resolve_style(name: str) -> str:return k+KEY_SHIFTS = (0, 2, -2, 3, -3, 5, -4) # semitones: at most a fourth either way keeps each part's register+++def auto_key(style: str, seed: int) -> str:+ """The style's key moved by a seeded interval, mode kept: beds of one style with "seed": "auto" in+ different projects sit in different keys (a mix.json compose track). Seed 0 keeps the style's key."""+ pc, mode = parse_key(STYLES[resolve_style(style)]["key"])+ return dsp.key_name(pc + KEY_SHIFTS[int(seed) % len(KEY_SHIFTS)], mode)++def style_list() -> List[dict]:return [{"style": k, "bpm": v["bpm"], "key": v["key"], "moods": v["moods"], "description": v["desc"],"use_for": v["use"], "backend": v["backend"], "drums": v["drums"] != "none",diff --git a/skills/showtime/lib/st/audio/filmscore.py b/skills/showtime/lib/st/audio/filmscore.pynew file mode 100644index 0000000..b3cf1c1--- /dev/null+++ b/skills/showtime/lib/st/audio/filmscore.py@@ -0,0 +1,322 @@+"""A different default score for every film project: `showtime new film` writes score.js from a signature.++The film template's score.js is a worked example (D major, 80 bpm, one motif). Kept as it was, every+film made from the template sounds the same. score_for() instead picks a signature from small curated+tables, per mood (calm, upbeat, tension, playful, cinematic):++ key + mode the tonic (C3..Bb3) and major or minor+ tempo + meter a pair that keeps the cues on bar lines: 80 bpm 4/4 and 60 bpm 3/4 (a 3 s bar), 100 bpm+ 5/4 (3 s), 120 bpm 3/4 and 160 bpm 4/4 (1.5 s); `showtime retime` then scales the tempo+ progression five chords for title | metaphor | data (two) | end card, tonic first and last+ motif a question (title) and its answer (end card), as scale degrees+ palette the melody and arpeggio instruments, pad brightness, reverb+ drums the groove the data section lifts with++The seed is the project (and its job's brief), plus the look history's length. The history records+the signature (score.js carries it on its first line as `showtime-score: {...}`), and a new score+avoids the key and tempo of the last job and every full signature of the last HISTORY_JOBS jobs.+The mood comes from the brief's words (the job's goal, the title, the folder name); none found: a+seeded choice. `showtime audio film-score <project>` writes a new one (--mood, --seed).+"""+from __future__ import annotations++import hashlib+import json+import math+import re+from pathlib import Path+from typing import Any, Dict, List, Optional, Sequence++from ..common import ShowtimeError++MARK = "showtime-score:"+HISTORY_JOBS = 6+KEYS = ("C", "D", "Eb", "E", "F", "G", "A", "Bb") # the tonic in octave 3; the bass sits an octave down++PROGRESSIONS = { # title | metaphor | data A | data B | end+ "major": {+ "anthem": ["Imaj7", "vi7", "IVmaj7", "V", "I"],+ "hopeful": ["Iadd9", "iii7", "vi7", "IVmaj7", "I"],+ "open": ["Isus2", "IVmaj7", "vi7", "V", "I"],+ "bright": ["I", "iii7", "IV", "V7", "I"],+ "warm": ["Imaj7", "ii7", "IVmaj7", "Vsus4", "I"],+ "lydian": ["I", "II", "IVmaj7", "V", "Iadd9"],+ },+ "minor": {+ "epic": ["i", "VI", "III", "VII", "i"],+ "dark": ["i", "iv7", "VI", "V", "i"],+ "dawn": ["i", "VI", "III", "VII", "I"],+ "drift": ["i7", "VImaj7", "iv7", "VII", "i"],+ "pulse": ["isus2", "VII", "VI", "VII", "i"],+ },+}+MOTIFS = { # (scale degree, beats): a question that ends off the tonic, an answer that lands on it+ "arch": ([(2, 1), (4, 1), (1, 1.5), (0, 0.5)], [(2, 1), (1, 1), (0, 2)]),+ "rise": ([(0, 0.5), (2, 0.5), (4, 1), (5, 1.5)], [(4, 1), (2, 1), (0, 2)]),+ "call": ([(4, 1), (3, 0.5), (2, 0.5), (1, 2)], [(1, 1), (2, 1), (0, 2)]),+ "step": ([(0, 1), (1, 1), (2, 1), (4, 1)], [(4, 0.5), (2, 0.5), (1, 1), (0, 2)]),+ "leap": ([(0, 1), (4, 1), (7, 1.5), (6, 0.5)], [(4, 1), (1, 1), (0, 2)]),+ "sigh": ([(5, 1.5), (4, 0.5), (2, 1), (1, 1)], [(2, 1), (1, 1), (0, 2)]),+ "echo": ([(2, 0.5), (2, 0.5), (4, 1), (3, 2)], [(3, 0.5), (2, 0.5), (1, 1), (0, 2)]),+}+PALETTES = { # melody, arpeggio, melody level, pad cutoff (Hz), reverb seconds, reverb wet+ "glass": ("bell", "pluck", 0.34, 1300, 2.6, 0.8),+ "wood": ("marimba", "marimba", 0.4, 1000, 1.6, 0.5),+ "felt": ("pluck", "bell", 0.36, 900, 3.2, 0.85),+ "synth": ("lead", "pluck", 0.2, 1800, 2.0, 0.6),+ "chime": ("bell", "marimba", 0.32, 1500, 3.0, 0.85),+}+DRUMS = ("soft", "pulse", "halftime", "shuffle")+METERS = {80: 4, 60: 3, 100: 5, 120: 3, 160: 4} # bpm -> beats per bar (every pair keeps the cues on bars)+MOODS = {+ "calm": dict(modes=("major", "major", "minor"), tempos=(60, 80), drums=("soft",),+ palettes=("glass", "felt", "chime"), motifs=("arch", "sigh", "step", "echo")),+ "upbeat": dict(modes=("major",), tempos=(160, 120, 80), drums=("pulse", "halftime", "shuffle"),+ palettes=("synth", "wood", "glass"), motifs=("rise", "step", "echo", "arch")),+ "tension": dict(modes=("minor",), tempos=(100, 80, 160), drums=("halftime", "pulse"),+ palettes=("synth", "felt", "glass"), motifs=("call", "leap", "sigh")),+ "playful": dict(modes=("major",), tempos=(120, 160), drums=("shuffle", "pulse"),+ palettes=("wood", "chime", "synth"), motifs=("rise", "echo", "step")),+ "cinematic": dict(modes=("major", "minor"), tempos=(80, 60, 100), drums=("halftime", "soft"),+ palettes=("glass", "felt", "synth", "chime"), motifs=("arch", "leap", "rise", "call")),+}+MOOD_WORDS = {+ "calm": ("calm", "meditat", "relax", "yoga", "sleep", "mindful", "breath", "spa", "gentle", "quiet", "peace",+ "wellness", "soft", "serene", "ambient", "slow"),+ "upbeat": ("launch", "hackathon", "recap", "release", "startup", "product", "energ", "celebrat", "sale", "promo",+ "fitness", "sport", "quarterly", "update", "announce", "teaser", "tech", "app"),+ "tension": ("sci-fi", "scifi", "thriller", "horror", "myster", "suspense", "dark", "heist", "danger", "space",+ "alien", "cyber", "hack ", "crime", "trailer"),+ "playful": ("birthday", "party", "kid", "cooking", "recipe", "food", "game", "cute", "pet", "fun", "silly",+ "cartoon", "toy", "holiday"),+ "cinematic": ("epic", "story", "journey", "documentary", "mission", "history", "adventure", "legacy", "film",+ "wedding", "memorial", "nature", "travel"),+}+++def mood_of(text: str) -> Optional[str]:+ """The mood a brief's words name (the most hits; ties go to the earlier mood), or None."""+ low = " %s " % (text or "").lower()+ hits = {m: sum(1 for w in ws if w in low) for m, ws in MOOD_WORDS.items()}+ best = max(hits.values()) if hits else 0+ return next((m for m in MOODS if hits[m] == best), None) if best else None+++def _h(*parts: Any) -> int:+ return int(hashlib.sha1("|".join(str(p) for p in parts).encode("utf-8")).hexdigest()[:12], 16)+++def _order(items: Sequence[Any], seed: int, salt: str) -> List[Any]:+ return sorted(items, key=lambda x: _h(seed, salt, x))+++def signature_id(sig: Dict[str, Any]) -> str:+ return "%s%s/%g/%s/%s/%s/%s" % (sig["key"], "m" if sig["mode"] == "minor" else "", sig["bpm"],+ sig["progression"], sig["motif"], sig["palette"], sig["drums"])+++def recent_signatures(key: Optional[str] = None, n: int = HISTORY_JOBS) -> List[Dict[str, Any]]:+ """Score signatures of the last n recorded jobs (newest first), leaving out `key` (the project)."""+ from ..variety import history+ if not history.enabled()[0]:+ return []+ out: List[Dict[str, Any]] = []+ for lk in reversed(history.load()):+ if key and (str(lk.get("project") or "") == key or lk.get("job") == key):+ continue+ for m in lk.get("music") or []:+ if m.get("ref") == "score:synth" and isinstance(m.get("signature"), dict):+ out.append(m["signature"])+ break+ else:+ continue+ if len(out) >= n:+ break+ return out+++def choose(mood: Optional[str], seed: int, recent: Sequence[Dict[str, Any]] = ()) -> Dict[str, Any]:+ """A signature for `mood` (None: a seeded mood), avoiding the key+tempo of the newest recent one,+ every full signature in `recent`, and (when it can) their progressions and motifs."""+ mood = mood if mood in MOODS else _order(sorted(MOODS), seed, "mood")[0]+ t = MOODS[mood]+ last = recent[0] if recent else {}+ used_sig = {signature_id(s) for s in recent if s.get("key")}+ used_prog = {s.get("progression") for s in recent[:3]}+ used_motif = {s.get("motif") for s in recent[:3]}+ fallback = None+ mode = t["modes"][_h(seed, "mode") % len(t["modes"])] # a mode listed twice is twice as likely+ for key in _order(KEYS, seed, "key"):+ for bpm in _order(t["tempos"], seed, "bpm"):+ if last and key == last.get("key") and bpm == last.get("bpm"):+ continue+ for prog in _order(sorted(PROGRESSIONS[mode]), seed, "prog"):+ for motif in _order(t["motifs"], seed, "motif"):+ sig = {"mood": mood, "key": key, "mode": mode, "bpm": bpm, "meter": METERS[bpm],+ "progression": prog, "motif": motif,+ "palette": _order(t["palettes"], seed, "pal")[0],+ "drums": _order(t["drums"], seed, "drums")[0]}+ if signature_id(sig) in used_sig:+ continue+ if fallback is None:+ fallback = sig+ if prog in used_prog or motif in used_motif:+ continue+ # a palette and drums the last job did not use, when the mood has others+ for k, salt, table in (("palette", "pal", "palettes"), ("drums", "drums", "drums")):+ sig[k] = ([x for x in _order(t[table], seed, salt) if x != last.get(k)] or [sig[k]])[0]+ return sig+ if fallback is None:+ raise ShowtimeError("no film score signature left for mood %s" % mood)+ return fallback+++def _degrees(line: Sequence[Any]) -> str:+ return "[%s]" % ", ".join("[key.degree(%d, 2), %g]" % (d, b) for d, b in line)+++def _drums(feel: str, beats: int) -> Dict[str, str]:+ """16th-note patterns (4 steps a beat) for one bar of `beats` beats."""+ n = 4 * beats++ def on(steps: Sequence[int]) -> str:+ return "".join("x" if i in steps else "." for i in range(n))++ mid = beats // 2 if beats != 3 else 2+ if feel == "pulse":+ return {"kick": on([4 * b for b in range(beats)]), "hat": on([4 * b + 2 for b in range(beats)])}+ if feel == "halftime":+ return {"kick": on([0]), "snare": on([4 * mid]), "hat": on([2 * i for i in range(2 * beats)])}+ if feel == "shuffle":+ return {"kick": on([0, 4 * mid]), "hat": on([4 * b + k for b in range(beats) for k in (0, 3)])}+ return {"kick": on([0, 4 * mid] if beats >= 4 else [0]), "hat": on([4 * b + 2 for b in range(beats)])}+++def render_js(sig: Dict[str, Any]) -> str:+ """score.js for the film template's cue table (CUE.title, metaphor, untangle, data, end, button, duration)."""+ mel, arp, mvel, cutoff, rev_s, rev_wet = PALETTES[sig["palette"]]+ chords = PROGRESSIONS[sig["mode"]][sig["progression"]]+ q, a = MOTIFS[sig["motif"]]+ beats = int(sig["meter"])+ drums = _drums(sig["drums"], beats)+ header = json.dumps(sig, sort_keys=True)+ return """/* %s %s+ * Score for this film: %s %s, %g bpm in %d/4, progression %s (%s), motif %s, palette %s, drums %s.+ * Written by `showtime new film` from the look history so films made from the template do not share a+ * score (st/audio/filmscore.py); `showtime audio film-score <project> [--mood M]` writes another.+ * Arc: calm (title) -> tension (metaphor, pulse) -> lift (data, drums) -> resolution (end card, the+ * motif answers on the tonic). Every hit uses the CUE times of the picture and lengths come from the+ * gaps between cues, so `showtime retime` moves picture and music together. Edit freely. */+'use strict';++var FILM_SCORE = Synth.score(function (m) {+ var g = m.grid({ bpm: CUE.bpm, beatsPerBar: %d });+ var bar = g.barDur;+ function span(a, b) { return b - a; } // section length in seconds+ function barOf(t) { return Math.round(g.beatAt(t) / g.beatsPerBar); }+ function bars(a, b) { return Math.max(1, Math.round((b - a) / bar)); }+ var key = Synth.scale('%s3', '%s');+ var ch = Synth.progression('%s3', '%s', %s);+ var root = key.degree(-7), mel = { inst: '%s', vel: %g };++ // ---- 1. title: soft pad from frame 1 + the motif (a question: it ends off the tonic)+ m.pad(ch[0], CUE.title, span(CUE.title, CUE.metaphor), { vel: 0.42, attack: 0.25, cutoff: %d });+ m.melody(g, 0.5, %s, mel);+ m.bass(root, CUE.title, span(CUE.title, CUE.metaphor), { vel: 0.35, cutoff: 300 });++ // ---- 2. metaphor: the second chord, an 8th-note pulse, an arpeggio as the idea untangles+ m.pad(ch[1], CUE.metaphor, span(CUE.metaphor, CUE.data), { vel: 0.4, cutoff: %d });+ m.bassline([ch[1]], g, barOf(CUE.metaphor), { pattern: 'pulse8', vel: 0.45, cutoff: 380, barsPerChord: bars(CUE.metaphor, CUE.data) });+ m.arp(ch[1], CUE.untangle, CUE.data, { grid: g, div: 4, inst: '%s', octaves: 2, vel: 0.22, decay: 0.5, pan: 0.2 });+ m.riser(CUE.data, { dur: 1.6, vel: 0.5, note: key.degree(-3) });+ m.sweep('music', CUE.data - 1.2, CUE.data - 0.02, 20000, 1400); // muffle into the cut...++ // ---- 3. data: the lift. The groove enters on the cut, two chords share the section+ m.sweep('music', CUE.data, CUE.data + 0.05, 1400, 20000); // ...and open on it+ m.impact(CUE.data, { vel: 0.45, note: root });+ var half = span(CUE.data, CUE.end) / 2;+ m.pad(ch[2], CUE.data, half, { vel: 0.42 });+ m.pad(ch[3], CUE.data + half, half, { vel: 0.42 });+ m.bassline([ch[2], ch[3]], g, barOf(CUE.data), { pattern: 'octave8', vel: 0.5, cutoff: 480, barsPerChord: bars(CUE.data, CUE.end) / 2 });+ m.drums(g, barOf(CUE.data), bars(CUE.data, CUE.end), %s, { vel: 0.6 });+ m.arp(ch[2].concat(ch[3]), CUE.data, CUE.end, { grid: g, div: 4, inst: '%s', vel: 0.24, decay: 0.4, pattern: 'updown' });+ m.tick(CUE.data + 0.4); m.tick(CUE.data + 0.55);+ m.duck('music', CUE.data, { depth: 5, release: 0.6 });++ // ---- 4. end card: resolution. Chime on the cut, the motif answers on the tonic+ m.chime([key.degree(7), key.degree(9), key.degree(11), key.degree(14)], CUE.end, { vel: 0.35 });+ m.pad(ch[4], CUE.end, span(CUE.end, CUE.duration) + 1, { vel: 0.45, attack: 0.1, release: 2.2 });+ m.melody(g, g.beatAt(CUE.end) + 0.5, %s, mel);+ m.bass(root, CUE.end, span(CUE.end, CUE.duration), { vel: 0.4, cutoff: 300 });+ m.subDrop(CUE.end, { note: key.degree(-14), dur: 1.4, vel: 0.5 });+ m.bell(key.degree(21), CUE.button, { vel: 0.4, decay: 3 }); // the button: final hit on the logo+ m.kick(CUE.button, { vel: 0.5, decay: 0.6 });+ m.end(CUE.duration, { fade: 1.2 });+}, { bpm: CUE.bpm, seed: %d, reverb: { seconds: %g, wet: %g } });+""" % (MARK, header, sig["key"], sig["mode"], sig["bpm"], beats, " ".join(chords), sig["progression"], sig["motif"],+ sig["palette"], sig["drums"], beats, sig["key"], sig["mode"], sig["key"], sig["mode"], json.dumps(chords),+ mel, mvel, cutoff, _degrees(q), max(700, cutoff - 200), arp, json.dumps(drums), arp, _degrees(a),+ int(sig.get("seed", 3)), rev_s, rev_wet)+++def read_signature(project: Path) -> Optional[Dict[str, Any]]:+ """The signature a generated score.js carries on its first line, or None (a hand-written score)."""+ p = Path(project) / "score.js"+ try:+ head = p.read_text(encoding="utf-8")[:600]+ except OSError:+ return None+ m = re.search(re.escape(MARK) + r"\s*(\{.*?\})\s*$", head.splitlines()[0] if head else "")+ if not m:+ return None+ try:+ sig = json.loads(m.group(1))+ except ValueError:+ return None+ return sig if isinstance(sig, dict) else None+++def _set_bpm(cues: Path, bpm: float) -> None:+ text = cues.read_text(encoding="utf-8")+ new = re.sub(r"(\bbpm\s*:\s*)[0-9.]+", lambda m: m.group(1) + ("%g" % bpm), text, count=1)+ new = re.sub(r"^( \* )80 bpm: one beat = 0\.75 s, one 4-beat bar = 3 s, so every section starts on a downbeat\.",+ lambda m: m.group(1) + "bpm and score.js's meter put every section start on a downbeat.",+ new, count=1, flags=re.M)+ cues.write_text(new, encoding="utf-8")+++def cue_scale(project: Path) -> float:+ """How far the cue table was stretched from the template's 3 s bars (1 for a fresh project)."""+ try:+ text = (Path(project) / "cues.js").read_text(encoding="utf-8")+ m = re.search(r"\bmetaphor\s*:\s*([0-9.]+)", text)+ return float(m.group(1)) / 3.0 if m and float(m.group(1)) > 0 else 1.0+ except (OSError, ValueError):+ return 1.0+++def apply(project: Path, brief: str = "", mood: Optional[str] = None, seed: Optional[int] = None,+ force: bool = False) -> Optional[Dict[str, Any]]:+ """Write a fresh score.js (and the tempo in cues.js) for a film project. Returns the signature, or+ None when the project's score.js is hand-written (not the template's, not generated) and not `force`."""+ from ..variety import history+ project = Path(project).resolve()+ sj, cj = project / "score.js", project / "cues.js"+ if not (sj.is_file() and cj.is_file()):+ return None+ text = sj.read_text(encoding="utf-8")+ if not force and MARK not in text and "Score for the film template" not in text:+ return None+ key = str(project)+ mine = read_signature(project)+ recent = ([mine] if mine else []) + recent_signatures(key) # a new score differs from the one it replaces+ n_hist = len(history.load()) if history.enabled()[0] else 0+ s = _h(key, brief, n_hist) if seed is None else int(seed)+ sig = choose(mood or mood_of(" ".join([brief, project.name.replace("-", " ")])), s, recent)+ sig["seed"] = s % 997 + 1+ # a retimed project's cues are k times the template's: a whole multiple of bpm / k keeps them on bars+ k = cue_scale(project)+ bpm = min((float(sig["bpm"]) * n / k for n in (1, 2, 3, 4)), key=lambda b: abs(math.log(b / float(sig["bpm"]))))+ sj.write_text(render_js(sig), encoding="utf-8")+ _set_bpm(cj, round(bpm, 3))+ return sigdiff --git a/skills/showtime/lib/st/audio/mix.py b/skills/showtime/lib/st/audio/mix.pyindex e419ea0..1cceab6 100644--- a/skills/showtime/lib/st/audio/mix.py+++ b/skills/showtime/lib/st/audio/mix.py@@ -21,8 +21,9 @@ Spec (all times in seconds on the output timeline):Track fieldskind music | voice | sfx | ambience (drives default level and ducking groups)- source one of: file, lib (library id), catalog (produced-music id, or {"use": "launch", "pick": 0};- fetched on first use and credited, see music.py), synth (sfx spec), compose (compose spec)+ source one of: file, lib (library id), catalog (produced-music id, or {"use": "launch", "pick": 0}+ rotated against recent jobs; fetched on first use and credited, see music.py), synth (sfx+ spec), compose (compose spec; "seed": "auto" varies the seed and, unless given, the key per project)level "auto" (default): normalise to the kind's reference (voice -16 LUFS,music -20, ambience -32, sfx by category) before gain_db; "raw": as isgain_db dB relative to the reference (or to the file with level=raw)@@ -440,7 +441,9 @@ def load_source(tr: dict, idx: int, bases: List[Path], mix_dur: float) -> Sourcereturn Source(wav.load(p), meta)if src == "catalog":from . import music- t = music.resolve(tr["catalog"], dur=float(tr.get("dur") or 0) or None)+ proj = next((b for b in bases if (b / "showtime.json").is_file()), None)+ t = music.resolve(tr["catalog"], dur=float(tr.get("dur") or 0) or None,+ key=str(proj.resolve()) if proj is not None else None) # a query rotates per projectp = music.fetch(t, purpose="the mix (track %d)" % idx)meta.update(path=str(p), catalog_id=t["id"], title=t["title"], artist=t["artist"], license=t["license"],attribution=t.get("attribution"), attribution_required=music.needs_attribution(t),@@ -485,8 +488,15 @@ def load_source(tr: dict, idx: int, bases: List[Path], mix_dur: float) -> Sourceif len(kept) < len(parsed):warn("track %d: sections after %.1fs dropped (the mix is %.1fs long)" % (idx, dur - 1.0, dur))sections = ",".join("%s:%s" % (round(t, 4), n) for n, t in kept) if kept else None- cspec = {"style": spec["style"], "duration": round(dur, 4), "bpm": spec.get("bpm"), "key": spec.get("key"),- "sections": sections, "seed": int(spec.get("seed", 0)), "backend": spec.get("backend", "auto"),+ seed, key_ = spec.get("seed", 0), spec.get("key")+ if str(seed).strip().lower() == "auto":+ # one bed per project: the seed (motif, humanising) and, unless "key" is given, the key follow the+ # project, so two videos on the same style do not share a bed+ proj = next((b for b in bases if (b / "showtime.json").is_file()), bases[0] if bases else Path.cwd())+ seed = int(hashlib.sha1(("%s|%s" % (proj.resolve(), spec["style"])).encode("utf-8")).hexdigest()[:6], 16)+ key_ = key_ or compose.auto_key(spec["style"], seed)+ cspec = {"style": spec["style"], "duration": round(dur, 4), "bpm": spec.get("bpm"), "key": key_,+ "sections": sections, "seed": int(seed), "backend": spec.get("backend", "auto"),"soundfont": spec.get("soundfont")}key = "compose-" + _hash(dict(cspec, _v=2)) # v2: beats.json records the backend and SoundFont usedcp = _cache_dir() / key / "music.wav"diff --git a/skills/showtime/lib/st/audio/music.py b/skills/showtime/lib/st/audio/music.pyindex be20e63..9728dfa 100644--- a/skills/showtime/lib/st/audio/music.py+++ b/skills/showtime/lib/st/audio/music.py@@ -57,6 +57,14 @@ placements; file hosts must belong to the track's source; custom "royalty-free"User vetoes live in ~/.showtime/music/vetoes.json (`audio music veto <id>`); vetoed tracks are neverpicked unless asked for by id.++Adding tracks is data only: append entries to `tracks` (a new host also needs a `sources` entry) and+run `showtime audio music check`. validate() refuses an entry without every required field above+(credit, license and deed, placements, pinned bytes + sha256, tags, the measured quiet_intro_s,+lead_silence_s and highlight_s, a `verified` date), a licence outside LICENSES, a host outside its+source, and a length or lead-in silence the quality gate fails. Search, rotation (recent jobs rank+lower) and the per-composer diversity re-rank pick new tracks up with no code change; `composer` names+the composer of a public-domain recording (rotation and diversity count it instead of the performer)."""from __future__ import annotations@@ -215,6 +223,16 @@ def validate(cat: Optional[Dict[str, Any]] = None) -> List[str]:v = t.get(k)if not (isinstance(v, (int, float)) and 0 <= v < max(d, 1)):errs.append(pre + "%s must be measured seconds within the track" % k)+ gate = (qg or {}).get("fail_if") if isinstance(qg, dict) else None+ if isinstance(gate, dict):+ if d and isinstance(gate.get("duration_s_below"), (int, float)) and d < gate["duration_s_below"]:+ errs.append(pre + "shorter than the quality gate's %gs" % gate["duration_s_below"])+ ls = t.get("lead_silence_s")+ if isinstance(ls, (int, float)) and isinstance(gate.get("lead_silence_s_above"), (int, float)) \+ and ls > gate["lead_silence_s_above"]:+ errs.append(pre + "lead-in silence above the quality gate's %gs" % gate["lead_silence_s_above"])+ if not re.fullmatch(r"\d{4}-\d{2}-\d{2}", str(t.get("verified") or "")):+ errs.append(pre + "verified must be the date the track passed the quality gate (YYYY-MM-DD)")if t.get("loops") not in (True, False, None):errs.append(pre + "loops must be true, false or null")if t.get("status", "active") not in ("active", "vetoed"):@@ -328,9 +346,15 @@ def preset(use: Optional[str], cat: Optional[Dict[str, Any]] = None) -> Dict[strdef search(words: Any = None, *, use: Optional[str] = None, shelf: Any = None, mood: Any = None, energy: Any = None,dur: Optional[float] = None, min_dur: Optional[float] = None, max_dur: Optional[float] = None,vocals: Any = None, source_id: Any = None, license: Any = None, ending: Any = None,- include_vetoed: bool = False, limit: int = 10, cat: Optional[Dict[str, Any]] = None) -> List[Dict[str, Any]]:- """Ranked tracks: [{"track", "score", "why"}]. `use` applies a preset (launch, explainer, ...)."""+ include_vetoed: bool = False, limit: int = 10, cat: Optional[Dict[str, Any]] = None,+ rotate: bool = True, key: Optional[str] = None) -> List[Dict[str, Any]]:+ """Ranked tracks: [{"track", "score", "why"}]. `use` applies a preset (launch, explainer, ...).++ With `rotate` (the default; see rotation()) tracks and composers heard in recent jobs rank lower+ and the best of several near-equal tracks is a seeded choice (`key` is the job or project, so one+ job keeps its pick). Every list is re-ranked so one composer does not fill the top (diversify())."""cat = cat or load_catalog()+ rot = rotation(key) if rotate else Nonepre = preset(use, cat)shelves = _words(shelf) or list(pre.get("shelves") or [])moods = _words(mood)@@ -397,15 +421,24 @@ def search(words: Any = None, *, use: Optional[str] = None, shelf: Any = None, mwhy.append("featured")if pre.get("max_intro_s") is not None and t.get("quiet_intro_s") and t["quiet_intro_s"] > pre["max_intro_s"]:score -= 1.0+ if rot:+ score -= _heard_penalty(t, rot, why)out.append({"track": t, "score": round(score, 3), "why": why})# equal scores: a stable order that differs per use, so ties are not settled alphabeticallysalt = (pre.get("name") or "") + "|" + " ".join(ws + moods + shelves)out.sort(key=lambda r: (-r["score"], hashlib.sha1((salt + r["track"]["id"]).encode("utf-8")).hexdigest()))+ if rot and rot["recent"] and out:+ # near-equal leaders: a seeded choice (the same job keeps it; the next job's seed differs). With+ # nothing recorded yet the best track leads (the featured one, for a launch)+ band = [r for r in out if out[0]["score"] - r["score"] <= NEAR]+ h = hashlib.sha1(("%s|%s|%s" % (rot["seed"], salt, dur or "")).encode("utf-8")).hexdigest()+ out.insert(0, out.pop(out.index(band[int(h[:8], 16) % len(band)])))+ out = diversify(out)return out[: max(1, int(limit))] if limit else outdef pick(use: Optional[str] = None, dur: Optional[float] = None, n: int = 0, **kw: Any) -> Dict[str, Any]:- """The n-th best track for a use (0 = best). Raises when nothing matches."""+ """The n-th best track for a use (0 = best), rotated against recent jobs. Raises when nothing matches."""res = search(use=use, dur=dur, limit=max(10, n + 1), **kw)if not res:raise ShowtimeError("no catalog track matches %s" % json.dumps({k: v for k, v in dict(kw, use=use, dur=dur).items()@@ -414,20 +447,165 @@ def pick(use: Optional[str] = None, dur: Optional[float] = None, n: int = 0, **kreturn res[min(n, len(res) - 1)]["track"]-def resolve(ref: Any, dur: Optional[float] = None) -> Dict[str, Any]:- """A track from an id string or {"use"/"shelf"/"mood"/"energy"/"words", "pick": n} (a mix.json source)."""+def resolve(ref: Any, dur: Optional[float] = None, key: Optional[str] = None) -> Dict[str, Any]:+ """A track from an id string or {"use"/"shelf"/"mood"/"energy"/"words", "pick": n} (a mix.json source).+ An id always wins. A query is rotated against recent jobs (`key`: the project, see search()), and a+ job the history already holds keeps the track it was recorded with."""if isinstance(ref, str):return get(ref)if isinstance(ref, dict):if ref.get("id"):return get(ref["id"])+ pinned = _pinned(key, query_key(ref)) if key else None+ if pinned:+ return pinnedq = {k: ref.get(k) for k in ("shelf", "mood", "energy", "vocals", "license", "ending") if ref.get(k) is not None}q["source_id"] = ref.get("source")return pick(use=ref.get("use") or ref.get("for"), dur=ref.get("dur") or dur, n=int(ref.get("pick", 0)),- words=ref.get("words") or ref.get("search"), **q)+ words=ref.get("words") or ref.get("search"), key=key, **q)raise ShowtimeError("bad catalog reference %r" % (ref,), hint='use a track id or {"use": "launch"}')+# ------------------------------------------------------------------------------------------ rotation+# The look history (st.variety.history, local only) records the music of every finished job. A new+# pick ranks tracks heard in the last ROTATE_JOBS jobs lower (the whole piece: its variants too) and+# composers heard in the last ARTIST_JOBS a little lower, so similar briefs in a row get different+# music. Off with `showtime history off` (nothing recorded, nothing demoted) or SHOWTIME_MUSIC_ROTATION=off+# (the plain ranking: tests, reproducing an old render). An explicit track id is never rotated.+ROTATE_JOBS = 8+TRACK_PENALTY = 3.0 # about one shelf match: a fresh track of the same kind comes first+ARTIST_JOBS = 3+ARTIST_PENALTY = 0.75 # per recent job with that composer, at most two+NEAR = 0.4 # leaders this close to the best are near-equal: the choice among them is seeded+DIVERSE_WINDOW, DIVERSE_CAP, DIVERSE_MARGIN = 5, 2, 1.0 # at most 2 of any 5 places in a row per composer+++def artist_of(t: Dict[str, Any]) -> str:+ """Who a listener hears: the composer of a public-domain recording, else the artist."""+ return str(t.get("composer") or t.get("artist") or "")+++def _family(t: Dict[str, Any]) -> str:+ return str(t.get("variant_of") or t.get("id"))+++def query_key(ref: Dict[str, Any]) -> str:+ """A catalog query as the history records it (a finished job keeps the track it resolved to)."""+ return json.dumps({k: v for k, v in ref.items() if k not in ("id", "dur")}, sort_keys=True)+++def rotation_off() -> Optional[str]:+ """Why rotation is off, or None when it is on."""+ v = str(os.environ.get("SHOWTIME_MUSIC_ROTATION", "")).strip().lower()+ if v in ("0", "off", "false", "no"):+ return "SHOWTIME_MUSIC_ROTATION=%s" % v+ return None+++def _same(a: Any, b: Any) -> bool:+ return bool(a and b) and os.path.normcase(str(a)) == os.path.normcase(str(b))+++def _is_job(lk: Dict[str, Any], key: str) -> bool:+ return _same(lk.get("project"), key) or _same(lk.get("job_path"), key) or lk.get("job") == key+++def recent_music(key: Optional[str] = None, n: int = ROTATE_JOBS) -> List[Dict[str, Any]]:+ """[{job, tracks, families, artists, composed}] of the last n recorded jobs, newest first, leaving+ out the job or project `key` itself. [] when the history is off."""+ from ..variety import history+ if not history.enabled()[0]:+ return []+ out: List[Dict[str, Any]] = []+ for lk in reversed(history.load()):+ if key and _is_job(lk, key):+ continue+ row: Dict[str, Any] = {"job": lk.get("job"), "tracks": [], "families": [], "artists": [], "composed": []}+ for m in lk.get("music") or []:+ ref = str(m.get("ref") or "")+ if ref.startswith("catalog:"):+ tid = ref[len("catalog:"):]+ try:+ t = get(tid)+ except ShowtimeError:+ t = {"id": tid}+ row["tracks"].append(tid)+ row["families"].append(_family(t))+ a = m.get("artist") or artist_of(t) # entries recorded before 0.3.2 carry no artist+ if a:+ row["artists"].append(a)+ elif ref.startswith("compose:"):+ row["composed"].append(m.get("style") or ref[len("compose:"):])+ out.append(row)+ if len(out) >= n:+ break+ return out+++def rotation(key: Optional[str] = None) -> Optional[Dict[str, Any]]:+ """{recent, seed} for search(), or None when rotation is off."""+ if rotation_off():+ return None+ try:+ from ..variety import history+ rec = recent_music(key)+ hist = history.load() if history.enabled()[0] else []+ except (ShowtimeError, OSError, ValueError): # an unreadable history never stops a pick+ rec, hist = [], []+ # the seed moves on with every finished job: the next similar request lands on another near-equal track+ seed = "%s|%d|%s" % (key or "", len(hist), ",".join(str(x.get("job")) for x in hist[-3:]))+ return {"recent": rec, "seed": seed}+++def _heard_penalty(t: Dict[str, Any], rot: Dict[str, Any], why: List[str]) -> float:+ rec = rot.get("recent") or []+ pen = 0.0+ if any(_family(t) in r["families"] for r in rec):+ pen += TRACK_PENALTY+ why.append("heard recently")+ a = artist_of(t)+ k = sum(1 for r in rec[:ARTIST_JOBS] if a in r["artists"])+ return pen + ARTIST_PENALTY * min(k, 2)+++def diversify(rows: List[Dict[str, Any]], window: int = DIVERSE_WINDOW, cap: int = DIVERSE_CAP,+ margin: float = DIVERSE_MARGIN) -> List[Dict[str, Any]]:+ """Re-rank so one composer takes at most `cap` of any `window` places in a row, when another+ composer's track scores within `margin` of the one it moves down (a clearly better track keeps its place)."""+ rest, out = list(rows), []+ while rest:+ near = [artist_of(r["track"]) for r in out[-(window - 1):]]+ j = 0+ if near.count(artist_of(rest[0]["track"])) >= cap:+ for i, r in enumerate(rest[1:], 1):+ if rest[0]["score"] - r["score"] > margin:+ break+ if near.count(artist_of(r["track"])) < cap:+ j = i+ break+ out.append(rest.pop(j))+ return out+++def _pinned(key: str, qk: str) -> Optional[Dict[str, Any]]:+ """The track a recorded job resolved this query to (a re-render after `qa` keeps its music)."""+ try:+ from ..variety import history+ if not history.enabled()[0]:+ return None+ for lk in reversed(history.load()):+ if not (_same(lk.get("project"), key) or _same(lk.get("job_path"), key)):+ continue+ for m in lk.get("music") or []:+ if m.get("query") == qk and str(m.get("ref") or "").startswith("catalog:"):+ t = get(str(m["ref"])[len("catalog:"):])+ if t.get("status", "active") == "active" and t["id"] not in vetoed_ids():+ return t+ except (ShowtimeError, OSError, ValueError):+ return None+ return None++# ------------------------------------------------------------------------------------------ fetch + cachedef cached_path(t: Dict[str, Any]) -> Path:return cache_root() / t["source"] / ("%s.%s" % (t["id"], t.get("format") or "mp3"))@@ -546,12 +724,28 @@ def match_file(path: Path) -> Optional[Dict[str, Any]]:return next((t for t in cands if t["sha256"] == digest), None)+def bulk_allowed(t: Dict[str, Any], cat: Optional[Dict[str, Any]] = None) -> bool:+ """False when the track's source asks never to be bulk-downloaded (its `fetch.bulk` is false): such tracks are+ fetched one at a time, the first time a mix uses them, never by a pre-fetch of many tracks."""+ return (source(t, cat).get("fetch") or {}).get("bulk", True) is not False++def fetch_many(ts: Iterable[Dict[str, Any]], seeds: Optional[Sequence[str]] = None, purpose: str = "offline use",- progress: Any = None) -> Dict[str, Any]:- rep: Dict[str, Any] = {"fetched": [], "cached": [], "failed": []}+ progress: Any = None, bulk: bool = False) -> Dict[str, Any]:+ """Fetch several tracks. With `bulk` (a pre-fetch of the catalog or a shelf, not tracks the user named), tracks+ whose source forbids bulk downloads are left to download on first use unless a seed folder has them."""+ rep: Dict[str, Any] = {"fetched": [], "cached": [], "failed": [], "skipped": []}ts = list(ts)todo = [t for t in ts if not is_cached(t)]rep["cached"] = [t["id"] for t in ts if t not in todo]+ if bulk:+ seeds_d = _seed_dirs(seeds)+ keep = [t for t in todo if bulk_allowed(t) or _from_seed(t, seeds_d) is not None]+ rep["skipped"] = [t["id"] for t in todo if t not in keep]+ todo = keep+ if rep["skipped"]:+ (progress or log)("music catalog: %d track(s) left to download on first use (their creator asks for no "+ "bulk downloads)" % len(rep["skipped"]))total = sum(int(t["bytes"]) for t in todo)if todo:(progress or log)("music catalog: %d track(s) to fetch (%s), %d already cached" % (len(todo), human_size(total),diff --git a/skills/showtime/lib/st/audio/music_catalog.json b/skills/showtime/lib/st/audio/music_catalog.jsonindex 69f9615..20b7625 100644--- a/skills/showtime/lib/st/audio/music_catalog.json+++ b/skills/showtime/lib/st/audio/music_catalog.json@@ -1,9 +1,9 @@{"schema": "showtime.music.catalog/1","about": "Produced music for showtime videos, curated for video use and fetched on first use from each creator's own host (never re-hosted). Every entry pins the file (bytes + sha256) and the exact credit its license asks for; `audio mix` writes it into credits.txt and share.txt. Field reference and the quality gate: lib/st/audio/music.py. Every track was downloaded and measured (format, bandwidth, noise, clipping, loudness, silences, stereo, rhythm, ending) and passed the gate below; moods come from the creators' descriptions, energy/shelf/tempo were checked against the measurements. `audio music veto` still hides a track you dislike.",- "updated": "2026-09-29",+ "updated": "2026-09-30","quality_gate": {- "checked": "2026-09-29",+ "checked": "2026-09-30","method": "each pinned file decoded in full; ffprobe, EBU R128 (ffmpeg ebur128), numpy/scipy spectra, LPC-residual click detection and onset analysis","fail_if": {"sample_rate_hz_below": 44100,@@ -60,7 +60,8 @@"scottbuckley.com.au"],"delay_s": 3.0,- "rule": "one track per user request from the track page's own MP3 link; never bulk (his hosting has limited bandwidth, so there is no zip and we do not mirror)"+ "rule": "one track per user request from the track page's own MP3 link; never bulk (his hosting has limited bandwidth, so there is no zip and we do not mirror)",+ "bulk": false}},"incompetech": {@@ -138,6 +139,34 @@"delay_s": 1.5,"rule": "archive.org/download/<item>/<file> links of items whose metadata licenseurl is CC0"}+ },+ "opengameart": {+ "name": "OpenGameArt.org (music posted by its composers)",+ "homepage": "https://opengameart.org/art-search-advanced?field_art_type_tid%5B%5D=12",+ "license": "CC-BY-4.0 / CC-BY-3.0 / CC0-1.0 (per asset page)",+ "attribution_format": null,+ "placements": [+ "description",+ "credits_file"+ ],+ "content_id": "none-known",+ "content_id_note": "No Content ID registration is known for these tracks; if a video is claimed, dispute it with the license and the credit (the asset's OpenGameArt page states both).",+ "restrictions": [+ "the license is the one on the asset's own page, posted by the composer; only CC0, CC-BY 3.0 and CC-BY 4.0 assets are catalogued (no SA, NC or GPL-only)",+ "a CC BY track's credit is the composer's own Copyright/Attribution Notice, else OpenGameArt's default (\"title\" by author licensed ...: page URL); it goes where viewers can find it",+ "only the downloadable file is catalogued; OpenGameArt previews may be under other terms"+ ],+ "evidence": [+ "https://opengameart.org/content/faq",+ "https://opengameart.org/robots.txt"+ ],+ "fetch": {+ "hosts": [+ "opengameart.org"+ ],+ "delay_s": 10.5,+ "rule": "the asset page's own file link (sites/default/files/...), one file per user request, at least 10 s apart as its robots.txt asks (Crawl-delay: 10); never bulk"+ }}},"presets": {@@ -6523,6 +6552,150 @@"lead_silence_s": 2.2,"highlight_s": 225.0},+ {+ "credit_optional": "\"Another August\" by The Cynic Project / cynicmusic.com / pixelsphere.org (CC0)",+ "loops": null,+ "status": "active",+ "verified": "2026-09-30",+ "id": "cynic-another-august",+ "title": "Another August",+ "artist": "The Cynic Project",+ "source": "opengameart",+ "landing_url": "https://opengameart.org/content/another-august",+ "file_url": "https://opengameart.org/sites/default/files/013_Another_August_0.mp3",+ "format": "mp3",+ "bytes": 8269313,+ "sha256": "6de6e4f770cda4d34db433e4df982deccb6877a8fcc5e32b48eeb57f770dec3b",+ "license": "CC0-1.0",+ "license_url": "https://creativecommons.org/publicdomain/zero/1.0/",+ "attribution": null,+ "placements": [+ "credits_file",+ "end_card"+ ],+ "content_id": "none-known",+ "duration": 206.6,+ "shelf": "ambient",+ "moods": [+ "serene",+ "ethereal",+ "calm"+ ],+ "energy": 0.25,+ "tempo": "slow",+ "uses": [+ "background",+ "explainer",+ "data"+ ],+ "vocals": "none",+ "instruments": [+ "synth pads",+ "keys"+ ],+ "ending": "soft",+ "notes": "Serene ambient piece from the game Pixelsphere; wide dynamics, fades out.",+ "quiet_intro_s": 1.0,+ "lead_silence_s": 0.0,+ "highlight_s": 41.0+ },+ {+ "credit_optional": "\"Enchanted Tiki 86\" by The Cynic Project / cynicmusic.com / pixelsphere.org (CC0)",+ "loops": null,+ "status": "active",+ "verified": "2026-09-30",+ "id": "cynic-enchanted-tiki-86",+ "title": "Enchanted Tiki 86",+ "artist": "The Cynic Project",+ "source": "opengameart",+ "landing_url": "https://opengameart.org/content/enchanted-tiki-86",+ "file_url": "https://opengameart.org/sites/default/files/enchanted%20tiki%2086_0.mp3",+ "format": "mp3",+ "bytes": 3714527,+ "sha256": "3d6a51a5f20e885d93f2c8e8ef7ea189fca701063ab7f72aa37d114701c32dcf",+ "license": "CC0-1.0",+ "license_url": "https://creativecommons.org/publicdomain/zero/1.0/",+ "attribution": null,+ "placements": [+ "credits_file",+ "end_card"+ ],+ "content_id": "none-known",+ "duration": 117.4,+ "shelf": "tension",+ "moods": [+ "dark",+ "moody",+ "hypnotic"+ ],+ "energy": 0.45,+ "tempo": "medium",+ "uses": [+ "problem",+ "tech",+ "story"+ ],+ "vocals": "none",+ "instruments": [+ "synth",+ "percussion",+ "bass"+ ],+ "ending": "clean",+ "notes": "Dark, hypnotic theme from the game Pixelsphere.",+ "quiet_intro_s": 0.0,+ "lead_silence_s": 0.3,+ "highlight_s": 0.0+ },+ {+ "credit_optional": null,+ "loops": null,+ "status": "active",+ "verified": "2026-09-30",+ "id": "foxsynergy-bouncing-baal",+ "title": "Bouncing Baal",+ "artist": "FoxSynergy",+ "source": "opengameart",+ "landing_url": "https://opengameart.org/content/bouncing-baal",+ "file_url": "https://opengameart.org/sites/default/files/08%20-%20Bouncing%20Baal%20v0_95.mp3",+ "format": "mp3",+ "bytes": 4845545,+ "sha256": "e0d6e4e482d8de2f7eed0e146261e61a4cad5993b66ca3e874df10c1b242e5bc",+ "license": "CC-BY-3.0",+ "license_url": "https://creativecommons.org/licenses/by/3.0/",+ "attribution": "\"Bouncing Baal\" by FoxSynergy - licensed CC-BY 3.0: https://opengameart.org/content/bouncing-baal",+ "placements": [+ "description",+ "credits_file",+ "end_card"+ ],+ "content_id": "none-known",+ "duration": 181.8,+ "shelf": "playful",+ "moods": [+ "bouncy",+ "cheeky",+ "retro"+ ],+ "energy": 0.7,+ "tempo": "fast",+ "uses": [+ "social",+ "promo",+ "tutorial"+ ],+ "vocals": "none",+ "instruments": [+ "synth",+ "drums",+ "bass"+ ],+ "ending": "clean",+ "notes": "Playful track in the spirit of a classic home computer (not chiptune).",+ "quiet_intro_s": 0.0,+ "lead_silence_s": 0.0,+ "highlight_s": 90.0+ },{"credit_optional": null,"loops": null,@@ -10678,6 +10851,101 @@"lead_silence_s": 0.0,"highlight_s": 33.0},+ {+ "credit_optional": "\"Sad walk with sad melodica\" by Komiku (CC0), from the album \"It's Time For Adventure! Vol 2\"",+ "loops": null,+ "status": "active",+ "verified": "2026-09-30",+ "id": "komiku-sad-walk-with-sad-melodica",+ "title": "Sad walk with sad melodica",+ "artist": "Komiku",+ "source": "archive",+ "landing_url": "https://archive.org/details/Komiku-ItsTimeForAdventureVol2",+ "file_url": "https://archive.org/download/Komiku-ItsTimeForAdventureVol2/Komiku_-_14_-_Sad_walk_with_sad_melodica.mp3",+ "format": "mp3",+ "bytes": 7810558,+ "sha256": "961aa3137cc2fa081f894679e2e9b568d5b526f4d5d1015eac146c7846f6bd78",+ "license": "CC0-1.0",+ "license_url": "https://creativecommons.org/publicdomain/zero/1.0/",+ "attribution": null,+ "placements": [+ "credits_file",+ "end_card"+ ],+ "content_id": "none-known",+ "duration": 191.3,+ "shelf": "documentary",+ "moods": [+ "wistful",+ "melancholic",+ "gentle"+ ],+ "energy": 0.3,+ "tempo": "medium",+ "uses": [+ "story",+ "documentary",+ "emotional"+ ],+ "vocals": "none",+ "instruments": [+ "melodica",+ "percussion"+ ],+ "ending": "soft",+ "notes": "Wistful walking tune led by a melodica.",+ "quiet_intro_s": 0.0,+ "lead_silence_s": 0.0,+ "highlight_s": 118.0+ },+ {+ "credit_optional": "\"Something to save\" by Komiku (CC0), from the album \"It's Time For Adventure! Vol 2\"",+ "loops": null,+ "status": "active",+ "verified": "2026-09-30",+ "id": "komiku-something-to-save",+ "title": "Something to save",+ "artist": "Komiku",+ "source": "archive",+ "landing_url": "https://archive.org/details/Komiku-ItsTimeForAdventureVol2",+ "file_url": "https://archive.org/download/Komiku-ItsTimeForAdventureVol2/Komiku_-_10_-_Something_to_save.mp3",+ "format": "mp3",+ "bytes": 8591097,+ "sha256": "f7f818dbd910b5f89b48f872727ae8769ffb84fd4b81a982e858adbb61ac121a",+ "license": "CC0-1.0",+ "license_url": "https://creativecommons.org/publicdomain/zero/1.0/",+ "attribution": null,+ "placements": [+ "credits_file",+ "end_card"+ ],+ "content_id": "none-known",+ "duration": 210.8,+ "shelf": "inspiring",+ "moods": [+ "hopeful",+ "determined",+ "warm"+ ],+ "energy": 0.45,+ "tempo": "medium",+ "uses": [+ "story",+ "mission",+ "recap"+ ],+ "vocals": "none",+ "instruments": [+ "synth",+ "piano",+ "percussion"+ ],+ "ending": "soft",+ "notes": "Hopeful adventure theme from 'It's Time For Adventure! Vol 2'.",+ "quiet_intro_s": 0.0,+ "lead_silence_s": 0.0,+ "highlight_s": 160.0+ },{"credit_optional": "\"Tale on the Late (Main Theme)\" by Komiku (CC0), from the album \"Tale On The Late\"","loops": null,@@ -10726,6 +10994,54 @@"lead_silence_s": 0.0,"highlight_s": 19.0},+ {+ "credit_optional": "\"Tension\" by Komiku (CC0), from the album \"It's Time For Adventure! Vol 2\"",+ "loops": null,+ "status": "active",+ "verified": "2026-09-30",+ "id": "komiku-tension",+ "title": "Tension",+ "artist": "Komiku",+ "source": "archive",+ "landing_url": "https://archive.org/details/Komiku-ItsTimeForAdventureVol2",+ "file_url": "https://archive.org/download/Komiku-ItsTimeForAdventureVol2/Komiku_-_12_-_Tension.mp3",+ "format": "mp3",+ "bytes": 8199260,+ "sha256": "d7038511ba8e8e15f599e13d3348e103223ecdb4b823f96d3c7b0690b753c159",+ "license": "CC0-1.0",+ "license_url": "https://creativecommons.org/publicdomain/zero/1.0/",+ "attribution": null,+ "placements": [+ "credits_file",+ "end_card"+ ],+ "content_id": "none-known",+ "duration": 201.0,+ "shelf": "tension",+ "moods": [+ "tense",+ "suspenseful",+ "adventurous"+ ],+ "energy": 0.55,+ "tempo": "medium",+ "uses": [+ "problem",+ "trailer",+ "story"+ ],+ "vocals": "none",+ "instruments": [+ "synth",+ "strings",+ "percussion"+ ],+ "ending": "clean",+ "notes": "Suspense cue from 'It's Time For Adventure! Vol 2'.",+ "quiet_intro_s": 0.0,+ "lead_silence_s": 0.0,+ "highlight_s": 115.0+ },{"credit_optional": "\"The main reason we are here\" by Komiku (CC0), from the album \"A Tale Is Never Forgotten\"","loops": null,@@ -11452,212 +11768,214 @@"highlight_s": 174.0},{- "credit_optional": "Tomaso Albinoni: Oboe Concerto in D minor, Op. 9 No. 2 - II. Adagio, performed by Paul Arden-Taylor (oboe), for Musopen (CC0, via Wikimedia Commons)",+ "credit_optional": null,"loops": null,"status": "active",- "verified": "2026-09-29",- "id": "pd-albinoni-oboe-concerto-adagio",- "title": "Oboe Concerto in D minor, Op. 9 No. 2 - II. Adagio",- "artist": "Paul Arden-Taylor (oboe), for Musopen",- "source": "wikimedia",- "landing_url": "https://commons.wikimedia.org/wiki/File:Albinoni,_Concerto_for_Oboe_and_Strings_No._2_in_D_minor,_Op._9,_II._Adagio.ogg",- "file_url": "https://upload.wikimedia.org/wikipedia/commons/d/da/Albinoni%2C_Concerto_for_Oboe_and_Strings_No._2_in_D_minor%2C_Op._9%2C_II._Adagio.ogg",- "format": "ogg",- "bytes": 4544115,- "sha256": "973d4afdbff655ba428f161f4f6326adc0737693720322058c0987ee7a9e4c0c",- "license": "CC0-1.0",- "license_url": "https://creativecommons.org/publicdomain/zero/1.0/",- "attribution": null,+ "verified": "2026-09-30",+ "id": "machine-reflection",+ "title": "Reflection",+ "artist": "Machine",+ "source": "opengameart",+ "landing_url": "https://opengameart.org/content/reflection-1",+ "file_url": "https://opengameart.org/sites/default/files/Reflection_2.mp3",+ "format": "mp3",+ "bytes": 2467884,+ "sha256": "c0e986739cf4bb0d12c5259efa405b283c67e78a65ab38984ead2451078db6e5",+ "license": "CC-BY-3.0",+ "license_url": "https://creativecommons.org/licenses/by/3.0/",+ "attribution": "\"Reflection\" by Machine - licensed CC-BY 3.0: https://opengameart.org/content/reflection-1","placements": [+ "description","credits_file","end_card"],- "content_id": "unknown",- "duration": 257.8,- "shelf": "documentary",+ "content_id": "none-known",+ "duration": 119.0,+ "shelf": "inspiring","moods": [- "poignant",- "tender",- "elegiac",- "beautiful"- ],- "energy": 0.3,+ "reflective",+ "hopeful",+ "gentle"+ ],+ "energy": 0.3,"tempo": "slow","uses": [+ "story","emotional",- "story"+ "outro"],"vocals": "none","instruments": [- "oboe",- "strings",- "continuo"+ "keys",+ "strings"],- "ending": "soft",- "notes": "Authentic Albinoni (not the Giazotto 'Adagio'); aching oboe line for emotional or memorial moments.",- "composer": "Tomaso Albinoni",- "quiet_intro_s": 1.0,- "lead_silence_s": 1.3,- "highlight_s": 219.0+ "ending": "clean",+ "notes": "\"A reflective and hopeful number\"; short.",+ "quiet_intro_s": 0.0,+ "lead_silence_s": 0.0,+ "highlight_s": 83.0},{- "credit_optional": "Performed by the United States Air Force Band (public domain, US government work)",+ "credit_optional": null,"loops": null,"status": "active",- "verified": "2026-09-29",- "id": "pd-bach-air-usaf-band",- "title": "Orchestral Suite No. 3, BWV 1068 - Air (\"Air on the G String\")",- "artist": "United States Air Force Band, Air Force Strings",- "source": "wikimedia",- "landing_url": "https://commons.wikimedia.org/wiki/File:Air_-_Air_Force_Strings_-_United_States_Air_Force_Band.mp3",- "file_url": "https://upload.wikimedia.org/wikipedia/commons/e/ec/Air_-_Air_Force_Strings_-_United_States_Air_Force_Band.mp3",+ "verified": "2026-09-30",+ "id": "ofdn-nectar",+ "title": "Nectar",+ "artist": "Of Far Different Nature",+ "source": "opengameart",+ "landing_url": "https://opengameart.org/content/escape-album-14-tracks-deep-massive",+ "file_url": "https://opengameart.org/sites/default/files/Of%20Far%20Different%20Nature%20-%20Escape%20-%2003%20-%20Nectar%20%28CC-BY%29_0.mp3","format": "mp3",- "bytes": 7539726,- "sha256": "139e7a43fc39a5502b58a49b0002f96d37875be3794d2f6938ef59c1f35af1cd",- "license": "CC-PDDC",- "license_url": "https://creativecommons.org/licenses/publicdomain/",- "attribution": null,+ "bytes": 8048806,+ "sha256": "81ba50dad2e57ed5a0bacbe18e64d1e232a8a490b1d2cd4d0d498a65468c55d8",+ "license": "CC-BY-4.0",+ "license_url": "https://creativecommons.org/licenses/by/4.0/",+ "attribution": "\"Nectar\" by Of Far Different Nature (fardifferent.carrd.co) - licensed CC-BY 4.0: https://opengameart.org/content/escape-album-14-tracks-deep-massive","placements": [+ "description","credits_file","end_card"],- "content_id": "unknown",- "duration": 183.3,- "shelf": "orchestral",+ "content_id": "none-known",+ "duration": 201.1,+ "shelf": "corporate-tech","moods": [- "serene",- "noble",- "graceful",- "reflective"+ "deep",+ "driving",+ "modern"],- "energy": 0.25,- "tempo": "slow",+ "energy": 0.65,+ "tempo": "fast","uses": [- "documentary",- "keynote",- "outro"+ "tech",+ "product-demo",+ "promo"],"vocals": "none","instruments": [- "string orchestra"+ "synth",+ "drums",+ "bass"],"ending": "soft",- "notes": "Timeless slow string air; ceremonies, tributes, calm corporate or institutional films.",- "composer": "Johann Sebastian Bach",- "quiet_intro_s": 5.0,- "lead_silence_s": 4.3,- "highlight_s": 131.0+ "notes": "Deep electronic groove from the album 'Escape'.",+ "quiet_intro_s": 0.0,+ "lead_silence_s": 0.0,+ "highlight_s": 141.0},{- "credit_optional": "Johann Sebastian Bach: Goldberg Variations, BWV 988 - Aria, performed by Kimiko Ishizaka (CC0, via Wikimedia Commons)",+ "credit_optional": null,"loops": null,"status": "active",- "verified": "2026-09-29",- "id": "pd-bach-goldberg-aria-ishizaka",- "title": "Goldberg Variations, BWV 988 - Aria",- "artist": "Kimiko Ishizaka",- "source": "wikimedia",- "landing_url": "https://commons.wikimedia.org/wiki/File:Kimiko_Ishizaka_-_J.S._Bach-_-Open-_Goldberg_Variations,_BWV_988_(Piano)_-_01_Aria.mp3",- "file_url": "https://upload.wikimedia.org/wikipedia/commons/5/59/Kimiko_Ishizaka_-_J.S._Bach-_-Open-_Goldberg_Variations%2C_BWV_988_%28Piano%29_-_01_Aria.mp3",+ "verified": "2026-09-30",+ "id": "ofdn-pure",+ "title": "Pure",+ "artist": "Of Far Different Nature",+ "source": "opengameart",+ "landing_url": "https://opengameart.org/content/escape-album-14-tracks-deep-massive",+ "file_url": "https://opengameart.org/sites/default/files/Of%20Far%20Different%20Nature%20-%20Escape%20-%2004%20-%20Pure%20%28CC-BY%29.mp3","format": "mp3",- "bytes": 12083840,- "sha256": "1b6c7d606d420f1b5b062b4fff8b1eb4f9c7efe11abd35bc33b2db8be7f35b73",- "license": "CC0-1.0",- "license_url": "https://creativecommons.org/publicdomain/zero/1.0/",- "attribution": null,+ "bytes": 7240430,+ "sha256": "5ff05f7633bff9384a430402636b8e7d21e6e3850bf0ca209c91cbb964058bf1",+ "license": "CC-BY-4.0",+ "license_url": "https://creativecommons.org/licenses/by/4.0/",+ "attribution": "\"Pure\" by Of Far Different Nature (fardifferent.carrd.co) - licensed CC-BY 4.0: https://opengameart.org/content/escape-album-14-tracks-deep-massive","placements": [+ "description","credits_file","end_card"],- "content_id": "unknown",- "duration": 299.5,- "shelf": "piano",+ "content_id": "none-known",+ "duration": 181.0,+ "shelf": "corporate-tech","moods": [- "serene",- "intimate",- "contemplative",- "pure"+ "clean",+ "flowing",+ "modern"],- "energy": 0.15,- "tempo": "slow",+ "energy": 0.6,+ "tempo": "fast","uses": [- "background",- "explainer",- "story"+ "tech",+ "product-demo",+ "explainer"],"vocals": "none","instruments": [- "piano"+ "synth",+ "drums",+ "bass"],- "ending": "clean",- "notes": "Studio-quality 'Open Goldberg Variations' release; gentle, ornamented aria, superb under thoughtful narration or opening titles.",- "composer": "Johann Sebastian Bach",- "quiet_intro_s": 1.0,- "lead_silence_s": 1.7,- "highlight_s": 188.0+ "ending": "soft",+ "notes": "Steady electronic track from the album 'Escape'; even level throughout.",+ "quiet_intro_s": 0.0,+ "lead_silence_s": 0.0,+ "highlight_s": 3.0},{- "credit_optional": "Ludwig van Beethoven: Piano Sonata No. 14 \"Moonlight\", Op. 27 No. 2 - I. Adagio sostenuto, performed by Paul Pitman (for Musopen) (public domain, via Wikimedia Commons)",+ "credit_optional": null,"loops": null,"status": "active",- "verified": "2026-09-29",- "id": "pd-beethoven-moonlight-sonata-i",- "title": "Piano Sonata No. 14 \"Moonlight\", Op. 27 No. 2 - I. Adagio sostenuto",- "artist": "Paul Pitman (for Musopen)",- "source": "wikimedia",- "landing_url": "https://commons.wikimedia.org/wiki/File:Ludwig_van_Beethoven_-_sonata_no._14_in_c_sharp_minor_%27moonlight%27,_op._27_no._2_-_i._adagio_sostenuto.ogg",- "file_url": "https://upload.wikimedia.org/wikipedia/commons/4/48/Ludwig_van_Beethoven_-_sonata_no._14_in_c_sharp_minor_%27moonlight%27%2C_op._27_no._2_-_i._adagio_sostenuto.ogg",- "format": "ogg",- "bytes": 10863043,- "sha256": "035a31b8d67de4b0574110592a6f8ce2f6e51dfc7f884e16f918e47e327d7d66",- "license": "CC-PDDC",- "license_url": "https://creativecommons.org/licenses/publicdomain/",- "attribution": null,+ "verified": "2026-09-30",+ "id": "ofdn-rush",+ "title": "Rush",+ "artist": "Of Far Different Nature",+ "source": "opengameart",+ "landing_url": "https://opengameart.org/content/escape-album-14-tracks-deep-massive",+ "file_url": "https://opengameart.org/sites/default/files/Of%20Far%20Different%20Nature%20-%20Escape%20-%2001%20-%20Rush%20%28CC-BY%29_0.mp3",+ "format": "mp3",+ "bytes": 6216055,+ "sha256": "668cb2c546e2fe89c2997e389ae59c9c35cd0fb0552f3b8e6f1937e97c14e750",+ "license": "CC-BY-4.0",+ "license_url": "https://creativecommons.org/licenses/by/4.0/",+ "attribution": "\"Rush\" by Of Far Different Nature (fardifferent.carrd.co) - licensed CC-BY 4.0: https://opengameart.org/content/escape-album-14-tracks-deep-massive","placements": [+ "description","credits_file","end_card"],- "content_id": "unknown",- "duration": 335.8,- "shelf": "piano",+ "content_id": "none-known",+ "duration": 155.3,+ "shelf": "upbeat","moods": [- "reflective",- "melancholic",- "nocturnal",- "intimate"+ "energetic",+ "massive",+ "driving"],- "energy": 0.15,- "tempo": "slow",+ "energy": 0.85,+ "tempo": "fast","uses": [- "story",- "emotional",- "background"+ "promo",+ "social",+ "launch"],"vocals": "none","instruments": [- "piano"+ "synth",+ "drums",+ "bass"],- "ending": "soft",- "notes": "Hushed, hypnotic triplet piano; excellent bed under serious narration or memorial pieces.",- "composer": "Ludwig van Beethoven",- "quiet_intro_s": 4.0,- "lead_silence_s": 4.5,- "highlight_s": 54.0+ "ending": "clean",+ "notes": "Deep, massive electro / drum and bass from the album 'Escape'.",+ "quiet_intro_s": 0.0,+ "lead_silence_s": 0.0,+ "highlight_s": 15.0},{- "credit_optional": "Ludwig van Beethoven: Piano Sonata No. 8 \"Pathetique\", Op. 13 - II. Adagio cantabile, performed by Musopen (performer uncredited) (CC0, via Wikimedia Commons)",+ "credit_optional": "\"Funky Hip Hop Lofi Jam\" by omfgdude (CC0, via OpenGameArt)","loops": null,"status": "active",- "verified": "2026-09-29",- "id": "pd-beethoven-pathetique-ii",- "title": "Piano Sonata No. 8 \"Pathetique\", Op. 13 - II. Adagio cantabile",- "artist": "Musopen (performer uncredited)",- "source": "wikimedia",- "landing_url": "https://commons.wikimedia.org/wiki/File:Beethoven,_Sonata_No._8_in_C_Minor_Pathetique,_Op._13_-_II._Adagio_cantabile.ogg",- "file_url": "https://upload.wikimedia.org/wikipedia/commons/6/63/Beethoven%2C_Sonata_No._8_in_C_Minor_Pathetique%2C_Op._13_-_II._Adagio_cantabile.ogg",+ "verified": "2026-09-30",+ "id": "omfgdude-funky-hip-hop-lofi-jam",+ "title": "Funky Hip Hop Lofi Jam",+ "artist": "omfgdude",+ "source": "opengameart",+ "landing_url": "https://opengameart.org/content/funky-hip-hop-lofi-jam",+ "file_url": "https://opengameart.org/sites/default/files/CVP701Jam_0.ogg","format": "ogg",- "bytes": 7450009,- "sha256": "96868eb250651f50522de6277528625172c8af78e238ff3b59dfc31004eb466a",+ "bytes": 10077689,+ "sha256": "7c213d1c6fe01bc6b67d6c1124c6cd88afae7149ee8ec966c7f55f517eb22af9","license": "CC0-1.0","license_url": "https://creativecommons.org/publicdomain/zero/1.0/","attribution": null,@@ -11665,776 +11983,2819 @@"credits_file","end_card"],- "content_id": "unknown",- "duration": 298.2,- "shelf": "piano",+ "content_id": "none-known",+ "duration": 189.3,+ "shelf": "lofi","moods": [- "warm",- "consoling",- "reflective",- "hopeful"+ "funky",+ "laid-back",+ "groovy"],- "energy": 0.2,- "tempo": "slow",+ "energy": 0.45,+ "tempo": "medium","uses": [- "story",- "testimonial",- "mission"+ "background",+ "tutorial",+ "social"],"vocals": "none","instruments": [- "piano"+ "keys",+ "drums",+ "bass"],- "ending": "soft",- "notes": "Warm cantabile theme; good for gratitude, tribute and 'thank you' sequences under narration.",- "composer": "Ludwig van Beethoven",- "quiet_intro_s": 0.0,- "lead_silence_s": 0.3,- "highlight_s": 153.0+ "ending": "clean",+ "notes": "One-take keyboard jam; relaxed and even, clean ending.",+ "quiet_intro_s": 4.0,+ "lead_silence_s": 1.4,+ "highlight_s": 102.0},{- "credit_optional": "Performed by the United States Army Band \"Pershing's Own\" (public domain, US government work)",+ "credit_optional": null,"loops": null,"status": "active",- "verified": "2026-09-29",- "id": "pd-elgar-pomp-and-circumstance-1",- "title": "Pomp and Circumstance March No. 1, Op. 39",- "artist": "United States Army Band (\"Pershing's Own\")",- "source": "wikimedia",- "landing_url": "https://commons.wikimedia.org/wiki/File:Pomp_and_Circumstance,_Op._39_-_No._1_-_United_States_Army_Band.mp3",- "file_url": "https://upload.wikimedia.org/wikipedia/commons/8/8a/Pomp_and_Circumstance%2C_Op._39_-_No._1_-_United_States_Army_Band.mp3",+ "verified": "2026-09-30",+ "id": "pablo-curious-critters",+ "title": "Curious Critters (Extended Version)",+ "artist": "Matthew Pablo",+ "source": "opengameart",+ "landing_url": "https://opengameart.org/content/curious-critters",+ "file_url": "https://opengameart.org/sites/default/files/Curious%20Critters%20%28Extended%20Version%29%201_0.mp3","format": "mp3",- "bytes": 5760789,- "sha256": "d113c1752cd9320f2d6f46c8da31f071e71517a277620a8b0909ea3a5cae5d58",- "license": "CC-PDDC",- "license_url": "https://creativecommons.org/licenses/publicdomain/",- "attribution": null,+ "bytes": 8680072,+ "sha256": "f9b62b22db0a4ede471433ab592ddbb4cc2739a0816566424ad7f6821b7ac07a",+ "license": "CC-BY-3.0",+ "license_url": "https://creativecommons.org/licenses/by/3.0/",+ "attribution": "\"Curious Critters (Extended Version)\" by Matthew Pablo (www.matthewpablo.com) - licensed CC-BY 3.0: https://opengameart.org/content/curious-critters","placements": [+ "description","credits_file","end_card"],- "content_id": "unknown",- "duration": 397.2,- "shelf": "orchestral",+ "content_id": "none-known",+ "duration": 214.6,+ "shelf": "playful","moods": [- "triumphant",- "ceremonial",- "proud",- "celebratory"+ "cute",+ "playful",+ "curious"],- "energy": 0.75,+ "energy": 0.55,"tempo": "medium","uses": [- "keynote",- "recap",- "outro"+ "social",+ "tutorial",+ "explainer"],"vocals": "none","instruments": [- "concert band",- "brass",+ "orchestra","percussion"],"ending": "clean",- "notes": "The graduation march ('Land of Hope and Glory' trio); achievements, milestones, awards.",- "composer": "Edward Elgar",+ "notes": "Cute, playful cue; the extended version, with transitions between its sections.","quiet_intro_s": 0.0,- "lead_silence_s": 0.4,- "highlight_s": 318.0+ "lead_silence_s": 0.0,+ "highlight_s": 50.0},{- "credit_optional": "Performed by \"The President's Own\" United States Marine Band (public domain, US government work)",+ "credit_optional": null,"loops": null,"status": "active",- "verified": "2026-09-29",- "id": "pd-grieg-holberg-air",- "title": "Holberg Suite, Op. 40 - IV. Air",- "artist": "United States Marine Band (Marine Chamber Orchestra, cond. Jason K. Fettig)",- "source": "wikimedia",- "landing_url": "https://commons.wikimedia.org/wiki/File:Grieg%27s_Suite_for_Strings,_Op._40,_%22From_Holberg%E2%80%99s_Time%22_-_IV._Air_-_Chamber_Orchestra_-_United_States_Marine_Band.mp3",- "file_url": "https://upload.wikimedia.org/wikipedia/commons/2/28/Grieg%27s_Suite_for_Strings%2C_Op._40%2C_%22From_Holberg%E2%80%99s_Time%22_-_IV._Air_-_Chamber_Orchestra_-_United_States_Marine_Band.mp3",+ "verified": "2026-09-30",+ "id": "pablo-irelands-coast",+ "title": "Ireland's Coast",+ "artist": "Matthew Pablo",+ "source": "opengameart",+ "landing_url": "https://opengameart.org/content/irelands-coast-game-edition",+ "file_url": "https://opengameart.org/sites/default/files/Ireland%27s%20Coast_0.mp3","format": "mp3",- "bytes": 7210499,- "sha256": "9575955094fadbf8642127cf76279934f6957d16a3f3de377b0f2bf13bea7598",- "license": "CC-PDDC",- "license_url": "https://creativecommons.org/licenses/publicdomain/",- "attribution": null,+ "bytes": 8503776,+ "sha256": "1fdc952281ad60e12aec334285564403ff406aa83fb6411252a42eb6e07e62aa",+ "license": "CC-BY-3.0",+ "license_url": "https://creativecommons.org/licenses/by/3.0/",+ "attribution": "\"Ireland's Coast\" by Matthew Pablo (www.matthewpablo.com) - licensed CC-BY 3.0: https://opengameart.org/content/irelands-coast-game-edition","placements": [+ "description","credits_file","end_card"],- "content_id": "unknown",- "duration": 316.9,- "shelf": "documentary",+ "content_id": "none-known",+ "duration": 205.8,+ "shelf": "upbeat","moods": [- "heartfelt",- "yearning",- "solemn",- "emotional"+ "lively",+ "celtic",+ "joyful"],- "energy": 0.35,- "tempo": "slow",+ "energy": 0.7,+ "tempo": "medium","uses": [- "documentary",- "emotional"+ "travel",+ "promo",+ "social"],"vocals": "none","instruments": [- "string orchestra"+ "orchestra",+ "strings",+ "percussion"],- "ending": "soft",- "notes": "Deeply expressive slow string movement; emotional documentary beats, tributes. Live concert recording (2013).",- "composer": "Edvard Grieg",+ "ending": "clean",+ "notes": "Big orchestral track with strong Irish flavours (game edition).","quiet_intro_s": 0.0,- "lead_silence_s": 0.2,- "highlight_s": 264.0+ "lead_silence_s": 0.0,+ "highlight_s": 11.0},{- "credit_optional": "Performed by \"The President's Own\" United States Marine Band (public domain, US government work)",+ "credit_optional": null,"loops": null,"status": "active",- "verified": "2026-09-29",- "id": "pd-grieg-holberg-praeludium",- "title": "Holberg Suite, Op. 40 - I. Praeludium",- "artist": "United States Marine Band (Marine Chamber Orchestra, cond. Jason K. Fettig)",- "source": "wikimedia",- "landing_url": "https://commons.wikimedia.org/wiki/File:Grieg%27s_Suite_for_Strings,_Op._40,_%22From_Holberg%E2%80%99s_Time%22_-_I._Praeludium_-_Chamber_Orchestra_-_United_States_Marine_Band.mp3",- "file_url": "https://upload.wikimedia.org/wikipedia/commons/0/08/Grieg%27s_Suite_for_Strings%2C_Op._40%2C_%22From_Holberg%E2%80%99s_Time%22_-_I._Praeludium_-_Chamber_Orchestra_-_United_States_Marine_Band.mp3",+ "verified": "2026-09-30",+ "id": "pablo-leap-into-eternity",+ "title": "Leap Into Eternity (Live Orchestra)",+ "artist": "Matthew Pablo",+ "source": "opengameart",+ "landing_url": "https://opengameart.org/content/leap-into-eternity-live-orchestra",+ "file_url": "https://opengameart.org/sites/default/files/Leap%20into%20Eternity%20%28Live%20Orchestra%29.mp3","format": "mp3",- "bytes": 3714636,- "sha256": "153a88f726d9bcde5820f0dafb788fecda5d54839df715690c91fe54c1bb7be8",- "license": "CC-PDDC",- "license_url": "https://creativecommons.org/licenses/publicdomain/",- "attribution": null,+ "bytes": 4442808,+ "sha256": "e246ab852191b31f8a46e7fa742bc1d1087f8929a3a1a441c6de16d695447480",+ "license": "CC-BY-3.0",+ "license_url": "https://creativecommons.org/licenses/by/3.0/",+ "attribution": "\"Leap Into Eternity (Live Orchestra)\" by Matthew Pablo (www.matthewpablo.com) - licensed CC-BY 3.0: https://opengameart.org/content/leap-into-eternity-live-orchestra","placements": [+ "description","credits_file","end_card"],- "content_id": "unknown",- "duration": 161.2,- "shelf": "orchestral",+ "content_id": "none-known",+ "duration": 110.8,+ "shelf": "documentary","moods": [- "energetic",- "bright",- "driving",- "optimistic"+ "somber",+ "tranquil",+ "reflective"],- "energy": 0.75,- "tempo": "fast",+ "energy": 0.3,+ "tempo": "slow","uses": [- "intro",- "travel",- "promo"+ "documentary",+ "memorial",+ "story"],"vocals": "none","instruments": [- "string orchestra"+ "orchestra",+ "strings"],- "ending": "soft",- "notes": "Galloping string figures; energetic openings, travel and progress montages. Live concert recording (2013).",- "composer": "Edvard Grieg",- "quiet_intro_s": 0.0,- "lead_silence_s": 0.2,- "highlight_s": 119.0+ "ending": "clean",+ "notes": "Film cue recorded with a live orchestra in a studio; somber and still.",+ "quiet_intro_s": 3.0,+ "lead_silence_s": 0.3,+ "highlight_s": 73.0},{- "credit_optional": "Edvard Grieg: Peer Gynt Suite No. 1, Op. 46 - I. Morning Mood, performed by Musopen Symphony Orchestra (Czech National Symphony Orchestra) (public domain, via Wikimedia Commons)",+ "credit_optional": null,"loops": null,"status": "active",- "verified": "2026-09-29",- "id": "pd-grieg-morning-mood",- "title": "Peer Gynt Suite No. 1, Op. 46 - I. Morning Mood",- "artist": "Musopen Symphony Orchestra (Czech National Symphony Orchestra)",- "source": "wikimedia",- "landing_url": "https://commons.wikimedia.org/wiki/File:Musopen_-_Morning.ogg",- "file_url": "https://upload.wikimedia.org/wikipedia/commons/1/1a/Musopen_-_Morning.ogg",- "format": "ogg",- "bytes": 3453888,- "sha256": "3207072ffef9f65f9a4a78c2ddc5afdd1c5b4c61b83ab092da3d6a87852e4996",- "license": "CC-PDDC",- "license_url": "https://creativecommons.org/licenses/publicdomain/",- "attribution": null,+ "verified": "2026-09-30",+ "id": "pablo-painted-dreams",+ "title": "Painted Dreams",+ "artist": "Matthew Pablo",+ "source": "opengameart",+ "landing_url": "https://opengameart.org/content/painted-dreams-mock-up",+ "file_url": "https://opengameart.org/sites/default/files/Painted%20Dreams%20Mock-Up.mp3",+ "format": "mp3",+ "bytes": 5930164,+ "sha256": "1d5f3ebaaaec9cebf5de98eb9dbe33975f63f40d521fc72ada2209298603572f",+ "license": "CC-BY-3.0",+ "license_url": "https://creativecommons.org/licenses/by/3.0/",+ "attribution": "\"Painted Dreams\" by Matthew Pablo (www.matthewpablo.com) - licensed CC-BY 3.0: https://opengameart.org/content/painted-dreams-mock-up","placements": [+ "description","credits_file","end_card"],- "content_id": "unknown",- "duration": 229.2,- "shelf": "orchestral",+ "content_id": "none-known",+ "duration": 145.3,+ "shelf": "cinematic","moods": [- "hopeful",- "fresh",- "sunrise",- "peaceful"+ "dreamy",+ "sweeping",+ "emotional"],- "energy": 0.45,- "tempo": "slow",+ "energy": 0.55,+ "tempo": "medium","uses": [- "intro",- "launch",- "story"+ "story",+ "trailer",+ "emotional"],"vocals": "none","instruments": ["orchestra",- "flute",- "oboe",- "strings"+ "strings",+ "brass"],- "ending": "clean",- "notes": "Famous flute/oboe sunrise theme that swells to a full-orchestra climax; openings, new beginnings, product dawn shots.",- "composer": "Edvard Grieg",- "quiet_intro_s": 0.0,- "lead_silence_s": 0.1,- "highlight_s": 46.0+ "ending": "soft",+ "notes": "Big orchestral film cue (sample-library mock-up) with overlapping themes; wide dynamics.",+ "quiet_intro_s": 2.0,+ "lead_silence_s": 0.3,+ "highlight_s": 78.0},{- "credit_optional": "Edvard Grieg: Piano Concerto in A minor, Op. 16 - II. Adagio, performed by Musopen (performers uncredited) (public domain, via Wikimedia Commons)",+ "credit_optional": null,"loops": null,"status": "active",- "verified": "2026-09-29",- "id": "pd-grieg-piano-concerto-adagio",- "title": "Piano Concerto in A minor, Op. 16 - II. Adagio",- "artist": "Musopen (performers uncredited)",- "source": "wikimedia",- "landing_url": "https://commons.wikimedia.org/wiki/File:Edvard_Grieg_-_piano_concerto_in_a_minor,_op._16_-_ii._adagio.ogg",- "file_url": "https://upload.wikimedia.org/wikipedia/commons/9/9d/Edvard_Grieg_-_piano_concerto_in_a_minor%2C_op._16_-_ii._adagio.ogg",- "format": "ogg",- "bytes": 6913372,- "sha256": "7f96d1d15f77b9078bf3ef1f0aac37c6b53972bb3b1e59a9f9aab3d7c28c090f",- "license": "CC-PDDC",- "license_url": "https://creativecommons.org/licenses/publicdomain/",- "attribution": null,+ "verified": "2026-09-30",+ "id": "pablo-shake-and-bake",+ "title": "Shake and Bake",+ "artist": "Matthew Pablo",+ "source": "opengameart",+ "landing_url": "https://opengameart.org/content/shake-and-bake",+ "file_url": "https://opengameart.org/sites/default/files/Shake%20and%20Bake_0.mp3",+ "format": "mp3",+ "bytes": 4662220,+ "sha256": "2499c4ddd0295b772be6b60cb39ea7bade6e6bb7584b7de29243a6a9adca647a",+ "license": "CC-BY-3.0",+ "license_url": "https://creativecommons.org/licenses/by/3.0/",+ "attribution": "\"Shake and Bake\" by Matthew Pablo (www.matthewpablo.com) - licensed CC-BY 3.0: https://opengameart.org/content/shake-and-bake","placements": [+ "description","credits_file","end_card"],- "content_id": "unknown",- "duration": 381.2,- "shelf": "piano",+ "content_id": "none-known",+ "duration": 116.3,+ "shelf": "playful","moods": [- "tender",- "romantic",- "hushed",- "emotional"+ "groovy",+ "quirky",+ "fun"],- "energy": 0.25,- "tempo": "slow",+ "energy": 0.65,+ "tempo": "medium","uses": [- "story",- "emotional"+ "social",+ "tutorial",+ "promo"],"vocals": "none","instruments": [- "piano",- "strings",- "horn",- "orchestra"+ "percussion",+ "bass",+ "keys"],- "ending": "cut",- "notes": "Hushed muted-strings opening then a lyrical piano entry; heartfelt stories, emotional pieces.",- "composer": "Edvard Grieg",+ "ending": "clean",+ "notes": "Very rhythmic casual-game groove; starts at full energy.","quiet_intro_s": 0.0,"lead_silence_s": 0.0,- "highlight_s": 235.0+ "highlight_s": 2.0},{- "credit_optional": "Performed by \"The President's Own\" United States Marine Band (public domain, US government work)",+ "credit_optional": null,"loops": null,"status": "active",- "verified": "2026-09-29",- "id": "pd-handel-water-music-hornpipe",- "title": "Water Music, Suite No. 2, HWV 349 - Alla hornpipe",- "artist": "United States Marine Band (Marine Chamber Orchestra)",- "source": "wikimedia",- "landing_url": "https://commons.wikimedia.org/wiki/File:Handel%27s_Water_Music_-_12._Alla_hornpipe_-_Chamber_Orchestra_-_United_States_Marine_Band.opus",- "file_url": "https://upload.wikimedia.org/wikipedia/commons/5/5c/Handel%27s_Water_Music_-_12._Alla_hornpipe_-_Chamber_Orchestra_-_United_States_Marine_Band.opus",- "format": "ogg",- "bytes": 3911359,- "sha256": "cbd5956d81eafb2a713dee5729ebc62d625c6417622335d6f4db82bc1662a1fe",- "license": "CC-PDDC",- "license_url": "https://creativecommons.org/licenses/publicdomain/",- "attribution": null,+ "verified": "2026-09-30",+ "id": "pablo-southern-pastures",+ "title": "Southern Pastures (Miniature Suite for Orchestra)",+ "artist": "Matthew Pablo",+ "source": "opengameart",+ "landing_url": "https://opengameart.org/content/southern-pastures-miniature-suite-for-orchestra",+ "file_url": "https://opengameart.org/sites/default/files/Southern%20Pastures%20%28Miniature%20Suite%20f_0.mp3",+ "format": "mp3",+ "bytes": 11098827,+ "sha256": "3cc378b224e3bffd1af74c7d10642e7655821afa5f17c973f99882a09d665e78",+ "license": "CC-BY-3.0",+ "license_url": "https://creativecommons.org/licenses/by/3.0/",+ "attribution": "\"Southern Pastures (Miniature Suite for Orchestra)\" by Matthew Pablo (www.matthewpablo.com) - licensed CC-BY 3.0: https://opengameart.org/content/southern-pastures-miniature-suite-for-orchestra","placements": [+ "description","credits_file","end_card"],- "content_id": "unknown",- "duration": 228.7,+ "content_id": "none-known",+ "duration": 277.2,"shelf": "orchestral","moods": [- "festive",- "regal",- "celebratory",- "bright"+ "pastoral",+ "nostalgic",+ "dramatic"],- "energy": 0.7,+ "energy": 0.45,"tempo": "medium","uses": [- "intro",- "keynote",- "promo"+ "documentary",+ "history",+ "story"],"vocals": "none","instruments": ["orchestra",- "trumpets",- "horns",- "strings"+ "strings",+ "brass"],"ending": "clean",- "notes": "Regal baroque celebration; announcements, grand openings, 'we did it' moments. Live concert recording (2017); Opus audio in an Ogg container (.opus).",- "composer": "George Frideric Handel",+ "notes": "Four-section miniature suite; the sections change scene, so cut on a section boundary.","quiet_intro_s": 1.0,- "lead_silence_s": 0.9,- "highlight_s": 193.0+ "lead_silence_s": 0.4,+ "highlight_s": 91.0},{- "credit_optional": "Performed by \"The President's Own\" United States Marine Band (public domain, US government work)",+ "credit_optional": null,"loops": null,"status": "active",- "verified": "2026-09-29",- "id": "pd-mozart-gran-partita-adagio",- "title": "Serenade No. 10 \"Gran Partita\", K. 361 - III. Adagio",- "artist": "United States Marine Band (\"The President's Own\")",- "source": "wikimedia",- "landing_url": "https://commons.wikimedia.org/wiki/File:Mozart%27s_Serenade_No._10_%22Grand_Partita%22_-_III._Adagio._Andante_-_United_States_Marine_Band.mp3",- "file_url": "https://upload.wikimedia.org/wikipedia/commons/6/60/Mozart%27s_Serenade_No._10_%22Grand_Partita%22_-_III._Adagio._Andante_-_United_States_Marine_Band.mp3",+ "verified": "2026-09-30",+ "id": "pablo-space-sprinkles",+ "title": "Space Sprinkles",+ "artist": "Matthew Pablo",+ "source": "opengameart",+ "landing_url": "https://opengameart.org/content/space-sprinkles",+ "file_url": "https://opengameart.org/sites/default/files/Space%20Sprinkles_0.mp3","format": "mp3",- "bytes": 4455333,- "sha256": "c1837068bc084b0e59722d7eb5b4958bb9c39c8f8bbd627bd065cc3352575976",- "license": "CC-PDDC",- "license_url": "https://creativecommons.org/licenses/publicdomain/",- "attribution": null,+ "bytes": 6510511,+ "sha256": "4283eb20471fd30fed0e56cefcb5003e6964dff40d7097d82af6ab8e8736a8fa",+ "license": "CC-BY-3.0",+ "license_url": "https://creativecommons.org/licenses/by/3.0/",+ "attribution": "\"Space Sprinkles\" by Matthew Pablo (www.matthewpablo.com) - licensed CC-BY 3.0: https://opengameart.org/content/space-sprinkles","placements": [+ "description","credits_file","end_card"],- "content_id": "unknown",- "duration": 332.5,- "shelf": "orchestral",+ "content_id": "none-known",+ "duration": 162.5,+ "shelf": "playful","moods": [- "sublime",- "tender",- "floating",- "reflective"+ "lively",+ "sparkly",+ "sci-fi"+ ],+ "energy": 0.75,+ "tempo": "fast",+ "uses": [+ "social",+ "promo",+ "tech"+ ],+ "vocals": "none",+ "instruments": [+ "synth",+ "drums",+ "bass"+ ],+ "ending": "clean",+ "notes": "Lively sci-fi game track; bright and busy.",+ "quiet_intro_s": 1.0,+ "lead_silence_s": 0.1,+ "highlight_s": 112.0+ },+ {+ "credit_optional": null,+ "loops": null,+ "status": "active",+ "verified": "2026-09-30",+ "id": "pablo-spiritwatcher",+ "title": "Spiritwatcher",+ "artist": "Matthew Pablo",+ "source": "opengameart",+ "landing_url": "https://opengameart.org/content/spiritwatcher",+ "file_url": "https://opengameart.org/sites/default/files/Spiritwatcher.mp3",+ "format": "mp3",+ "bytes": 5656153,+ "sha256": "5e7ec8b7ac9243456b4721cd3e7232255a3d2c83e308426e50e3b40defd4227c",+ "license": "CC-BY-3.0",+ "license_url": "https://creativecommons.org/licenses/by/3.0/",+ "attribution": "\"Spiritwatcher\" by Matthew Pablo (www.matthewpablo.com) - licensed CC-BY 3.0: https://opengameart.org/content/spiritwatcher",+ "placements": [+ "description",+ "credits_file",+ "end_card"+ ],+ "content_id": "none-known",+ "duration": 135.2,+ "shelf": "tension",+ "moods": [+ "dark",+ "somber",+ "lush"],"energy": 0.25,"tempo": "slow","uses": [- "story",- "emotional",+ "problem",+ "documentary","background"],"vocals": "none","instruments": [- "oboe",- "clarinet",- "basset horn",- "bassoon",- "horn",- "double bass"+ "synth pads",+ "strings"],- "ending": "clean",- "notes": "The celebrated 'Amadeus' adagio for winds; floating, luminous bed for reflective or awe moments. Broadcast recording (2021).",- "composer": "Wolfgang Amadeus Mozart",- "quiet_intro_s": 1.0,- "lead_silence_s": 1.4,- "highlight_s": 250.0+ "ending": "soft",+ "notes": "Slow, dark and lush; open texture that leaves room for a voice.",+ "quiet_intro_s": 0.0,+ "lead_silence_s": 0.4,+ "highlight_s": 45.0},{- "credit_optional": "Wolfgang Amadeus Mozart: Piano Sonata No. 16 in C major, K. 545 - I. Allegro, performed by Musopen (performer uncredited) (public domain, via Wikimedia Commons)",+ "credit_optional": null,"loops": null,"status": "active",- "verified": "2026-09-29",- "id": "pd-mozart-sonata-k545-i",- "title": "Piano Sonata No. 16 in C major, K. 545 - I. Allegro",- "artist": "Musopen (performer uncredited)",- "source": "wikimedia",- "landing_url": "https://commons.wikimedia.org/wiki/File:Wolfgang_Amadeus_Mozart_-_sonata_no._16_in_c_major,_k.545_%27sonata_facile%27_-_i._allegro.ogg",- "file_url": "https://upload.wikimedia.org/wikipedia/commons/3/38/Wolfgang_Amadeus_Mozart_-_sonata_no._16_in_c_major%2C_k.545_%27sonata_facile%27_-_i._allegro.ogg",- "format": "ogg",- "bytes": 2937849,- "sha256": "27c63f441129af6d244714a2d3fff5a427b5cb46bcf362137ee0fff29bc0fa50",- "license": "CC-PDDC",- "license_url": "https://creativecommons.org/licenses/publicdomain/",- "attribution": null,+ "verified": "2026-09-30",+ "id": "pablo-thrust-sequence",+ "title": "Thrust Sequence",+ "artist": "Matthew Pablo",+ "source": "opengameart",+ "landing_url": "https://opengameart.org/content/thrust-sequence",+ "file_url": "https://opengameart.org/sites/default/files/Thrust%20Sequence_0.mp3",+ "format": "mp3",+ "bytes": 5530335,+ "sha256": "402bc79218db2b81e38f0b54d56a9270d6010289b471916a34154a837eaa390e",+ "license": "CC-BY-3.0",+ "license_url": "https://creativecommons.org/licenses/by/3.0/",+ "attribution": "\"Thrust Sequence\" by Matthew Pablo (www.matthewpablo.com) - licensed CC-BY 3.0: https://opengameart.org/content/thrust-sequence","placements": [+ "description","credits_file","end_card"],- "content_id": "unknown",- "duration": 133.9,- "shelf": "piano",+ "content_id": "none-known",+ "duration": 138.0,+ "shelf": "corporate-tech","moods": [- "bright",- "playful",- "light",- "cheerful"+ "energetic",+ "electro",+ "driving"],- "energy": 0.4,+ "energy": 0.8,"tempo": "fast","uses": [- "tutorial",- "explainer"+ "promo",+ "tech",+ "launch"],"vocals": "none","instruments": [- "piano"+ "synth",+ "drums",+ "bass"],"ending": "clean",- "notes": "Crisp, sunny piano; light explainers, tutorials, quick tips.",- "composer": "Wolfgang Amadeus Mozart",- "quiet_intro_s": 2.0,- "lead_silence_s": 1.9,- "highlight_s": 16.0+ "notes": "Electro track with a dramatic middle section; high energy from the first bar.",+ "quiet_intro_s": 0.0,+ "lead_silence_s": 0.0,+ "highlight_s": 6.0},{- "credit_optional": "Erik Satie: Gymnopedie No. 1 (Lent et douloureux), performed by Robin Alciatore (for Musopen) (public domain, via Wikimedia Commons)",+ "credit_optional": null,"loops": null,"status": "active",- "verified": "2026-09-29",- "id": "pd-satie-gymnopedie-1",- "title": "Gymnopedie No. 1 (Lent et douloureux)",- "artist": "Robin Alciatore (for Musopen)",- "source": "wikimedia",- "landing_url": "https://commons.wikimedia.org/wiki/File:Erik_Satie_-_gymnopedies_-_la_1_ere._lent_et_douloureux.ogg",- "file_url": "https://upload.wikimedia.org/wikipedia/commons/9/90/Erik_Satie_-_gymnopedies_-_la_1_ere._lent_et_douloureux.ogg",- "format": "ogg",- "bytes": 3696351,- "sha256": "419e37656856224227086df32d6d481a00a738961e08fca9f6147e472beea53e",- "license": "CC-PDDC",- "license_url": "https://creativecommons.org/licenses/publicdomain/",- "attribution": null,+ "verified": "2026-09-30",+ "id": "pablo-woodland-fantasy",+ "title": "Woodland Fantasy",+ "artist": "Matthew Pablo",+ "source": "opengameart",+ "landing_url": "https://opengameart.org/content/woodland-fantasy",+ "file_url": "https://opengameart.org/sites/default/files/Woodland%20Fantasy_0.mp3",+ "format": "mp3",+ "bytes": 6012254,+ "sha256": "87f9a9d04fdd0b924db98b90e86c2906330f4931cb8734f7b431706e2869aacd",+ "license": "CC-BY-3.0",+ "license_url": "https://creativecommons.org/licenses/by/3.0/",+ "attribution": "\"Woodland Fantasy\" by Matthew Pablo (www.matthewpablo.com) - licensed CC-BY 3.0: https://opengameart.org/content/woodland-fantasy","placements": [+ "description","credits_file","end_card"],- "content_id": "unknown",- "duration": 183.6,- "shelf": "piano",+ "content_id": "none-known",+ "duration": 150.0,+ "shelf": "playful","moods": [- "calm",- "melancholic",- "minimal",- "contemplative"+ "peaceful",+ "medieval",+ "whimsical"],- "energy": 0.1,+ "energy": 0.35,"tempo": "slow","uses": [- "background",- "explainer",- "data"+ "story",+ "travel",+ "background"],"vocals": "none","instruments": [- "piano"+ "violin",+ "strings"],- "ending": "clean",- "notes": "The classic sparse Satie waltz; ideal unobtrusive bed under narration, slow b-roll, reflective product stories.",- "composer": "Erik Satie",- "quiet_intro_s": 2.0,- "lead_silence_s": 2.2,- "highlight_s": 50.0+ "ending": "soft",+ "notes": "Peaceful medieval-fantasy ballad with a real violin; town or tavern feel.",+ "quiet_intro_s": 0.0,+ "lead_silence_s": 0.1,+ "highlight_s": 69.0},{- "credit_optional": "Robert Schumann: Kinderszenen, Op. 15 - VII. Traumerei (Dreaming), performed by Musopen (performer uncredited) (public domain, via Wikimedia Commons)",+ "credit_optional": null,"loops": null,"status": "active",- "verified": "2026-09-29",- "id": "pd-schumann-traumerei",- "title": "Kinderszenen, Op. 15 - VII. Traumerei (Dreaming)",- "artist": "Musopen (performer uncredited)",- "source": "wikimedia",- "landing_url": "https://commons.wikimedia.org/wiki/File:Robert_Schumann_-_scenes_from_childhood,_op._15_-_vii._dreaming.ogg",- "file_url": "https://upload.wikimedia.org/wikipedia/commons/0/06/Robert_Schumann_-_scenes_from_childhood%2C_op._15_-_vii._dreaming.ogg",- "format": "ogg",- "bytes": 2892811,- "sha256": "bf04d6906d50f399ec62b7cf8650fe0414d684446d6a0ae2053a416d6515deb5",- "license": "CC-PDDC",- "license_url": "https://creativecommons.org/licenses/publicdomain/",- "attribution": null,+ "verified": "2026-09-30",+ "id": "pablo-you-were-my-brother",+ "title": "You Were My Brother (Live Orchestra)",+ "artist": "Matthew Pablo",+ "source": "opengameart",+ "landing_url": "https://opengameart.org/content/you-were-my-brother-live-orchestra",+ "file_url": "https://opengameart.org/sites/default/files/Tropic%20Strike%20-%201M2%20-%20_You%20Were%20My%20Brother__0.mp3",+ "format": "mp3",+ "bytes": 4296522,+ "sha256": "b9799c78571a13b05c8b860b3d7fc3723f4e1adf6c01cb9033011e53813c50ee",+ "license": "CC-BY-3.0",+ "license_url": "https://creativecommons.org/licenses/by/3.0/",+ "attribution": "\"You Were My Brother (Live Orchestra)\" by Matthew Pablo (www.matthewpablo.com) - licensed CC-BY 3.0: https://opengameart.org/content/you-were-my-brother-live-orchestra","placements": [+ "description","credits_file","end_card"],- "content_id": "unknown",- "duration": 203.0,- "shelf": "piano",+ "content_id": "none-known",+ "duration": 107.2,+ "shelf": "cinematic","moods": [- "tender",- "nostalgic",- "dreamy",- "warm"+ "emotional",+ "grieving",+ "tender"],- "energy": 0.1,+ "energy": 0.35,"tempo": "slow","uses": [- "story",- "testimonial"+ "emotional",+ "memorial",+ "story"+ ],+ "vocals": "none",+ "instruments": [+ "orchestra",+ "strings"+ ],+ "ending": "clean",+ "notes": "Live-orchestra film cue for an emotional scene; short and complete.",+ "quiet_intro_s": 1.0,+ "lead_silence_s": 0.2,+ "highlight_s": 39.0+ },+ {+ "credit_optional": null,+ "loops": null,+ "status": "active",+ "verified": "2026-09-30",+ "id": "panchout-sweet-70s",+ "title": "Sweet 70s",+ "artist": "Clement Panchout",+ "source": "opengameart",+ "landing_url": "https://opengameart.org/content/funky-sweet-70s",+ "file_url": "https://opengameart.org/sites/default/files/ClementPanchout_Sweet70s.wav",+ "format": "wav",+ "bytes": 20322930,+ "sha256": "c019992363f26c267f3f012034cfcee9c6c861282293958bbeaff47a59b7ea8f",+ "license": "CC-BY-4.0",+ "license_url": "https://creativecommons.org/licenses/by/4.0/",+ "attribution": "\"Sweet 70s\" by Clement Panchout (http://www.clementpanchout.com/) - licensed CC-BY 4.0: https://opengameart.org/content/funky-sweet-70s",+ "placements": [+ "description",+ "credits_file",+ "end_card"+ ],+ "content_id": "none-known",+ "duration": 115.2,+ "shelf": "upbeat",+ "moods": [+ "funky",+ "juicy",+ "retro"+ ],+ "energy": 0.8,+ "tempo": "fast",+ "uses": [+ "social",+ "promo",+ "intro"+ ],+ "vocals": "none",+ "instruments": [+ "bass",+ "drums",+ "electric guitar",+ "keys"+ ],+ "ending": "cut",+ "notes": "Funky, upbeat 70s groove; a loop-style track that stops at full level (fade it out).",+ "quiet_intro_s": 0.0,+ "lead_silence_s": 0.0,+ "highlight_s": 0.0+ },+ {+ "credit_optional": null,+ "loops": null,+ "status": "active",+ "verified": "2026-09-30",+ "id": "panchout-time-flies",+ "title": "Time Flies",+ "artist": "Clement Panchout",+ "source": "opengameart",+ "landing_url": "https://opengameart.org/content/emotional-time-flies",+ "file_url": "https://opengameart.org/sites/default/files/time_flies_clement_panchout_2016.wav",+ "format": "wav",+ "bytes": 17781266,+ "sha256": "e37ab2611e038defcd4a770afe9ee47a32847cfa58b50dcbe69580a713d19f29",+ "license": "CC-BY-4.0",+ "license_url": "https://creativecommons.org/licenses/by/4.0/",+ "attribution": "\"Time Flies\" by Clement Panchout (http://www.clementpanchout.com/) - licensed CC-BY 4.0: https://opengameart.org/content/emotional-time-flies",+ "placements": [+ "description",+ "credits_file",+ "end_card"+ ],+ "content_id": "none-known",+ "duration": 100.8,+ "shelf": "cinematic",+ "moods": [+ "aerial",+ "emotional",+ "floating"+ ],+ "energy": 0.3,+ "tempo": "slow",+ "uses": [+ "story",+ "emotional",+ "recap"+ ],+ "vocals": "none",+ "instruments": [+ "piano",+ "strings",+ "synth pads"+ ],+ "ending": "cut",+ "notes": "Aerial, emotional tune about time passing; ends at full level (fade it out).",+ "quiet_intro_s": 0.0,+ "lead_silence_s": 0.0,+ "highlight_s": 36.0+ },+ {+ "credit_optional": "Tomaso Albinoni: Oboe Concerto in D minor, Op. 9 No. 2 - II. Adagio, performed by Paul Arden-Taylor (oboe), for Musopen (CC0, via Wikimedia Commons)",+ "loops": null,+ "status": "active",+ "verified": "2026-09-29",+ "id": "pd-albinoni-oboe-concerto-adagio",+ "title": "Oboe Concerto in D minor, Op. 9 No. 2 - II. Adagio",+ "artist": "Paul Arden-Taylor (oboe), for Musopen",+ "source": "wikimedia",+ "landing_url": "https://commons.wikimedia.org/wiki/File:Albinoni,_Concerto_for_Oboe_and_Strings_No._2_in_D_minor,_Op._9,_II._Adagio.ogg",+ "file_url": "https://upload.wikimedia.org/wikipedia/commons/d/da/Albinoni%2C_Concerto_for_Oboe_and_Strings_No._2_in_D_minor%2C_Op._9%2C_II._Adagio.ogg",+ "format": "ogg",+ "bytes": 4544115,+ "sha256": "973d4afdbff655ba428f161f4f6326adc0737693720322058c0987ee7a9e4c0c",+ "license": "CC0-1.0",+ "license_url": "https://creativecommons.org/publicdomain/zero/1.0/",+ "attribution": null,+ "placements": [+ "credits_file",+ "end_card"+ ],+ "content_id": "unknown",+ "duration": 257.8,+ "shelf": "documentary",+ "moods": [+ "poignant",+ "tender",+ "elegiac",+ "beautiful"+ ],+ "energy": 0.3,+ "tempo": "slow",+ "uses": [+ "emotional",+ "story"+ ],+ "vocals": "none",+ "instruments": [+ "oboe",+ "strings",+ "continuo"+ ],+ "ending": "soft",+ "notes": "Authentic Albinoni (not the Giazotto 'Adagio'); aching oboe line for emotional or memorial moments.",+ "composer": "Tomaso Albinoni",+ "quiet_intro_s": 1.0,+ "lead_silence_s": 1.3,+ "highlight_s": 219.0+ },+ {+ "credit_optional": "Performed by the United States Air Force Band (public domain, US government work)",+ "loops": null,+ "status": "active",+ "verified": "2026-09-29",+ "id": "pd-bach-air-usaf-band",+ "title": "Orchestral Suite No. 3, BWV 1068 - Air (\"Air on the G String\")",+ "artist": "United States Air Force Band, Air Force Strings",+ "source": "wikimedia",+ "landing_url": "https://commons.wikimedia.org/wiki/File:Air_-_Air_Force_Strings_-_United_States_Air_Force_Band.mp3",+ "file_url": "https://upload.wikimedia.org/wikipedia/commons/e/ec/Air_-_Air_Force_Strings_-_United_States_Air_Force_Band.mp3",+ "format": "mp3",+ "bytes": 7539726,+ "sha256": "139e7a43fc39a5502b58a49b0002f96d37875be3794d2f6938ef59c1f35af1cd",+ "license": "CC-PDDC",+ "license_url": "https://creativecommons.org/licenses/publicdomain/",+ "attribution": null,+ "placements": [+ "credits_file",+ "end_card"+ ],+ "content_id": "unknown",+ "duration": 183.3,+ "shelf": "orchestral",+ "moods": [+ "serene",+ "noble",+ "graceful",+ "reflective"+ ],+ "energy": 0.25,+ "tempo": "slow",+ "uses": [+ "documentary",+ "keynote",+ "outro"+ ],+ "vocals": "none",+ "instruments": [+ "string orchestra"+ ],+ "ending": "soft",+ "notes": "Timeless slow string air; ceremonies, tributes, calm corporate or institutional films.",+ "composer": "Johann Sebastian Bach",+ "quiet_intro_s": 5.0,+ "lead_silence_s": 4.3,+ "highlight_s": 131.0+ },+ {+ "credit_optional": "Johann Sebastian Bach: Goldberg Variations, BWV 988 - Aria, performed by Kimiko Ishizaka (CC0, via Wikimedia Commons)",+ "loops": null,+ "status": "active",+ "verified": "2026-09-29",+ "id": "pd-bach-goldberg-aria-ishizaka",+ "title": "Goldberg Variations, BWV 988 - Aria",+ "artist": "Kimiko Ishizaka",+ "source": "wikimedia",+ "landing_url": "https://commons.wikimedia.org/wiki/File:Kimiko_Ishizaka_-_J.S._Bach-_-Open-_Goldberg_Variations,_BWV_988_(Piano)_-_01_Aria.mp3",+ "file_url": "https://upload.wikimedia.org/wikipedia/commons/5/59/Kimiko_Ishizaka_-_J.S._Bach-_-Open-_Goldberg_Variations%2C_BWV_988_%28Piano%29_-_01_Aria.mp3",+ "format": "mp3",+ "bytes": 12083840,+ "sha256": "1b6c7d606d420f1b5b062b4fff8b1eb4f9c7efe11abd35bc33b2db8be7f35b73",+ "license": "CC0-1.0",+ "license_url": "https://creativecommons.org/publicdomain/zero/1.0/",+ "attribution": null,+ "placements": [+ "credits_file",+ "end_card"+ ],+ "content_id": "unknown",+ "duration": 299.5,+ "shelf": "piano",+ "moods": [+ "serene",+ "intimate",+ "contemplative",+ "pure"+ ],+ "energy": 0.15,+ "tempo": "slow",+ "uses": [+ "background",+ "explainer",+ "story"+ ],+ "vocals": "none",+ "instruments": [+ "piano"+ ],+ "ending": "clean",+ "notes": "Studio-quality 'Open Goldberg Variations' release; gentle, ornamented aria, superb under thoughtful narration or opening titles.",+ "composer": "Johann Sebastian Bach",+ "quiet_intro_s": 1.0,+ "lead_silence_s": 1.7,+ "highlight_s": 188.0+ },+ {+ "credit_optional": "Johann Sebastian Bach: Goldberg Variations, BWV 988 - Variation 13, performed by Kimiko Ishizaka (CC0, via Wikimedia Commons)",+ "loops": null,+ "status": "active",+ "verified": "2026-09-30",+ "id": "pd-bach-goldberg-var13-ishizaka",+ "title": "Goldberg Variations, BWV 988 - Variation 13",+ "artist": "Kimiko Ishizaka",+ "source": "wikimedia",+ "landing_url": "https://commons.wikimedia.org/wiki/File:Goldberg_Variations_14_Variatio_13_a_2_Clav.ogg",+ "file_url": "https://upload.wikimedia.org/wikipedia/commons/1/14/Goldberg_Variations_14_Variatio_13_a_2_Clav.ogg",+ "format": "ogg",+ "bytes": 7406030,+ "sha256": "ad8f58ee444146b9630023e7f07920bdb43f8b6510929f362678a27bb12e49de",+ "license": "CC0-1.0",+ "license_url": "https://creativecommons.org/publicdomain/zero/1.0/",+ "attribution": null,+ "placements": [+ "credits_file",+ "end_card"+ ],+ "content_id": "unknown",+ "duration": 254.5,+ "shelf": "piano",+ "moods": [+ "graceful",+ "intimate",+ "lyrical"+ ],+ "energy": 0.2,+ "tempo": "slow",+ "uses": [+ "background",+ "explainer",+ "story"+ ],+ "vocals": "none",+ "instruments": [+ "piano"+ ],+ "ending": "clean",+ "notes": "From the Open Goldberg Variations; a lyrical, ornamented slow variation.",+ "composer": "Johann Sebastian Bach",+ "released": "2012",+ "quiet_intro_s": 0.0,+ "lead_silence_s": 0.2,+ "highlight_s": 141.0+ },+ {+ "credit_optional": "Johann Sebastian Bach: Goldberg Variations, BWV 988 - Variation 16 (Ouverture), performed by Kimiko Ishizaka (CC0, via Wikimedia Commons)",+ "loops": null,+ "status": "active",+ "verified": "2026-09-30",+ "id": "pd-bach-goldberg-var16-ishizaka",+ "title": "Goldberg Variations, BWV 988 - Variation 16 (Ouverture)",+ "artist": "Kimiko Ishizaka",+ "source": "wikimedia",+ "landing_url": "https://commons.wikimedia.org/wiki/File:Kimiko_Ishizaka_-_J.S._Bach-_-Open-_Goldberg_Variations,_BWV_988_(Piano)_-_17_Variatio_16_a_1_Clav._Ouverture.mp3",+ "file_url": "https://upload.wikimedia.org/wikipedia/commons/6/62/Kimiko_Ishizaka_-_J.S._Bach-_-Open-_Goldberg_Variations%2C_BWV_988_%28Piano%29_-_17_Variatio_16_a_1_Clav._Ouverture.mp3",+ "format": "mp3",+ "bytes": 7621082,+ "sha256": "97e55fa51f355bc802d73a073ba6043e8581339e30eadb20bb5d6b6cc3128808",+ "license": "CC0-1.0",+ "license_url": "https://creativecommons.org/publicdomain/zero/1.0/",+ "attribution": null,+ "placements": [+ "credits_file",+ "end_card"+ ],+ "content_id": "unknown",+ "duration": 188.7,+ "shelf": "piano",+ "moods": [+ "stately",+ "bright",+ "ceremonial"+ ],+ "energy": 0.45,+ "tempo": "medium",+ "uses": [+ "intro",+ "story",+ "explainer"+ ],+ "vocals": "none",+ "instruments": [+ "piano"+ ],+ "ending": "clean",+ "notes": "From the Open Goldberg Variations; the French overture that opens the second half.",+ "composer": "Johann Sebastian Bach",+ "released": "2012",+ "quiet_intro_s": 1.0,+ "lead_silence_s": 0.9,+ "highlight_s": 123.0+ },+ {+ "credit_optional": "Johann Sebastian Bach: Goldberg Variations, BWV 988 - Variation 21 (Canone alla Settima), performed by Kimiko Ishizaka (CC0, via Wikimedia Commons)",+ "loops": null,+ "status": "active",+ "verified": "2026-09-30",+ "id": "pd-bach-goldberg-var21-ishizaka",+ "title": "Goldberg Variations, BWV 988 - Variation 21 (Canone alla Settima)",+ "artist": "Kimiko Ishizaka",+ "source": "wikimedia",+ "landing_url": "https://commons.wikimedia.org/wiki/File:Goldberg_Variations_22_Variatio_21_Canone_alla_Settima.ogg",+ "file_url": "https://upload.wikimedia.org/wikipedia/commons/0/04/Goldberg_Variations_22_Variatio_21_Canone_alla_Settima.ogg",+ "format": "ogg",+ "bytes": 6851891,+ "sha256": "7e6d4e520a22dd05a7b01e1751027801f2b231fe2156de64553f06b93e222026",+ "license": "CC0-1.0",+ "license_url": "https://creativecommons.org/publicdomain/zero/1.0/",+ "attribution": null,+ "placements": [+ "credits_file",+ "end_card"+ ],+ "content_id": "unknown",+ "duration": 234.6,+ "shelf": "piano",+ "moods": [+ "contemplative",+ "grave",+ "intimate"+ ],+ "energy": 0.2,+ "tempo": "slow",+ "uses": [+ "background",+ "data",+ "story"+ ],+ "vocals": "none",+ "instruments": [+ "piano"+ ],+ "ending": "clean",+ "notes": "From the Open Goldberg Variations; a grave minor-key canon.",+ "composer": "Johann Sebastian Bach",+ "released": "2012",+ "quiet_intro_s": 0.0,+ "lead_silence_s": 0.4,+ "highlight_s": 102.0+ },+ {+ "credit_optional": "Ludwig van Beethoven: Piano Sonata No. 14 \"Moonlight\", Op. 27 No. 2 - I. Adagio sostenuto, performed by Paul Pitman (for Musopen) (public domain, via Wikimedia Commons)",+ "loops": null,+ "status": "active",+ "verified": "2026-09-29",+ "id": "pd-beethoven-moonlight-sonata-i",+ "title": "Piano Sonata No. 14 \"Moonlight\", Op. 27 No. 2 - I. Adagio sostenuto",+ "artist": "Paul Pitman (for Musopen)",+ "source": "wikimedia",+ "landing_url": "https://commons.wikimedia.org/wiki/File:Ludwig_van_Beethoven_-_sonata_no._14_in_c_sharp_minor_%27moonlight%27,_op._27_no._2_-_i._adagio_sostenuto.ogg",+ "file_url": "https://upload.wikimedia.org/wikipedia/commons/4/48/Ludwig_van_Beethoven_-_sonata_no._14_in_c_sharp_minor_%27moonlight%27%2C_op._27_no._2_-_i._adagio_sostenuto.ogg",+ "format": "ogg",+ "bytes": 10863043,+ "sha256": "035a31b8d67de4b0574110592a6f8ce2f6e51dfc7f884e16f918e47e327d7d66",+ "license": "CC-PDDC",+ "license_url": "https://creativecommons.org/licenses/publicdomain/",+ "attribution": null,+ "placements": [+ "credits_file",+ "end_card"+ ],+ "content_id": "unknown",+ "duration": 335.8,+ "shelf": "piano",+ "moods": [+ "reflective",+ "melancholic",+ "nocturnal",+ "intimate"+ ],+ "energy": 0.15,+ "tempo": "slow",+ "uses": [+ "story",+ "emotional",+ "background"+ ],+ "vocals": "none",+ "instruments": [+ "piano"+ ],+ "ending": "soft",+ "notes": "Hushed, hypnotic triplet piano; excellent bed under serious narration or memorial pieces.",+ "composer": "Ludwig van Beethoven",+ "quiet_intro_s": 4.0,+ "lead_silence_s": 4.5,+ "highlight_s": 54.0+ },+ {+ "credit_optional": "Ludwig van Beethoven: Piano Sonata No. 8 \"Pathetique\", Op. 13 - II. Adagio cantabile, performed by Musopen (performer uncredited) (CC0, via Wikimedia Commons)",+ "loops": null,+ "status": "active",+ "verified": "2026-09-29",+ "id": "pd-beethoven-pathetique-ii",+ "title": "Piano Sonata No. 8 \"Pathetique\", Op. 13 - II. Adagio cantabile",+ "artist": "Musopen (performer uncredited)",+ "source": "wikimedia",+ "landing_url": "https://commons.wikimedia.org/wiki/File:Beethoven,_Sonata_No._8_in_C_Minor_Pathetique,_Op._13_-_II._Adagio_cantabile.ogg",+ "file_url": "https://upload.wikimedia.org/wikipedia/commons/6/63/Beethoven%2C_Sonata_No._8_in_C_Minor_Pathetique%2C_Op._13_-_II._Adagio_cantabile.ogg",+ "format": "ogg",+ "bytes": 7450009,+ "sha256": "96868eb250651f50522de6277528625172c8af78e238ff3b59dfc31004eb466a",+ "license": "CC0-1.0",+ "license_url": "https://creativecommons.org/publicdomain/zero/1.0/",+ "attribution": null,+ "placements": [+ "credits_file",+ "end_card"+ ],+ "content_id": "unknown",+ "duration": 298.2,+ "shelf": "piano",+ "moods": [+ "warm",+ "consoling",+ "reflective",+ "hopeful"+ ],+ "energy": 0.2,+ "tempo": "slow",+ "uses": [+ "story",+ "testimonial",+ "mission"+ ],+ "vocals": "none",+ "instruments": [+ "piano"+ ],+ "ending": "soft",+ "notes": "Warm cantabile theme; good for gratitude, tribute and 'thank you' sequences under narration.",+ "composer": "Ludwig van Beethoven",+ "quiet_intro_s": 0.0,+ "lead_silence_s": 0.3,+ "highlight_s": 153.0+ },+ {+ "credit_optional": "Performed by the United States Army Band \"Pershing's Own\" (public domain, US government work)",+ "loops": null,+ "status": "active",+ "verified": "2026-09-29",+ "id": "pd-elgar-pomp-and-circumstance-1",+ "title": "Pomp and Circumstance March No. 1, Op. 39",+ "artist": "United States Army Band (\"Pershing's Own\")",+ "source": "wikimedia",+ "landing_url": "https://commons.wikimedia.org/wiki/File:Pomp_and_Circumstance,_Op._39_-_No._1_-_United_States_Army_Band.mp3",+ "file_url": "https://upload.wikimedia.org/wikipedia/commons/8/8a/Pomp_and_Circumstance%2C_Op._39_-_No._1_-_United_States_Army_Band.mp3",+ "format": "mp3",+ "bytes": 5760789,+ "sha256": "d113c1752cd9320f2d6f46c8da31f071e71517a277620a8b0909ea3a5cae5d58",+ "license": "CC-PDDC",+ "license_url": "https://creativecommons.org/licenses/publicdomain/",+ "attribution": null,+ "placements": [+ "credits_file",+ "end_card"+ ],+ "content_id": "unknown",+ "duration": 397.2,+ "shelf": "orchestral",+ "moods": [+ "triumphant",+ "ceremonial",+ "proud",+ "celebratory"+ ],+ "energy": 0.75,+ "tempo": "medium",+ "uses": [+ "keynote",+ "recap",+ "outro"+ ],+ "vocals": "none",+ "instruments": [+ "concert band",+ "brass",+ "percussion"+ ],+ "ending": "clean",+ "notes": "The graduation march ('Land of Hope and Glory' trio); achievements, milestones, awards.",+ "composer": "Edward Elgar",+ "quiet_intro_s": 0.0,+ "lead_silence_s": 0.4,+ "highlight_s": 318.0+ },+ {+ "credit_optional": "Performed by \"The President's Own\" United States Marine Band (public domain, US government work)",+ "loops": null,+ "status": "active",+ "verified": "2026-09-29",+ "id": "pd-grieg-holberg-air",+ "title": "Holberg Suite, Op. 40 - IV. Air",+ "artist": "United States Marine Band (Marine Chamber Orchestra, cond. Jason K. Fettig)",+ "source": "wikimedia",+ "landing_url": "https://commons.wikimedia.org/wiki/File:Grieg%27s_Suite_for_Strings,_Op._40,_%22From_Holberg%E2%80%99s_Time%22_-_IV._Air_-_Chamber_Orchestra_-_United_States_Marine_Band.mp3",+ "file_url": "https://upload.wikimedia.org/wikipedia/commons/2/28/Grieg%27s_Suite_for_Strings%2C_Op._40%2C_%22From_Holberg%E2%80%99s_Time%22_-_IV._Air_-_Chamber_Orchestra_-_United_States_Marine_Band.mp3",+ "format": "mp3",+ "bytes": 7210499,+ "sha256": "9575955094fadbf8642127cf76279934f6957d16a3f3de377b0f2bf13bea7598",+ "license": "CC-PDDC",+ "license_url": "https://creativecommons.org/licenses/publicdomain/",+ "attribution": null,+ "placements": [+ "credits_file",+ "end_card"+ ],+ "content_id": "unknown",+ "duration": 316.9,+ "shelf": "documentary",+ "moods": [+ "heartfelt",+ "yearning",+ "solemn",+ "emotional"+ ],+ "energy": 0.35,+ "tempo": "slow",+ "uses": [+ "documentary",+ "emotional"+ ],+ "vocals": "none",+ "instruments": [+ "string orchestra"+ ],+ "ending": "soft",+ "notes": "Deeply expressive slow string movement; emotional documentary beats, tributes. Live concert recording (2013).",+ "composer": "Edvard Grieg",+ "quiet_intro_s": 0.0,+ "lead_silence_s": 0.2,+ "highlight_s": 264.0+ },+ {+ "credit_optional": "Performed by \"The President's Own\" United States Marine Band (public domain, US government work)",+ "loops": null,+ "status": "active",+ "verified": "2026-09-29",+ "id": "pd-grieg-holberg-praeludium",+ "title": "Holberg Suite, Op. 40 - I. Praeludium",+ "artist": "United States Marine Band (Marine Chamber Orchestra, cond. Jason K. Fettig)",+ "source": "wikimedia",+ "landing_url": "https://commons.wikimedia.org/wiki/File:Grieg%27s_Suite_for_Strings,_Op._40,_%22From_Holberg%E2%80%99s_Time%22_-_I._Praeludium_-_Chamber_Orchestra_-_United_States_Marine_Band.mp3",+ "file_url": "https://upload.wikimedia.org/wikipedia/commons/0/08/Grieg%27s_Suite_for_Strings%2C_Op._40%2C_%22From_Holberg%E2%80%99s_Time%22_-_I._Praeludium_-_Chamber_Orchestra_-_United_States_Marine_Band.mp3",+ "format": "mp3",+ "bytes": 3714636,+ "sha256": "153a88f726d9bcde5820f0dafb788fecda5d54839df715690c91fe54c1bb7be8",+ "license": "CC-PDDC",+ "license_url": "https://creativecommons.org/licenses/publicdomain/",+ "attribution": null,+ "placements": [+ "credits_file",+ "end_card"+ ],+ "content_id": "unknown",+ "duration": 161.2,+ "shelf": "orchestral",+ "moods": [+ "energetic",+ "bright",+ "driving",+ "optimistic"+ ],+ "energy": 0.75,+ "tempo": "fast",+ "uses": [+ "intro",+ "travel",+ "promo"+ ],+ "vocals": "none",+ "instruments": [+ "string orchestra"+ ],+ "ending": "soft",+ "notes": "Galloping string figures; energetic openings, travel and progress montages. Live concert recording (2013).",+ "composer": "Edvard Grieg",+ "quiet_intro_s": 0.0,+ "lead_silence_s": 0.2,+ "highlight_s": 119.0+ },+ {+ "credit_optional": "Edvard Grieg: Peer Gynt Suite No. 1, Op. 46 - I. Morning Mood, performed by Musopen Symphony Orchestra (Czech National Symphony Orchestra) (public domain, via Wikimedia Commons)",+ "loops": null,+ "status": "active",+ "verified": "2026-09-29",+ "id": "pd-grieg-morning-mood",+ "title": "Peer Gynt Suite No. 1, Op. 46 - I. Morning Mood",+ "artist": "Musopen Symphony Orchestra (Czech National Symphony Orchestra)",+ "source": "wikimedia",+ "landing_url": "https://commons.wikimedia.org/wiki/File:Musopen_-_Morning.ogg",+ "file_url": "https://upload.wikimedia.org/wikipedia/commons/1/1a/Musopen_-_Morning.ogg",+ "format": "ogg",+ "bytes": 3453888,+ "sha256": "3207072ffef9f65f9a4a78c2ddc5afdd1c5b4c61b83ab092da3d6a87852e4996",+ "license": "CC-PDDC",+ "license_url": "https://creativecommons.org/licenses/publicdomain/",+ "attribution": null,+ "placements": [+ "credits_file",+ "end_card"+ ],+ "content_id": "unknown",+ "duration": 229.2,+ "shelf": "orchestral",+ "moods": [+ "hopeful",+ "fresh",+ "sunrise",+ "peaceful"+ ],+ "energy": 0.45,+ "tempo": "slow",+ "uses": [+ "intro",+ "launch",+ "story"+ ],+ "vocals": "none",+ "instruments": [+ "orchestra",+ "flute",+ "oboe",+ "strings"+ ],+ "ending": "clean",+ "notes": "Famous flute/oboe sunrise theme that swells to a full-orchestra climax; openings, new beginnings, product dawn shots.",+ "composer": "Edvard Grieg",+ "quiet_intro_s": 0.0,+ "lead_silence_s": 0.1,+ "highlight_s": 46.0+ },+ {+ "credit_optional": "Edvard Grieg: Piano Concerto in A minor, Op. 16 - II. Adagio, performed by Musopen (performers uncredited) (public domain, via Wikimedia Commons)",+ "loops": null,+ "status": "active",+ "verified": "2026-09-29",+ "id": "pd-grieg-piano-concerto-adagio",+ "title": "Piano Concerto in A minor, Op. 16 - II. Adagio",+ "artist": "Musopen (performers uncredited)",+ "source": "wikimedia",+ "landing_url": "https://commons.wikimedia.org/wiki/File:Edvard_Grieg_-_piano_concerto_in_a_minor,_op._16_-_ii._adagio.ogg",+ "file_url": "https://upload.wikimedia.org/wikipedia/commons/9/9d/Edvard_Grieg_-_piano_concerto_in_a_minor%2C_op._16_-_ii._adagio.ogg",+ "format": "ogg",+ "bytes": 6913372,+ "sha256": "7f96d1d15f77b9078bf3ef1f0aac37c6b53972bb3b1e59a9f9aab3d7c28c090f",+ "license": "CC-PDDC",+ "license_url": "https://creativecommons.org/licenses/publicdomain/",+ "attribution": null,+ "placements": [+ "credits_file",+ "end_card"+ ],+ "content_id": "unknown",+ "duration": 381.2,+ "shelf": "piano",+ "moods": [+ "tender",+ "romantic",+ "hushed",+ "emotional"+ ],+ "energy": 0.25,+ "tempo": "slow",+ "uses": [+ "story",+ "emotional"+ ],+ "vocals": "none",+ "instruments": [+ "piano",+ "strings",+ "horn",+ "orchestra"+ ],+ "ending": "cut",+ "notes": "Hushed muted-strings opening then a lyrical piano entry; heartfelt stories, emotional pieces.",+ "composer": "Edvard Grieg",+ "quiet_intro_s": 0.0,+ "lead_silence_s": 0.0,+ "highlight_s": 235.0+ },+ {+ "credit_optional": "Performed by \"The President's Own\" United States Marine Band (public domain, US government work)",+ "loops": null,+ "status": "active",+ "verified": "2026-09-29",+ "id": "pd-handel-water-music-hornpipe",+ "title": "Water Music, Suite No. 2, HWV 349 - Alla hornpipe",+ "artist": "United States Marine Band (Marine Chamber Orchestra)",+ "source": "wikimedia",+ "landing_url": "https://commons.wikimedia.org/wiki/File:Handel%27s_Water_Music_-_12._Alla_hornpipe_-_Chamber_Orchestra_-_United_States_Marine_Band.opus",+ "file_url": "https://upload.wikimedia.org/wikipedia/commons/5/5c/Handel%27s_Water_Music_-_12._Alla_hornpipe_-_Chamber_Orchestra_-_United_States_Marine_Band.opus",+ "format": "ogg",+ "bytes": 3911359,+ "sha256": "cbd5956d81eafb2a713dee5729ebc62d625c6417622335d6f4db82bc1662a1fe",+ "license": "CC-PDDC",+ "license_url": "https://creativecommons.org/licenses/publicdomain/",+ "attribution": null,+ "placements": [+ "credits_file",+ "end_card"+ ],+ "content_id": "unknown",+ "duration": 228.7,+ "shelf": "orchestral",+ "moods": [+ "festive",+ "regal",+ "celebratory",+ "bright"+ ],+ "energy": 0.7,+ "tempo": "medium",+ "uses": [+ "intro",+ "keynote",+ "promo"+ ],+ "vocals": "none",+ "instruments": [+ "orchestra",+ "trumpets",+ "horns",+ "strings"+ ],+ "ending": "clean",+ "notes": "Regal baroque celebration; announcements, grand openings, 'we did it' moments. Live concert recording (2017); Opus audio in an Ogg container (.opus).",+ "composer": "George Frideric Handel",+ "quiet_intro_s": 1.0,+ "lead_silence_s": 0.9,+ "highlight_s": 193.0+ },+ {+ "credit_optional": "Performed by \"The President's Own\" United States Marine Band (public domain, US government work)",+ "loops": null,+ "status": "active",+ "verified": "2026-09-29",+ "id": "pd-mozart-gran-partita-adagio",+ "title": "Serenade No. 10 \"Gran Partita\", K. 361 - III. Adagio",+ "artist": "United States Marine Band (\"The President's Own\")",+ "source": "wikimedia",+ "landing_url": "https://commons.wikimedia.org/wiki/File:Mozart%27s_Serenade_No._10_%22Grand_Partita%22_-_III._Adagio._Andante_-_United_States_Marine_Band.mp3",+ "file_url": "https://upload.wikimedia.org/wikipedia/commons/6/60/Mozart%27s_Serenade_No._10_%22Grand_Partita%22_-_III._Adagio._Andante_-_United_States_Marine_Band.mp3",+ "format": "mp3",+ "bytes": 4455333,+ "sha256": "c1837068bc084b0e59722d7eb5b4958bb9c39c8f8bbd627bd065cc3352575976",+ "license": "CC-PDDC",+ "license_url": "https://creativecommons.org/licenses/publicdomain/",+ "attribution": null,+ "placements": [+ "credits_file",+ "end_card"+ ],+ "content_id": "unknown",+ "duration": 332.5,+ "shelf": "orchestral",+ "moods": [+ "sublime",+ "tender",+ "floating",+ "reflective"+ ],+ "energy": 0.25,+ "tempo": "slow",+ "uses": [+ "story",+ "emotional",+ "background"+ ],+ "vocals": "none",+ "instruments": [+ "oboe",+ "clarinet",+ "basset horn",+ "bassoon",+ "horn",+ "double bass"+ ],+ "ending": "clean",+ "notes": "The celebrated 'Amadeus' adagio for winds; floating, luminous bed for reflective or awe moments. Broadcast recording (2021).",+ "composer": "Wolfgang Amadeus Mozart",+ "quiet_intro_s": 1.0,+ "lead_silence_s": 1.4,+ "highlight_s": 250.0+ },+ {+ "credit_optional": "Wolfgang Amadeus Mozart: Piano Sonata No. 16 in C major, K. 545 - I. Allegro, performed by Musopen (performer uncredited) (public domain, via Wikimedia Commons)",+ "loops": null,+ "status": "active",+ "verified": "2026-09-29",+ "id": "pd-mozart-sonata-k545-i",+ "title": "Piano Sonata No. 16 in C major, K. 545 - I. Allegro",+ "artist": "Musopen (performer uncredited)",+ "source": "wikimedia",+ "landing_url": "https://commons.wikimedia.org/wiki/File:Wolfgang_Amadeus_Mozart_-_sonata_no._16_in_c_major,_k.545_%27sonata_facile%27_-_i._allegro.ogg",+ "file_url": "https://upload.wikimedia.org/wikipedia/commons/3/38/Wolfgang_Amadeus_Mozart_-_sonata_no._16_in_c_major%2C_k.545_%27sonata_facile%27_-_i._allegro.ogg",+ "format": "ogg",+ "bytes": 2937849,+ "sha256": "27c63f441129af6d244714a2d3fff5a427b5cb46bcf362137ee0fff29bc0fa50",+ "license": "CC-PDDC",+ "license_url": "https://creativecommons.org/licenses/publicdomain/",+ "attribution": null,+ "placements": [+ "credits_file",+ "end_card"+ ],+ "content_id": "unknown",+ "duration": 133.9,+ "shelf": "piano",+ "moods": [+ "bright",+ "playful",+ "light",+ "cheerful"+ ],+ "energy": 0.4,+ "tempo": "fast",+ "uses": [+ "tutorial",+ "explainer"+ ],+ "vocals": "none",+ "instruments": [+ "piano"+ ],+ "ending": "clean",+ "notes": "Crisp, sunny piano; light explainers, tutorials, quick tips.",+ "composer": "Wolfgang Amadeus Mozart",+ "quiet_intro_s": 2.0,+ "lead_silence_s": 1.9,+ "highlight_s": 16.0+ },+ {+ "credit_optional": "Erik Satie: Gymnopedie No. 1 (Lent et douloureux), performed by Robin Alciatore (for Musopen) (public domain, via Wikimedia Commons)",+ "loops": null,+ "status": "active",+ "verified": "2026-09-29",+ "id": "pd-satie-gymnopedie-1",+ "title": "Gymnopedie No. 1 (Lent et douloureux)",+ "artist": "Robin Alciatore (for Musopen)",+ "source": "wikimedia",+ "landing_url": "https://commons.wikimedia.org/wiki/File:Erik_Satie_-_gymnopedies_-_la_1_ere._lent_et_douloureux.ogg",+ "file_url": "https://upload.wikimedia.org/wikipedia/commons/9/90/Erik_Satie_-_gymnopedies_-_la_1_ere._lent_et_douloureux.ogg",+ "format": "ogg",+ "bytes": 3696351,+ "sha256": "419e37656856224227086df32d6d481a00a738961e08fca9f6147e472beea53e",+ "license": "CC-PDDC",+ "license_url": "https://creativecommons.org/licenses/publicdomain/",+ "attribution": null,+ "placements": [+ "credits_file",+ "end_card"+ ],+ "content_id": "unknown",+ "duration": 183.6,+ "shelf": "piano",+ "moods": [+ "calm",+ "melancholic",+ "minimal",+ "contemplative"+ ],+ "energy": 0.1,+ "tempo": "slow",+ "uses": [+ "background",+ "explainer",+ "data"+ ],+ "vocals": "none",+ "instruments": [+ "piano"+ ],+ "ending": "clean",+ "notes": "The classic sparse Satie waltz; ideal unobtrusive bed under narration, slow b-roll, reflective product stories.",+ "composer": "Erik Satie",+ "quiet_intro_s": 2.0,+ "lead_silence_s": 2.2,+ "highlight_s": 50.0+ },+ {+ "credit_optional": "Robert Schumann: Kinderszenen, Op. 15 - VII. Traumerei (Dreaming), performed by Musopen (performer uncredited) (public domain, via Wikimedia Commons)",+ "loops": null,+ "status": "active",+ "verified": "2026-09-29",+ "id": "pd-schumann-traumerei",+ "title": "Kinderszenen, Op. 15 - VII. Traumerei (Dreaming)",+ "artist": "Musopen (performer uncredited)",+ "source": "wikimedia",+ "landing_url": "https://commons.wikimedia.org/wiki/File:Robert_Schumann_-_scenes_from_childhood,_op._15_-_vii._dreaming.ogg",+ "file_url": "https://upload.wikimedia.org/wikipedia/commons/0/06/Robert_Schumann_-_scenes_from_childhood%2C_op._15_-_vii._dreaming.ogg",+ "format": "ogg",+ "bytes": 2892811,+ "sha256": "bf04d6906d50f399ec62b7cf8650fe0414d684446d6a0ae2053a416d6515deb5",+ "license": "CC-PDDC",+ "license_url": "https://creativecommons.org/licenses/publicdomain/",+ "attribution": null,+ "placements": [+ "credits_file",+ "end_card"+ ],+ "content_id": "unknown",+ "duration": 203.0,+ "shelf": "piano",+ "moods": [+ "tender",+ "nostalgic",+ "dreamy",+ "warm"+ ],+ "energy": 0.1,+ "tempo": "slow",+ "uses": [+ "story",+ "testimonial"+ ],+ "vocals": "none",+ "instruments": [+ "piano"+ ],+ "ending": "soft",+ "notes": "Short, gentle piano miniature; family, memory and nostalgia moments. Quiet master (mean about -33 dBFS): normalise before mixing.",+ "composer": "Robert Schumann",+ "quiet_intro_s": 0.0,+ "lead_silence_s": 0.5,+ "highlight_s": 98.0+ },+ {+ "credit_optional": "Performed by the United States Air Force Band (public domain, US government work)",+ "loops": null,+ "status": "active",+ "verified": "2026-09-29",+ "id": "pd-usaf-band-burst-of-blue",+ "title": "Burst of Blue",+ "artist": "United States Air Force Band, Concert Band",+ "source": "wikimedia",+ "landing_url": "https://commons.wikimedia.org/wiki/File:Burst_of_Blue_(2017)_-_Concert_Band_-_United_States_Air_Force_Band.mp3",+ "file_url": "https://upload.wikimedia.org/wikipedia/commons/c/ce/Burst_of_Blue_%282017%29_-_Concert_Band_-_United_States_Air_Force_Band.mp3",+ "format": "mp3",+ "bytes": 2857315,+ "sha256": "e22819fff7513880b55a15a4717c7a8cf66e484938f38335573e2b8f34ab56bf",+ "license": "CC-PDDC",+ "license_url": "https://creativecommons.org/licenses/publicdomain/",+ "attribution": null,+ "placements": [+ "credits_file",+ "end_card"+ ],+ "content_id": "unknown",+ "duration": 68.8,+ "shelf": "upbeat",+ "moods": [+ "bright",+ "triumphant",+ "energetic",+ "fanfare"+ ],+ "energy": 0.85,+ "tempo": "fast",+ "uses": [+ "intro",+ "promo",+ "launch"+ ],+ "vocals": "none",+ "instruments": [+ "concert band",+ "brass",+ "percussion"+ ],+ "ending": "clean",+ "notes": "Short modern concert-band opener by a USAF staff composer (composition and recording both US-government works); intros, stings, launches.",+ "composer": "Robert Thurston",+ "quiet_intro_s": 0.0,+ "lead_silence_s": 0.5,+ "highlight_s": 26.0+ },+ {+ "credit_optional": "Performed by the United States Air Force Band (public domain, US government work)",+ "loops": null,+ "status": "active",+ "verified": "2026-09-29",+ "id": "pd-usaf-band-falcons-in-flight",+ "title": "Falcons in Flight",+ "artist": "United States Air Force Band, Concert Band",+ "source": "wikimedia",+ "landing_url": "https://commons.wikimedia.org/wiki/File:Falcons_in_Flight_-_Concert_Band_-_United_States_Air_Force_Band.mp3",+ "file_url": "https://upload.wikimedia.org/wikipedia/commons/6/62/Falcons_in_Flight_-_Concert_Band_-_United_States_Air_Force_Band.mp3",+ "format": "mp3",+ "bytes": 12613196,+ "sha256": "625d80e591f37c13931b4abd52c25a8052cbaccfc53117af00192b36aaa8b1b3",+ "license": "CC-PDDC",+ "license_url": "https://creativecommons.org/licenses/publicdomain/",+ "attribution": null,+ "placements": [+ "credits_file",+ "end_card"+ ],+ "content_id": "unknown",+ "duration": 363.8,+ "shelf": "cinematic",+ "moods": [+ "soaring",+ "heroic",+ "adventurous",+ "cinematic"+ ],+ "energy": 0.75,+ "tempo": "medium",+ "uses": [+ "launch",+ "trailer",+ "keynote"+ ],+ "vocals": "none",+ "instruments": [+ "concert band",+ "euphonium",+ "trumpet",+ "brass",+ "percussion"+ ],+ "ending": "soft",+ "notes": "Film-score-style concert band piece with euphonium and trumpet solos, by a USAF member (composition and recording US-government works); aviation, ambition, launch films.",+ "composer": "Tadd Russo",+ "quiet_intro_s": 1.0,+ "lead_silence_s": 1.2,+ "highlight_s": 318.0+ },+ {+ "credit_optional": "Performed by the United States Air Force Band (public domain, US government work)",+ "loops": null,+ "status": "active",+ "verified": "2026-09-29",+ "id": "pd-usaf-band-skyscrapers",+ "title": "Skyscrapers",+ "artist": "United States Air Force Band, Airmen of Note",+ "source": "wikimedia",+ "landing_url": "https://commons.wikimedia.org/wiki/File:Skyscrapers_-_Airmen_of_Note_-_United_States_Air_Force_Band.mp3",+ "file_url": "https://upload.wikimedia.org/wikipedia/commons/f/f5/Skyscrapers_-_Airmen_of_Note_-_United_States_Air_Force_Band.mp3",+ "format": "mp3",+ "bytes": 7693124,+ "sha256": "7c39bc02a77ad26c9b76d3d1db99ee3ae09965a0cb3766a8deaae0567e75daef",+ "license": "CC-PDDC",+ "license_url": "https://creativecommons.org/licenses/publicdomain/",+ "attribution": null,+ "placements": [+ "credits_file",+ "end_card"+ ],+ "content_id": "unknown",+ "duration": 477.6,+ "shelf": "upbeat",+ "moods": [+ "confident",+ "urban",+ "sophisticated",+ "upbeat"+ ],+ "energy": 0.7,+ "tempo": "fast",+ "uses": [+ "promo",+ "product-demo",+ "recap"+ ],+ "vocals": "none",+ "instruments": [+ "big band",+ "saxophones",+ "trumpets",+ "trombones",+ "rhythm section"+ ],+ "ending": "clean",+ "notes": "Modern big-band jazz by the band's own arranger (US-government work); city, business, confident tech-launch energy.",+ "composer": "Alan Baylock",+ "quiet_intro_s": 0.0,+ "lead_silence_s": 0.5,+ "highlight_s": 358.0+ },+ {+ "credit_optional": "Antonio Vivaldi: The Four Seasons: Spring, RV 269 - I. Allegro, performed by The Modena Chamber Orchestra (Public Domain Mark, via Wikimedia Commons)",+ "loops": null,+ "status": "active",+ "verified": "2026-09-29",+ "id": "pd-vivaldi-spring-i",+ "title": "The Four Seasons: Spring, RV 269 - I. Allegro",+ "artist": "The Modena Chamber Orchestra",+ "source": "wikimedia",+ "landing_url": "https://commons.wikimedia.org/wiki/File:The_Modena_Chamber_Orchestra_-_Vivaldi%27s_Spring,_RV_269_-_I._Allegro.ogg",+ "file_url": "https://upload.wikimedia.org/wikipedia/commons/1/18/The_Modena_Chamber_Orchestra_-_Vivaldi%27s_Spring%2C_RV_269_-_I._Allegro.ogg",+ "format": "ogg",+ "bytes": 4361343,+ "sha256": "be981b99147f3521362f008a48311b008dac5dbd9727d9d818f07e0ed9e3bd91",+ "license": "CC-PDM-1.0",+ "license_url": "https://creativecommons.org/publicdomain/mark/1.0/",+ "attribution": null,+ "placements": [+ "credits_file",+ "end_card"+ ],+ "content_id": "unknown",+ "duration": 214.0,+ "shelf": "orchestral",+ "moods": [+ "joyful",+ "bright",+ "energetic",+ "springlike"+ ],+ "energy": 0.75,+ "tempo": "fast",+ "uses": [+ "intro",+ "promo",+ "launch"+ ],+ "vocals": "none",+ "instruments": [+ "solo violin",+ "string orchestra",+ "harpsichord"+ ],+ "ending": "soft",+ "notes": "The famous 'Spring' ritornello; openings, launches with a classical flavour, upbeat montages.",+ "composer": "Antonio Vivaldi",+ "quiet_intro_s": 0.0,+ "lead_silence_s": 0.2,+ "highlight_s": 100.0+ },+ {+ "credit_optional": "Antonio Vivaldi: The Four Seasons: Winter, RV 297 - II. Largo, performed by The Modena Chamber Orchestra (Public Domain Mark, via Wikimedia Commons)",+ "loops": null,+ "status": "active",+ "verified": "2026-09-29",+ "id": "pd-vivaldi-winter-ii",+ "title": "The Four Seasons: Winter, RV 297 - II. Largo",+ "artist": "The Modena Chamber Orchestra",+ "source": "wikimedia",+ "landing_url": "https://commons.wikimedia.org/wiki/File:The_Modena_Chamber_Orchestra_-_Vivaldi%27s_Winter,_RV_297_-_II._Largo.ogg",+ "file_url": "https://upload.wikimedia.org/wikipedia/commons/8/8b/The_Modena_Chamber_Orchestra_-_Vivaldi%27s_Winter%2C_RV_297_-_II._Largo.ogg",+ "format": "ogg",+ "bytes": 3165879,+ "sha256": "963f0a4b7c10da711bd44fc9d0704da8aa6d8b2545e07bb1505b7012cc1890f7",+ "license": "CC-PDM-1.0",+ "license_url": "https://creativecommons.org/publicdomain/mark/1.0/",+ "attribution": null,+ "placements": [+ "credits_file",+ "end_card"+ ],+ "content_id": "unknown",+ "duration": 163.8,+ "shelf": "orchestral",+ "moods": [+ "cozy",+ "calm",+ "gentle",+ "warm"+ ],+ "energy": 0.3,+ "tempo": "slow",+ "uses": [+ "background",+ "story"+ ],+ "vocals": "none",+ "instruments": [+ "solo violin",+ "pizzicato strings"+ ],+ "ending": "soft",+ "notes": "Violin melody over pizzicato 'raindrops'; cozy indoor or winter scenes, calm explainers.",+ "composer": "Antonio Vivaldi",+ "quiet_intro_s": 1.0,+ "lead_silence_s": 1.0,+ "highlight_s": 89.0+ },+ {+ "credit_optional": "\"Bartender\" by TAD (CC0, via OpenGameArt)",+ "loops": null,+ "status": "active",+ "verified": "2026-09-30",+ "id": "tad-bartender",+ "title": "Bartender",+ "artist": "TAD",+ "source": "opengameart",+ "landing_url": "https://opengameart.org/content/lofi-compilation",+ "file_url": "https://opengameart.org/sites/default/files/Bartender_0.mp3",+ "format": "mp3",+ "bytes": 5924279,+ "sha256": "5cbbbe5058ed31d5a9288529ac7b4c3e16a440aad5a4b603bb8bc90df54708d4",+ "license": "CC0-1.0",+ "license_url": "https://creativecommons.org/publicdomain/zero/1.0/",+ "attribution": null,+ "placements": [+ "credits_file",+ "end_card"+ ],+ "content_id": "none-known",+ "duration": 246.7,+ "shelf": "lofi",+ "moods": [+ "chill",+ "cozy",+ "mellow"+ ],+ "energy": 0.35,+ "tempo": "slow",+ "uses": [+ "background",+ "tutorial",+ "explainer"+ ],+ "vocals": "none",+ "instruments": [+ "keys",+ "drums",+ "bass"+ ],+ "ending": "soft",+ "notes": "Lo-fi compilation track; relaxed beat with a soft ending.",+ "quiet_intro_s": 0.0,+ "lead_silence_s": 0.0,+ "highlight_s": 154.0+ },+ {+ "credit_optional": "\"Cat Caffe\" by TAD (CC0, via OpenGameArt)",+ "loops": null,+ "status": "active",+ "verified": "2026-09-30",+ "id": "tad-cat-caffe",+ "title": "Cat Caffe",+ "artist": "TAD",+ "source": "opengameart",+ "landing_url": "https://opengameart.org/content/lofi-compilation",+ "file_url": "https://opengameart.org/sites/default/files/Cat%20caffe_0.mp3",+ "format": "mp3",+ "bytes": 2748984,+ "sha256": "896b036154c439e0790fa821bf4a5a1d208d17954c8db1b10c72a6d053c7d3d9",+ "license": "CC0-1.0",+ "license_url": "https://creativecommons.org/publicdomain/zero/1.0/",+ "attribution": null,+ "placements": [+ "credits_file",+ "end_card"+ ],+ "content_id": "none-known",+ "duration": 133.0,+ "shelf": "lofi",+ "moods": [+ "chill",+ "cute",+ "cozy"+ ],+ "energy": 0.35,+ "tempo": "slow",+ "uses": [+ "background",+ "tutorial",+ "social"+ ],+ "vocals": "none",+ "instruments": [+ "keys",+ "drums",+ "bass"+ ],+ "ending": "clean",+ "notes": "Lo-fi compilation track; short and gentle.",+ "quiet_intro_s": 2.0,+ "lead_silence_s": 2.6,+ "highlight_s": 68.0+ },+ {+ "credit_optional": "\"Cue\" by TAD (CC0, via OpenGameArt)",+ "loops": null,+ "status": "active",+ "verified": "2026-09-30",+ "id": "tad-cue",+ "title": "Cue",+ "artist": "TAD",+ "source": "opengameart",+ "landing_url": "https://opengameart.org/content/lofi-compilation",+ "file_url": "https://opengameart.org/sites/default/files/Cue_0.mp3",+ "format": "mp3",+ "bytes": 3020681,+ "sha256": "c97929e1a7b209d0ce24445d33396e3272b4675f50c3d72dbaa315c0152372a4",+ "license": "CC0-1.0",+ "license_url": "https://creativecommons.org/publicdomain/zero/1.0/",+ "attribution": null,+ "placements": [+ "credits_file",+ "end_card"+ ],+ "content_id": "none-known",+ "duration": 146.6,+ "shelf": "lofi",+ "moods": [+ "chill",+ "mellow",+ "late-night"+ ],+ "energy": 0.35,+ "tempo": "slow",+ "uses": [+ "background",+ "tutorial",+ "product-demo"+ ],+ "vocals": "none",+ "instruments": [+ "keys",+ "drums",+ "bass"+ ],+ "ending": "cut",+ "notes": "Lo-fi compilation track; loops cleanly and stops at level (fade it out).",+ "quiet_intro_s": 0.0,+ "lead_silence_s": 0.0,+ "highlight_s": 47.0+ },+ {+ "credit_optional": null,+ "loops": null,+ "status": "active",+ "verified": "2026-09-30",+ "id": "tcarisland-atmospheric-space-f-minor",+ "title": "Atmospheric Space F Minor",+ "artist": "tcarisland",+ "source": "opengameart",+ "landing_url": "https://opengameart.org/content/atmospheric-space-f-minor",+ "file_url": "https://opengameart.org/sites/default/files/SpaceFMin_0.mp3",+ "format": "mp3",+ "bytes": 4799959,+ "sha256": "bc4205621b781ae2c837ed493507cf6058add1ac9120a8e9fd3c47d69e2eb0de",+ "license": "CC-BY-4.0",+ "license_url": "https://creativecommons.org/licenses/by/4.0/",+ "attribution": "\"Atmospheric Space F Minor\" by tcarisland - licensed CC-BY 4.0: https://opengameart.org/content/atmospheric-space-f-minor",+ "placements": [+ "description",+ "credits_file",+ "end_card"+ ],+ "content_id": "none-known",+ "duration": 200.0,+ "shelf": "ambient",+ "moods": [+ "spacey",+ "atmospheric",+ "drifting"+ ],+ "energy": 0.25,+ "tempo": "slow",+ "uses": [+ "background",+ "science",+ "data"+ ],+ "vocals": "none",+ "instruments": [+ "synth pads",+ "synth"+ ],+ "ending": "soft",+ "notes": "Ambient space piece in F minor, slightly atonal.",+ "quiet_intro_s": 2.0,+ "lead_silence_s": 0.6,+ "highlight_s": 90.0+ },+ {+ "credit_optional": null,+ "loops": null,+ "status": "active",+ "verified": "2026-09-30",+ "id": "tcarisland-city-at-night",+ "title": "City at Night",+ "artist": "tcarisland",+ "source": "opengameart",+ "landing_url": "https://opengameart.org/content/city-at-night",+ "file_url": "https://opengameart.org/sites/default/files/city_at_night_0.mp3",+ "format": "mp3",+ "bytes": 3687709,+ "sha256": "f46f5470ce769af4649e3d2ac82b75cc467a67360fe3168131619ab5fd887ba9",+ "license": "CC-BY-4.0",+ "license_url": "https://creativecommons.org/licenses/by/4.0/",+ "attribution": "\"City at Night\" by tcarisland - licensed CC-BY 4.0: https://opengameart.org/content/city-at-night",+ "placements": [+ "description",+ "credits_file",+ "end_card"+ ],+ "content_id": "none-known",+ "duration": 153.7,+ "shelf": "upbeat",+ "moods": [+ "jazzy",+ "nightlife",+ "cool"+ ],+ "energy": 0.55,+ "tempo": "medium",+ "uses": [+ "promo",+ "social",+ "travel"+ ],+ "vocals": "none",+ "instruments": [+ "drums",+ "brass",+ "bass"+ ],+ "ending": "cut",+ "notes": "Jazzy night-club music (100 bpm, D Dorian); stops at level (fade it out).",+ "quiet_intro_s": 0.0,+ "lead_silence_s": 0.0,+ "highlight_s": 79.0+ },+ {+ "credit_optional": "\"Midnight Cruiser\" by Zane Little (CC0) - ko-fi.com/zanelittle",+ "loops": null,+ "status": "active",+ "verified": "2026-09-30",+ "id": "zanelittle-midnight-cruiser",+ "title": "Midnight Cruiser",+ "artist": "Zane Little",+ "source": "opengameart",+ "landing_url": "https://opengameart.org/content/midnight-cruiser",+ "file_url": "https://opengameart.org/sites/default/files/midnight_cruiser_0.mp3",+ "format": "mp3",+ "bytes": 5778728,+ "sha256": "be0285ba239d85c47c6a0de6466123e3fe8dbc4ad4d9419ccd224ab8ea2b54fc",+ "license": "CC0-1.0",+ "license_url": "https://creativecommons.org/publicdomain/zero/1.0/",+ "attribution": null,+ "placements": [+ "credits_file",+ "end_card"+ ],+ "content_id": "none-known",+ "duration": 144.4,+ "shelf": "upbeat",+ "moods": [+ "jazzy",+ "funky",+ "cruising"+ ],+ "energy": 0.65,+ "tempo": "fast",+ "uses": [+ "promo",+ "social",+ "travel"+ ],+ "vocals": "none",+ "instruments": [+ "electric piano",+ "bass",+ "drums",+ "synth"+ ],+ "ending": "cut",+ "notes": "Jazz-funk fusion inspired by early-2000s racing-game soundtracks; stops at level (fade it out).",+ "quiet_intro_s": 0.0,+ "lead_silence_s": 0.0,+ "highlight_s": 13.0+ },+ {+ "credit_optional": "\"Rhythm Factory\" by Zane Little (CC0) - ko-fi.com/zanelittle",+ "loops": null,+ "status": "active",+ "verified": "2026-09-30",+ "id": "zanelittle-rhythm-factory",+ "title": "Rhythm Factory",+ "artist": "Zane Little",+ "source": "opengameart",+ "landing_url": "https://opengameart.org/content/rhythm-factory",+ "file_url": "https://opengameart.org/sites/default/files/rhythm_factory_0.mp3",+ "format": "mp3",+ "bytes": 8951846,+ "sha256": "5126faf85adffc64f22a4cd176b84ed47b6014c03328ba8380fdb24efca11f90",+ "license": "CC0-1.0",+ "license_url": "https://creativecommons.org/publicdomain/zero/1.0/",+ "attribution": null,+ "placements": [+ "credits_file",+ "end_card"+ ],+ "content_id": "none-known",+ "duration": 223.8,+ "shelf": "playful",+ "moods": [+ "quirky",+ "energetic",+ "weird"+ ],+ "energy": 0.75,+ "tempo": "medium",+ "uses": [+ "social",+ "promo",+ "tech"+ ],+ "vocals": "none",+ "instruments": [+ "synth",+ "drums",+ "bass",+ "samples"+ ],+ "ending": "clean",+ "notes": "Twisting, quirky track full of odd sounds.",+ "quiet_intro_s": 0.0,+ "lead_silence_s": 0.0,+ "highlight_s": 105.0+ },+ {+ "credit_optional": "\"Wednesday Night (Funk Fusion)\" by Zane Little (CC0) - ko-fi.com/zanelittle",+ "loops": null,+ "status": "active",+ "verified": "2026-09-30",+ "id": "zanelittle-wednesday-night-funk-fusion",+ "title": "Wednesday Night (Funk Fusion)",+ "artist": "Zane Little",+ "source": "opengameart",+ "landing_url": "https://opengameart.org/content/wednesday-night-funk-fusion",+ "file_url": "https://opengameart.org/sites/default/files/wednesday_night_0.mp3",+ "format": "mp3",+ "bytes": 7065807,+ "sha256": "6187f62385f94db5feda3360da6309d90664c5410dda1351f837f978df2c5861",+ "license": "CC0-1.0",+ "license_url": "https://creativecommons.org/publicdomain/zero/1.0/",+ "attribution": null,+ "placements": [+ "credits_file",+ "end_card"+ ],+ "content_id": "none-known",+ "duration": 176.6,+ "shelf": "upbeat",+ "moods": [+ "smooth",+ "funky",+ "pleasant"+ ],+ "energy": 0.55,+ "tempo": "medium",+ "uses": [+ "promo",+ "product-demo",+ "social"+ ],+ "vocals": "none",+ "instruments": [+ "electric piano",+ "bass",+ "drums"+ ],+ "ending": "clean",+ "notes": "Clean, composed funk fusion; solid chords and melodies, simple mix.",+ "quiet_intro_s": 0.0,+ "lead_silence_s": 0.0,+ "highlight_s": 35.0+ },+ {+ "credit_optional": null,+ "loops": null,+ "status": "active",+ "verified": "2026-09-30",+ "id": "zhelanov-caves-of-sorrow",+ "title": "Caves of Sorrow",+ "artist": "Alexandr Zhelanov",+ "source": "opengameart",+ "landing_url": "https://opengameart.org/content/caves-of-sorrow",+ "file_url": "https://opengameart.org/sites/default/files/Caves%20of%20sorrow.ogg",+ "format": "ogg",+ "bytes": 4581288,+ "sha256": "7e6f75093ed8008531c5461d5ca0e5d84e6308042cee92acc3161a2784d92651",+ "license": "CC-BY-3.0",+ "license_url": "https://creativecommons.org/licenses/by/3.0/",+ "attribution": "\"Caves of Sorrow\" by Alexandr Zhelanov, https://soundcloud.com/alexandr-zhelanov - licensed CC-BY 3.0: https://opengameart.org/content/caves-of-sorrow",+ "placements": [+ "description",+ "credits_file",+ "end_card"+ ],+ "content_id": "none-known",+ "duration": 282.8,+ "shelf": "tension",+ "moods": [+ "dark",+ "mysterious",+ "somber"+ ],+ "energy": 0.35,+ "tempo": "slow",+ "uses": [+ "problem",+ "documentary",+ "story"+ ],+ "vocals": "none",+ "instruments": [+ "synth pads",+ "strings",+ "percussion"+ ],+ "ending": "clean",+ "notes": "Brooding, steady underscore for the problem or the risk.",+ "quiet_intro_s": 0.0,+ "lead_silence_s": 0.0,+ "highlight_s": 202.0+ },+ {+ "credit_optional": null,+ "loops": null,+ "status": "active",+ "verified": "2026-09-30",+ "id": "zhelanov-dark-hall",+ "title": "Dark Hall",+ "artist": "Alexandr Zhelanov",+ "source": "opengameart",+ "landing_url": "https://opengameart.org/content/north-wind-more-music-inside",+ "file_url": "https://opengameart.org/sites/default/files/2.Dark%20Hall_0.mp3",+ "format": "mp3",+ "bytes": 3780864,+ "sha256": "a00baa77e215c24efe79b3690ad83164adb1381c00e50a2575aab9057031c6fa",+ "license": "CC-BY-3.0",+ "license_url": "https://creativecommons.org/licenses/by/3.0/",+ "attribution": "\"Dark Hall\" by Alexandr Zhelanov, https://soundcloud.com/alexandr-zhelanov - licensed CC-BY 3.0: https://opengameart.org/content/north-wind-more-music-inside",+ "placements": [+ "description",+ "credits_file",+ "end_card"+ ],+ "content_id": "none-known",+ "duration": 236.0,+ "shelf": "tension",+ "moods": [+ "dark",+ "ominous",+ "cold"+ ],+ "energy": 0.35,+ "tempo": "slow",+ "uses": [+ "problem",+ "security",+ "story"+ ],+ "vocals": "none",+ "instruments": [+ "synth pads",+ "drone"+ ],+ "ending": "soft",+ "notes": "Dark-ambient archive piece; sparse and cold, ducks well under a voice.",+ "quiet_intro_s": 0.0,+ "lead_silence_s": 0.0,+ "highlight_s": 65.0+ },+ {+ "credit_optional": null,+ "loops": null,+ "status": "active",+ "verified": "2026-09-30",+ "id": "zhelanov-decision",+ "title": "Decision",+ "artist": "Alexandr Zhelanov",+ "source": "opengameart",+ "landing_url": "https://opengameart.org/content/decision",+ "file_url": "https://opengameart.org/sites/default/files/Decision.mp3",+ "format": "mp3",+ "bytes": 3747492,+ "sha256": "99797742568b76ecdbf4fb3f5dd197875052a3990d646e8b2b3d0ffe29d42f84",+ "license": "CC-BY-3.0",+ "license_url": "https://creativecommons.org/licenses/by/3.0/",+ "attribution": "\"Decision\" by Alexandr Zhelanov, https://soundcloud.com/alexandr-zhelanov - licensed CC-BY 3.0: https://opengameart.org/content/decision",+ "placements": [+ "description",+ "credits_file",+ "end_card"+ ],+ "content_id": "none-known",+ "duration": 234.2,+ "shelf": "cinematic",+ "moods": [+ "dramatic",+ "determined",+ "epic",+ "hollywood"+ ],+ "energy": 0.65,+ "tempo": "medium",+ "uses": [+ "trailer",+ "launch",+ "story"+ ],+ "vocals": "none",+ "instruments": [+ "orchestra",+ "strings",+ "percussion"+ ],+ "ending": "soft",+ "notes": "Written in the style of a Hollywood score; a resolute build for the turn in a story or a reveal.",+ "quiet_intro_s": 0.0,+ "lead_silence_s": 0.1,+ "highlight_s": 50.0+ },+ {+ "credit_optional": null,+ "loops": null,+ "status": "active",+ "verified": "2026-09-30",+ "id": "zhelanov-dont-look-back",+ "title": "Don't Look Back",+ "artist": "Alexandr Zhelanov",+ "source": "opengameart",+ "landing_url": "https://opengameart.org/content/north-wind-more-music-inside",+ "file_url": "https://opengameart.org/sites/default/files/9.Don%27t%20look%20back_0.mp3",+ "format": "mp3",+ "bytes": 2745798,+ "sha256": "4acaf9c274393dd15ae595a920f6246066b392e4d8eca371b949d5ee5476144d",+ "license": "CC-BY-3.0",+ "license_url": "https://creativecommons.org/licenses/by/3.0/",+ "attribution": "\"Don't Look Back\" by Alexandr Zhelanov, https://soundcloud.com/alexandr-zhelanov - licensed CC-BY 3.0: https://opengameart.org/content/north-wind-more-music-inside",+ "placements": [+ "description",+ "credits_file",+ "end_card"+ ],+ "content_id": "none-known",+ "duration": 171.6,+ "shelf": "tension",+ "moods": [+ "tense",+ "urgent",+ "dark"+ ],+ "energy": 0.5,+ "tempo": "medium",+ "uses": [+ "problem",+ "trailer",+ "security"+ ],+ "vocals": "none",+ "instruments": [+ "synth",+ "percussion",+ "strings"+ ],+ "ending": "clean",+ "notes": "The most urgent of the dark-ambient archive pieces; a pulse under a countdown or a threat.",+ "quiet_intro_s": 0.0,+ "lead_silence_s": 0.3,+ "highlight_s": 78.0+ },+ {+ "credit_optional": null,+ "loops": null,+ "status": "active",+ "verified": "2026-09-30",+ "id": "zhelanov-fly",+ "title": "Fly",+ "artist": "Alexandr Zhelanov",+ "source": "opengameart",+ "landing_url": "https://opengameart.org/content/techno-space",+ "file_url": "https://opengameart.org/sites/default/files/Fly_1.mp3",+ "format": "mp3",+ "bytes": 8068600,+ "sha256": "4ea7d35907540ef648ddf036bde10001a982773e4abf34dd57c09370d182d3b7",+ "license": "CC-BY-3.0",+ "license_url": "https://creativecommons.org/licenses/by/3.0/",+ "attribution": "\"Fly\" by Alexandr Zhelanov, https://soundcloud.com/alexandr-zhelanov - licensed CC-BY 3.0: https://opengameart.org/content/techno-space",+ "placements": [+ "description",+ "credits_file",+ "end_card"+ ],+ "content_id": "none-known",+ "duration": 252.1,+ "shelf": "corporate-tech",+ "moods": [+ "uplifting",+ "driving",+ "airy"+ ],+ "energy": 0.65,+ "tempo": "medium",+ "uses": [+ "tech",+ "launch",+ "promo"+ ],+ "vocals": "none",+ "instruments": [+ "synth",+ "drums",+ "bass"+ ],+ "ending": "clean",+ "notes": "Electronic track from his 'Techno Space' set; steady energy throughout.",+ "quiet_intro_s": 0.0,+ "lead_silence_s": 0.1,+ "highlight_s": 190.0+ },+ {+ "credit_optional": null,+ "loops": null,+ "status": "active",+ "verified": "2026-09-30",+ "id": "zhelanov-heart-of-machine",+ "title": "Heart of Machine",+ "artist": "Alexandr Zhelanov",+ "source": "opengameart",+ "landing_url": "https://opengameart.org/content/heart-of-machine",+ "file_url": "https://opengameart.org/sites/default/files/Heart%20of%20Machine.mp3",+ "format": "mp3",+ "bytes": 6980996,+ "sha256": "8522e3069a01bca6320bb157fca36df3ccd137147098e8dae3194770d5a12cea",+ "license": "CC-BY-3.0",+ "license_url": "https://creativecommons.org/licenses/by/3.0/",+ "attribution": "\"Heart of Machine\" by Alexandr Zhelanov, https://soundcloud.com/alexandr-zhelanov - licensed CC-BY 3.0: https://opengameart.org/content/heart-of-machine",+ "placements": [+ "description",+ "credits_file",+ "end_card"+ ],+ "content_id": "none-known",+ "duration": 232.7,+ "shelf": "corporate-tech",+ "moods": [+ "driving",+ "mechanical",+ "epic",+ "determined"+ ],+ "energy": 0.7,+ "tempo": "medium",+ "uses": [+ "tech",+ "launch",+ "trailer"+ ],+ "vocals": "none",+ "instruments": [+ "synth",+ "orchestra",+ "drums"+ ],+ "ending": "clean",+ "notes": "Hybrid orchestral-electronic piece written for a music competition; strong under a product or engine reveal.",+ "quiet_intro_s": 0.0,+ "lead_silence_s": 0.0,+ "highlight_s": 105.0+ },+ {+ "credit_optional": null,+ "loops": null,+ "status": "active",+ "verified": "2026-09-30",+ "id": "zhelanov-heroes-theme",+ "title": "Heroes Theme",+ "artist": "Alexandr Zhelanov",+ "source": "opengameart",+ "landing_url": "https://opengameart.org/content/heroes-theme",+ "file_url": "https://opengameart.org/sites/default/files/Heroes%20Theme_0.mp3",+ "format": "mp3",+ "bytes": 1882558,+ "sha256": "50c8bdf616e65e8f713248b635cd2ea44e8266ef33bae486ddd7685cd53ba0a1",+ "license": "CC-BY-3.0",+ "license_url": "https://creativecommons.org/licenses/by/3.0/",+ "attribution": "\"Heroes Theme\" by Alexandr Zhelanov, https://soundcloud.com/alexandr-zhelanov - licensed CC-BY 3.0: https://opengameart.org/content/heroes-theme",+ "placements": [+ "description",+ "credits_file",+ "end_card"+ ],+ "content_id": "none-known",+ "duration": 117.7,+ "shelf": "orchestral",+ "moods": [+ "heroic",+ "triumphant",+ "bold"+ ],+ "energy": 0.75,+ "tempo": "medium",+ "uses": [+ "trailer",+ "launch",+ "keynote"+ ],+ "vocals": "none",+ "instruments": [+ "orchestra",+ "brass",+ "drums"+ ],+ "ending": "clean",+ "notes": "Short orchestral cue with a heroic motif; good for an opener or a title card.",+ "quiet_intro_s": 0.0,+ "lead_silence_s": 0.0,+ "highlight_s": 68.0+ },+ {+ "credit_optional": null,+ "loops": null,+ "status": "active",+ "verified": "2026-09-30",+ "id": "zhelanov-industria",+ "title": "Industria",+ "artist": "Alexandr Zhelanov",+ "source": "opengameart",+ "landing_url": "https://opengameart.org/content/techno-space",+ "file_url": "https://opengameart.org/sites/default/files/Industria_1.mp3",+ "format": "mp3",+ "bytes": 7536956,+ "sha256": "00470563767209265afeaa00c12b49d896ba9871ecb9c05467e3584b1972338a",+ "license": "CC-BY-3.0",+ "license_url": "https://creativecommons.org/licenses/by/3.0/",+ "attribution": "\"Industria\" by Alexandr Zhelanov, https://soundcloud.com/alexandr-zhelanov - licensed CC-BY 3.0: https://opengameart.org/content/techno-space",+ "placements": [+ "description",+ "credits_file",+ "end_card"+ ],+ "content_id": "none-known",+ "duration": 235.5,+ "shelf": "corporate-tech",+ "moods": [+ "industrial",+ "driving",+ "mechanical"+ ],+ "energy": 0.7,+ "tempo": "medium",+ "uses": [+ "tech",+ "product-demo",+ "promo"],"vocals": "none","instruments": [- "piano"+ "synth",+ "drums",+ "bass"],- "ending": "soft",- "notes": "Short, gentle piano miniature; family, memory and nostalgia moments. Quiet master (mean about -33 dBFS): normalise before mixing.",- "composer": "Robert Schumann",+ "ending": "clean",+ "notes": "Industrial electronic groove from his 'Techno Space' set.","quiet_intro_s": 0.0,- "lead_silence_s": 0.5,- "highlight_s": 98.0+ "lead_silence_s": 0.0,+ "highlight_s": 66.0},{- "credit_optional": "Performed by the United States Air Force Band (public domain, US government work)",+ "credit_optional": null,"loops": null,"status": "active",- "verified": "2026-09-29",- "id": "pd-usaf-band-burst-of-blue",- "title": "Burst of Blue",- "artist": "United States Air Force Band, Concert Band",- "source": "wikimedia",- "landing_url": "https://commons.wikimedia.org/wiki/File:Burst_of_Blue_(2017)_-_Concert_Band_-_United_States_Air_Force_Band.mp3",- "file_url": "https://upload.wikimedia.org/wikipedia/commons/c/ce/Burst_of_Blue_%282017%29_-_Concert_Band_-_United_States_Air_Force_Band.mp3",- "format": "mp3",- "bytes": 2857315,- "sha256": "e22819fff7513880b55a15a4717c7a8cf66e484938f38335573e2b8f34ab56bf",- "license": "CC-PDDC",- "license_url": "https://creativecommons.org/licenses/publicdomain/",- "attribution": null,+ "verified": "2026-09-30",+ "id": "zhelanov-journey-to-the-east-rocks",+ "title": "Journey to the East Rocks",+ "artist": "Alexandr Zhelanov",+ "source": "opengameart",+ "landing_url": "https://opengameart.org/content/journey-to-the-east-rocks",+ "file_url": "https://opengameart.org/sites/default/files/Journey%20to%20the%20East%20Rocks.ogg",+ "format": "ogg",+ "bytes": 4646822,+ "sha256": "576868805a2758002a311c851d43d3bfc7f3a894adc2858a5c1f17e8c54496ce",+ "license": "CC-BY-3.0",+ "license_url": "https://creativecommons.org/licenses/by/3.0/",+ "attribution": "\"Journey to the East Rocks\" by Alexandr Zhelanov, https://soundcloud.com/alexandr-zhelanov - licensed CC-BY 3.0: https://opengameart.org/content/journey-to-the-east-rocks","placements": [+ "description","credits_file","end_card"],- "content_id": "unknown",- "duration": 68.8,- "shelf": "upbeat",+ "content_id": "none-known",+ "duration": 287.1,+ "shelf": "cinematic","moods": [- "bright",- "triumphant",- "energetic",- "fanfare"+ "adventurous",+ "exotic",+ "sweeping"],- "energy": 0.85,- "tempo": "fast",+ "energy": 0.55,+ "tempo": "medium","uses": [- "intro",- "promo",- "launch"+ "story",+ "travel",+ "documentary"],"vocals": "none","instruments": [- "concert band",- "brass",+ "orchestra",+ "strings","percussion"],"ending": "clean",- "notes": "Short modern concert-band opener by a USAF staff composer (composition and recording both US-government works); intros, stings, launches.",- "composer": "Robert Thurston",+ "notes": "Adventure cue with an eastern colour; long, even build.","quiet_intro_s": 0.0,- "lead_silence_s": 0.5,- "highlight_s": 26.0+ "lead_silence_s": 0.0,+ "highlight_s": 237.0},{- "credit_optional": "Performed by the United States Air Force Band (public domain, US government work)",+ "credit_optional": null,"loops": null,"status": "active",- "verified": "2026-09-29",- "id": "pd-usaf-band-falcons-in-flight",- "title": "Falcons in Flight",- "artist": "United States Air Force Band, Concert Band",- "source": "wikimedia",- "landing_url": "https://commons.wikimedia.org/wiki/File:Falcons_in_Flight_-_Concert_Band_-_United_States_Air_Force_Band.mp3",- "file_url": "https://upload.wikimedia.org/wikipedia/commons/6/62/Falcons_in_Flight_-_Concert_Band_-_United_States_Air_Force_Band.mp3",+ "verified": "2026-09-30",+ "id": "zhelanov-mystery-forest",+ "title": "Mystery Forest",+ "artist": "Alexandr Zhelanov",+ "source": "opengameart",+ "landing_url": "https://opengameart.org/content/mystery-forest",+ "file_url": "https://opengameart.org/sites/default/files/Mystery%20Forest.mp3","format": "mp3",- "bytes": 12613196,- "sha256": "625d80e591f37c13931b4abd52c25a8052cbaccfc53117af00192b36aaa8b1b3",- "license": "CC-PDDC",- "license_url": "https://creativecommons.org/licenses/publicdomain/",- "attribution": null,+ "bytes": 9287424,+ "sha256": "cbd67ca371d77a5039b8bd35689aa1513f4c371392ee2b5db2189e28318f6a93",+ "license": "CC-BY-3.0",+ "license_url": "https://creativecommons.org/licenses/by/3.0/",+ "attribution": "\"Mystery Forest\" by Alexandr Zhelanov, https://soundcloud.com/alexandr-zhelanov - licensed CC-BY 3.0: https://opengameart.org/content/mystery-forest","placements": [+ "description","credits_file","end_card"],- "content_id": "unknown",- "duration": 363.8,- "shelf": "cinematic",+ "content_id": "none-known",+ "duration": 232.4,+ "shelf": "documentary","moods": [- "soaring",- "heroic",- "adventurous",- "cinematic"+ "mysterious",+ "magical",+ "curious"],- "energy": 0.75,+ "energy": 0.35,"tempo": "medium","uses": [- "launch",- "trailer",- "keynote"+ "documentary",+ "nature",+ "story"],"vocals": "none","instruments": [- "concert band",- "euphonium",- "trumpet",- "brass",+ "orchestra",+ "synth pads","percussion"],"ending": "soft",- "notes": "Film-score-style concert band piece with euphonium and trumpet solos, by a USAF member (composition and recording US-government works); aviation, ambition, launch films.",- "composer": "Tadd Russo",- "quiet_intro_s": 1.0,- "lead_silence_s": 1.2,- "highlight_s": 318.0+ "notes": "\"A mysterious city in the forest\"; slow reveal with a fade-out ending.",+ "quiet_intro_s": 2.0,+ "lead_silence_s": 0.6,+ "highlight_s": 134.0},{- "credit_optional": "Performed by the United States Air Force Band (public domain, US government work)",+ "credit_optional": null,"loops": null,"status": "active",- "verified": "2026-09-29",- "id": "pd-usaf-band-skyscrapers",- "title": "Skyscrapers",- "artist": "United States Air Force Band, Airmen of Note",- "source": "wikimedia",- "landing_url": "https://commons.wikimedia.org/wiki/File:Skyscrapers_-_Airmen_of_Note_-_United_States_Air_Force_Band.mp3",- "file_url": "https://upload.wikimedia.org/wikipedia/commons/f/f5/Skyscrapers_-_Airmen_of_Note_-_United_States_Air_Force_Band.mp3",- "format": "mp3",- "bytes": 7693124,- "sha256": "7c39bc02a77ad26c9b76d3d1db99ee3ae09965a0cb3766a8deaae0567e75daef",- "license": "CC-PDDC",- "license_url": "https://creativecommons.org/licenses/publicdomain/",- "attribution": null,+ "verified": "2026-09-30",+ "id": "zhelanov-path-to-lake-land",+ "title": "Path to Lake Land",+ "artist": "Alexandr Zhelanov",+ "source": "opengameart",+ "landing_url": "https://opengameart.org/content/path-to-lake-land",+ "file_url": "https://opengameart.org/sites/default/files/Path%20to%20Lake%20Land.ogg",+ "format": "ogg",+ "bytes": 4139721,+ "sha256": "e6e0bab96463b2fad4386e87d2e84cd3a7237f0297af5c65e9e6328a794accb3",+ "license": "CC-BY-3.0",+ "license_url": "https://creativecommons.org/licenses/by/3.0/",+ "attribution": "\"Path to Lake Land\" by Alexandr Zhelanov, https://soundcloud.com/alexandr-zhelanov - licensed CC-BY 3.0: https://opengameart.org/content/path-to-lake-land","placements": [+ "description","credits_file","end_card"],- "content_id": "unknown",- "duration": 477.6,- "shelf": "upbeat",+ "content_id": "none-known",+ "duration": 254.8,+ "shelf": "inspiring","moods": [- "confident",- "urban",- "sophisticated",- "upbeat"+ "hopeful",+ "pastoral",+ "adventurous"],- "energy": 0.7,- "tempo": "fast",+ "energy": 0.5,+ "tempo": "medium","uses": [- "promo",- "product-demo",+ "story",+ "travel","recap"],"vocals": "none","instruments": [- "big band",- "saxophones",- "trumpets",- "trombones",- "rhythm section"+ "orchestra",+ "strings",+ "flute"],"ending": "clean",- "notes": "Modern big-band jazz by the band's own arranger (US-government work); city, business, confident tech-launch energy.",- "composer": "Alan Baylock",+ "notes": "Open, hopeful travelling theme with a long, even build.","quiet_intro_s": 0.0,- "lead_silence_s": 0.5,- "highlight_s": 358.0+ "lead_silence_s": 0.1,+ "highlight_s": 183.0},{- "credit_optional": "Antonio Vivaldi: The Four Seasons: Spring, RV 269 - I. Allegro, performed by The Modena Chamber Orchestra (Public Domain Mark, via Wikimedia Commons)",+ "credit_optional": null,"loops": null,"status": "active",- "verified": "2026-09-29",- "id": "pd-vivaldi-spring-i",- "title": "The Four Seasons: Spring, RV 269 - I. Allegro",- "artist": "The Modena Chamber Orchestra",- "source": "wikimedia",- "landing_url": "https://commons.wikimedia.org/wiki/File:The_Modena_Chamber_Orchestra_-_Vivaldi%27s_Spring,_RV_269_-_I._Allegro.ogg",- "file_url": "https://upload.wikimedia.org/wikipedia/commons/1/18/The_Modena_Chamber_Orchestra_-_Vivaldi%27s_Spring%2C_RV_269_-_I._Allegro.ogg",- "format": "ogg",- "bytes": 4361343,- "sha256": "be981b99147f3521362f008a48311b008dac5dbd9727d9d818f07e0ed9e3bd91",- "license": "CC-PDM-1.0",- "license_url": "https://creativecommons.org/publicdomain/mark/1.0/",- "attribution": null,+ "verified": "2026-09-30",+ "id": "zhelanov-please-answer-me-my-friend",+ "title": "Please, Answer Me My Friend",+ "artist": "Alexandr Zhelanov",+ "source": "opengameart",+ "landing_url": "https://opengameart.org/content/please-answer-me-my-friend",+ "file_url": "https://opengameart.org/sites/default/files/Please%2C%20answer%20me%20my%20friend.mp3",+ "format": "mp3",+ "bytes": 2484069,+ "sha256": "b3e47f97db538f2ac1186bad5cf3628bcb292a4a4f36a1d86a2594fbcfdf185b",+ "license": "CC-BY-3.0",+ "license_url": "https://creativecommons.org/licenses/by/3.0/",+ "attribution": "\"Please, Answer Me My Friend\" by Alexandr Zhelanov, https://soundcloud.com/alexandr-zhelanov - licensed CC-BY 3.0: https://opengameart.org/content/please-answer-me-my-friend","placements": [+ "description","credits_file","end_card"],- "content_id": "unknown",- "duration": 214.0,- "shelf": "orchestral",+ "content_id": "none-known",+ "duration": 155.6,+ "shelf": "inspiring","moods": [- "joyful",- "bright",- "energetic",- "springlike"+ "tender",+ "hopeful",+ "spacey"],- "energy": 0.75,- "tempo": "fast",+ "energy": 0.45,+ "tempo": "medium","uses": [- "intro",- "promo",- "launch"+ "story",+ "science",+ "emotional"],"vocals": "none","instruments": [- "solo violin",- "string orchestra",- "harpsichord"+ "synth",+ "piano",+ "strings"],- "ending": "soft",- "notes": "The famous 'Spring' ritornello; openings, launches with a classical flavour, upbeat montages.",- "composer": "Antonio Vivaldi",+ "ending": "clean",+ "notes": "A \"sweet space theme\"; warm and short enough for a single segment.","quiet_intro_s": 0.0,"lead_silence_s": 0.2,- "highlight_s": 100.0+ "highlight_s": 102.0},{- "credit_optional": "Antonio Vivaldi: The Four Seasons: Winter, RV 297 - II. Largo, performed by The Modena Chamber Orchestra (Public Domain Mark, via Wikimedia Commons)",+ "credit_optional": null,"loops": null,"status": "active",- "verified": "2026-09-29",- "id": "pd-vivaldi-winter-ii",- "title": "The Four Seasons: Winter, RV 297 - II. Largo",- "artist": "The Modena Chamber Orchestra",- "source": "wikimedia",- "landing_url": "https://commons.wikimedia.org/wiki/File:The_Modena_Chamber_Orchestra_-_Vivaldi%27s_Winter,_RV_297_-_II._Largo.ogg",- "file_url": "https://upload.wikimedia.org/wikipedia/commons/8/8b/The_Modena_Chamber_Orchestra_-_Vivaldi%27s_Winter%2C_RV_297_-_II._Largo.ogg",- "format": "ogg",- "bytes": 3165879,- "sha256": "963f0a4b7c10da711bd44fc9d0704da8aa6d8b2545e07bb1505b7012cc1890f7",- "license": "CC-PDM-1.0",- "license_url": "https://creativecommons.org/publicdomain/mark/1.0/",- "attribution": null,+ "verified": "2026-09-30",+ "id": "zhelanov-unknown-place",+ "title": "Unknown Place",+ "artist": "Alexandr Zhelanov",+ "source": "opengameart",+ "landing_url": "https://opengameart.org/content/north-wind-more-music-inside",+ "file_url": "https://opengameart.org/sites/default/files/1.Unknown%20place_0.mp3",+ "format": "mp3",+ "bytes": 2858851,+ "sha256": "f6ad42f4dee091735245afb862e30b6cc45c13a89470032a630ea65f6bb98526",+ "license": "CC-BY-3.0",+ "license_url": "https://creativecommons.org/licenses/by/3.0/",+ "attribution": "\"Unknown Place\" by Alexandr Zhelanov, https://soundcloud.com/alexandr-zhelanov - licensed CC-BY 3.0: https://opengameart.org/content/north-wind-more-music-inside","placements": [+ "description","credits_file","end_card"],- "content_id": "unknown",- "duration": 163.8,- "shelf": "orchestral",+ "content_id": "none-known",+ "duration": 178.4,+ "shelf": "tension","moods": [- "cozy",- "calm",- "gentle",- "warm"+ "dark",+ "uneasy",+ "ambient"],- "energy": 0.3,+ "energy": 0.35,"tempo": "slow","uses": [- "background",- "story"+ "problem",+ "security",+ "tech"],"vocals": "none","instruments": [- "solo violin",- "pizzicato strings"+ "synth pads",+ "drone",+ "percussion"],- "ending": "soft",- "notes": "Violin melody over pizzicato 'raindrops'; cozy indoor or winter scenes, calm explainers.",- "composer": "Antonio Vivaldi",- "quiet_intro_s": 1.0,- "lead_silence_s": 1.0,- "highlight_s": 89.0+ "ending": "clean",+ "notes": "From his dark-ambient archive (North Wind); low, restless bed.",+ "quiet_intro_s": 0.0,+ "lead_silence_s": 0.0,+ "highlight_s": 75.0}]}diff --git a/skills/showtime/lib/st/brand/capture.py b/skills/showtime/lib/st/brand/capture.pyindex 50f753e..d80f3a7 100644--- a/skills/showtime/lib/st/brand/capture.py+++ b/skills/showtime/lib/st/brand/capture.py@@ -468,7 +468,7 @@ def record_in_job(job: Path, entry: Dict[str, Any]) -> None:def job_brand(job: Optional[Path]) -> Optional[Dict[str, Any]]:if job is None:return None- d = read_json(job / "job.json", None)+ d = read_json(job / "job.json", {})b = d.get("brand") if isinstance(d, dict) else Nonereturn b if isinstance(b, dict) else Nonediff --git a/skills/showtime/lib/st/cli_audio.py b/skills/showtime/lib/st/cli_audio.pyindex cefe4c6..97bdc53 100644--- a/skills/showtime/lib/st/cli_audio.py+++ b/skills/showtime/lib/st/cli_audio.py@@ -36,7 +36,7 @@ def _unique(path: Path) -> Path:def register(sub: argparse._SubParsersAction) -> None:a = sub.add_parser("audio", help=COMMANDS["audio"], formatter_class=_F, description=("Local audio toolkit.\n\n"- " music produced music catalog (Scott Buckley, Kevin MacLeod, CC0 ...): search, pick, fetch,\n"+ " music produced music catalog (Scott Buckley, Kevin MacLeod, OpenGameArt ...): search, pick, fetch,\n"" credits; fetched on first use; also live Openverse search\n"" compose procedural music in 18 styles, exact length, stems + MIDI + beats.json\n"" styles list music styles (bpm, key, moods, what they suit)\n"@@ -96,6 +96,24 @@ def register(sub: argparse._SubParsersAction) -> None:p.add_argument("--json", action="store_true")p.set_defaults(func=cmd_styles)+ p = s.add_parser("film-score", help="write a new score.js for a film project (key, tempo, chords, motif, sound)",+ formatter_class=_F,+ description="Write the film template's score.js from a new signature: key and mode, a tempo "+ "and meter that keep the cues on bar lines, a progression, a motif, the "+ "instruments and the drums, picked for the mood and away from the scores of "+ "recent jobs (the look history). `showtime new film` does this once; run it again "+ "for another score. A score.js you wrote by hand is kept unless --force.",+ epilog="Examples:\n showtime audio film-score my-film\n"+ " showtime audio film-score my-film --mood tension\n"+ " showtime audio film-score my-film --seed 7 --json")+ p.add_argument("project")+ p.add_argument("--mood", choices=["calm", "upbeat", "tension", "playful", "cinematic"],+ help="default: from the job's goal and the title, else a seeded choice")+ p.add_argument("--seed", type=int, help="a fixed seed (default: the project and the history)")+ p.add_argument("--force", action="store_true", help="replace a hand-written score.js")+ p.add_argument("--json", action="store_true")+ p.set_defaults(func=cmd_film_score)+p = s.add_parser("sfx", help="render a procedural sound effect", formatter_class=_F,description="Render one procedural effect (loudness-matched to its category) and print its ""hit time: the moment to align with a video frame.",@@ -255,7 +273,7 @@ def _music_filters(p) -> None:p.add_argument("--min-dur", type=float)p.add_argument("--max-dur", type=float)p.add_argument("--vocals", help="none, some, lead (comma list; explainer presets allow none only)")- p.add_argument("--source", help="buckley, incompetech, wikimedia, archive (comma list)")+ p.add_argument("--source", help="buckley, incompetech, opengameart, wikimedia, archive (comma list)")p.add_argument("--license", help="cc-by, cc0, pd, CC-BY-4.0 ... (comma list)")p.add_argument("--ending", help="clean (a final hit and ring-out), soft (fade or quiet outro), cut, unknown")p.add_argument("--all", action="store_true", help="include tracks you vetoed")@@ -263,7 +281,7 @@ def _music_filters(p) -> None:def _register_music(s) -> None:m = s.add_parser("music", help="produced music catalog: search, pick, fetch, credits, veto", formatter_class=_F,- description="A curated catalog of produced recordings (Scott Buckley, Kevin MacLeod, CC0 and "+ description="A curated catalog of produced recordings (Scott Buckley, Kevin MacLeod, composers on OpenGameArt, CC0 and ""public-domain recordings), tagged by shelf, mood, energy and use. ""Nothing is bundled: a track is fetched from its creator's site the first time it is ""used (\"fetching X (N MB) for Y\"), checked against its pinned sha256 and kept in "@@ -569,6 +587,25 @@ def cmd_compose(args) -> int:return 0+def cmd_film_score(args) -> int:+ from .audio import filmscore+ from .common import read_json+ proj = Path(args.project).expanduser().resolve()+ if not (proj / "score.js").is_file() or not (proj / "cues.js").is_file():+ raise ShowtimeError("%s has no score.js and cues.js" % proj, hint="this works on a film project (showtime new film)")+ title = str((read_json(proj / "showtime.json", {}) or {}).get("title") or "")+ sig = filmscore.apply(proj, brief=title, mood=args.mood, seed=args.seed, force=args.force)+ if sig is None:+ raise ShowtimeError("score.js in %s was written by hand: kept" % proj, hint="--force replaces it")+ if args.json:+ print_json(sig)+ else:+ print("score.js: %s %s, %g bpm in %d/4, %s chords, %s motif, %s, %s drums (%s mood)" % (+ sig["key"], sig["mode"], sig["bpm"], sig["meter"], sig["progression"], sig["motif"], sig["palette"],+ sig["drums"], sig["mood"]))+ return 0++def cmd_styles(args) -> int:from .audio import composerows = compose.style_list()@@ -625,7 +662,7 @@ def cmd_cuts(args) -> int:if proj is not None:if proj.is_file() and proj.name == "showtime.json":proj = proj.parent- cfg = read_json(proj / "showtime.json", None)+ cfg = read_json(proj / "showtime.json", {})if not cfg:raise ShowtimeError("no showtime.json in %s" % proj, hint="--apply takes the project folder")dur = dur or float(cfg.get("duration") or 0) or None@@ -1030,12 +1067,12 @@ def cmd_music_fetch(args) -> int:else:raise ShowtimeError("name tracks to fetch, or use --for/--shelf/--all",hint="showtime audio music fetch buckley-with-these-hands")- rep = music.fetch_many(ts, seeds=args.seed, purpose="offline use")+ rep = music.fetch_many(ts, seeds=args.seed, purpose="offline use", bulk=not args.ids)if args.json:print_json(rep)else:- print("fetched %d, already cached %d, failed %d (%s)" % (len(rep["fetched"]), len(rep["cached"]), len(rep["failed"]),- music.cache_root()))+ print("fetched %d, already cached %d, failed %d, left for first use %d (%s)" % (+ len(rep["fetched"]), len(rep["cached"]), len(rep["failed"]), len(rep["skipped"]), music.cache_root()))for f in rep["failed"]:print(" FAILED %s: %s" % (f["id"], f["error"]))return 1 if rep["failed"] and not (rep["fetched"] or rep["cached"]) else 0diff --git a/skills/showtime/lib/st/cli_core.py b/skills/showtime/lib/st/cli_core.pyindex 52ba8af..10d93b4 100644--- a/skills/showtime/lib/st/cli_core.py+++ b/skills/showtime/lib/st/cli_core.py@@ -301,6 +301,7 @@ def cmd_new(args: argparse.Namespace) -> int:if int(cfg[dim]) % 2:raise ShowtimeError("%s must be even for H.264 (got %s)" % (dim, cfg[dim]))write_json(cfg_path, cfg)+ film_score = _vary_film_score(dst, cfg, job_dir) if cfg.get("score") else Noneretimed: Optional[Dict[str, Any]] = Noneif args.duration is not None:old = float(cfg.get("duration") or 0)@@ -329,6 +330,7 @@ def cmd_new(args: argparse.Namespace) -> int:cfg = read_json(cfg_path, cfg)result = {"project": str(dst), "template": args.template, "config": cfg, "retime": retimed, "notes": notes,"review_mode": getattr(args, "mode", None),+ "film_score": film_score,"job": str(job_rec) if job_rec else None, "brand": branded, "reference_style": ref_style,"template_notes": str(src / "README.md") if (src / "README.md").is_file() else None}if args.json:@@ -341,6 +343,9 @@ def cmd_new(args: argparse.Namespace) -> int:log(" retimed " + line)for n in retimed["notes"]:warn(n)+ if film_score:+ log("score: %s %s, %g bpm, %s mood (a new one: showtime audio film-score %s --mood <mood>)" % (+ film_score["key"], film_score["mode"], film_score["bpm"], film_score["mood"], dst))if job_rec:log("job %s: project -> %s" % (job_rec.name, dst))if branded and branded.get("applied"):@@ -383,6 +388,20 @@ def _brand_new_project(dst: Path, cfg: Dict[str, Any], job: Optional[Path], skipreturn None+def _vary_film_score(project: Path, cfg: Dict[str, Any], job: Optional[Path]) -> Optional[Dict[str, Any]]:+ """A film project's own score (st.audio.filmscore): key, tempo, chords, motif and sound picked from the+ brief's mood and away from recent jobs' scores. Never fails `new`: the template's score stays."""+ try:+ from .audio import filmscore+ from .job import ledger+ job = job or ledger.enclosing_job(project)+ goal = str((ledger.load(job) if job is not None and (job / "job.json").is_file() else {}).get("goal") or "")+ return filmscore.apply(project, brief=" ".join(x for x in (goal, str(cfg.get("title") or "")) if x))+ except Exception as e: # noqa: BLE001+ warn("kept the template's score (%s)" % e)+ return None++def _attach_to_job(project: Path, job: Optional[Path]) -> Optional[Path]:"""Record the new project in its job (pointers.project): the --job given, else the job folderthat contains it. Never fails `new` over the ledger."""diff --git a/skills/showtime/lib/st/cli_receipt.py b/skills/showtime/lib/st/cli_receipt.pyindex 3ccec76..0d7afe3 100644--- a/skills/showtime/lib/st/cli_receipt.py+++ b/skills/showtime/lib/st/cli_receipt.py@@ -28,15 +28,18 @@ def register(sub: argparse._SubParsersAction) -> None:"Tokens and cost: only from a session log you name (--transcript, $SHOWTIME_TRANSCRIPT, or the\n""plugin's Stop hook for Claude Code), only the current session, and only its numbers: no prompt,\n""reply or file content is read out or copied. Claude Code logs are priced at the public API list\n"- "price (dated in the receipt; a plan does not pay per video). Codex logs give tokens only."),+ "price (dated in the receipt; a plan does not pay per video). Codex logs give tokens only. Under Devin\n"+ "its CLI session database is read by itself (the sessions that worked in the job's folder; numbers\n"+ "only), and the cost is an estimate at Devin's listed per-token prices, labelled as one."),epilog=("examples:\n"" showtime receipt # the current or newest job\n"" showtime receipt launch-teaser --transcript ~/.claude/projects/<project>/<session>.jsonl\n"" showtime receipt --whole-session --transcript rollout.jsonl --host codex\n"" showtime receipt --print # show it, write nothing"))p.add_argument("job", nargs="?", help="job folder or name (default: the current or newest job)")- p.add_argument("--transcript", metavar="FILE", help="the current session's log (Claude Code .jsonl or a Codex rollout)")- p.add_argument("--host", choices=["claude", "codex"], help="the log's format (default: detected)")+ p.add_argument("--transcript", metavar="FILE", help="the current session's log (Claude Code .jsonl, a Codex rollout, "+ "or Devin's sessions.db)")+ p.add_argument("--host", choices=["claude", "codex", "devin"], help="the log's format (default: detected)")p.add_argument("--whole-session", action="store_true",help="count the whole session, not only the time from the job's start to its last update")p.add_argument("--no-share", action="store_true", help="do not touch share.txt")diff --git a/skills/showtime/lib/st/deliver/poster.py b/skills/showtime/lib/st/deliver/poster.pyindex 3eae176..8b9971c 100644--- a/skills/showtime/lib/st/deliver/poster.py+++ b/skills/showtime/lib/st/deliver/poster.py@@ -39,6 +39,8 @@ def extract_frame(video: PathLike, t: float, out: PathLike, width: Optional[int]ff.run_ffmpeg(args + ["-update", "1", os.fspath(out)])if not out.is_file():raise ShowtimeError("could not extract a frame at %.3fs from %s" % (t, video))+ from ..qa.media import strip_png_colour_chunks+ strip_png_colour_chunks(out) # no gAMA/cHRM/cICP: browsers draw the still as bright as the videoreturn outdiff --git a/skills/showtime/lib/st/doctor.py b/skills/showtime/lib/st/doctor.pyindex 63f5acd..4b52d83 100644--- a/skills/showtime/lib/st/doctor.py+++ b/skills/showtime/lib/st/doctor.py@@ -275,8 +275,15 @@ class Doctor:returnreachable, detail = sandbox.probe_network()installed = bool(self.state.get("installed"))+ m_ok, m_detail = (False, "") if reachable else sandbox.probe_mirror()if reachable:self.add("network", PASS, detail)+ elif m_ok:+ self.add("network", WARN, "%s: %s; the model mirror answers (%s), so model downloads come from there"+ % (sandbox.PROBE_URL, detail, m_detail),+ "nothing to do for the models; other first-use downloads (extra voices, media search) may "+ "need the hosts allowed in the sandbox's network settings. %s=<URL or folder> picks "+ "another mirror" % sandbox.MIRROR_ENV, host=host)else:what = ("setup needs it" if not installed else"only features that fetch on first use need it (extra voices, media search, lazy models)")diff --git a/skills/showtime/lib/st/footage/transcribe.py b/skills/showtime/lib/st/footage/transcribe.pyindex 5d9a0eb..44d1ba1 100644--- a/skills/showtime/lib/st/footage/transcribe.py+++ b/skills/showtime/lib/st/footage/transcribe.py@@ -209,8 +209,12 @@ def _ensure_whisper(name: str) -> Path:shutil.rmtree(d)os.replace(str(tmp), str(d))except Exception as e: # noqa: BLE001- raise ShowtimeError("could not download whisper model %s: %s" % (name, e),- hint=("run %s" % hint_setup) if hint_setup else "check your network connection")+ # unpinned sizes come straight from Hugging Face (no model mirror): name the mirrored default+ blocked = re.search(r"\b(403|407)\b|Tunnel connection failed|ProxyError", str(e))+ hint = ("Hugging Face is blocked here and this size has no mirror: use --model small.en (pinned, it falls "+ "back to the showtime model mirror) or allow huggingface.co in the sandbox's network settings"+ if blocked else ("run %s" % hint_setup) if hint_setup else "check your network connection")+ raise ShowtimeError("could not download whisper model %s: %s" % (name, e), hint=hint)return ddiff --git a/skills/showtime/lib/st/job/ledger.py b/skills/showtime/lib/st/job/ledger.pyindex f58159d..229ba78 100644--- a/skills/showtime/lib/st/job/ledger.py+++ b/skills/showtime/lib/st/job/ledger.py@@ -1314,7 +1314,7 @@ def status_lines(job: Path, data: Optional[Dict[str, Any]] = None, absolute: bool2 += "; last output %s (%s)" % (_rel(lo[0], job), lo[1][:16].replace("T", " ") if absolute else _ago(lo[1]))if qa.get("verdict"):l2 += "; qa %s" % qa["verdict"]- if rv.get("status") in ("pending", "waiting", "not ready"):+ if rv.get("pending"):l2 += "; review pending"elif rv.get("status") in ("done", "cap"):l2 += "; " + rv["message"]diff --git a/skills/showtime/lib/st/job/receipt.py b/skills/showtime/lib/st/job/receipt.pyindex d3c05d5..3b22fad 100644--- a/skills/showtime/lib/st/job/receipt.py+++ b/skills/showtime/lib/st/job/receipt.py@@ -102,22 +102,40 @@ def _images(job: Path) -> Dict[str, int]:def _review(job: Path) -> Dict[str, Any]:- rounds = sorted((d for d in (job / "review").glob("round-*") if d.is_dir()),- key=lambda d: int(re.sub(r"\D", "", d.name) or 0)) if (job / "review").is_dir() else []+ """Review rounds and their FINDINGS files. A pairwise round (blind A/B, both orders) has one FINDINGS.md+ per order (order-1/, order-2/): it has its findings when both orders were answered."""+ try:+ from . import review_state+ rs = review_state.rounds(job)+ except Exception: # noqa: BLE001 - the receipt never fails over it+ rs = []info: List[Dict[str, Any]] = []- for d in rounds:- f = d / "FINDINGS.md"- row = {"round": int(re.sub(r"\D", "", d.name) or 0), "findings": f.is_file(), "self_review": False}- if f.is_file():+ for r in rs:+ d = Path(r["dir"])+ pair = r.get("kind") == "pairwise"+ files = [d / ("order-%d" % k) / "FINDINGS.md" for k in (1, 2)] if pair else [d / "FINDINGS.md"]+ saved = [f for f in files if f.is_file()]+ selfr = False+ for f in saved:try:- row["self_review"] = "self-review" in f.read_text(encoding="utf-8", errors="replace")[:20000].lower()+ selfr = selfr or "self-review" in f.read_text(encoding="utf-8", errors="replace")[:20000].lower()except OSError:pass- info.append(row)+ info.append({"round": r["round"], "kind": r.get("kind") or "single", "findings": len(saved) == len(files),+ "findings_files": len(saved), "self_review": selfr})return {"packed": len(info), "with_findings": sum(1 for r in info if r["findings"]),+ "pairwise": sum(1 for r in info if r["kind"] == "pairwise"),+ "findings_files": sum(r["findings_files"] for r in info),"self_reviewed": sum(1 for r in info if r["self_review"]), "rounds": info}+def _lead_review(rv: Dict[str, Any], us: Dict[str, Any]) -> bool:+ """Findings saved, none marked as a self-review, yet no sub-agent ran in the session: the lead model+ (e.g. the lead of a Devin Fusion session, reviewing its sidekick's build) wrote them, not a critic."""+ return (us.get("status") == "reported" and us.get("subagents") == 0 and rv["findings_files"] > 0+ and rv["self_reviewed"] < sum(1 for r in rv["rounds"] if r["findings_files"]))++def _review_state(job: Path, data: Dict[str, Any]) -> Dict[str, Any]:"""The review mode and critic-round state (st.job.review_state); {} when unreadable."""try:@@ -161,6 +179,8 @@ def _agent(us: Dict[str, Any]) -> Optional[str]:return "Claude Code"if us.get("host") == "codex":return "Codex"+ if us.get("host") == "devin":+ return "Devin"name = re.sub(r"[^\w .+/-]", "", os.environ.get("SHOWTIME_AGENT", "")).strip()[:60]return ("%s (through MCP)" % name) if name else None@@ -177,6 +197,15 @@ def remember_source(job: Path, transcript: str, host: Optional[str] = None, sesspass+def _devin_here() -> bool:+ """Running under Devin (its environment) with its session database on this machine."""+ try:+ from ..sandbox import detect_host+ return detect_host() == "devin" and usage.devin_db() is not None+ except Exception: # noqa: BLE001+ return False++def _source(job: Path) -> Dict[str, Any]:d = read_json(job / SOURCE_FILE, {}) or {}return d if isinstance(d, dict) else {}@@ -190,6 +219,8 @@ def build(job: Path, transcript: Optional[str] = None, host: Optional[str] = Nonsrc = _source(job)tpath = transcript or os.environ.get("SHOWTIME_TRANSCRIPT") or src.get("transcript")thost = host or (src.get("host") if not transcript else None)+ if not tpath and _devin_here():+ tpath, thost = str(usage.devin_db()), "devin" # Devin keeps its sessions in one databasestart = _epoch(data.get("created"))end, end_label = _end_of_job(job, data)upd = _epoch(data.get("updated"))@@ -197,7 +228,7 @@ def build(job: Path, transcript: Optional[str] = None, host: Optional[str] = Nonuntil = None if whole_session else ((max(x for x in (upd, end) if x is not None) + TAIL_SECONDS)if (upd or end) else None)if tpath:- us = usage.read_usage(tpath, since, until, thost)+ us = usage.read_usage(tpath, since, until, thost, where=job)if us.get("status") == "reported":us["window"] = "the whole session" if whole_session else "from the job's start to its last update (and 30 min after)"if us.get("cost_usd") is not None:@@ -227,6 +258,8 @@ def build(job: Path, transcript: Optional[str] = None, host: Optional[str] = Nonwall = (end - start) if (start is not None and end is not None and end >= start) else Nonerstate = _review_state(job, data)+ rv = dict(_review(job), status=rstate.get("status"), note=rstate.get("message"))+ rv["lead_review"] = _lead_review(rv, us)rec: Dict[str, Any] = {"schema": SCHEMA, "job": job.name, "showtime": __version__, "generated": ledger.now_iso(),"request": req, "mode": data.get("mode"), "platform": data.get("platform"), "agent": agent,@@ -239,7 +272,7 @@ def build(job: Path, transcript: Optional[str] = None, host: Optional[str] = Nonfor q in data.get("questions") or [] if q.get("answer")],"open_questions": [mask(q["text"]) for q in data.get("questions") or [] if not q.get("answer")],},- "review": dict(_review(job), status=rstate.get("status"), note=rstate.get("message")),+ "review": rv,"qa": {"runs": sum(1 for s in data.get("stages") or [] if s.get("name") == "qa") or (1 if qa else 0),"verdict": qa.get("verdict"), "fail": qa.get("fail"), "warn": qa.get("warn"),"file": Path(str(qa["video"])).name if qa.get("video") else None},@@ -284,6 +317,8 @@ def usd_text(us: Dict[str, Any]) -> str:return NOT_REPORTEDif us.get("cost_usd") is None:return NOT_REPORTED+ if us.get("host") == "devin":+ return "about $%.2f (est., at listed prices)" % us["cost_usd"]return "about $%.2f (API-equivalent)" % us["cost_usd"]@@ -357,13 +392,19 @@ def to_markdown(rec: Dict[str, Any]) -> str:rv, qa = rec["review"], rec["qa"]if rv["packed"]:extra = []+ if rv.get("pairwise"):+ extra.append("%d pairwise (blind A/B, both orders)" % rv["pairwise"])if rv["with_findings"] != rv["packed"]:extra.append("%d with findings saved" % rv["with_findings"])else:extra.append("all with findings saved")+ if rv.get("findings_files", 0) != rv["with_findings"]:+ extra.append(_n(rv["findings_files"], "FINDINGS file"))if rv["self_reviewed"]:extra.append("%d answered by the agent itself, not a separate critic" % rv["self_reviewed"])a("- Review rounds: %d (%s)" % (rv["packed"], "; ".join(extra)))+ if rv.get("lead_review"):+ a("- Critic: not an independent critic (no sub-agent ran; the session's lead model wrote the findings)")else:a("- Review rounds: 0")if rv.get("note") and rv.get("status") not in ("no final",):@@ -426,8 +467,10 @@ def to_markdown(rec: Dict[str, Any]) -> str:_tok(tk["input"]), _tok(tk["output"]), _tok(tk["cache_read"]), _tok(tk["write_5m"] + tk["write_1h"])))a("- Cost: %s" % usd_text(us))for m, row in us["models"].items():- a(" - %s: %s output, %s" % (m, _tok(row["output"]),- "$%.2f" % row["cost_usd"] if row.get("cost_usd") is not None else "cost " + NOT_REPORTED))+ share = ", %d%% of the tokens" % round(100 * row["token_share"]) if row.get("token_share") is not None else ""+ reqs = "%s, " % _n(row.get("messages", 0), "request") if us.get("host") == "devin" else ""+ a(" - %s: %s%s output%s, %s" % (m, reqs, _tok(row["output"]), share,+ "$%.2f" % row["cost_usd"] if row.get("cost_usd") is not None else "cost " + NOT_REPORTED))a("- %s" % us["cost_note"])a("- Window: %s." % us["window"])a("")diff --git a/skills/showtime/lib/st/job/review_state.py b/skills/showtime/lib/st/job/review_state.pyindex c0196a3..758f9f5 100644--- a/skills/showtime/lib/st/job/review_state.py+++ b/skills/showtime/lib/st/job/review_state.py@@ -11,19 +11,36 @@ A round has a verdict whenIt is still pending when no round was answered yet, a built pack waits for its critic, a pairwise roundwaits for its second critic or for review-verdict, or the last answered round said "not ready" and fewerthan three rounds were used (fix, re-render, then a pairwise round against the best version).++The quality floor (quality mode; lean only warns):+ * the absolute verdict. Every FINDINGS.md carries `WOULD I POST THIS: yes | no -- one reason` (pairwise:+ one per video, `WOULD I POST X: ...`), judged on the video alone, never against another version. A+ "no" (for a pairwise round: either critic's "no" for the winning version) holds delivery like "not+ ready", even when the pairwise preferred the new version; a missing line keeps the round pending.+ * caption should-fixes cannot ship silently. A SHOULD-FIX (or BLOCKER) line that names captions or+ subtitles stays open until a later text says what happened to it: a line that also names captions+ and says `fixed` or `won't fix: <reason>`, in a later round's FINDINGS.md or in the maker's+ review/round-N/RESPONSE.md (N = the round that raised it, or any later one). Plain word matching,+ nothing smarter: name the captions in the answer."""from __future__ import annotationsimport jsonimport refrom pathlib import Path-from typing import Any, Dict, List, Optional+from typing import Any, Dict, List, Optional, Tuplefrom .. import review_modeMAX_ROUNDS = 3 # the critic protocol's cap (st.qa.review.MAX_ROUNDS)KEYS = ".pairwise-keys" # st.qa.pairwise.KEYS_VERDICT = re.compile(r"^\W*VERDICT\W*:?\s*(.*)$", re.I)+# the absolute verdict: "WOULD I POST THIS: no -- the captions look cheap" (pairwise: "WOULD I POST X: yes -- ...")+_POST = re.compile(r"^\W*WOULD\s+I\s+POST(?:\s+THIS)?\s*(?:\[?\s*([XY])\s*\]?)?\s*[:=]?\s*(.*)$", re.I)+_CAPTION = re.compile(r"\b(captions?|subtitles?|subs)\b", re.I)+_FIXED = re.compile(r"(?<!not )(?<!n't )\bfixed\b|\bwon'?t\s+fix\s*:\s*\S|\bwill\s+not\s+fix\s*:\s*\S", re.I)+_SECTION = re.compile(r"^\W*(BLOCKERS?|SHOULD[- ]FIX|POLISH|WHAT WORKS|DECLINED TO JUDGE|BEST POSTER FRAME|VERDICT|"+ r"PREFERENCE|WOULD I POST|PREVIOUS)\b", re.I)def _read(p: Path) -> Any:@@ -53,6 +70,77 @@ def parse_verdict(text: str) -> Optional[str]:return None+def parse_would_post(text: str) -> Dict[str, Tuple[str, str]]:+ """The absolute verdict lines: {"": ("yes"|"no", reason)} for a single round, {"X": ..., "Y": ...} for a+ pairwise order. A template line left as is ("yes | no") is not an answer."""+ out: Dict[str, Tuple[str, str]] = {}+ for raw in text.splitlines():+ m = _POST.match(raw.strip().strip("`*"))+ if not m:+ continue+ rest = m.group(2).strip().strip("*").strip()+ head = re.split(r"\s--\s|\s-\s|\s—\s", rest, maxsplit=1)+ v = head[0].strip().lower()+ if "|" in v or not re.match(r"(yes|no)\b", v):+ continue+ answer = "yes" if v.startswith("yes") else "no"+ reason = head[1].strip() if len(head) > 1 else re.sub(r"^(yes|no)\W*", "", head[0].strip(), flags=re.I)+ out[(m.group(1) or "").upper()] = (answer, reason)+ return out+++def caption_should_fixes(text: str) -> List[str]:+ """SHOULD-FIX and BLOCKER bullets of one FINDINGS.md that name captions or subtitles."""+ out: List[str] = []+ sev = ""+ for raw in text.splitlines():+ line = raw.strip().strip("`")+ h = _SECTION.match(line)+ if h:+ sev = h.group(1).upper()+ continue+ b = re.match(r"(?:[-*]|\d+[.)])\s*(.*)", line)+ if b and sev.startswith(("SHOULD", "BLOCKER")) and _CAPTION.search(b.group(1)):+ body = b.group(1).strip()+ if body.strip(".() ").lower() not in ("none", "n/a", "..."):+ out.append(body)+ return out+++def resolves_captions(text: str) -> bool:+ """A line that names captions/subtitles and says `fixed` or `won't fix: <reason>`."""+ return any(_CAPTION.search(ln) and _FIXED.search(ln) for ln in text.splitlines())+++def _read_text(f: Path) -> str:+ try:+ return f.read_text(encoding="utf-8", errors="replace")[:40000] if f.is_file() else ""+ except OSError:+ return ""+++def _findings_texts(d: Path) -> List[str]:+ return [t for t in (_read_text(d / "FINDINGS.md"), _read_text(d / "order-1" / "FINDINGS.md"),+ _read_text(d / "order-2" / "FINDINGS.md")) if t]+++def open_caption_fixes(job: Path, rs: Optional[List[Dict[str, Any]]] = None) -> List[Dict[str, Any]]:+ """Caption should-fixes that no later text resolved: [{round, text}] (see the module docstring)."""+ rs = rounds(job) if rs is None else rs+ out: List[Dict[str, Any]] = []+ for i, r in enumerate(rs):+ d = Path(r["dir"])+ raised = [c for t in _findings_texts(d) for c in caption_should_fixes(t)]+ if not raised:+ continue+ later = [_read_text(d / "RESPONSE.md")]+ for r2 in rs[i + 1:]:+ later += _findings_texts(Path(r2["dir"])) + [_read_text(Path(r2["dir"]) / "RESPONSE.md")]+ if not any(resolves_captions(t) for t in later if t):+ out += [{"round": r["round"], "text": c} for c in raised]+ return out++def _answered(f: Path) -> bool:return f.is_file() and f.stat().st_size > 0@@ -81,6 +169,9 @@ def rounds(job: Path) -> List[Dict[str, Any]]:row["video"] = str((key.get("new") or {}).get("video") or "")row["against"] = str((key.get("old") or {}).get("video") or "")row["best"] = str(v.get("best") or "") if isinstance(v, dict) else ""+ wp = v.get("would_post") if isinstance(v, dict) else None+ row["would_post"] = wp.get("answer") if isinstance(wp, dict) else None+ row["would_post_reason"] = wp.get("reason") if isinstance(wp, dict) else Noneelse:row["kind"] = "single"f = d / "FINDINGS.md"@@ -94,6 +185,9 @@ def rounds(job: Path) -> List[Dict[str, Any]]:row["verdict"] = parse_verdict(text) if text else Nonerow["decided"] = row["verdict"] is not Nonerow["self_review"] = text.lstrip().upper().startswith("SELF-REVIEW")+ wp = parse_would_post(text).get("") if text else None+ row["would_post"] = wp[0] if wp else None+ row["would_post_reason"] = wp[1] if wp else Noneman = _read(d / "manifest.json")row["video"] = str(man.get("video") or "") if isinstance(man, dict) else ""out.append(row)@@ -146,7 +240,7 @@ def state(job: Path, data: Optional[Dict[str, Any]] = None, video: Optional[Pathres: Dict[str, Any] = {"mode": mode, "mode_source": source, "required": mode == "quality", "pending": False,"status": "", "message": "", "next": None, "rounds": []}rs = rounds(job)- res["rounds"] = [{k: r.get(k) for k in ("round", "kind", "answered", "verdict", "self_review", "decided")+ res["rounds"] = [{k: r.get(k) for k in ("round", "kind", "answered", "verdict", "self_review", "decided", "would_post")if r.get(k) is not None} for r in rs]answered = [r for r in rs if r["answered"]]res["rounds_answered"] = len(answered)@@ -154,9 +248,14 @@ def state(job: Path, data: Optional[Dict[str, Any]] = None, video: Optional[Pathvideo, kind = ledger.latest_video(job, data)if kind != "final":video = None+ caps = open_caption_fixes(job, rs)+ if caps:+ res["caption_fixes_open"] = capsif mode == "lean":res["status"] = "lean"res["message"] = "lean mode: no critic round required (review-pack + critic when publish-bound or asked)"+ if caps:+ res["warn"] = _caption_message(caps)return resif video is None:res["status"] = "no final"@@ -190,19 +289,22 @@ def state(job: Path, data: Optional[Dict[str, Any]] = None, video: Optional[Pathif prev:res["against"] = str(prev)return res- if len(answered) >= MAX_ROUNDS:+ lr = answered[-1]+ cap = len(answered) >= MAX_ROUNDS+ if cap:res["status"] = "cap"res["message"] = ("review done: %d critic rounds used (the cap); ship the best version with its open findings ""listed" % len(answered))- return res- lr = answered[-1]- if lr["kind"] == "single" and not lr.get("verdict"):+ if lr.get("would_post") == "no":+ res["message"] += "; the last critic would not post it (%s): tell the user" % (+ lr.get("would_post_reason") or "no reason given")+ if not cap and lr["kind"] == "single" and not lr.get("verdict"):res.update(status="waiting", pending=True)res["message"] = "review pending: round-%d's FINDINGS.md has no readable VERDICT line" % lr["round"]res["next"] = ("have the critic finish %s with one line: VERDICT: ship | ship after fixes | not ready -- why"% (Path(lr["dir"]) / "FINDINGS.md"))return res- if lr["kind"] == "single" and lr.get("verdict") == "not ready":+ if not cap and lr["kind"] == "single" and lr.get("verdict") == "not ready":res.update(status="not ready", pending=True)newer = not _same_render(lr.get("video", ""), video)res["message"] = "review pending: round-%d said not ready%s" % (@@ -211,6 +313,37 @@ def state(job: Path, data: Optional[Dict[str, Any]] = None, video: Optional[Pathif newer else "fix the blockers in %s, re-render, then showtime review-pack %s --against best"% (Path(lr["dir"]) / "FINDINGS.md", jn))return res+ if not cap and lr.get("would_post") is None:+ res.update(status="waiting", pending=True)+ pair = lr["kind"] == "pairwise"+ res["message"] = ("review pending: round-%d has no absolute verdict (WOULD I POST THIS: yes | no), which "+ "quality mode requires" % lr["round"])+ res["next"] = ("have %s add one line: %s -- one reason, judged on the video alone%s"+ % ("each critic (order-1/ and order-2/FINDINGS.md)" if pair else "the critic of %s" % (+ Path(lr["dir"]) / "FINDINGS.md"),+ "WOULD I POST X: yes | no, and WOULD I POST Y: yes | no" if pair else "WOULD I POST THIS: yes | no",+ "; then showtime review-verdict %s" % jn if pair else ""))+ return res+ if not cap and lr.get("would_post") == "no":+ res.update(status="would not post", pending=True)+ seen = lr.get("video", "") if lr["kind"] == "single" else lr.get("best", "")+ newer = not _same_render(seen, video)+ res["message"] = ("review pending: round-%d's critic would not post %s under their own name (%s), whatever a "+ "comparison said" % (lr["round"], "the reviewed version" if newer else video.name,+ lr.get("would_post_reason") or "no reason given"))+ res["next"] = ("showtime review-pack %s --against best (%s has not been reviewed)" % (jn, video.name) if newer+ else "fix what the critic named in %s, re-render, then showtime review-pack %s --against best"+ % (lr["dir"], jn))+ return res+ if caps:+ res.update(status="caption fix open", pending=True)+ res["message"] = "review pending: " + _caption_message(caps)+ res["next"] = ("fix it, re-render and pair again (the critic answers `fixed: <the caption finding>`), or write "+ "`won't fix: <reason>` about the captions in %s"+ % (job / "review" / ("round-%d" % caps[-1]["round"]) / "RESPONSE.md"))+ return res+ if cap:+ return resres["status"] = "done"v = lr.get("verdict") or "answered"res["message"] = "review done: round-%d %s%s" % (lr["round"], v, " (a self-review)" if lr.get("self_review") else "")@@ -220,8 +353,15 @@ def state(job: Path, data: Optional[Dict[str, Any]] = None, video: Optional[Pathreturn res+def _caption_message(caps: List[Dict[str, Any]]) -> str:+ c = caps[0]+ return ("a caption should-fix from round-%d is unresolved%s: %s (no later `fixed` or `won't fix: <reason>` naming "+ "the captions)" % (c["round"], " (+%d more)" % (len(caps) - 1) if len(caps) > 1 else "", c["text"][:140]))++def pending_line(st: Dict[str, Any]) -> Optional[str]:- """The one WARN line for qa / deliver / job note, or None when nothing is pending."""+ """The one WARN line for qa / deliver / job note, or None when nothing is pending (lean mode: a caption+ should-fix left open still warns)."""if not st.get("pending"):- return None+ return ("WARN %s" % st["warn"]) if st.get("warn") else Nonereturn "WARN %s -> %s" % (st["message"], st["next"]) if st.get("next") else "WARN %s" % st["message"]diff --git a/skills/showtime/lib/st/job/usage.py b/skills/showtime/lib/st/job/usage.pyindex 0eaaf90..fb924c4 100644--- a/skills/showtime/lib/st/job/usage.py+++ b/skills/showtime/lib/st/job/usage.py@@ -10,6 +10,10 @@ Hosts:* Claude Code session JSONL, one usage record per model message (input, output, cache read, cachewrite) plus the sub-agent logs kept beside it (<session>/subagents/*.jsonl).* Codex rollout JSONL with cumulative `token_count` events (tokens only: it reports no dollars).+ * Devin the CLI's session database (SQLite, read-only): per request, the model id and the token+ metrics of `message_nodes`, selected in SQL; never a message's text. The sessions counted+ are the ones whose working folder holds the job. Devin shows tokens, not dollars: the cost+ is an estimate at its listed per-token prices (DEVIN_PRICES, dated) and says so.* anything else "not reported by this agent".Cost is what the same tokens cost at the public API list price (PRICES, dated). A subscription plan@@ -23,6 +27,7 @@ import calendarimport jsonimport osimport re+import sqlite3import timefrom pathlib import Pathfrom typing import Any, Dict, Iterable, List, Optional, Tuple@@ -40,6 +45,14 @@ PRICES: Dict[str, Dict[str, float]] = {"claude-sonnet-5": {"input": 2.0, "output": 10.0, "cache_read": 0.20, "write_5m": 2.5, "write_1h": 4.0},"claude-haiku-4-5": {"input": 1.0, "output": 5.0, "cache_read": 0.10, "write_5m": 1.25, "write_1h": 2.0},}+# Devin's listed per-token prices (USD per million tokens) for the models it runs; it lists no cache-write+# price, so a cache write counts at the input price. A model not listed here is not priced (a lower bound).+DEVIN_PRICES_AS_OF = "2026-09-30"+DEVIN_PRICES: Dict[str, Dict[str, float]] = {+ "claude-opus-5-5": {"input": 4.0, "output": 20.0, "cache_read": 0.20, "write_5m": 4.0, "write_1h": 4.0},+ "swe-2": {"input": 0.0, "output": 0.0, "cache_read": 0.0, "write_5m": 0.0, "write_1h": 0.0},+}+_DEVIN_EFFORT = re.compile(r"-(?:minimal|low|medium|high|xhigh|max|slow|fast)$")WEB_SEARCH_USD = 0.01 # per search request_DATE_SUFFIX = re.compile(r"-\d{8}$")FIELDS = ("input", "output", "cache_read", "write_5m", "write_1h")@@ -78,8 +91,11 @@ def _lines(path: Path) -> Iterable[str]:def sniff(path: Path) -> Optional[str]:- """'claude' or 'codex' by the shape of the first records; None when it is neither."""+ """'claude', 'codex' or 'devin' by the shape of the first records; None when it is none of them."""try:+ with open(str(path), "rb") as f:+ if f.read(16) == b"SQLite format 3\x00":+ return "devin"if path.stat().st_size > MAX_LOG_BYTES:return Nonen = 0@@ -113,6 +129,7 @@ def read_claude(path: Path, since: Optional[float] = None, until: Optional[floatonce: records are keyed by message id and the largest count of each field wins. `since`/`until`(epoch seconds) keep only messages stamped inside that window."""seen: Dict[str, Dict[str, Any]] = {}+ subs = set()files = 0for f in _claude_files(path):try:@@ -145,6 +162,8 @@ def read_claude(path: Path, since: Optional[float] = None, until: Optional[float"input": _int(u.get("input_tokens")), "output": _int(u.get("output_tokens")),"cache_read": _int(u.get("cache_read_input_tokens")), "write_5m": w5, "write_1h": w1,"searches": _int(st.get("web_search_requests")), "ts": ts}+ if f != path and rec["model"] != "<synthetic>" and any(rec[k] for k in FIELDS):+ subs.add(str(f)) # a sub-agent that worked inside the windowkey = str(msg.get("id") or d.get("requestId") or "%s:%d" % (f.name, n))old = seen.get(key)if old:@@ -174,7 +193,7 @@ def read_claude(path: Path, since: Optional[float] = None, until: Optional[floatif not any(b["fast"].values()):del b["fast"]return {"host": "claude-code", "files": files, "messages": sum(b["messages"] for b in models.values()),- "models": models, "first": first, "last": last}+ "models": models, "first": first, "last": last, "subagents": len(subs)}# ------------------------------------------------------------------ Codex@@ -230,14 +249,141 @@ def read_codex(path: Path, since: Optional[float] = None, until: Optional[float]"models": {canonical_model(model) or "unknown": {"messages": n, **delta}}}+# ------------------------------------------------------------------ Devin++def devin_db(env: Optional[Dict[str, str]] = None) -> Optional[Path]:+ """The Devin CLI's session database on this machine, None when there is none."""+ env = dict(os.environ if env is None else env)+ bases = [env.get("XDG_DATA_HOME") or "", str(Path.home() / ".local" / "share"), env.get("LOCALAPPDATA") or "",+ env.get("APPDATA") or "", str(Path.home() / "Library" / "Application Support")]+ for b in bases:+ if b:+ p = Path(b) / "devin" / "cli" / "sessions.db"+ if p.is_file():+ return p+ return None+++_DEVIN_KEYS = ("message_id", "metadata.created_at", "metadata.generation_model", "metadata.metrics.input_tokens",+ "metadata.metrics.output_tokens", "metadata.metrics.cache_read_tokens",+ "metadata.metrics.cache_creation_tokens")+++def _dig(d: Any, dotted: str) -> Any:+ for part in dotted.split("."):+ d = d.get(part) if isinstance(d, dict) else None+ return d if isinstance(d, (int, float, str)) and not isinstance(d, bool) else None+++def devin_model(name: Any) -> str:+ """A Devin model id without its effort suffix (claude-opus-5-5-high -> claude-opus-5-5, swe-2-medium -> swe-2)."""+ return _DEVIN_EFFORT.sub("", canonical_model(name))+++def _inside(folder: str, target: Optional[Path]) -> bool:+ if target is None:+ return True+ try:+ f = Path(folder).expanduser().resolve()+ t = target.expanduser().resolve()+ except (OSError, RuntimeError, ValueError):+ return False+ return f == t or f in t.parents+++def read_devin(path: Path, since: Optional[float] = None, until: Optional[float] = None,+ where: Optional[Path] = None) -> Dict[str, Any]:+ """Token metrics of the Devin CLI sessions that worked in `where` (the job folder or a parent of it).++ Read-only, and only numbers: SQL selects each assistant message's id, model id, time and token metrics+ (chat_message -> metadata.metrics); the message text is never selected. A message stored in several+ nodes of the session forest counts once (keyed by its message id)."""+ empty = {"host": "devin", "files": 0, "models": {}, "messages": 0}+ try:+ con = sqlite3.connect("%s?mode=ro" % path.resolve().as_uri(), uri=True, timeout=5)+ except (sqlite3.Error, OSError, ValueError):+ return empty+ try:+ sessions = [sid for sid, wd in con.execute("SELECT id, working_directory FROM sessions")+ if _inside(str(wd or ""), where)]+ if not sessions:+ return dict(empty, files=1, note="no Devin session worked in this job's folder")+ marks = ",".join("?" * len(sessions))+ try:+ rows = con.execute("SELECT session_id, created_at, %s FROM message_nodes WHERE session_id IN (%s) "+ "AND json_extract(chat_message, '$.metadata.metrics') IS NOT NULL"+ % (", ".join("json_extract(chat_message, '$.%s')" % k for k in _DEVIN_KEYS), marks),+ sessions).fetchall()+ except sqlite3.OperationalError: # an SQLite without JSON functions: parse, keep the same fields+ rows = []+ for sid, created, raw in con.execute("SELECT session_id, created_at, chat_message FROM message_nodes "+ "WHERE session_id IN (%s) AND chat_message LIKE '%%\"metrics\"%%'"+ % marks, sessions):+ try:+ d = json.loads(raw)+ except (TypeError, ValueError):+ continue+ rows.append((sid, created) + tuple(_dig(d, k) for k in _DEVIN_KEYS))+ del d+ try:+ heads = con.execute("SELECT updated_at FROM subagent_heads WHERE session_id IN (%s)" % marks,+ sessions).fetchall()+ except sqlite3.Error:+ heads = []+ except sqlite3.Error:+ return dict(empty, files=1)+ finally:+ con.close()++ def when(v: Any) -> Optional[float]:+ try:+ t = float(v)+ except (TypeError, ValueError):+ return None+ return t / 1000.0 if t > 1e11 else t # seconds (milliseconds on some builds)++ seen: Dict[Tuple[str, str], Dict[str, Any]] = {}+ for n, (sid, created, mid, stamp, model, i, o, cr, cc) in enumerate(rows):+ ts = parse_ts(stamp)+ ts = ts if ts is not None else when(created)+ key = (str(sid), str(mid or "row:%d" % n))+ old = seen.get(key)+ if old is not None: # the same message in another node: once, at its first time+ if ts is not None and (old["ts"] is None or ts < old["ts"]):+ old["ts"] = ts+ continue+ seen[key] = {"model": canonical_model(model) or "unknown", "input": _int(i), "output": _int(o),+ "cache_read": _int(cr), "write_5m": _int(cc), "write_1h": 0, "ts": ts}+ for key in [k for k, r in seen.items() if (r["ts"] is None and since is not None) or (r["ts"] is not None and (+ (since is not None and r["ts"] < since) or (until is not None and r["ts"] > until)))]:+ del seen[key]+ models: Dict[str, Dict[str, Any]] = {}+ first = last = None+ for rec in seen.values():+ if not any(rec[k] for k in FIELDS):+ continue+ b = models.setdefault(rec["model"], {"messages": 0, "searches": 0, **{k: 0 for k in FIELDS}})+ b["messages"] += 1+ for k in FIELDS:+ b[k] += rec[k]+ if rec["ts"] is not None:+ first = rec["ts"] if first is None else min(first, rec["ts"])+ last = rec["ts"] if last is None else max(last, rec["ts"])+ subagents = sum(1 for (u,) in heads if since is None or (when(u) or 0) >= since)+ return {"host": "devin", "files": 1, "sessions": len({k[0] for k in seen}), "subagents": subagents,+ "messages": sum(b["messages"] for b in models.values()), "models": models, "first": first, "last": last}++# ------------------------------------------------------------------ cost and the summary block-def price_of(model: str) -> Optional[Dict[str, float]]:+def price_of(model: str, host: Optional[str] = None) -> Optional[Dict[str, float]]:+ if host == "devin":+ return DEVIN_PRICES.get(devin_model(model))return PRICES.get(canonical_model(model))-def cost_usd(bucket: Dict[str, Any], model: str) -> Optional[float]:- p = price_of(model)+def cost_usd(bucket: Dict[str, Any], model: str, host: Optional[str] = None) -> Optional[float]:+ p = price_of(model, host)if p is None:return Noneusd = sum(bucket.get(k, 0) * p[k] for k in FIELDS) / 1e6@@ -256,7 +402,9 @@ def summarize(rd: Dict[str, Any], transcript_note: str = "") -> Dict[str, Any]:models = rd.get("models") or {}if not models:return {"status": "not_reported", "host": rd.get("host"),- "note": "the session log has no model usage in this window"}+ "note": rd.get("note") or "the session log has no model usage in this window"}+ host = rd.get("host")+ devin = host == "devin"out_models: Dict[str, Any] = {}tot = {k: 0 for k in FIELDS}usd = 0.0@@ -267,7 +415,7 @@ def summarize(rd: Dict[str, Any], transcript_note: str = "") -> Dict[str, Any]:(("input", "cached_input", "output", "reasoning") if codex else FIELDS)}row["messages"] = b.get("messages", 0)if not codex:- c = cost_usd(b, m)+ c = cost_usd(b, m, host)row["cost_usd"] = round(c, 4) if c is not None else Noneif c is None:unpriced.append(m)@@ -280,6 +428,8 @@ def summarize(rd: Dict[str, Any], transcript_note: str = "") -> Dict[str, Any]:out_models[m] = rowres: Dict[str, Any] = {"status": "reported", "host": rd.get("host"), "messages": rd.get("messages"),"models": out_models}+ if rd.get("subagents") is not None:+ res["subagents"] = rd["subagents"]if codex:t = {k: sum(r.get(k, 0) for r in out_models.values()) for k in ("input", "cached_input", "output", "reasoning")}res["tokens"] = t@@ -287,6 +437,26 @@ def summarize(rd: Dict[str, Any], transcript_note: str = "") -> Dict[str, Any]:res["cost_note"] = "Codex reports tokens, not dollars: cost %s" % NOT_REPORTEDreturn resres["tokens"] = dict(tot, total=sum(tot.values()))+ if len(out_models) > 1 and res["tokens"]["total"]:+ for row in out_models.values(): # e.g. a Devin Fusion session: the lead and its sidekick+ row["token_share"] = round(sum(row[k] for k in FIELDS) / float(res["tokens"]["total"]), 4)+ if devin:+ res["sessions"] = rd.get("sessions")+ res["prices_as_of"] = DEVIN_PRICES_AS_OF+ priced = [m for m in out_models if m not in unpriced]+ if not priced:+ res["cost_usd"] = None+ res["cost_note"] = "Devin reports tokens, not dollars; no listed price for %s: cost %s" % (+ ", ".join(unpriced), NOT_REPORTED)+ else:+ res["cost_usd"] = round(usd, 2)+ res["cost_note"] = ("est., at Devin's listed per-token prices as of %s (Devin reports tokens, not dollars; "+ "cache writes at the input price); a plan does not pay per video" % DEVIN_PRICES_AS_OF)+ if unpriced:+ res["cost_note"] += "; %s not priced, so this is a lower bound" % ", ".join(unpriced)+ if transcript_note:+ res["note"] = transcript_note+ return resres["prices_as_of"] = PRICES_AS_OFif unpriced and len(unpriced) == len(out_models):res["cost_usd"] = None@@ -302,12 +472,15 @@ def summarize(rd: Dict[str, Any], transcript_note: str = "") -> Dict[str, Any]:def read_usage(path: Any, since: Optional[float] = None, until: Optional[float] = None,- host: Optional[str] = None) -> Dict[str, Any]:- """The usage block for a session log. Never raises: a missing or unreadable file is 'not reported'."""+ host: Optional[str] = None, where: Optional[Path] = None) -> Dict[str, Any]:+ """The usage block for a session log. Never raises: a missing or unreadable file is 'not reported'.+ `where` (the job folder) picks the Devin sessions that worked there."""p = Path(str(path)).expanduser() if path else Noneif p is None or not p.is_file():return {"status": "not_reported", "host": host, "note": "no session log to read"}- kind = host if host in ("claude", "codex") else sniff(p)+ kind = host if host in ("claude", "codex", "devin") else sniff(p)+ if kind == "devin":+ return summarize(read_devin(p, since, until, where))if kind == "claude":return summarize(read_claude(p, since, until))if kind == "codex":diff --git a/skills/showtime/lib/st/lazy.py b/skills/showtime/lib/st/lazy.pyindex 627fd6e..afa58ae 100644--- a/skills/showtime/lib/st/lazy.py+++ b/skills/showtime/lib/st/lazy.py@@ -162,8 +162,10 @@ def ensure_item(item_id: str, feature: str, allow_download: bool = True) -> Pathlabel = it.get("description", item_id).split(" (")[0]seeds = su.Seeds([d for d in os.environ.get("SHOWTIME_SEED_DIRS", "").split(os.pathsep) if d])if not allow_download or offline():- # a seed folder or a shared cache copy still counts when offline- if not all(seeds.find(f.get("size"), f.get("sha256"), f.get("url")) for f in files):+ # a seed folder, a shared cache copy or a SHOWTIME_MODEL_MIRROR folder still counts when offline+ from . import mirror+ if not all(seeds.find(f.get("size"), f.get("sha256"), f.get("url")) or mirror.local_copy(f.get("url", ""))+ for f in files):raise missing_error(item_id, label, nbytes, feature)with cache_lock(paths()["cache"] / "lazy" / item_id, timeout=4 * 3600, stale=6 * 3600):if su.item_status(it, home(), key)[0] == "ok": # another process just fetched itdiff --git a/skills/showtime/lib/st/mirror.json b/skills/showtime/lib/st/mirror.jsonnew file mode 100644index 0000000..94a88a7--- /dev/null+++ b/skills/showtime/lib/st/mirror.json@@ -0,0 +1,215 @@+{+ "schema": 1,+ "about": "Mirror of the model files the default install and first-use features download. When a primary host is blocked (a sandbox's egress proxy answering 403, no route to Hugging Face or GitHub LFS), the shared fetcher (setup/setup.py fetch) tries SHOWTIME_MODEL_MIRROR (a base URL or a local folder) and then each base in `mirrors`, in order. Every copy is sha256-verified. scripts/stage_model_mirror.py builds the release assets from this file.",+ "tag": "models-v1",+ "mirrors": [+ "https://github.com/FavioVazquez/showtime/releases/download/models-v1/"+ ],+ "not_mirrored": {+ "piper voices": "GitHub release archives (reachable wherever the mirror is) that bundle GPL-3.0 espeak-ng data",+ "whisper-large-v3-turbo, supertonic-3 and the other setup extras": "opt-in; large-v3-turbo alone is 1.6 GB",+ "unpinned Whisper sizes (small, base, medium ...)": "fetched with huggingface_hub; the pinned small.en is mirrored",+ "wav2vec2 fp32 aligner (SHOWTIME_ALIGNER=fp32)": "opt-in, 378 MB; the default q8 aligner is mirrored",+ "ffmpeg, Chromium, musicgen": "programs and opt-in weights, not model files"+ },+ "files": [+ {+ "item": "kokoro-timestamped",+ "url": "https://huggingface.co/onnx-community/Kokoro-82M-v1.0-ONNX-timestamped/resolve/dd4401a9add81ac692d20e240d22ec9dda82cc29/onnx/model_fp16.onnx",+ "file": "kokoro-timestamped--model_fp16.onnx",+ "size": 163232776,+ "sha256": "220724d5c5e0cc01be30f38faa6cf0c895a7cde6e7773e91db2973c8c7e5123c",+ "license": "Apache-2.0",+ "license_url": "https://www.apache.org/licenses/LICENSE-2.0",+ "source": "https://huggingface.co/hexgrad/Kokoro-82M",+ "attribution": "Kokoro-82M by hexgrad (Apache-2.0); timestamped fp16 ONNX export by onnx-community"+ },+ {+ "item": "kokoro-voices",+ "url": "https://github.com/thewh1teagle/kokoro-onnx/releases/download/model-files-v1.0/voices-v1.0.bin",+ "file": "kokoro-voices--voices-v1.0.bin",+ "size": 28214398,+ "sha256": "bca610b8308e8d99f32e6fe4197e7ec01679264efed0cac9140fe9c29f1fbf7d",+ "license": "Apache-2.0",+ "license_url": "https://www.apache.org/licenses/LICENSE-2.0",+ "source": "https://huggingface.co/hexgrad/Kokoro-82M",+ "attribution": "Kokoro-82M v1.0 voice style vectors by hexgrad (Apache-2.0), packed as voices-v1.0.bin by the kokoro-onnx project"+ },+ {+ "item": "whisper-small.en",+ "url": "https://huggingface.co/Systran/faster-whisper-small.en/resolve/d1d751a5f8271d482d14ca55d9e2deeebbae577f/model.bin",+ "file": "whisper-small.en--model.bin",+ "size": 483545366,+ "sha256": "62b2a45b05ee59acb4a5341b33ee35e041395d378d418a18acfe4c9e768ee37a",+ "license": "MIT",+ "license_url": "https://opensource.org/license/mit",+ "source": "https://huggingface.co/Systran/faster-whisper-small.en",+ "attribution": "Whisper small.en by OpenAI (MIT); CTranslate2 conversion by SYSTRAN (MIT)"+ },+ {+ "item": "whisper-small.en",+ "url": "https://huggingface.co/Systran/faster-whisper-small.en/resolve/d1d751a5f8271d482d14ca55d9e2deeebbae577f/config.json",+ "file": "whisper-small.en--config.json",+ "size": 2657,+ "sha256": "666a9605530ac1f61fa8177f3702b4dacec9966749e42610839fcc32661d5fae",+ "license": "MIT",+ "license_url": "https://opensource.org/license/mit",+ "source": "https://huggingface.co/Systran/faster-whisper-small.en",+ "attribution": "Whisper small.en by OpenAI (MIT); CTranslate2 conversion by SYSTRAN (MIT)"+ },+ {+ "item": "whisper-small.en",+ "url": "https://huggingface.co/Systran/faster-whisper-small.en/resolve/d1d751a5f8271d482d14ca55d9e2deeebbae577f/tokenizer.json",+ "file": "whisper-small.en--tokenizer.json",+ "size": 2128466,+ "sha256": "929c5252409436dce1b38a75d1abbcb5e132d170d8e324e4e04ed915fa2d22df",+ "license": "MIT",+ "license_url": "https://opensource.org/license/mit",+ "source": "https://huggingface.co/Systran/faster-whisper-small.en",+ "attribution": "Whisper small.en by OpenAI (MIT); CTranslate2 conversion by SYSTRAN (MIT)"+ },+ {+ "item": "whisper-small.en",+ "url": "https://huggingface.co/Systran/faster-whisper-small.en/resolve/d1d751a5f8271d482d14ca55d9e2deeebbae577f/vocabulary.txt",+ "file": "whisper-small.en--vocabulary.txt",+ "size": 422309,+ "sha256": "ff77588746d3a2595d32ab5b69ffd7b95ce2441ac57533cb66fc3eb575a115cf",+ "license": "MIT",+ "license_url": "https://opensource.org/license/mit",+ "source": "https://huggingface.co/Systran/faster-whisper-small.en",+ "attribution": "Whisper small.en by OpenAI (MIT); CTranslate2 conversion by SYSTRAN (MIT)"+ },+ {+ "item": "silero-vad-v5",+ "url": "https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/silero_vad_v5.onnx",+ "file": "silero-vad-v5--silero_vad_v5.onnx",+ "size": 2313101,+ "sha256": "6b99cbfd39246b6706f98ec13c7c50c6b299181f2474fa05cbc8046acc274396",+ "license": "MIT",+ "license_url": "https://opensource.org/license/mit",+ "source": "https://github.com/snakers4/silero-vad",+ "attribution": "Silero VAD v5 by Silero Team (MIT), ONNX file as published by sherpa-onnx"+ },+ {+ "item": "yunet",+ "url": "https://github.com/opencv/opencv_zoo/raw/f12e12798e8314f7c074a6656816c048dcc95b7a/models/face_detection_yunet/face_detection_yunet_2023mar.onnx",+ "file": "yunet--face_detection_yunet_2023mar.onnx",+ "size": 232589,+ "sha256": "8f2383e4dd3cfbb4553ea8718107fc0423210dc964f9f4280604804ed2552fa4",+ "license": "MIT",+ "license_url": "https://opensource.org/license/mit",+ "source": "https://github.com/opencv/opencv_zoo/tree/main/models/face_detection_yunet",+ "attribution": "YuNet face detector (2023mar) by Shiqi Yu and contributors, OpenCV Zoo (MIT)"+ },+ {+ "item": "yunet",+ "url": "https://raw.githubusercontent.com/opencv/opencv_zoo/f12e12798e8314f7c074a6656816c048dcc95b7a/models/face_detection_yunet/LICENSE",+ "file": "yunet--LICENSE",+ "size": 1085,+ "sha256": "c83b8120c50ccbd4c4f96edf53141bdd566ebb8f8e9227e415326aa1b1aba958",+ "license": "MIT",+ "license_url": "https://opensource.org/license/mit",+ "source": "https://github.com/opencv/opencv_zoo/tree/main/models/face_detection_yunet",+ "attribution": "YuNet face detector (2023mar) by Shiqi Yu and contributors, OpenCV Zoo (MIT)"+ },+ {+ "item": "arnndn",+ "url": "https://raw.githubusercontent.com/richardpl/arnndn-models/c670d8220c9db2667f0879541f9dd80bc5abfbdc/sh.rnnn",+ "file": "arnndn--sh.rnnn",+ "size": 297646,+ "sha256": "70bb6685eb0c2a1d18e2918dca3fbfbd39317010b1802eb1b6ea73a92f3fdec0",+ "license": "LicenseRef-PublicDomain",+ "license_url": "https://github.com/GregorR/rnnoise-models",+ "source": "https://github.com/richardpl/arnndn-models",+ "attribution": "RNNoise model trained by Gregor Richards (public domain)"+ },+ {+ "item": "arnndn",+ "url": "https://raw.githubusercontent.com/richardpl/arnndn-models/c670d8220c9db2667f0879541f9dd80bc5abfbdc/cb.rnnn",+ "file": "arnndn--cb.rnnn",+ "size": 299741,+ "sha256": "f1357c4e5be9dee8467bead486dfced2d75b640c26ad0b594fa7f102322371d9",+ "license": "LicenseRef-PublicDomain",+ "license_url": "https://github.com/GregorR/rnnoise-models",+ "source": "https://github.com/richardpl/arnndn-models",+ "attribution": "RNNoise model trained by Gregor Richards (public domain)"+ },+ {+ "item": "arnndn",+ "url": "https://raw.githubusercontent.com/richardpl/arnndn-models/c670d8220c9db2667f0879541f9dd80bc5abfbdc/std.rnnn",+ "file": "arnndn--std.rnnn",+ "size": 302903,+ "sha256": "6b8943dc4a9b6b24425873992a44f29c0577503276456af46a8854774faeb294",+ "license": "BSD-3-Clause",+ "license_url": "https://github.com/xiph/rnnoise/blob/main/COPYING",+ "source": "https://github.com/richardpl/arnndn-models",+ "attribution": "RNNoise standard model by Jean-Marc Valin / Xiph.Org Foundation (BSD-3-Clause)"+ },+ {+ "item": "sf-fluidr3mono",+ "url": "https://raw.githubusercontent.com/musescore/MuseScore/1a4bd0feb9378cd145418dbcb40246980ca1013d/share/sound/FluidR3Mono_GM.sf3",+ "file": "sf-fluidr3mono--FluidR3Mono_GM.sf3",+ "size": 23712790,+ "sha256": "2aacd036d7058d40a371846ef2f5dc5f130d648ab3837fe2626591ba49a71254",+ "license": "MIT",+ "license_url": "https://opensource.org/license/mit",+ "source": "https://github.com/musescore/MuseScore/tree/master/share/sound",+ "attribution": "FluidR3Mono GM SoundFont by Frank Wen and the MuseScore team (MIT)"+ },+ {+ "item": "sf-fluidr3mono",+ "url": "https://raw.githubusercontent.com/musescore/MuseScore/1a4bd0feb9378cd145418dbcb40246980ca1013d/share/sound/FluidR3Mono_License.md",+ "file": "sf-fluidr3mono--FluidR3Mono_License.md",+ "size": 3355,+ "sha256": "cf1889febeafd2b0a20c2c82359245524fc7dba29ded336cc3b51e0bcfdc8b84",+ "license": "MIT",+ "license_url": "https://opensource.org/license/mit",+ "source": "https://github.com/musescore/MuseScore/tree/master/share/sound",+ "attribution": "FluidR3Mono GM SoundFont by Frank Wen and the MuseScore team (MIT)"+ },+ {+ "item": "parakeet-tdt-0.6b-v3-int8",+ "url": "https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-nemo-parakeet-tdt-0.6b-v3-int8.tar.bz2",+ "file": "parakeet-tdt-0.6b-v3-int8--sherpa-onnx-nemo-parakeet-tdt-0.6b-v3-int8.tar.bz2",+ "size": 487170055,+ "sha256": "5793d0fd397c5778d2cf2126994d58e9d56b1be7c04d13c7a15bb1b4eafb16bf",+ "license": "CC-BY-4.0 AND Apache-2.0",+ "license_url": "https://creativecommons.org/licenses/by/4.0/",+ "source": "https://huggingface.co/nvidia/parakeet-tdt-0.6b-v3",+ "attribution": "Parakeet-TDT-0.6B-v3 by NVIDIA (CC-BY-4.0); int8 ONNX export by sherpa-onnx (Apache-2.0)"+ },+ {+ "item": "uvr-mdx-net-voc-ft",+ "url": "https://github.com/TRvlvr/model_repo/releases/download/all_public_uvr_models/UVR-MDX-NET-Voc_FT.onnx",+ "file": "uvr-mdx-net-voc-ft--UVR-MDX-NET-Voc_FT.onnx",+ "size": 66762490,+ "sha256": "534b2070fcc7df514b13ef660dc8cbb328679c2374d04354a5c42bb14ecce111",+ "license": "MIT",+ "license_url": "https://opensource.org/license/mit",+ "source": "https://github.com/TRvlvr/model_repo",+ "attribution": "Vocal separation model UVR-MDX-NET-Voc_FT by the Ultimate Vocal Remover (UVR) project (MIT)"+ },+ {+ "item": "wav2vec2-base-960h",+ "url": "https://huggingface.co/onnx-community/wav2vec2-base-960h-ONNX/resolve/729c1a6730fb549c20a1c73a3d3f96f11020225e/onnx/model_quantized.onnx",+ "file": "wav2vec2-base-960h--model_quantized.onnx",+ "size": 95212816,+ "sha256": "1d9a366c27b2966625cd5035ac3db8847c53bba617169912bb251b42975a3a22",+ "license": "Apache-2.0",+ "license_url": "https://www.apache.org/licenses/LICENSE-2.0",+ "source": "https://huggingface.co/facebook/wav2vec2-base-960h",+ "attribution": "wav2vec2-base-960h by Facebook AI (Apache-2.0); uint8 ONNX export by onnx-community"+ },+ {+ "item": "wav2vec2-base-960h",+ "url": "https://huggingface.co/onnx-community/wav2vec2-base-960h-ONNX/resolve/729c1a6730fb549c20a1c73a3d3f96f11020225e/vocab.json",+ "file": "wav2vec2-base-960h--vocab.json",+ "size": 358,+ "sha256": "4178db26b3c7570f6a47f14ac6a1c7b32950b8c2800fb097287e53776934f1c5",+ "license": "Apache-2.0",+ "license_url": "https://www.apache.org/licenses/LICENSE-2.0",+ "source": "https://huggingface.co/facebook/wav2vec2-base-960h",+ "attribution": "wav2vec2-base-960h by Facebook AI (Apache-2.0); uint8 ONNX export by onnx-community"+ }+ ]+}diff --git a/skills/showtime/lib/st/mirror.py b/skills/showtime/lib/st/mirror.pynew file mode 100644index 0000000..ad8765b--- /dev/null+++ b/skills/showtime/lib/st/mirror.py@@ -0,0 +1,154 @@+"""The model mirror: where a pinned model file can come from when its own host is blocked (stdlib only).++Agent sandboxes often sit behind an egress proxy that allows GitHub but answers 403 for Hugging Face or+GitHub LFS. setup/setup.py `fetch` (the one downloader behind setup, first-use fetches and the voice+models) asks this module for the other places a file lives and tries them in order:++ 1. SHOWTIME_MODEL_MIRROR as a local folder: checked before any network, like a seed folder+ 2. the primary URL, unless it already failed as blocked in this process+ 3. SHOWTIME_MODEL_MIRROR as a base URL, then each base in mirror.json `mirrors`++Every copy, from any source, is verified by size and sha256 before it is installed. mirror.json lists+the mirrored files (primary URL, file name on the mirror, size, sha256, license); a URL that is not in+it has no mirror. SHOWTIME_MODEL_MIRROR=off turns the mirrors off. Several values are separated by commas.+"""+from __future__ import annotations++import json+import os+import re+import socket+import ssl+import urllib.error+from pathlib import Path+from typing import Any, Dict, List, Optional, Tuple++MANIFEST = Path(__file__).resolve().parent / "mirror.json"+ENV = "SHOWTIME_MODEL_MIRROR"++_data: Optional[Dict[str, Any]] = None+_by_url: Dict[str, Dict[str, Any]] = {}+_blocked: Dict[str, str] = {} # host -> why, for this process: later files skip straight to a mirror+++class Blocked(IOError):+ """The source refused or cannot be reached (proxy block, 403/404, no route): try the next one, do not retry."""+++def load(data: Optional[Dict[str, Any]] = None) -> Dict[str, Any]:+ """mirror.json, cached. Passing `data` replaces it (tests)."""+ global _data, _by_url+ if data is not None or _data is None:+ if data is None:+ try:+ data = json.loads(MANIFEST.read_text(encoding="utf-8"))+ except (OSError, ValueError):+ data = {"mirrors": [], "files": []}+ _data = data+ _by_url = {f["url"]: f for f in data.get("files") or []}+ return _data+++def entry(url: str) -> Optional[Dict[str, Any]]:+ load()+ return _by_url.get(url)+++def _env_values() -> List[str]:+ raw = (os.environ.get(ENV) or "").strip()+ return [v.strip() for v in raw.split(",") if v.strip()]+++def disabled() -> bool:+ return any(v.lower() in ("off", "0", "no", "false", "none") for v in _env_values())+++def _is_url(v: str) -> bool:+ return bool(re.match(r"^(https?|file)://", v, re.I))+++def bases() -> List[str]:+ """Mirror base URLs in the order they are tried (SHOWTIME_MODEL_MIRROR first)."""+ if disabled():+ return []+ out: List[str] = []+ for b in [v for v in _env_values() if _is_url(v)] + list(load().get("mirrors") or []):+ b = b if b.endswith("/") else b + "/"+ if b not in out:+ out.append(b)+ return out+++def local_dirs() -> List[Path]:+ if disabled():+ return []+ return [Path(os.path.expanduser(v)) for v in _env_values() if not _is_url(v)]+++def local_copy(url: str) -> Optional[Path]:+ """The mirror file for `url` in a SHOWTIME_MODEL_MIRROR folder (by its mirror name or its own name);+ the caller verifies it."""+ e = entry(url)+ names = ([e["file"]] if e else []) + [url.rsplit("/", 1)[-1]]+ for d in local_dirs():+ for n in names:+ p = d / n+ if p.is_file():+ return p+ return None+++def host(url: str) -> str:+ m = re.match(r"^[a-z]+://([^/:]+)", url, re.I)+ return m.group(1).lower() if m else url+++def sources(url: str) -> List[str]:+ """URLs to try for `url`, in order: the primary (unless its host is known blocked), then the mirrors."""+ e = entry(url)+ mirrors = [b + e["file"] for b in bases()] if e else []+ if mirrors and host(url) in _blocked:+ return mirrors+ return [url] + mirrors+++def mark_blocked(url: str, why: str) -> None:+ _blocked[host(url)] = why+++def reset() -> None:+ _blocked.clear()+++def blocked_reason(exc: BaseException) -> Optional[str]:+ """A short reason when `exc` means this source will not serve the file (so: next source, no retry);+ None for errors worth retrying (timeouts, resets, a truncated body)."""+ if isinstance(exc, Blocked):+ return str(exc)+ if isinstance(exc, urllib.error.HTTPError):+ if exc.code in (401, 403, 404, 407, 410, 451):+ return "HTTP %d" % exc.code+ return None+ reason: Any = exc.reason if isinstance(exc, urllib.error.URLError) else exc+ text = str(reason)+ if "Tunnel connection failed" in text or re.search(r"\b(403|407)\b", text):+ return "blocked by a proxy (%s)" % text.strip()[:80]+ if isinstance(reason, socket.gaierror):+ return "host name not resolved"+ if isinstance(reason, (ConnectionRefusedError, PermissionError)):+ return "connection refused"+ if isinstance(reason, ssl.SSLError) or isinstance(exc, (socket.timeout, TimeoutError)):+ return None+ return None+++def describe_failure(label: str, url: str, tried: List[Tuple[str, str]]) -> str:+ """The one error when every source failed: what is blocked, and the override."""+ parts = ["%s (%s)" % (host(u), why) for u, why in tried]+ msg = "could not download %s: %s" % (label, "; ".join(parts) or "no source")+ if entry(url):+ msg += (". Allow one of these hosts in the sandbox's network settings, or set %s to a mirror URL or "+ "a folder holding %s" % (ENV, entry(url)["file"])) # type: ignore[index]+ elif any(why.startswith(("HTTP 403", "HTTP 407", "blocked")) for _u, why in tried):+ msg += ". %s is blocked here and this file has no mirror: allow it in the sandbox's network settings" % host(url)+ return msgdiff --git a/skills/showtime/lib/st/qa/floor.py b/skills/showtime/lib/st/qa/floor.pynew file mode 100644index 0000000..c9e7dfb--- /dev/null+++ b/skills/showtime/lib/st/qa/floor.py@@ -0,0 +1,404 @@+"""The quality floor: four looks-cheap patterns `showtime qa` warns about (never a FAIL).++A video can pass every technical check and still look cheap at full size. These detectors look for the+four patterns seen in real runs, on a few frames sampled across the video (grey, at delivery size, up+to 1920 px wide; numpy and ffmpeg only):++ player_chrome a web player's control strip recorded with the footage: a thin bar spanning over half+ the frame's width, low in the frame (its bottom 15 %, or the bottom of a player inside a+ recorded page), with small glyphs (play, time, fullscreen) at both ends, in the same+ place on 2+ sampled frames+ soft_footage footage whose edges are soft: an upscaled or low-resolution recording (edge sharpness,+ the Laplacian against the gradient, below SOFT_RATIO on most detailed parts)+ caption_boxes two stacked caption boxes of different widths (one box per line: the stepped look)+ empty_borders a solid picture fills under 70 % of the frame (width x height) inside flat borders, for+ over 30 % of the video (a small recording in a big frame)++Each is a WARN with the time range and a fix. Thresholds are the constants below; they were checked on+real renders (a clip with all of these looks, its approved re-cut, the shipped examples) and chosen to stay+quiet on designed frames (a title on a flat ground, a divider line, a single caption plate).+player_chrome, soft_footage and empty_borders run only when the video may hold footage.+"""+from __future__ import annotations++import os+import subprocess+from typing import Any, Dict, List, Optional, Sequence, Tuple++from .. import ff+from ..common import debug++RULES = {+ "player_chrome": "a video player's control strip (progress bar, play and fullscreen glyphs) is in the footage",+ "soft_footage": "footage looks soft or upscaled at the delivery size",+ "caption_boxes": "caption lines sit in stacked boxes of different widths (stepped boxes)",+ "empty_borders": "the picture fills under 70 % of the frame, with flat borders, for much of the video",+}++MAX_SAMPLES = 20 # frames sampled per video (evenly spread, one per 1.5 s; fewer for short videos)+MAX_WIDTH = 1920 # analysis width cap (4K is judged at 1920, where softness still shows)+EDGE = 24 # grey-level step that counts as an edge (0-255)++PLAYER_TOP = 0.25 # a control strip is looked for below this share of the height (the frame's bottom+ # 15 % alone misses a player inside a recorded page, the case seen in real runs)+PLAYER_SPAN = 0.50 # the bar spans more than this share of the frame's width+PLAYER_BAR_MAX = 0.012 # the bar is at most this share of the height thick (a thin bar or line)+PLAYER_END_W = 0.08 # glyph windows reach this share of the width either side of each bar end+PLAYER_NEAR = 0.06 # and this share of the height above or below the bar+PLAYER_GLYPHS = (0.01, 0.30) # edge density that reads as small glyphs (not empty, not a texture)+PLAYER_FRAMES = 2 # sampled frames with the strip in the same place (row within 3 px)+PLAYER_DARK = 110 # median grey (0-255) just above the bar: a player's controls sit on a dark overlay++SOFT_RATIO = 0.75 # edge sharpness sum|Laplacian| / sum|gradient| per detailed cell: crisp screen text+ # ~1.5, a 2x upscale ~1.0, 3x ~0.7; crisp recordings measured 0.9-1.5 after encoding+SOFT_CELLS = 0.6 # share of detailed cells that must be soft+SOFT_MIN_CELLS = 6 # at least this many detailed cells per frame (else nothing to judge)+SOFT_DETAIL = 2.0 # mean |gradient| per pixel that makes a cell detailed+SOFT_SHARE = 0.5 # share of sampled frames (and at least 2) that must be soft++CAPTION_TOP = 0.45 # caption boxes are looked for below this share of the height+BOX_EDGE = 12 # a box's edge against the picture (a dark plate on a dark ground is a small step)+BOX_MIN_W = 0.12 # a caption box is at least this share of the width wide+BOX_H = (0.025, 0.15) # and this share of the height tall (one line of text plus padding)+BOX_ALIGN = 0.04 # stacked boxes' centres within this share of the width+BOX_STEP = 0.10 # widths differing by more than this share of the wider box: stepped+BOX_SHARE = 2 # at least this many sampled frames show stepped boxes++BORDER_FILL = 0.70 # the picture fills under this share of the frame (width x height: a 16:9 recording+ # across a square frame fills 56 %; a 4:3 one pillarboxed in 16:9 fills 75 %)+BORDER_MIN = 0.25 # a smaller solid block is a design element (a card, a logo plate), not the picture+BORDER_FLAT = 3.0 # a border row/column: grey std under this, mean within BORDER_TONE of the edge+BORDER_TONE = 6.0+BORDER_SOLID = 0.6 # two of the picture's sides differ from the ground over this share (else: loose content)+BORDER_SHARE = 0.30 # of the sampled frames (the duration), and at least 2 frames+++# ------------------------------------------------------------------ sampling++def sample_times(dur: float) -> List[float]:+ n = int(max(3, min(MAX_SAMPLES, round(dur / 1.5))))+ return [round((k + 0.5) * dur / n, 3) for k in range(n)] if dur > 0 else []+++def grab(video: Any, t: float, W: int, H: int, crop: Optional[Sequence[int]] = None) -> Any:+ """One grey frame at t as a uint8 array (h, w), at delivery size capped at MAX_WIDTH; None on failure."""+ import numpy as np+ if crop:+ W, H = int(crop[2]), int(crop[3])+ w = min(W, MAX_WIDTH)+ h = int(round(H * w / float(W))) if W else H+ w, h = w - w % 2, h - h % 2+ if w < 16 or h < 16:+ return None+ pre = ("crop=%d:%d:%d:%d," % (int(crop[2]), int(crop[3]), int(crop[0]), int(crop[1]))) if crop else ""+ try:+ cp = subprocess.run([ff.ffmpeg_path(), "-hide_banner", "-nostdin", "-loglevel", "error", "-ss", "%.3f" % t,+ "-i", os.fspath(video), "-frames:v", "1", "-an", "-sn",+ "-vf", pre + "scale=%d:%d:flags=area,format=gray" % (w, h), "-f", "rawvideo", "-"],+ stdout=subprocess.PIPE, stderr=subprocess.PIPE, timeout=60)+ except (OSError, subprocess.SubprocessError) as e:+ debug("floor: %s" % e)+ return None+ buf = cp.stdout or b""+ if len(buf) < w * h:+ return None+ return np.frombuffer(buf[: w * h], np.uint8).reshape(h, w)+++# ------------------------------------------------------------------ helpers++def _runs(mask: Any, min_len: int, gap: int = 2) -> List[Tuple[int, int]]:+ """[start, end) runs of True in a 1-D mask, bridging gaps up to `gap`, at least min_len long."""+ import numpy as np+ idx = np.flatnonzero(mask)+ if idx.size == 0:+ return []+ out = []+ s = p = int(idx[0])+ for i in idx[1:]:+ i = int(i)+ if i - p > gap + 1:+ if p + 1 - s >= min_len:+ out.append((s, p + 1))+ s = i+ p = i+ if p + 1 - s >= min_len:+ out.append((s, p + 1))+ return out+++def _hsegments(g: Any, y0: int, y1: int, min_len: int, edge: int = EDGE) -> List[Tuple[int, int, int, int]]:+ """Long horizontal edges between rows y0..y1: (y, x0, x1, sign), where row y+1 differs from row y."""+ import numpy as np+ dy = g[y0 + 1:y1].astype(np.int16) - g[y0:y1 - 1].astype(np.int16)+ out = []+ for r in range(dy.shape[0]):+ row = dy[r]+ if int(np.abs(row).max()) <= edge:+ continue+ for sign in (1, -1):+ for a, b in _runs(row * sign > edge, min_len):+ out.append((y0 + r, a, b, sign))+ return out+++def _edge_density(g: Any, y0: int, y1: int, x0: int, x1: int) -> float:+ import numpy as np+ y0, y1, x0, x1 = max(0, y0), min(g.shape[0], y1), max(0, x0), min(g.shape[1], x1)+ if y1 - y0 < 2 or x1 - x0 < 2:+ return 0.0+ a = g[y0:y1, x0:x1].astype(np.int16)+ e = (np.abs(np.diff(a, axis=1))[:-1] > EDGE) | (np.abs(np.diff(a, axis=0))[:, :-1] > EDGE)+ return float(e.mean())+++# ------------------------------------------------------------------ player chrome++def player_strip(g: Any) -> Optional[Tuple[int, int, int]]:+ """(y, x0, x1) of a player's progress bar with glyphs at both ends in the bottom band, else None."""+ import numpy as np+ h, w = g.shape+ y0 = int(h * PLAYER_TOP)+ segs = _hsegments(g, y0, h, int(w * PLAYER_SPAN))+ thick = max(2, int(round(h * PLAYER_BAR_MAX)))+ ew = int(w * PLAYER_END_W)+ for (ya, xa0, xa1, sa) in segs:+ for (yb, xb0, xb1, sb) in segs:+ if not (0 < yb - ya <= thick and sb == -sa):+ continue+ x0, x1 = max(xa0, xb0), min(xa1, xb1)+ if x1 - x0 < w * PLAYER_SPAN:+ continue+ band = (ya - int(h * PLAYER_NEAR), yb + int(h * PLAYER_NEAR))+ ends = []+ for cx in (x0, x1):+ d = max(_edge_density(g, band[0], ya - 1, cx - ew, cx + ew),+ _edge_density(g, yb + 2, band[1], cx - ew, cx + ew))+ ends.append(PLAYER_GLYPHS[0] <= d <= PLAYER_GLYPHS[1])+ above = g[max(0, ya - int(h * PLAYER_NEAR / 2)):max(1, ya - 1), x0:x1] # where the play/time glyphs sit+ if all(ends) and above.size and float(np.median(above)) < PLAYER_DARK: # a page's rule sits on a light page+ return ya, x0, x1+ return None+++# ------------------------------------------------------------------ soft footage++def sharpness(g: Any, cell: int = 64) -> Dict[str, Any]:+ """Edge sharpness per detailed cell: sum|Laplacian| / sum|gradient| (scale-free; a crisp edge ~2)."""+ import numpy as np+ a = g.astype(np.float32)+ gx = np.abs(np.diff(a, axis=1))[1:-1, :-1]+ gy = np.abs(np.diff(a, axis=0))[:-1, 1:-1]+ grad = gx + gy+ lap = np.abs(4 * a[1:-1, 1:-1] - a[:-2, 1:-1] - a[2:, 1:-1] - a[1:-1, :-2] - a[1:-1, 2:])+ grad = grad[:lap.shape[0], :lap.shape[1]]+ hh, ww = (lap.shape[0] // cell) * cell, (lap.shape[1] // cell) * cell+ if hh == 0 or ww == 0:+ return {"cells": 0, "soft_share": 0.0, "ratio": None}+ G = grad[:hh, :ww].reshape(hh // cell, cell, ww // cell, cell).sum(axis=(1, 3))+ L = lap[:hh, :ww].reshape(hh // cell, cell, ww // cell, cell).sum(axis=(1, 3))+ detailed = G / float(cell * cell) >= SOFT_DETAIL+ if not detailed.any():+ return {"cells": 0, "soft_share": 0.0, "ratio": None}+ r = L[detailed] / np.maximum(G[detailed], 1e-6)+ return {"cells": int(detailed.sum()), "soft_share": float((r < SOFT_RATIO).mean()),+ "ratio": round(float(np.median(r)), 3)}+++def is_soft(g: Any) -> Tuple[bool, Dict[str, Any]]:+ s = sharpness(g)+ return s["cells"] >= SOFT_MIN_CELLS and s["soft_share"] >= SOFT_CELLS, s+++# ------------------------------------------------------------------ stepped caption boxes++def _side_rows(g: Any, x: int, y: int, down: bool, max_h: int) -> int:+ """How many rows from y (down or up) column x keeps a vertical edge (within 2 px)."""+ import numpy as np+ h, w = g.shape+ x0, x1 = max(1, x - 2), min(w - 1, x + 3)+ n, miss = 0, 0+ rng = range(y + 1, min(h, y + 1 + max_h)) if down else range(y, max(-1, y - max_h), -1)+ for yy in rng:+ row = g[yy].astype(np.int16)+ if np.max(np.abs(row[x0:x1] - row[x0 - 1:x1 - 1])) > BOX_EDGE:+ n += 1 + miss+ miss = 0+ else:+ miss += 1+ if miss > 1:+ break+ return n+++def caption_boxes(g: Any) -> List[Tuple[int, int, int, int]]:+ """Filled boxes (x0, y0, x1, y1) with text inside, below CAPTION_TOP."""+ import numpy as np+ h, w = g.shape+ top = int(h * CAPTION_TOP)+ segs = _hsegments(g, top, h, int(w * BOX_MIN_W), BOX_EDGE)+ hmin, hmax = int(h * BOX_H[0]), int(h * BOX_H[1])+ boxes: List[Tuple[int, int, int, int]] = []+ for (y, x0, x1, _s) in segs:+ for down in (True, False):+ n = min(_side_rows(g, x0, y, down, hmax + 2), _side_rows(g, x1 - 1, y, down, hmax + 2))+ if not (hmin <= n <= hmax):+ continue+ ya, yb = (y + 1, y + 1 + n) if down else (y + 1 - n, y + 1)+ inner = g[ya + 2:yb - 2, x0 + 3:x1 - 3]+ if inner.size == 0:+ continue+ med = float(np.median(inner))+ fill = float((np.abs(inner.astype(np.int16) - med) <= 14).mean())+ text = _edge_density(g, ya + 2, yb - 2, x0 + 3, x1 - 3)+ if fill >= 0.5 and 0.01 <= text <= 0.5:+ b = (x0, ya, x1, yb)+ if not any(abs(b[0] - c[0]) <= 4 and abs(b[2] - c[2]) <= 4 and abs(b[1] - c[1]) <= 4 for c in boxes):+ boxes.append(b)+ return boxes+++def stepped(boxes: Sequence[Tuple[int, int, int, int]], w: int) -> bool:+ """Two boxes stacked (touching or close) around one centre, with clearly different widths."""+ for a in boxes:+ for b in boxes:+ if b[1] <= a[1]:+ continue+ ha = a[3] - a[1]+ gap = b[1] - a[3]+ if not (-4 <= gap <= 0.6 * ha):+ continue+ if abs((a[0] + a[2]) / 2.0 - (b[0] + b[2]) / 2.0) > w * BOX_ALIGN:+ continue+ wa, wb = a[2] - a[0], b[2] - b[0]+ if abs(wa - wb) > BOX_STEP * max(wa, wb):+ return True+ return False+++# ------------------------------------------------------------------ empty borders++def _largest_run(busy: Any) -> Tuple[int, int]:+ """[start, end) of the longest run of True (the picture, not a caption strip below it)."""+ best, s = (0, 0), None+ for i, v in enumerate(list(busy) + [False]):+ if v and s is None:+ s = i+ elif not v and s is not None:+ if i - s > best[1] - best[0]:+ best = (s, i)+ s = None+ return best+++def picture_box(g: Any) -> Optional[Tuple[int, int, int, int]]:+ """(x0, y0, x1, y1) of a solid picture inside flat borders when it fills under BORDER_FILL of the+ frame; None when the frame is filled, the ground is not flat, or the content is loose (a title on a+ flat ground: its box's sides are mostly ground and so is its inside)."""+ import numpy as np+ a = g.astype(np.float32)+ h, w = a.shape+ ring = np.concatenate([a[:2].ravel(), a[-2:].ravel(), a[:, :2].ravel(), a[:, -2:].ravel()])+ ground = float(np.median(ring))+ if float(np.mean(np.abs(ring - ground) < BORDER_TONE)) < 0.9:+ return None+ rows = ~((a.std(axis=1) < BORDER_FLAT) & (np.abs(a.mean(axis=1) - ground) < BORDER_TONE))+ y0, y1 = _largest_run(rows)+ if y1 - y0 < 8:+ return None+ band = a[y0:y1]+ cols = ~((band.std(axis=0) < BORDER_FLAT) & (np.abs(band.mean(axis=0) - ground) < BORDER_TONE))+ x0, x1 = _largest_run(cols)+ if x1 - x0 < 8:+ return None+ if not (BORDER_MIN * w * h <= (x1 - x0) * (y1 - y0) < BORDER_FILL * w * h):+ return None+ off = np.abs(a[y0:y1, x0:x1] - ground) > BORDER_TONE+ sides = [off[min(2, off.shape[0] - 1)].mean(), off[-min(3, off.shape[0])].mean(),+ off[:, min(2, off.shape[1] - 1)].mean(), off[:, -min(3, off.shape[1])].mean()]+ if sum(1 for v in sides if v >= BORDER_SOLID) < 2:+ return None+ return x0, y0, x1, y1+++# ------------------------------------------------------------------ the check++def _span(times: Sequence[float]) -> str:+ return "%.1f-%.1fs" % (min(times), max(times)) if len(times) > 1 else "%.1fs" % times[0]+++def check(F: Any, video: Any, dur: float, W: int, H: int, *, crop: Optional[Sequence[int]] = None,+ footage: bool = True, frames: Optional[Sequence[Tuple[float, Any]]] = None) -> Dict[str, Any]:+ """Run the four detectors and add WARNs to F (st.qa.video.Findings). `frames` [(t, grey array)] skips+ decoding (tests). Returns what was measured, for qa.json."""+ if frames is None:+ from concurrent.futures import ThreadPoolExecutor+ times = sample_times(dur)+ with ThreadPoolExecutor(max_workers=4) as pool: # one short ffmpeg seek per frame, 4 at a time+ got = list(pool.map(lambda t: grab(video, t, W, H, crop), times))+ frames = [(t, g) for t, g in zip(times, got) if g is not None]+ out: Dict[str, Any] = {"frames": len(frames)}+ if len(frames) < 2:+ return out+ n = len(frames)+ # player chrome: the same strip (bar row within 3 px, same ends within 2 % of the width) on 2+ frames+ if footage:+ groups: List[Tuple[Tuple[int, int, int], List[float]]] = []+ for t, g in frames:+ s = player_strip(g)+ if not s:+ continue+ tol = 0.02 * g.shape[1]+ for key, ts in groups:+ if abs(key[0] - s[0]) <= 3 and abs(key[1] - s[1]) <= tol and abs(key[2] - s[2]) <= tol:+ ts.append(t)+ break+ else:+ groups.append((s, [t]))+ best = max((ts for _k, ts in groups), key=len) if groups else []+ out["player_chrome"] = len(best)+ if len(best) >= PLAYER_FRAMES:+ F.add("player_chrome", "WARN",+ "a video player's control strip (a progress bar with controls at both ends) is in the footage at %s"+ % _span(best), t=min(best), end=max(best),+ fix="crop the footage above the strip or cut those seconds; re-record with the player's controls "+ "hidden (move the pointer away, or play the page's video without controls)")+ soft = []+ ratios = []+ for t, g in frames:+ box = picture_box(g)+ sub = g[box[1]:box[3], box[0]:box[2]] if box else g+ ok, s = is_soft(sub)+ if s.get("ratio") is not None:+ ratios.append(s["ratio"])+ if ok:+ soft.append(t)+ out["soft_footage"] = {"frames": len(soft), "ratio": round(sorted(ratios)[len(ratios) // 2], 3) if ratios else None}+ if len(soft) >= max(2, SOFT_SHARE * n):+ F.add("soft_footage", "WARN",+ "footage looks soft or upscaled at %dx%d (edge sharpness %s, crisp is about 1 or more) at %s"+ % (W, H, out["soft_footage"]["ratio"], _span(soft)), t=min(soft), end=max(soft),+ fix="footage looks soft or upscaled; re-record at 2x device scale (or deliver at the source's size)")+ step = [t for t, g in frames if stepped(caption_boxes(g), g.shape[1])]+ out["caption_boxes"] = len(step)+ if len(step) >= BOX_SHARE:+ F.add("caption_boxes", "WARN",+ "captions sit in stacked boxes of different widths (one box per line: the stepped look) at %s" % _span(step),+ t=min(step), end=max(step),+ fix="one box for the whole caption: showtime captions --style boxed (a single plate), or no box with an outline")+ if footage and not crop:+ bordered, fill = [], []+ for t, g in frames:+ b = picture_box(g)+ if b:+ bordered.append(t)+ fill.append((b[2] - b[0]) * (b[3] - b[1]) / float(g.shape[0] * g.shape[1]))+ out["empty_borders"] = len(bordered)+ if len(bordered) >= 2 and len(bordered) > BORDER_SHARE * n:+ share = sorted(fill)[len(fill) // 2]+ F.add("empty_borders", "WARN",+ "the picture fills only %d %% of the frame, inside flat borders, at %s (%d of %d sampled frames)"+ % (round(share * 100), _span(bordered), len(bordered), n), t=min(bordered), end=max(bordered),+ fix="fill the frame: crop the recording to its subject and scale it up, or make the video in the "+ "recording's own aspect")+ return outdiff --git a/skills/showtime/lib/st/qa/media.py b/skills/showtime/lib/st/qa/media.pyindex b3dbb73..c58cf96 100644--- a/skills/showtime/lib/st/qa/media.py+++ b/skills/showtime/lib/st/qa/media.py@@ -267,6 +267,76 @@ def opening_diffs(video: PathLike, n: int = 3, size: Tuple[int, int] = (64, 36))return [sum(abs(a - b) for a, b in zip(frames[i], frames[i + 1])) / float(k) for i in range(len(frames) - 1)]+def mean_luma(path: PathLike, at: Optional[float] = None, size: Tuple[int, int] = (64, 36)) -> Optional[float]:+ """Mean grey level (0-255) of an image, or of a video's frame at `at` seconds, on a tiny copy decoded by+ ffmpeg (which ignores PNG colour chunks, as a video player does). None when it cannot be decoded."""+ import subprocess+ w, h = size+ pre = ["-ss", "%.3f" % max(0.0, float(at))] if at is not None else []+ try:+ cp = subprocess.run([ff.ffmpeg_path(), "-hide_banner", "-nostdin", "-loglevel", "error"] + pre ++ ["-i", os.fspath(path), "-frames:v", "1", "-vf", "scale=%d:%d:flags=area,format=gray" % (w, h),+ "-f", "rawvideo", "-"], stdout=subprocess.PIPE, stderr=subprocess.PIPE, timeout=60)+ except (OSError, subprocess.SubprocessError):+ return None+ buf = (cp.stdout or b"")[:w * h]+ return sum(buf) / float(len(buf)) if len(buf) == w * h else None+++PNG_COLOUR_CHUNKS = (b"gAMA", b"cHRM", b"cICP", b"iCCP")+++def png_colour_chunks(path: PathLike) -> List[str]:+ """Colour chunks in a PNG (gAMA, cHRM, cICP, iCCP): a browser colour-manages the image by them, so a+ still carrying them draws darker or lighter than the same frame of the video. [] for other files."""+ out: List[str] = []+ try:+ with open(os.fspath(path), "rb") as f:+ if f.read(8) != b"\x89PNG\r\n\x1a\n":+ return out+ while True:+ head = f.read(8)+ if len(head) < 8:+ break+ n, kind = int.from_bytes(head[:4], "big"), head[4:]+ if kind in PNG_COLOUR_CHUNKS:+ out.append(kind.decode("ascii"))+ if kind in (b"IDAT", b"IEND"):+ break # colour chunks come before the image data+ f.seek(n + 4, 1)+ except OSError:+ return out+ return out+++def strip_png_colour_chunks(path: PathLike) -> int:+ """Drop the colour chunks (and sRGB) from a PNG in place, so browsers draw it as the video decodes the+ same frame. Returns how many were dropped; other files are left alone."""+ p = os.fspath(path)+ try:+ with open(p, "rb") as f:+ data = f.read()+ except OSError:+ return 0+ if data[:8] != b"\x89PNG\r\n\x1a\n":+ return 0+ out, i, dropped = [data[:8]], 8, 0+ while i + 8 <= len(data):+ n = int.from_bytes(data[i:i + 4], "big")+ kind, end = data[i + 4:i + 8], i + 12 + n+ if kind in PNG_COLOUR_CHUNKS + (b"sRGB",):+ dropped += 1+ else:+ out.append(data[i:end])+ i = end+ if kind == b"IEND":+ break+ if dropped:+ with open(p, "wb") as f:+ f.write(b"".join(out))+ return dropped++def image_stats(path: PathLike) -> Dict[str, float]:"""Mean/std/percentiles of luma (0-255) for a small copy of an image."""import numpy as npdiff --git a/skills/showtime/lib/st/qa/pairwise.py b/skills/showtime/lib/st/qa/pairwise.pyindex 3f2fd79..158c4bf 100644--- a/skills/showtime/lib/st/qa/pairwise.py+++ b/skills/showtime/lib/st/qa/pairwise.py@@ -498,6 +498,8 @@ Weigh them for both videos. Then prefer one: the one you would ship. Answer "tiecannot choose. **No scores**: do not rate either video on a number scale; the preference and the findingscarry the judgment.+Then judge each video on its own, {absolute}+{severity}Rule: **every finding names its video ([{a}] or [{b}]), cites a timestamp and a frame path** from this@@ -509,6 +511,8 @@ in fixes.PREFERENCE: {a} | {b} | tie -- one line: the one you would ship, and whyVERDICT {a}: ship | ship after fixes | not readyVERDICT {b}: ship | ship after fixes | not ready+WOULD I POST {a}: yes | no -- one reason, judged on {a} alone (not against {b})+WOULD I POST {b}: yes | no -- one reason, judged on {b} alone (not against {a})WHAT WORKS (max 3 per video, so it is kept):- [{a}] ...BLOCKERS:@@ -526,7 +530,7 @@ BEST POSTER FRAME: [{a} or {b}] t=..s because ...cmp=_rel(m["compare"][first + second], od), ctx=ctx, launch=launch,questions=review.QUESTIONS.replace("open every text crop above", "open every text crop listed").replace("Answer these eight questions for yourself first", "Answer these eight questions for each video first"),- severity=review.SEVERITY)+ severity=review.SEVERITY, absolute=review.ABSOLUTE)# ------------------------------------------------------------------ findings and the verdict@@ -581,10 +585,25 @@ def parse_findings(text: str) -> Dict[str, Any]:dropped.append(body)continueitems.append({"severity": sev, "video": label, "t": float(t.group(1)), "frame": fr.group(0), "text": body})+ from ..job import review_state+ posts = review_state.parse_would_post(text)return {"preference": pref, "verdicts": verdicts, "findings": items, "dropped": dropped,+ "would_post": {k: v for k, v in posts.items() if k in LABELS},"self_review": text.lstrip().upper().startswith("SELF-REVIEW")}+def would_post(parsed: Sequence[Dict[str, Any]], label: str) -> Dict[str, Any]:+ """The absolute verdict on one version across both orders: "no" when either critic would not post it,+ "yes" when both would, None when a line is missing."""+ ans = [p.get("would_post", {}).get(label) for p in parsed]+ nos = [a for a in ans if a and a[0] == "no"]+ if nos:+ return {"answer": "no", "reason": "; ".join(a[1] for a in nos if a[1]) or None}+ if ans and all(ans):+ return {"answer": "yes", "reason": "; ".join(a[1] for a in ans if a[1]) or None}+ return {"answer": None, "reason": None}++def decide(pref1: Optional[str], pref2: Optional[str], new_label: str) -> Tuple[bool, str]:"""The rule: the new version wins only when both orders prefer it; a tie or a split is no improvement."""if pref1 == new_label and pref2 == new_label:@@ -660,10 +679,17 @@ def verdict(target: Optional[str] = None, rnd: Optional[int] = None) -> Dict[str"blind": not any(p["self_review"] for p in parsed), "open_findings": open_best,"findings": findings, "dropped": [d for p in parsed for d in p["dropped"]],"rounds_used": len(answered), "max_rounds": review.MAX_ROUNDS, "cap_reached": cap,- "blockers_open": sum(1 for f in open_best if f["severity"] == "blocker")}+ "blockers_open": sum(1 for f in open_best if f["severity"] == "blocker"),+ "would_post": would_post(parsed, best_label),+ "would_post_new": would_post(parsed, new_l)["answer"]}if cap:res["next"] = "round cap reached: ship %s with its open findings listed%s" % (Path(best_video).name, "; blockers are open, so show them to the user, who decides" if res["blockers_open"] else "")+ elif res["would_post"]["answer"] != "yes":+ res["next"] = ("%s is the best version, but %s: fix what the critics named and pair again (--against best)"+ % (Path(best_video).name, "a critic would not post it (%s)" % (res["would_post"]["reason"] or "no reason")+ if res["would_post"]["answer"] == "no" else+ "a critic left out the WOULD I POST line; ask for it, then rerun review-verdict"))elif improved:res["next"] = ("keep %s; fix its open findings and pair the next render with showtime review-pack <job> ""--against best, or ship it" % Path(best_video).name)@@ -695,6 +721,9 @@ def verdict_md(v: Dict[str, Any]) -> str:", ".join("%s = %s" % kv for kv in sorted(v["labels"].items()))),"- Result: **%s** (%s)" % ("improvement" if v["improved"] else "not an improvement", v["reason"]),"- Best so far: `%s`" % v["best"], "- Rounds: %d of %d" % (v["rounds_used"], v["max_rounds"])]+ wp = v.get("would_post") or {}+ out.append("- Would the critics post the best version: **%s**%s (absolute, independent of the comparison)" % (+ wp.get("answer") or "not answered", (" (%s)" % wp["reason"]) if wp.get("reason") else ""))if not v["blind"]:out.append("- Not blind: at least one order is a self-review by the maker, who knows which is new; say so to the user")out += ["- Next: %s" % v["next"], "", "## Open findings of the best version"]@@ -725,6 +754,9 @@ def print_verdict(v: Dict[str, Any]) -> None:print("round %d: %s (%s)" % (v["round"], "IMPROVEMENT: the new version wins" if v["improved"] else "NOT AN IMPROVEMENT",v["reason"]))print(" best %s" % v["best"])+ wp = v.get("would_post") or {}+ print(" post it? %s%s" % (wp.get("answer") or "not answered (a WOULD I POST line is missing)",+ (" (%s)" % wp["reason"]) if wp.get("reason") else ""))if not v["blind"]:print(" note a self-review is not blind (the maker knows which is new): tell the user")nb = {s: sum(1 for f in v["open_findings"] if f["severity"] == s) for s in ("blocker", "should-fix", "polish")}diff --git a/skills/showtime/lib/st/qa/review.py b/skills/showtime/lib/st/qa/review.pyindex 297cec3..1c6e381 100644--- a/skills/showtime/lib/st/qa/review.py+++ b/skills/showtime/lib/st/qa/review.py@@ -515,7 +515,7 @@ def build(target: Optional[PathLike] = None, *, out: Optional[PathLike] = None,def loudness_png(qa_dir: Path, q: Dict[str, Any], out: Path, dur: float, title: str) -> Optional[str]:"""The loudness graph from a qa run's loudness.json (None when qa measured no audio)."""- lj = read_json(qa_dir / "loudness.json", None)+ lj = read_json(qa_dir / "loudness.json", {}) # a silent video has no loudness.jsonloud = q.get("loudness") or {}if not (isinstance(lj, dict) and lj.get("short_term")):return None@@ -590,6 +590,15 @@ QUESTIONS = """Answer these eight questions for yourself first; they are what thjob does it do (show the product, prove a claim, set up the next beat)? A shot that is only there becauseit looks good, or that only makes sense to the author, is a finding."""+ABSOLUTE = """**would you post this under your own name?** Picture it on the target platform, watched once+at full size by someone who does not know the maker. The bar is "a stranger would not call it cheap, broken or+wrong", not "flawless": a video with should-fix and polish findings is usually still a yes (list them above).+Answer no only when a blocker stands, or when the video as a whole reads as cheap or unfinished at a glance:+captions in stepped boxes (one box per line, each a different width), a player's controls or a cursor left in+the footage, a small or soft recording inside big empty borders, a hook that shows nothing for seconds. One+flawed shot in an otherwise finished video is a should-fix, not a no. Judge this video alone, never "better+than before". In quality mode a "no" holds delivery like a blocker, so name what a stranger notices first."""+SEVERITY = """Severity:- **Blocker**: an invented or wrong claim, a misspelled product or person name; black, frozen or garbageframes; wrong aspect or duration for the platform; clipped or missing voice; text cut off or outside the safe@@ -623,7 +632,8 @@ def critic_brief(m: Dict[str, Any], q: Dict[str, Any], pack: Path) -> str:prev = ""if m.get("previous_findings"):prev = ("\n## This is round %d\nRead the previous findings first and judge only whether they were fixed, plus anything "- "the fixes broke. Do not reopen settled taste questions.\n%s\n" % (+ "the fixes broke, and answer each under PREVIOUS (`fixed: ...` or `not fixed: ...`, naming what it was "+ "about, e.g. the captions). Do not reopen settled taste questions.\n%s\n" % (m["round"], "\n".join("- `%s`" % p for p in m["previous_findings"])))return """# Critic brief (round {round} of at most {maxr})@@ -666,9 +676,12 @@ Rule: **every finding cites a timestamp and a frame path** from this folder (orwithout a location is dropped. Quote numbers (sizes, seconds, colours) in fixes. No scores: do not rate thevideo on a number scale; the verdict and the findings carry the judgment.+Then the absolute verdict, {absolute}+## Answer in exactly this format (write it to FINDINGS.md in this folder)```VERDICT: ship | ship after fixes | not ready -- one line of reasoning+WOULD I POST THIS: yes | no -- one reason, judged on this video aloneWHAT WORKS (max 3, so it is kept):- ...BLOCKERS:@@ -680,6 +693,8 @@ POLISH:DECLINED TO JUDGE (what you could not or chose not to assess, e.g. audio quality, brand fit without a brand kit):- ...BEST POSTER FRAME: t=..s because ...+PREVIOUS (round 2+ only: one line per earlier blocker or should-fix):+- fixed: <the finding> | not fixed: <the finding> -> what is still wrong```Limits: at most {maxr} critic rounds per video. A later round checks only the fixes. If blockers remain@@ -689,4 +704,4 @@ after the last one, stop: the maker shows your findings to the user instead of lqa=_rel(q["report"], pack), sheet=_rel(m["sheet"], pack), scenes=_rel(m["scenes_sheet"], pack),loud=_rel(m["loudness_graph"], pack), thumb=_rel(m["thumbnail_preview"], pack), keys=key_list, ctx=ctx_list,qa_list=qa_list, prev=prev, cuts=_rel(m.get("cut_strips"), pack), others=others, text_list=text_list,- judging=QUESTIONS + "\n\n" + SEVERITY + "\n")+ judging=QUESTIONS + "\n\n" + SEVERITY + "\n", absolute=ABSOLUTE)diff --git a/skills/showtime/lib/st/qa/video.py b/skills/showtime/lib/st/qa/video.pyindex 23e1163..8ea77d8 100644--- a/skills/showtime/lib/st/qa/video.py+++ b/skills/showtime/lib/st/qa/video.py@@ -23,6 +23,7 @@ from ..common import ShowtimeError, log, read_json, write_jsonfrom . import captions as capmodfrom . import phone as phonemodfrom . import media+from . import floor_THRESHOLD_DEFAULTS = {"still_hold_s": 2.5, "launch_hold_s": 3.5, "final_hold_max_s": 4.0, "frozen_fail_s": 6.0, "freeze_noise_db": -50.0}@@ -84,6 +85,7 @@ RULES = {"first_frame_black": "frame 0 is black (players and feeds show it as the thumbnail)","first_frame_flat": "frame 0 is a flat colour","poster_flash": "frame 0 differs sharply from frame 1 (a baked poster that flashes on autoplay and loops)",+ "poster_mismatch": "the delivered poster still is lighter or darker than its video frame (or its PNG carries colour chunks)","black_segment": "a black stretch inside the video","ends_black": "the video ends on black","frozen": "the picture does not change for a long stretch",@@ -121,6 +123,7 @@ RULES = {"reference_close": "some frames look like frames of the style reference","reference_credit": "the \"Style reference:\" credit is missing from credits.txt or share.txt",}+RULES.update(floor.RULES) # the quality floor (st.qa.floor): looks-cheap patterns, WARN onlyclass Findings:@@ -159,10 +162,15 @@ def find_project(video: Path, explicit: Optional[PathLike] = None) -> Optional[Praise ShowtimeError("%s is not a showtime project (no showtime.json or index.html)" % p,hint="pass the project folder that holds showtime.json, or leave --project out")return p+ edit = edit_report(video) is not None # a footage edit: its own report, not a project, made itfor rj in (video.parent / "render.json", video.with_suffix(".work") / "render.json",video.parent / "job.json"):data = read_json(rj, None) if rj.is_file() else Noneif isinstance(data, dict) and data.get("project"):+ if rj.name == "render.json" and data.get("output") and Path(str(data["output"])).name != video.name:+ continue # another video's render (e.g. a cards/ sub-project's)+ if rj.name == "job.json" and edit:+ continue # the job's sub-project (cards, titles) did not make this videop = Path(data["project"])if (p / "showtime.json").is_file() or (p / "index.html").is_file():return p@@ -380,8 +388,10 @@ def run(video: PathLike, *, project: Optional[PathLike] = None, expect_file: Optfootage=_may_hold_footage(proj, cfg), rep=rep,launch_kind=str(cfg.get("kind") or "").lower() in ("launch", "promo", "trailer", "teaser", "release"))_check_opening_flash(F, vpath, fps)+ _check_poster_match(F, vpath)_check_upscale(F, vpath)+ rep["floor"] = _check_floor(F, vpath, dur, W, H, pic, _may_hold_footage(proj, cfg))_check_rhythm(F, vpath, dur, fps, proj, cfg, expect, rep, say)# ---------------------------------------------------------- captions, credits, texts@@ -493,6 +503,10 @@ def _expected_duration(vpath: Path, cfg: Dict[str, Any], expect: Dict[str, Any],rj = read_json(vpath.parent / "render.json", None) if (vpath.parent / "render.json").is_file() else Noneif isinstance(rj, dict) and rj.get("output") and Path(rj["output"]).name == vpath.name and rj.get("duration"):return float(rj["duration"]), frame * 1.5, "the render report"+ er = edit_report(vpath)+ if er is not None:+ # a footage edit: the EDL's own length (a poster-baked copy of it runs as long)+ return (float(er["duration"]), frame * 1.5, "the edit render report") if er.get("duration") else (None, 0, "")if cfg.get("duration"):return float(cfg["duration"]), frame * 1.5, "showtime.json"return None, 0, ""@@ -870,6 +884,54 @@ def _check_opening_flash(F: Findings, vpath: Path, fps: float) -> None:F.ok("frame 0 flows into frame 1 (no poster flash)")+POSTER_LUMA_DIFF = 4.0 # mean luma levels (0-255) a poster still may differ from its video frame+++def poster_of(vpath: Path) -> Optional[Tuple[Path, float]]:+ """(poster image, time) recorded by the render of this video (render.json "poster"), when it exists."""+ for rj in (vpath.parent / "render.json", vpath.with_suffix(".work") / "render.json"):+ r = read_json(rj, None) if rj.is_file() else None+ if not isinstance(r, dict) or not isinstance(r.get("poster"), dict):+ continue+ if r.get("output") and Path(str(r["output"])).name != vpath.name:+ continue+ f, t = r["poster"].get("file"), r["poster"].get("time")+ if not f or t is None:+ continue+ p = Path(str(f))+ p = p if p.is_absolute() else vpath.parent / p+ if p.is_file():+ try:+ return p, float(t)+ except (TypeError, ValueError):+ return None+ return None+++def _check_poster_match(F: Findings, vpath: Path) -> None:+ """A delivered poster still should look like its video frame: compare mean luma (tiny grey copies), and+ flag PNG colour chunks (gAMA, cHRM, cICP, iCCP), which make browsers draw the still darker than the video."""+ found = poster_of(vpath)+ if not found:+ return+ img, t = found+ chunks = media.png_colour_chunks(img)+ a, b = media.mean_luma(img), media.mean_luma(vpath, at=t)+ if a is None or b is None:+ return+ d = a - b+ if abs(d) > POSTER_LUMA_DIFF:+ F.add("poster_mismatch", "WARN", "the poster %s is %.0f levels %s than the video at %.2fs" % (+ img.name, abs(d), "lighter" if d > 0 else "darker", t), t=t,+ fix="make the poster from the final video: showtime deliver poster %s --at %.2f" % (vpath.name, t))+ elif chunks:+ F.add("poster_mismatch", "WARN", "the poster %s carries PNG colour chunks (%s): browsers draw it darker than the "+ "video frame" % (img.name, ", ".join(chunks)), t=t,+ fix="make the poster again with this showtime (it writes PNGs without them), or use a .jpg")+ else:+ F.ok("the poster matches its video frame (mean luma within %.0f levels)" % POSTER_LUMA_DIFF)++UPSCALE_LIMIT = 1.5@@ -913,6 +975,17 @@ def _check_upscale(F: Findings, vpath: Path) -> None:F.ok("no source enlarged more than %.1fx" % UPSCALE_LIMIT)+def _check_floor(F: Findings, vpath: Path, dur: float, W: int, H: int, crop: Optional[Sequence[int]],+ footage: bool) -> Dict[str, Any]:+ """The quality floor (st.qa.floor): player chrome, soft footage, stepped caption boxes, empty borders."""+ try:+ return floor.check(F, vpath, dur, W, H, crop=crop, footage=footage)+ except Exception as e: # noqa: BLE001 - a warning-only look never breaks qa+ from ..common import debug+ debug("quality floor skipped: %s" % e)+ return {"error": str(e)}++def is_job_latest(vpath: Path) -> bool:"""True when `vpath` is its job's latest final or preview."""job = job_of(vpath)diff --git a/skills/showtime/lib/st/sandbox.py b/skills/showtime/lib/st/sandbox.pyindex ec6a98a..376c94a 100644--- a/skills/showtime/lib/st/sandbox.py+++ b/skills/showtime/lib/st/sandbox.py@@ -171,6 +171,24 @@ def probe_network(url: Optional[str] = None, timeout: float = PROBE_TIMEOUT) ->return False, _why(e)+MIRROR_ENV = "SHOWTIME_MODEL_MIRROR"+++def probe_mirror(timeout: float = PROBE_TIMEOUT) -> Tuple[bool, str]:+ """(reachable, detail) for the first model mirror (st/mirror.py): where model files come from when+ Hugging Face or GitHub LFS is blocked. A local SHOWTIME_MODEL_MIRROR folder counts when it exists."""+ try:+ from . import mirror+ except ImportError:+ return False, "no mirror list"+ for d in mirror.local_dirs():+ if d.is_dir():+ return True, "folder %s" % d+ for base in mirror.bases()[:1]:+ return probe_network(base, timeout)+ return False, "mirrors off"++def _host(url: str) -> str:m = re.match(r"^[a-z]+://([^/:]+)", url)return m.group(1) if m else urldiff --git a/skills/showtime/lib/st/variety/history.py b/skills/showtime/lib/st/variety/history.pyindex d33ca19..e893166 100644--- a/skills/showtime/lib/st/variety/history.py+++ b/skills/showtime/lib/st/variety/history.py@@ -11,8 +11,12 @@ the environment. `showtime history clear` deletes the file.The repeat check compares a look with the last RECENT jobs, aspect by aspect (template, theme,palette, type, transitions, camera, music, structure, tone), and for every repeat proposes twoconcrete alternatives from what showtime has: runtime themes, their type pairs and palettes,-transitions from the catalog, camera verbs, catalog music from other shelves, other structures and-hooks, other tone presets.+transitions from the catalog, camera verbs, catalog music by other composers (from other shelves+when the shelf repeats), other structures and hooks, other tone presets.++Music rows ({ref, shelf, moods, title, artist, query?} for a catalog track, {ref, style, seed?, key?,+bpm?} for a composed bed) also feed music rotation (st.audio.music.rotation): a new pick ranks what+the last jobs used lower. Rows recorded before 0.3.2 have no artist; the catalog supplies it."""from __future__ import annotations@@ -28,6 +32,7 @@ from . import look as LSCHEMA = 1MAX_KEEP = 50RECENT = 5+COMPOSER_RECENT = 2 # the same composer counts as a music repeat against the last 2 jobs onlyPALETTE_NEAR = 60.0 # colour distance under which two colours count as the same# aspects that make a video look the same; template and tone alone are notesSTRONG = ("theme", "palette", "type", "transitions", "camera", "music", "structure")@@ -170,12 +175,57 @@ def _structure_match(a: Dict[str, Any], b: Dict[str, Any]) -> bool:return bool(a.get("shape")) and a.get("shape") == b.get("shape")-def _music_match(a: List[Dict[str, Any]], b: List[Dict[str, Any]]) -> Optional[str]:+def _artists(ms: List[Dict[str, Any]]) -> set:+ """The composers of a look's catalog music (entries recorded before 0.3.2 name none: the catalog does)."""+ out = set()+ for m in ms:+ ref = str(m.get("ref") or "")+ a = m.get("artist")+ if not a and ref.startswith("catalog:"):+ try:+ from ..audio import music as mus+ a = mus.artist_of(mus.get(ref[len("catalog:"):]))+ except Exception: # noqa: BLE001 - an id the catalog no longer has+ a = None+ if a:+ out.add(a)+ return out+++def _score(ms: List[Dict[str, Any]]) -> Dict[str, Any]:+ return next((m for m in ms if m.get("ref") == "score:synth"), {})+++def _score_match(a: List[Dict[str, Any]], b: List[Dict[str, Any]]) -> Optional[str]:+ """A procedural score (score.js) that repeats: the same file, the same signature, or its key and tempo."""+ sa, sb = _score(a), _score(b)+ if not (sa and sb):+ return None+ if sa.get("sha") and sa.get("sha") == sb.get("sha"):+ return "the same score (score.js %s)" % sa["sha"][:8]+ ga, gb = sa.get("signature") or {}, sb.get("signature") or {}+ if not (ga.get("key") and gb.get("key")):+ return None+ from ..audio import filmscore+ if filmscore.signature_id(ga) == filmscore.signature_id(gb):+ return "the same score (%s)" % filmscore.signature_id(ga)+ if (ga["key"], ga.get("mode"), ga.get("bpm")) == (gb["key"], gb.get("mode"), gb.get("bpm")):+ return "the same score key and tempo (%s %s, %g bpm)" % (ga["key"], ga.get("mode"), ga.get("bpm"))+ return None+++def _music_match(a: List[Dict[str, Any]], b: List[Dict[str, Any]], composer: bool = True) -> Optional[str]:ra = {m.get("ref") for m in a if m.get("ref") and m.get("ref") != "score:synth"}rb = {m.get("ref") for m in b if m.get("ref") and m.get("ref") != "score:synth"}same = sorted(ra & rb)if same:return "the same track (%s)" % ", ".join(same)+ sc = _score_match(a, b)+ if sc:+ return sc+ same = sorted(_artists(a) & _artists(b)) if composer else []+ if same:+ return "the same composer (%s)" % ", ".join(same)sa = {m.get("shelf") for m in a if m.get("shelf")}sb = {m.get("shelf") for m in b if m.get("shelf")}if sa & sb:@@ -220,7 +270,7 @@ def repeats(look: Dict[str, Any], others: List[Dict[str, Any]]) -> List[Dict[strout.append({"aspect": aspect, "value": aspect_value(look, aspect), "jobs": [o.get("job") or "?"],"detail": detail, "strong": aspect in STRONG})- for o in others:+ for i, o in enumerate(others):same_brand = bool(look.get("brand")) and look.get("brand") == o.get("brand")if look.get("template") and look.get("template") == o.get("template"):hit("template", o)@@ -238,7 +288,7 @@ def repeats(look: Dict[str, Any], others: List[Dict[str, Any]]) -> List[Dict[strca, cb = look.get("camera") or [], o.get("camera") or []if ca and cb and _jacc(ca, cb) >= 0.67:hit("camera", o)- mm = _music_match(look.get("music") or [], o.get("music") or [])+ mm = _music_match(look.get("music") or [], o.get("music") or [], composer=i < COMPOSER_RECENT)if mm:hit("music", o, mm)if _structure_match(look.get("structure") or {}, o.get("structure") or {}):@@ -396,31 +446,65 @@ def _energy_of(tr: Dict[str, int], cat: List[Dict[str, Any]]) -> str:def _music_alternatives(look: Dict[str, Any], others: List[Dict[str, Any]], kind: str, seed: int, n: int) -> List[str]:+ mine = look.get("music") or []+ if _score(mine) and not [m for m in mine if str(m.get("ref") or "").startswith("catalog:")]:+ # a procedural score: a new signature away from the recent ones, then a produced track+ out = _score_alternatives(look, others, seed)[:1]+ return out + _catalog_alternatives(look, others, kind, n - len(out))+ return _catalog_alternatives(look, others, kind, n)+++def _score_alternatives(look: Dict[str, Any], others: List[Dict[str, Any]], seed: int) -> List[str]:+ try:+ from ..audio import filmscore+ sig0 = _score(look.get("music") or []).get("signature") or {}+ recent = [s for s in [sig0] + [_score(o.get("music") or []).get("signature") or {} for o in others] if s]+ moods = [m for m in filmscore.MOODS if m != sig0.get("mood")]+ mood = sig0.get("mood") or moods[seed % len(moods)]+ sig = filmscore.choose(mood, seed + 1, recent)+ except Exception: # noqa: BLE001 - a hint without the tables+ return ["a new score: `showtime audio film-score <project>`"]+ where = look.get("project") or "<project>"+ return ["a new score, %s %s at %g bpm in %d/4 with %s chords and the %s motif (`showtime audio film-score %s "+ "--mood %s --seed %d`)" % (sig["key"], sig["mode"], sig["bpm"], sig["meter"], sig["progression"],+ sig["motif"], where, mood, seed + 1)]+++def _catalog_alternatives(look: Dict[str, Any], others: List[Dict[str, Any]], kind: str, n: int) -> List[str]:+ if n <= 0:+ return []try:from ..audio import music as muscat = mus.load_catalog()use = MUSIC_USE.get(kind, "launch")pre = mus.preset(use, cat) or {}shelves = list(pre.get("shelves") or [])- lo, hi = (pre.get("energy") or [0.0, 1.0])[:2]- tracks = [t for t in mus.tracks(cat, include_vetoed=False)- if t.get("energy") is None or lo - 0.05 <= float(t["energy"]) <= hi + 0.05]+ # ranked for this use, recent tracks and composers already lower (music rotation)+ ranked = [r["track"] for r in mus.search(use=use, limit=0, cat=cat, key=look.get("project") or look.get("job"))]except Exception: # noqa: BLE001 - no catalog: a generic hintreturn ["a different catalog shelf: `showtime audio music search --shelf <shelf>`","a composed bed in another style (audio mix `compose`)"][:n]used_refs = {m.get("ref") for x in [look] + others for m in (x.get("music") or [])}used_shelves = {m.get("shelf") for x in [look] + others for m in (x.get("music") or []) if m.get("shelf")}+ used_artists = _artists([m for x in [look] + others[:COMPOSER_RECENT] for m in (x.get("music") or [])])free = [s for s in shelves if s not in used_shelves] or [s for s in shelves]+ fresh = [t for t in ranked if "catalog:%s" % t["id"] not in used_refs and t.get("shelf") in free]+ # other composers first, a different shelf for each suggestion; then whatever is fresh+ order = [t for t in fresh if mus.artist_of(t) not in used_artists] + freshout: List[str] = []- for shelf in _rotate(free, seed):- cands = [t for t in tracks if t.get("shelf") == shelf and "catalog:%s" % t["id"] not in used_refs]- if not cands:- continue- t = _rotate(sorted(cands, key=lambda t: t["id"]), seed)[0]- out.append("catalog:%s (\"%s\", %s shelf, %s; `showtime audio music info %s`)" % (- t["id"], t.get("title"), shelf, ", ".join((t.get("moods") or [])[:2]) or "no mood tags", t["id"]))- if len(out) >= n:- break+ seen_shelves, seen_artists = set(), set()+ for strict in (True, False):+ for t in order:+ if len(out) >= n:+ break+ line = "catalog:%s (\"%s\" by %s, %s shelf, %s; `showtime audio music info %s`)" % (+ t["id"], t.get("title"), mus.artist_of(t), t.get("shelf"),+ ", ".join((t.get("moods") or [])[:2]) or "no mood tags", t["id"])+ if line in out or (strict and (t.get("shelf") in seen_shelves or mus.artist_of(t) in seen_artists)):+ continue+ out.append(line)+ seen_shelves.add(t.get("shelf"))+ seen_artists.add(mus.artist_of(t))return outdiff --git a/skills/showtime/lib/st/variety/look.py b/skills/showtime/lib/st/variety/look.pyindex 64aff56..9bbfad7 100644--- a/skills/showtime/lib/st/variety/look.py+++ b/skills/showtime/lib/st/variety/look.py@@ -19,6 +19,7 @@ Everything is best effort: a field that cannot be read is left out, never guesse"""from __future__ import annotations+import hashlibimport jsonimport refrom pathlib import Path@@ -300,17 +301,26 @@ def _music(project: Path, cfg: Dict[str, Any], texts: Dict[str, str]) -> List[Diif not isinstance(tr, dict) or str(tr.get("kind") or "") != "music":continueif tr.get("catalog"):- row: Dict[str, Any] = {"ref": "catalog:%s" % tr["catalog"]}+ ref = tr["catalog"]+ row: Dict[str, Any] = {"ref": "catalog:%s" % ref}try:from ..audio import music as mus- t = mus.get(str(tr["catalog"]))- row.update(shelf=t.get("shelf"), moods=t.get("moods") or [], title=t.get("title"))+ if isinstance(ref, dict) and not ref.get("id"):+ # a query ({"use": "launch"}): the track it resolves to for this project, and the+ # query itself, so a re-render after qa keeps that track (music.resolve)+ t = mus.resolve(ref, dur=float(tr.get("dur") or 0) or None, key=str(project.resolve()))+ row["query"] = mus.query_key(ref)+ else:+ t = mus.get(str(ref["id"] if isinstance(ref, dict) else ref))+ row.update(ref="catalog:%s" % t["id"], shelf=t.get("shelf"), moods=t.get("moods") or [],+ title=t.get("title"), artist=mus.artist_of(t))except Exception: # noqa: BLE001 - an unknown id is still a repeatable factpassout.append(row)elif isinstance(tr.get("compose"), dict):c = tr["compose"]- out.append({"ref": "compose:%s" % (c.get("style") or "default"), "style": c.get("style")})+ out.append({"ref": "compose:%s" % (c.get("style") or "default"), "style": c.get("style"),+ **{k: c[k] for k in ("seed", "key", "bpm") if c.get(k) is not None}})elif tr.get("library") or tr.get("lib"):out.append({"ref": "library:%s" % (tr.get("library") or tr.get("lib"))})elif tr.get("file") or tr.get("src"):@@ -322,7 +332,14 @@ def _music(project: Path, cfg: Dict[str, Any], texts: Dict[str, str]) -> List[Diif m:bpm = int(m.group(1))break- out.append({"ref": "score:synth", "bpm": bpm})+ row = {"ref": "score:synth", "bpm": bpm}+ from ..audio import filmscore+ sig = filmscore.read_signature(project) # a generated film score names its key, chords, motif ...+ if sig:+ row["signature"] = sig+ if texts.get("score.js"):+ row["sha"] = hashlib.sha1(texts["score.js"].encode("utf-8")).hexdigest()[:12] # a score copied unchanged+ out.append(row)return outdiff --git a/skills/showtime/lib/st/voice/models.py b/skills/showtime/lib/st/voice/models.pyindex 8d7a315..2b49466 100644--- a/skills/showtime/lib/st/voice/models.py+++ b/skills/showtime/lib/st/voice/models.py@@ -7,7 +7,8 @@ use (with a one-line notice), verified by size + sha256:- the English CTC aligner (wav2vec2-base-960h, ONNX uint8-quantized, 95 MB, Apache-2.0)- Piper voices for sherpa-onnx (60-115 MB each; commercially usable ones only)-Downloads reuse the installer's resumable, checksum-verified fetcher.+Downloads reuse the installer's resumable, checksum-verified fetcher, which falls back to the+model mirror (st/mirror.py) when Hugging Face is blocked."""from __future__ import annotations@@ -94,7 +95,9 @@ def _fetch(url: str, dest: Path, sha: Optional[str], size: Optional[int], label:raiseexcept Exception as e: # noqa: BLE001raise ShowtimeError("download failed for %s: %s" % (label, e),- hint="check your connection and retry; files resume where they stopped")+ hint="check your connection and retry; files resume where they stopped. Behind a "+ "proxy that blocks the model hosts, set SHOWTIME_MODEL_MIRROR to a mirror URL "+ "or a folder holding the files")def ensure_aligner(allow_download: bool = True) -> Optional[Path]:diff --git a/skills/showtime/references/audio.md b/skills/showtime/references/audio.mdindex 53b4e78..1ce16a3 100644--- a/skills/showtime/references/audio.md+++ b/skills/showtime/references/audio.md@@ -43,12 +43,12 @@ Everything runs locally. Every command has `--help` with examples, and most acce| Section | Lines ||---|---|| 1. The five-minute path | 53-67 |-| 2. Music | 69-121 |-| 3. Sound effects | 123-139 |-| 4. Library | 141-188 |-| 5. The mix spec (audio/mix.json): Credits | 190-288 |-| 6. Analysis and delivery | 290-306 |-| 7. Platform notes | 308-318 |+| 2. Music | 69-124 |+| 3. Sound effects | 126-142 |+| 4. Library | 144-191 |+| 5. The mix spec (audio/mix.json): Credits | 193-291 |+| 6. Analysis and delivery | 293-309 |+| 7. Platform notes | 311-321 |## 1. The five-minute path@@ -78,8 +78,9 @@ changed.| The beat grid of any track | `audio beats track.mp3` (writes `track.beats.json`) || Temp music from a text prompt (non-commercial) | `audio musicgen "prompt" --dur 20 -o draft.wav` (optional tier) |-**The produced-music catalog** (`lib/st/audio/music_catalog.json`, 150+ tracks: Scott Buckley and-Kevin MacLeod under CC BY 4.0, CC0 and public-domain recordings; every track was downloaded, measured+**The produced-music catalog** (`lib/st/audio/music_catalog.json`, nearly 300 tracks: Scott Buckley and+Kevin MacLeod under CC BY 4.0, composers on OpenGameArt under CC BY 3.0/4.0 or CC0, CC0 and public-domain+recordings; every track was downloaded, measuredand passed a quality gate: no muffled old transfers, hiss, crackle, clipping, mono, dead gaps or wildloudness swings, thresholds in `music.py`):- `audio music search [words] --for USE --shelf S --mood M --energy 0.2-0.5 --dur D --vocals none`@@ -118,7 +119,9 @@ loudness swings, thresholds in `music.py`):- `--backend auto|sf|synth|hybrid`: SoundFont instruments (GeneralUser GS), the numpy synth, or synthdrums/bass with SoundFont keys and strings. If `tinysoundfont` or the SoundFont is missing, itfalls back to the synth automatically. It still works, it just sounds more electronic.-- `--seed N` gives a different melody and variation with the same structure. Try 2 or 3 seeds.+- `--seed N` gives a different melody and variation with the same structure. Try 2 or 3 seeds. In a+ mix.json compose track, `"seed": "auto"` takes the seed from the project and, unless `"key"` is given,+ moves the style's key (up to a fourth), so two videos on one style do not share a bed.## 3. Sound effectsdiff --git a/skills/showtime/references/crew/critic.md b/skills/showtime/references/crew/critic.mdindex dcce591..74537df 100644--- a/skills/showtime/references/crew/critic.md+++ b/skills/showtime/references/crew/critic.md@@ -33,6 +33,15 @@ replaces `TASK.md` for you: it names the video, the pack's images and what to an- what you declined to judge and why (for example, you cannot hear the audio: judge the loudnessplot and the captions instead);- a verdict: `ship`, `ship after fixes` or `not ready`;+ - the absolute verdict, `WOULD I POST THIS: yes | no -- one reason`: would you post this under your own+ name, watched once at full size by a stranger? The bar is "not cheap, broken or wrong", not "flawless":+ with only should-fix and polish findings it is usually a yes. Say no when a blocker stands or the whole+ video reads as cheap at a glance (captions in stepped boxes, a player's controls in the footage, a small+ or soft recording in big borders); one flawed shot is a should-fix. Judge the video alone, never "better+ than the last version". In quality mode a "no" holds delivery like a blocker;+ - from round 2, a `PREVIOUS` line per earlier blocker or should-fix: `fixed: ...` or `not fixed: ...`,+ naming what it was about (a caption should-fix stays open until a later line names the captions and+ says `fixed`, or the maker writes `won't fix: <reason>`);- the best poster frame.Done when: `FINDINGS.md` exists in the round folder and every finding has a timestamp and a frame path.@@ -42,7 +51,8 @@ Done when: `FINDINGS.md` exists in the round folder and every finding has a timeA brief in `round-N/order-1/` or `order-2/` compares two versions, `X` and `Y`, shown in the order itnames; another critic judges the other order. Look at every image of both (`../X/`, `../Y/`, theside-by-side `compare-*.jpg`, both `qa.txt` and `transcript.txt`), answer the questions for each, then-give `PREFERENCE: X | Y | tie` (the one you would ship). Every finding names its video (`[X]` or `[Y]`)+give `PREFERENCE: X | Y | tie` (the one you would ship), then `WOULD I POST X:` and `WOULD I POST Y:` (yes or+no, one reason each, each judged alone: preferring one does not make it postable). Every finding names its video (`[X]` or `[Y]`)besides its time and frame. Which version is newer is hidden on purpose: never look for it (the`.pairwise-keys/` folder, other `order-*` folders, file dates). Write `FINDINGS.md` next to your brief.No scores in any round: do not rate a video on a number scale.diff --git a/skills/showtime/references/music.md b/skills/showtime/references/music.mdindex 1317a06..2c702b0 100644--- a/skills/showtime/references/music.md+++ b/skills/showtime/references/music.md@@ -9,6 +9,9 @@ end. The commands are in `audio.md`.- Launch, trailer, story: a produced track (`showtime audio music pick --for launch --dur <len>`, then`{"kind": "music", "catalog": "<id>", "fit": true}`); explainer, tutorial, data: a restrained underscore ornone; exact beats, stems: `showtime audio compose` (§0)+- "With music" on a video of 10 s or more with a mood (launch, birthday, recap, trailer, intro): a produced+ track is the default, on the film template too (a mix.json as `"audio"`; then trim score.js to its hits or+ set `"score": false`). `new film` writes each film its own score; `audio film-score <dir>` another (§0)- You cannot listen: read `audio music info <id>` (moods, energy, vocals, `ending`, highlight); a short cut ofa slow build: `"offset": "highlight"`; a disliked track: `audio music veto <id>` (§0)- Never use Pixabay, Mixkit, Uppbeat, Bensound or YouTube Audio Library files, or anything NC or ND. Credits@@ -30,12 +33,12 @@ end. The commands are in `audio.md`.<!-- section lines: kept current by scripts/check_release.py -->| Section | Lines ||---|---|-| 0. Produced track, composed bed, or none | 40-69 |-| 1. Decide the job of the music first | 71-107 |-| 2. Style catalog (showtime audio styles) | 109-164 |-| 3. Sync music to the edit | 166-200 |-| 4. Endings | 202-223 |-| 5. Iterate cheaply | 225-232 |+| 0. Produced track, composed bed, or none | 43-77 |+| 1. Decide the job of the music first | 79-115 |+| 2. Style catalog (showtime audio styles) | 117-172 |+| 3. Sync music to the edit | 174-208 |+| 4. Endings | 210-231 |+| 5. Iterate cheaply | 233-240 |## 0. Produced track, composed bed, or none@@ -48,6 +51,11 @@ end. The commands are in `audio.md`.- `--for` is one of launch, trailer, keynote, story, emotional, promo, social, product-demo, tech,explainer, tutorial, data, documentary, problem, background (`audio music presets`). Add `--mood`,`--energy 0.2-0.5` or words (`audio music search hopeful piano`). In a series, vary with `--n 1`, `--n 2`.+- Picks rotate: `pick`, `search` and `{"catalog": {"use": ...}}` rank tracks heard in the last 8 finished+ jobs lower (and, gently, composers of the last 3), and lists never let one composer take more than+ 2 of 5 places in a row. `showtime history check` warns when a track or composer repeats a recent job+ and names two alternatives. An explicit id always wins; `showtime history off` or+ `SHOWTIME_MUSIC_ROTATION=off` turns rotation off.- You cannot listen, so read `audio music info <id>`: moods, energy, vocals, `ending` (clean = ends on ahit and a ring-out; soft = a fade or a quiet outro; cut = still loud at the end), the length, a longquiet intro and the highlight. Every catalog track passed a measured quality gate (no muffled olddiff --git a/skills/showtime/references/onboarding.md b/skills/showtime/references/onboarding.mdindex 21f0124..e8273d9 100644--- a/skills/showtime/references/onboarding.md+++ b/skills/showtime/references/onboarding.md@@ -24,10 +24,10 @@ short exchange: what is there, what is missing, one decision, then the install,|---|---|| 1. Look before you talk | 32-43 || 2. Tell the user in one table, then ask one thing | 45-62 |-| 3. Install | 64-87 |-| 4. What works now, what arrives later | 89-110 |-| 5. Where things live | 112-116 |-| 6. If setup fails | 118-123 |+| 3. Install | 64-90 |+| 4. What works now, what arrives later | 92-113 |+| 5. Where things live | 115-119 |+| 6. If setup fails | 121-126 |## 1. Look before you talk@@ -83,6 +83,9 @@ showtime doctor # full check, including a real browser launch andnot stuck; later runs take seconds.- Behind a proxy or offline: `showtime setup --seed DIR` reuses files downloaded elsewhere(matched by size and sha256).+- A proxy that blocks Hugging Face or GitHub LFS (the Claude app's sandbox answers 403): setup and first-use+ fetches take those model files from showtime's model mirror on GitHub by themselves, sha256-verified;+ `SHOWTIME_MODEL_MIRROR=<URL or folder>` points at another copy.Done when `showtime doctor` shows 0 fail. Warnings each come with a `fix:` line; most are optional.diff --git a/skills/showtime/references/qa.md b/skills/showtime/references/qa.mdindex d16fa68..17a6814 100644--- a/skills/showtime/references/qa.md+++ b/skills/showtime/references/qa.md@@ -46,15 +46,17 @@ Batch visual checks: one `showtime look` per phase, not dozens of single framespast 5 hard cuts or 6 scenes in 60 s, a 5.5 s still, and a voiceless mix moving under 3 dB (§ Tools)- Quality mode (the default), publish-bound or studio work: `showtime review-pack <job>` (qa's "review pending"line names it), then `review.md` with the pack's `CRITIC.md`; lean: publish-bound only (§3)+- Quality floor (WARN): player controls in the footage, soft or upscaled footage, stepped caption boxes, a+ small picture in big flat borders; the critic's `WOULD I POST THIS: no` holds delivery in quality mode (§3, § Tools)- Only a `final*.mp4` is the latest final; promote a variant: `job note <job> --output final=<file>` (§ Tools)<!-- section lines: kept current by scripts/check_release.py -->| Section | Lines ||---|---|-| 1. Pre-render (on the project) | 59-100 |-| 2. Post-render (on the MP4) | 102-140 |-| 3. The critic pass | 142-149 |-| Tools | 151-325 |+| 1. Pre-render (on the project) | 61-102 |+| 2. Post-render (on the MP4) | 104-142 |+| 3. The critic pass | 144-151 |+| Tools | 153-339 |## 1. Pre-render (on the project)@@ -145,7 +147,7 @@ Every finished video in quality mode (the default; qa prints "review pending" wihas a verdict), and publish-bound or studio work in lean mode: `showtime review-pack <job>`, then follow`review.md`. The critic'sbrief is the `CRITIC.md` the pack writes (severity scale, citation rule, answer format, three rounds-at most, pairwise from round 2); do not write a brief of your own. Lean work that is not publish-bound gets+at most, pairwise from round 2, the absolute `WOULD I POST THIS` line); do not write a brief of your own. Lean work that is not publish-bound getsthe self-review in `review.md` section 1.## Tools@@ -206,6 +208,7 @@ export itself (`showtime qa <export> --platform github`); without one it FAILs w| `first_frame_black` | FAIL | frame 0 is black (no poster baked) || `first_frame_flat` | WARN | frame 0 is one flat colour || `poster_flash` | WARN | frame 0 differs sharply from frames 1-2 (a baked poster over an opening that builds from empty): a one-frame flash on autoplay and every loop |+| `poster_mismatch` | WARN | the render's poster still (render.json `poster`) differs from its video frame by more than 4 mean luma levels, or its PNG carries colour chunks (gAMA, cHRM, cICP, iCCP) that make browsers draw it darker than the video || `black_segment` | WARN ≥ 0.25 s, FAIL ≥ 1 s | black inside the video (`ends_black`: WARN for a black ending ≥ 1 s) || `frozen` | WARN ≥ 2.5 s (launch films, showtime.json `"kind": "launch"`: ≥ 3.5 s, `launch_hold_s`), FAIL ≥ 6 s or half the video | no visible change (a few typed characters or a thin moving line still count as a hold); the thresholds, `freeze_noise_db` included, live in `runtime/thresholds.json`, shared with `showtime check`, so check finds the same holds before the render. A padded or blurred export is judged inside its picture (`<export>.export.json`), not on its bars. See "Dark themes and slow pushes" below || `dead_stop` | WARN | a fast move (6+ frames of real change) whose last frames still move at half its peak or more, then nothing for 4+ frames: it lands with no settle. The message names the frame; fix: ease the last 6-10 frames out (`power3.out`, `premium`) or land earlier and hold (st.qa.motion, on the rhythm's frame differences) |@@ -224,6 +227,10 @@ export itself (`showtime qa <export> --platform github`); without one it FAILs w| `aspect` | WARN (FAIL for `expect.width/height/aspect`) | aspect differs from the platform || `resolution` | WARN | the aspect fits but the frame has under 97 % of the platform's pixels (540x960 for Reels): render the final at full size || `upscale` | WARN (INFO when the EDL sets `"output": {"allow_upscale": true}`) | an EDL render enlarged a source more than 1.5x (from `<video>.report.json`, also for a baked `final.poster.mp4` and for exports, which carry the report with factors scaled to their size); the fix names a smaller output size or `--fit blur`, or says when it is unavoidable (1080p to 1080x1920) |+| `player_chrome` | WARN (footage) | a thin bar across over half the width, low in the frame or in a recorded player, with small glyphs at both ends (play, time, fullscreen), in the same place on 2+ sampled frames: a web player's controls recorded with the page |+| `soft_footage` | WARN (footage) | edge sharpness (sum \|Laplacian\| / sum \|gradient\| per detailed 64 px cell, at delivery size) under 0.75 on 60 % of the detailed cells, on half the sampled frames: crisp screen text is ~1.5, a 2x upscale ~1.0, 3x ~0.7. Fix: re-record at 2x device scale |+| `caption_boxes` | WARN | two caption boxes stacked around one centre with widths differing by over 10 % (one box per line: the stepped look), on 2+ sampled frames. Fix: one plate (`captions --style boxed`) |+| `empty_borders` | WARN (footage) | a solid picture filling under 70 % of the frame (width x height) inside flat borders, on over 30 % (and 2+) of the sampled frames || `must_show` | FAIL | a must-show text is missing from the on-screen text list of the last `showtime check` || `must_show_unverified` | WARN | found only in the project source (run `showtime check`, then `qa` again) || `expect_invalid` | WARN | an unknown key in the `expect` block, or an unknown platform name (checked without a platform target) |@@ -283,6 +290,13 @@ Parts:Burned-in captions that are drawn as page text (`data-caption`) get the type-size and zone checks like any text,but not the reading-time rule (they follow the voice).+**Quality floor** (`st/qa/floor.py`). Four looks-cheap patterns that pass every technical check: the four+rows above from `player_chrome` on, measured on 3-10 frames sampled across the video (grey, at delivery size up to+1920 px wide). They are WARNs only, tuned to stay quiet on designed frames (a title on a flat ground, a divider+line, one caption plate); the thresholds are constants at the top of the file. `player_chrome`, `soft_footage`+and `empty_borders` run only when the video may hold footage (not for a project whose page plays no `<video>`),+and a padded export is judged inside its picture. `qa.json` `floor` has the counts.+**Dark themes and slow pushes.** Black and frozen stretches are measured on absolute pixel change, so twohonest designs can trip them:- `black_segment` on a dark theme: a near-black ground (#0b0b0f and similar) counts as black. A 0.25-1 sdiff --git a/skills/showtime/references/receipt.md b/skills/showtime/references/receipt.mdindex 10f25a7..d241701 100644--- a/skills/showtime/references/receipt.md+++ b/skills/showtime/references/receipt.md@@ -28,8 +28,8 @@ Run `showtime receipt <job>` last, after `share.txt` is written, and it is alway| Section | Lines ||---|---|| What goes in it, and where it comes from | 34-49 |-| Tokens and cost | 51-68 |-| receipt.json (schema 1) | 70-88 |+| Tokens and cost | 51-73 |+| receipt.json (schema 1) | 75-94 |## What goes in it, and where it comes from@@ -38,7 +38,7 @@ Run `showtime receipt <job>` last, after `share.txt` is written, and it is alway| Request | `job.json` `request`: the user's message as typed (`showtime job init <slug> --request "<verbatim>"`); else the job goal, labelled as the agent's wording | "Not recorded." || Setup | agent, models, mode, platform, showtime version | "not reported by this agent" || Assumptions | `job.json` assumed / verified / answered questions | empty lists |-| Rounds | `review/round-N/` (packed, findings saved, self-review) and qa runs | 0 |+| Rounds | `review/round-N/` (packed, findings saved, self-review; a pairwise round has one FINDINGS.md per order and counts as saved when both are) and qa runs; findings saved in a session where no sub-agent ran are flagged "not an independent critic" | 0 || Renders | `job.json` `renders`, written by `render`, `edit render` and `job note --render KIND=FILE` (full, preview, partial with `--render-span A-B`; a partial render spliced into a full final adds `--render-base FILE`); older jobs are counted from the stage log | "No render was recorded" || Images made for looking | image files in the folders showtime writes for looking (review packs, qa, snap, check, edit views, look and composite images) | "no review images" || Time | job start to the newest final's file time; includes waiting for the user | "not reported by this agent" |@@ -64,6 +64,11 @@ token counts). No prompt, reply, tool call or file content is read out, kept orlower bound. Work the host keeps outside the session log is not counted, so treat it as a floor, not a bill.- **Codex.** `--transcript <rollout.jsonl>`: tokens (input, cached, output, reasoning) from the cumulative`token_count` events in the window. Codex reports tokens, not dollars: cost says "not reported by this agent".+- **Devin.** Under Devin (or `--transcript <sessions.db> --host devin`) the CLI's session database+ (`~/.local/share/devin/cli/sessions.db`) is opened read-only; only each request's model id, time and token+ metrics are selected, from the sessions whose working folder holds the job. Devin reports tokens, not dollars:+ the cost is an estimate at Devin's listed per-token prices (`DEVIN_PRICES`, dated) and is labelled "est.". A+ Fusion session lists the lead and the sidekick model with their share of the tokens.- **Everything else, and the MCP path** (Claude Desktop, Cursor, ...): the server cannot see a session log, sotokens and cost say "not reported by this agent". The receipt still names the client through MCP.@@ -76,7 +81,8 @@ schema, job, showtime, generatedrequest {text, source} text is masked (home paths, keys, e-mail addresses)mode, platform, agentassumptions {not_checked[], checked[], decisions[{question, answer}], open_questions[]}-review {packed, with_findings, self_reviewed, rounds[{round, findings, self_review}]}+review {packed, with_findings, pairwise, findings_files, self_reviewed, lead_review,+ rounds[{round, kind, findings, findings_files, self_review}]}qa {runs, verdict, fail, warn, file}renders {full, preview, partial, spliced, seconds, source, list[{kind, file, seconds, span, spliced_from}]}images {total, by_kind{review, qa, snap, check, views, looks}, note}@@ -84,5 +90,5 @@ time {start, end, ends_at, wall_seconds, render_seconds, note}usage {status: "reported" | "not_reported", host, note?,tokens{input, output, cache_read, write_5m, write_1h, total} (Codex: input, cached_input, output, reasoning)cost_usd (number | null), cost_note, prices_as_of, window,- models{<model>: {input, output, cache_read, write_5m, write_1h, messages, cost_usd}}}+ subagents?, models{<model>: {input, output, cache_read, write_5m, write_1h, messages, cost_usd, token_share?}}}```diff --git a/skills/showtime/references/review.md b/skills/showtime/references/review.mdindex c9af49b..ff0d141 100644--- a/skills/showtime/references/review.md+++ b/skills/showtime/references/review.md@@ -26,6 +26,9 @@ The checklists live in `qa.md`; this file is the review protocol (self-review, c- Then re-render, `showtime check` after timing fixes, `showtime qa <job>`, a pairwise round, and`showtime review-verdict <job>`: an improvement only when preferred in both orders (§4)- Three rounds at most; then ship the best version with its open findings listed (§4)+- The critic's absolute line, `WOULD I POST THIS: yes | no`, is judged alone; in quality mode a "no" holds+ delivery even when the pairwise preferred the render, and a caption should-fix needs a later `fixed` or your+ `won't fix: <reason>` in `review/round-N/RESPONSE.md` (§4)- User notes: echo them back numbered with timestamps; ask only about an ambiguous one (2-3 readings, adefault); apply blockers, then cheap tweaks, then structural changes (§5)- Prove fixes with `showtime snap <new> --at t --compare <old>`; push back when a note collides with a locked@@ -34,11 +37,11 @@ The checklists live in `qa.md`; this file is the review protocol (self-review, c<!-- section lines: kept current by scripts/check_release.py -->| Section | Lines ||---|---|-| 1. Pick the tier | 43-87 |-| 2. Build the pack | 89-130 |-| 3. Dispatch the critic | 132-162 |-| 4. Act on the findings | 164-185 |-| 5. Notes from the user | 187-209 |+| 1. Pick the tier | 46-90 |+| 2. Build the pack | 92-133 |+| 3. Dispatch the critic | 135-166 |+| 4. Act on the findings | 168-196 |+| 5. Notes from the user | 198-220 |## 1. Pick the tier@@ -159,7 +162,8 @@ Every finding cites a timestamp and a frame path from the pack (in a pairwise ro`[Y]`). Findings without a location are dropped. **No scores**: a 1-10 rating from a model reviewer is noise;the verdict, the preference and the findings carry the judgment.The answer also lists what works, what the critic declined to judge, a verdict (ship / ship after fixes /-not ready) and the best poster frame.+not ready), the absolute verdict (`WOULD I POST THIS: yes | no -- one reason`; pairwise: one per video) and+the best poster frame.## 4. Act on the findings@@ -177,10 +181,17 @@ not ready) and the best poster frame.the new render is an improvement only when **preferred in both orders**; a tie or a split (the preferencefollowed the position) is not, and the older one stays the best (`<review>/best.json`; `VERDICT.md` liststhe best version's open findings). A losing render can leave the job with `showtime job discard`.-6. **Three rounds at most.** After round 3, ship the best version with its open findings listed; open+6. **The quality floor.** A pairwise round only asks "better than the last version?"; a better render can+ still look cheap. So every critic also answers `WOULD I POST THIS` on the video alone, and in quality+ mode a "no" (either pairwise critic's, for the winning render) keeps the review pending like "not ready"+ (`showtime qa <job>` names it). A should-fix or blocker that names captions or subtitles stays open, and+ pending, until a later round's critic writes a line naming the captions with `fixed`, or you write+ `won't fix: <reason>` about the captions in `review/round-N/RESPONSE.md` (plain word matching; lean+ mode only warns). `showtime qa` also warns on the four cheap looks it can see (`qa.md`, quality floor).+7. **Three rounds at most.** After round 3, ship the best version with its open findings listed; openblockers go to the user with frames, and they decide. `review-pack` refuses a fourth round unless`--force-round` is given.-7. **Polish after a "ship" verdict** needs no new pack: fix, then prove each fix with a before/after pair+8. **Polish after a "ship" verdict** needs no new pack: fix, then prove each fix with a before/after pair(`showtime snap <new.mp4> --at t1,t2 --compare <old.mp4>`), run `showtime qa`, and log it in`work/feedback.md`. An unused render is dropped from the job with `showtime job discard <job> <file>` (its poster, credits and `.work/` move with it to `work/discarded/`; caption files stay, name one to discard it too).diff --git a/skills/showtime/references/synth-score.md b/skills/showtime/references/synth-score.mdindex 6b01cc2..dedebf7 100644--- a/skills/showtime/references/synth-score.md+++ b/skills/showtime/references/synth-score.md@@ -4,7 +4,9 @@ Read this when a project needs music or sound design written in code: a canvas fpage with `ST.score`. It covers the API, how to compose a score for a specific film (key, mode, motif,sections, sync to picture) and how to mix it. For library music, stock SFX and voice-over mixing, read theaudio references instead. A film can combine both: the score renders to WAV, and `showtime.json` `"audio"`-adds a mix on top.+adds a mix on top. For "with music" on a mood piece of 10 s or more, a produced catalog track is usually+the better bed (music.md); `showtime new film` writes each project its own score (key, tempo, chords,+motif, instruments, away from recent jobs), and `showtime audio film-score <dir> [--mood M]` writes another.`Synth` is a Web Audio kit. The same score plays in the preview player and renders offline (faster thanreal time) during `showtime render`. Every sound is synthesised: no samples, no downloads, no licences to@@ -42,15 +44,15 @@ track. Randomness is seeded, so a score renders identically every time.<!-- section lines: kept current by scripts/check_release.py -->| Section | Lines ||---|---|-| 1. Shape of a score | 55-80 |-| 2. Instruments (all times are film seconds) | 82-105 |-| 3. Theory helpers | 107-134 |-| 4. Composing for a film: the method | 136-170 |-| 5. Sync accuracy | 172-178 |-| 5b. Seeking: a score rendered from any time | 180-202 |-| 6. Mixing levels | 204-230 |-| 7. Pitfalls | 232-249 |-| 8. Standalone use | 251-263 |+| 1. Shape of a score | 57-82 |+| 2. Instruments (all times are film seconds) | 84-107 |+| 3. Theory helpers | 109-136 |+| 4. Composing for a film: the method | 138-172 |+| 5. Sync accuracy | 174-180 |+| 5b. Seeking: a score rendered from any time | 182-204 |+| 6. Mixing levels | 206-232 |+| 7. Pitfalls | 234-251 |+| 8. Standalone use | 253-265 |## 1. Shape of a scorediff --git a/skills/showtime/runtime/components/chart.js b/skills/showtime/runtime/components/chart.jsindex b80c83f..e347625 100644--- a/skills/showtime/runtime/components/chart.js+++ b/skills/showtime/runtime/components/chart.js@@ -132,7 +132,8 @@ export const Chart = define({// clear of the category labels under the plot: the axis reaches low enough for it (set after layout)let negRoom = 0;const yMinAt = (lt, yMax) => {- if (o.yMin != null) return Math.min(0, Number(o.yMin));+ // a given yMin is the axis floor, also above zero (a zoomed-in axis: 90-100 %)+ if (o.yMin != null && Number.isFinite(Number(o.yMin)) && !(yMax != null && Number(o.yMin) >= yMax)) return Number(o.yMin);let m = minOf(states[0]);for (const st of states.slice(1)) m = lerp(m, minOf(st), M(clamp((lt - st.at) / 0.5)));if (!(m < 0)) return 0;@@ -175,6 +176,8 @@ export const Chart = define({root.append(g);const gridG = svg('g', { class: 'st-chart-grid' });g.append(gridG);+ // marks grow from zero, or from the axis floor when a yMin above zero cuts zero off+ const baseOf = (yMin, yMax) => Math.min(Math.max(0, yMin), yMax);const hasNeg = states.some((st) => minOf(st) < 0) || (o.yMin != null && Number(o.yMin) < 0);const zeroLine = hasNeg ? svg('line', { class: 'st-chart-zero' }) : null;// a reference line ("next warmest: 2014, +0.75", a target, a previous record), drawn on at `at`@@ -354,7 +357,7 @@ export const Chart = define({const gapAt = (sc) => valFs * sc * 0.3;const hit = (a, b, gp) => Math.min(a.b, b.b) - Math.max(a.t, b.t) > -gp * 0.3 && Math.max(a.l, b.l) - Math.min(a.r, b.r) < gp;// the settled bars: a label must not sit on another bar- const bars = marks.map((m, i) => { const bw = m.rect.width.baseVal.value, x = m.cx - bw / 2, y = lin(vals[i]), z = lin(0); return { l: x, r: x + bw, t: Math.min(y, z), b: Math.max(y, z) }; });+ const bars = marks.map((m, i) => { const bw = m.rect.width.baseVal.value, x = m.cx - bw / 2, y = lin(vals[i]), z = lin(baseOf(yMn, yMx)); return { l: x, r: x + bw, t: Math.min(y, z), b: Math.max(y, z) }; });const onBar = (a, i, gp) => bars.some((q, j) => j !== i && inK[j] && Math.min(a.b, q.b) - Math.max(a.t, q.t) > 0 && Math.min(a.r, q.r) - Math.max(a.l, q.l) > -gp * 0.3);const clean = (bx, gp) => { for (let i = 0; i < n; i++) { if (!inK[i]) continue; if (onBar(bx[i], i, gp)) return false; for (let j = i + 1; j < n; j++) if (inK[j] && hit(bx[i], bx[j], gp)) return false; } return true; };for (let sc = 1; sc >= kMin - 1e-6; sc -= 0.05) if (clean(boxes(sc), gapAt(sc))) return { s: sc, show: inK.map((x) => (x ? 1 : 0)) };@@ -413,7 +416,8 @@ export const Chart = define({// tick labels carry as many decimals as their step needs (0, 0.5, 1.0 -> one decimal)const step = tickVals.length > 1 ? Math.abs(tickVals[1] - tickVals[0]) : 1;const tickDec = step > 0 && step < 1 ? Math.min(4, Math.ceil(-Math.log10(step) - 1e-9)) : 0;- const base0 = lin(0);+ const baseV = baseOf(yMin, yMax);+ const base0 = lin(baseV);if (zeroLine) {zeroLine.style.display = yMin < 0 ? '' : 'none';if (type === 'hbar') { zeroLine.setAttribute('x1', base0); zeroLine.setAttribute('x2', base0); zeroLine.setAttribute('y1', 0); zeroLine.setAttribute('y2', ih); }@@ -437,8 +441,8 @@ export const Chart = define({const p = E(clamp((lt - 0.2 - stagger(m.li, nL, 0.045, { cap: 0.6 })) / o.grow));const full = valueAt(m.si, m.li, lt);const v = full * p;- const y = lin(v);- // bars grow up or down from zero+ const y = lin(baseV + (full - baseV) * p);+ // bars grow up or down from zero (or from a positive yMin)m.rect.setAttribute('y', Math.min(y, base0).toFixed(2)); m.rect.setAttribute('height', Math.abs(base0 - y).toFixed(2));if (m.hiFill) m.rect.setAttribute('fill', lt >= hlAt ? m.hiFill : 'var(--chart-muted, var(--chart-muted-default, #8a8f98))');if (m.val) {@@ -474,7 +478,7 @@ export const Chart = define({marks.forEach((m, i) => {const p = E(clamp((lt - 0.2 - stagger(i, nL, 0.045, { cap: 0.6 })) / o.grow));const v = vals[i] * p;- const w = lin(v);+ const w = lin(baseV + (vals[i] - baseV) * p);const yv = ((rankOf[i] + 0.5) * m.band);m.row.setAttribute('transform', `translate(0, ${yv.toFixed(2)})`);m.rect.setAttribute('x', Math.min(w, base0).toFixed(2));diff --git a/skills/showtime/scripts/check.mjs b/skills/showtime/scripts/check.mjsindex 89b06c7..9382d74 100644--- a/skills/showtime/scripts/check.mjs+++ b/skills/showtime/scripts/check.mjs@@ -836,6 +836,7 @@ async function main() {const vis = new Map(); // bid -> [[t0,t1],...]const blocksById = new Map();const cvis = new Map(); // canvas text -> [[t0,t1],...]+ const cdecor = new Set(); // canvas texts drawn as decor (F.decor): exempt from short_textconst okGrid = [];const activeClips = []; // per sample: clips ([data-start]) showingconst textShown = []; // per sample: any readable text (DOM or canvas)@@ -883,6 +884,7 @@ async function main() {if (!k || now.has(k)) continue;now.add(k);anyText = true;+ if (tx.decor) cdecor.add(k);if (!tx.decor) sizeSeen(`canvas:${k}`, k, (tx.size || 0) * ky, gt, { source: 'canvas', caption: onPlate(tx) });if (onPlate(tx)) { seenText(k, gt, 'canvas', true); continue; }seenText(k, gt, 'canvas', false);@@ -916,7 +918,8 @@ async function main() {const beatNoted = new Set();for (const [bid, runs] of vis) {const blk = blocksById.get(bid);- if (!blk || blk.caption || blk.len < 2) continue;+ // UI-mockup detail (data-st-decor, and everything inside it) is not copy the viewer must read+ if (!blk || blk.caption || blk.decor || blk.len < 2) continue;// numbers alone (axis ticks, counters, years) are glanced at, not read: as for canvas text; a// camera zoom that carries tick labels out of the frame is not a readability problem. A number// with a short unit ("+0.4 °C", "12 min", "3 GB": an axis tick that shows only while the axis@@ -946,7 +949,7 @@ async function main() {const shapes = new Map();for (const k of ckeys) shapes.set(shape(k), (shapes.get(shape(k)) || 0) + 1);for (const [k, runs] of cvis) {- if (k.length < 2 || /^[\d\s.,:%$€£+\-×x/]+$/i.test(k)) continue;+ if (k.length < 2 || cdecor.has(k) || /^[\d\s.,:%$€£+\-×x/]+$/i.test(k)) continue;if (/\d/.test(k) && shapes.get(shape(k)) >= 3) continue; // a counting number ("5.8 min", "5.9 min", ...)if (ckeys.some((o) => o !== k && o.startsWith(k))) continue;const best = Math.max(...runs.map(([s, e]) => e - s + stepS));@@ -1641,7 +1644,7 @@ function beatRunBlocks(vis, blocksById, stepS, rate) {const items = [];for (const [bid, runs] of vis) {const blk = blocksById.get(bid);- if (!blk || blk.caption || runs.length !== 1) continue;+ if (!blk || blk.caption || blk.decor || runs.length !== 1) continue;const words = String(blk.text || '').split(/\s+/).filter((w) => /[\p{L}\p{N}]/u.test(w)).length;const [s, e] = runs[0];const held = e - s + stepS;diff --git a/skills/showtime/scripts/lib/export/probe.mjs b/skills/showtime/scripts/lib/export/probe.mjsindex 9083012..ad1ca49 100644--- a/skills/showtime/scripts/lib/export/probe.mjs+++ b/skills/showtime/scripts/lib/export/probe.mjs@@ -55,6 +55,24 @@ function pageLook() {return out;}+const SEQ_RE = /^(.*?)(\d{2,})\.(png|jpe?g|webp|avif|gif)$/i;++/** Time spans [from, to] (seconds) around the requests of numbered image sequences (name_0007.png ...). */+export function sequenceSpans(requests, firstAt, step) {+ const groups = new Map();+ for (const p of requests) {+ const m = SEQ_RE.exec(p);+ if (!m || !firstAt.has(p)) continue;+ const k = `${m[1]}#${m[3].toLowerCase()}`;+ const g = groups.get(k) || [];+ g.push(firstAt.get(p));+ groups.set(k, g);+ }+ const spans = [];+ for (const ts of groups.values()) spans.push([Math.min(...ts) - step, Math.max(...ts) + step]);+ return spans;+}+/*** @param o.url server base URL @param o.page page path @param o.config showtime.json (+ overrides)* @param o.posterT seconds, 'auto' (40%) or null @param o.wantScore pull ST.score as float channels@@ -70,6 +88,8 @@ export async function probeProject(o) {const origin = new URL(o.url).origin;const requests = [];const seen = new Set();+ const firstAt = new Map(); // path -> the probe time that first requested it+ let curT = 0;const failed = [];const errors = [];const consoleErrors = [];@@ -84,7 +104,7 @@ export async function probeProject(o) {const u = r.url();if (!u.startsWith(origin + '/')) return;const p = decodeURIComponent(new URL(u).pathname);- if (!seen.has(p)) { seen.add(p); requests.push(p); }+ if (!seen.has(p)) { seen.add(p); requests.push(p); firstAt.set(p, curT); }});page.on('response', (r) => {if (r.status() >= 400 && r.url().startsWith(origin + '/')) failed.push({ path: decodeURIComponent(new URL(r.url()).pathname), status: r.status() });@@ -143,7 +163,8 @@ export async function probeProject(o) {for (const c of chapters) times.add(q(c.t + 0.1));times.add(lastT);const list = [...times].filter((x) => x >= 0 && x <= lastT).sort((x, y) => x - y);- for (const t of list) {+ const visit = async (t) => {+ curT = t;// every character on the page at that time (for dropping font subsets nothing uses)await withTimeout(page.evaluate(async (x) => {await window.ST.seek(x);@@ -156,7 +177,19 @@ export async function probeProject(o) {for (const f of F.frameInfo().fonts || []) fams.add(f);}}, t), 60000, `seek to ${t.toFixed(3)}s`);+ };+ for (const t of list) await visit(t);+ // per-frame images (a numbered sequence, one file per frame) change between the samples: visit every+ // frame around the times the sweep met one, so each image of the sequence is requested and packed+ const extra = [];+ for (const [a, b] of sequenceSpans(requests, firstAt, step)) {+ for (let f = Math.max(0, Math.floor(a * fps)); f / fps <= Math.min(b, lastT) + 1e-9; f++) {+ const t = q(f / fps);+ if (!times.has(t)) { times.add(t); extra.push(t); }+ }}+ for (const t of extra) await visit(t);+ list.push(...extra);const domText = await page.evaluate(() => [...(window.__stChars || [])].join(''));// families drawn on the canvas (null: not a canvas film, or text in the page's DOM too)const canvasFonts = await page.evaluate(() => {diff --git a/skills/showtime/scripts/lib/frames.mjs b/skills/showtime/scripts/lib/frames.mjsindex 0429fd0..aec19ba 100644--- a/skills/showtime/scripts/lib/frames.mjs+++ b/skills/showtime/scripts/lib/frames.mjs@@ -6,6 +6,7 @@ import { startServer } from '../server.mjs';import { resolveProject, info, c, UserError } from './cli.mjs';import { openStage } from './stagehost.mjs';import { resolveFF, ffmpeg, probe } from './ff.mjs';+import { stripColorChunks } from './png.mjs';export const VIDEO_EXT = /\.(mp4|mov|m4v|webm|mkv)$/i;@@ -32,7 +33,8 @@ export async function openSource(arg, a, shared) {if (t - back <= 0) break;}if (!fs.existsSync(tmp)) throw new UserError(`could not decode a frame of ${path.basename(file)} at ${t.toFixed(3)} s`);- const b = fs.readFileSync(tmp);+ // ffmpeg tags the still with the video's colour (cICP/cHRM/gAMA): a browser then draws it darker than the video+ const b = stripColorChunks(fs.readFileSync(tmp));fs.rmSync(tmp, { force: true });return b;},@@ -52,7 +54,7 @@ export async function openSource(arg, a, shared) {const d = await sess.diag().catch(() => null);const bad = d && d.videos ? Object.entries(d.videos) : [];for (const [k, v] of bad) if (!this.warned.has(k)) { this.warned.add(k); info(c.yellow(`snap: warning: video ${k}: ${v} (the still at ${t.toFixed(3)}s may show the wrong frame)`)); }- return sess.shot({ format: 'png' });+ return stripColorChunks(await sess.shot({ format: 'png' }));},warned: new Set(),async close() { await sess.close().catch(() => {}); await server.close().catch(() => {}); },diff --git a/skills/showtime/scripts/lib/png.mjs b/skills/showtime/scripts/lib/png.mjsnew file mode 100644index 0000000..24c2d8c--- /dev/null+++ b/skills/showtime/scripts/lib/png.mjs@@ -0,0 +1,36 @@+// PNG chunk helpers. A still decoded from a BT.709 video carries cICP/cHRM/gAMA colour chunks; a+// browser honours them and draws the still visibly darker than the same frame playing in <video>.+// Dropping them leaves plain (sRGB-assumed) pixels, exactly the values the video shows.++const SIG = Buffer.from([0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a]);++/** Colour-management chunks removed by stripColorChunks. */+export const COLOR_CHUNKS = new Set(['cICP', 'cHRM', 'gAMA', 'iCCP', 'sRGB']);++/** Chunk types of a PNG, in order (for tests and diagnostics). */+export function pngChunks(buf) {+ const out = [];+ if (!Buffer.isBuffer(buf) || buf.length < 8 || !buf.subarray(0, 8).equals(SIG)) return out;+ for (let i = 8; i + 12 <= buf.length;) {+ const n = buf.readUInt32BE(i);+ out.push(buf.toString('latin1', i + 4, i + 8));+ i += 12 + n;+ }+ return out;+}++/** The PNG without its colour chunks; other chunks are copied byte for byte (CRCs intact). Non-PNG input is returned as is. */+export function stripColorChunks(buf) {+ if (!Buffer.isBuffer(buf) || buf.length < 8 || !buf.subarray(0, 8).equals(SIG)) return buf;+ const keep = [buf.subarray(0, 8)];+ let dropped = false;+ for (let i = 8; i + 12 <= buf.length;) {+ const n = buf.readUInt32BE(i);+ const end = i + 12 + n;+ if (end > buf.length) { keep.push(buf.subarray(i)); break; }+ if (COLOR_CHUNKS.has(buf.toString('latin1', i + 4, i + 8))) dropped = true;+ else keep.push(buf.subarray(i, end));+ i = end;+ }+ return dropped ? Buffer.concat(keep) : buf;+}diff --git a/skills/showtime/scripts/snap.mjs b/skills/showtime/scripts/snap.mjsindex 56db126..52e449f 100644--- a/skills/showtime/scripts/snap.mjs+++ b/skills/showtime/scripts/snap.mjs@@ -8,6 +8,7 @@ import { parseCli, runMain, info, c, fmtTime, parseTimes, parseTime, jobDir, worimport { openBrowser, openLab, parseSize } from './lib/stagehost.mjs';import { enclosingJob } from './lib/studio/paths.mjs';import { VIDEO_EXT, openSource } from './lib/frames.mjs';+import { stripColorChunks } from './lib/png.mjs';const SPEC = {name: 'snap',@@ -140,7 +141,7 @@ async function main() {if (w && w > W) notes.push(`upscaled ${W} -> ${w} px wide (no new detail)`);if (w && w !== W) out = await lab.resize(out, w, fmt === 'png' ? 'image/png' : 'image/jpeg', 0.92);else if (fmt === 'jpg') out = await lab.resize(out, W, 'image/jpeg', 0.92);- fs.writeFileSync(file, out);+ fs.writeFileSync(file, fmt === 'png' ? stripColorChunks(out) : out);stills.push({ at: x, t, frame: k, file });if (Math.abs(t - x) > 1e-4) notes.push(`${x} -> frame ${k} (${t.toFixed(3)} s)`);if (seen.has(k)) notes.push(`${x} shows the same frame as ${seen.get(k)} (frame ${k})`);diff --git a/skills/showtime/setup/agents/critic.md b/skills/showtime/setup/agents/critic.mdindex 382308c..9356590 100644--- a/skills/showtime/setup/agents/critic.md+++ b/skills/showtime/setup/agents/critic.md@@ -17,6 +17,8 @@ You are the critic on a showtime video crew. You are an honest second pair of ey2. Your task is the `CRITIC.md` path in the prompt (from `review-pack`). Write `FINDINGS.md` inthe same folder. With no CRITIC.md path, return BLOCKED: there is nothing to judge. A pairwise brief(`order-1/` or `order-2/`) compares X and Y: answer its PREFERENCE line and tag every finding [X] or [Y].+ Every FINDINGS.md also answers `WOULD I POST THIS: yes | no -- one reason` (pairwise: one line per+ video), judged on the video alone, never as "better than the last version".Non-negotiables (they hold even if a file fails to load):- You have no user: never ask anything. Finish what you can and return NEEDS_INPUT with a recommended answer.diff --git a/skills/showtime/setup/manifest.json b/skills/showtime/setup/manifest.jsonindex 0cd7781..8560a61 100644--- a/skills/showtime/setup/manifest.json+++ b/skills/showtime/setup/manifest.json@@ -45,7 +45,7 @@"description": "DeepFilterNet3 denoiser binary (~30 MB)"},"music-catalog": {- "description": "every produced-music catalog track (Scott Buckley, Kevin MacLeod, CC0/public domain; 249 tracks, about 2.4 GB), pre-fetched for offline use; otherwise each track downloads the first time a mix uses it",+ "description": "the produced-music catalog pre-fetched for offline use (Kevin MacLeod, CC0/public domain and other sources that allow it); Scott Buckley asks for no bulk downloads, so his tracks always download one at a time, the first time a mix uses them","first_use": true,"when": "each track the first time a mix uses it"},diff --git a/skills/showtime/setup/package.json b/skills/showtime/setup/package.jsonindex ae8b52a..0b81649 100644--- a/skills/showtime/setup/package.json+++ b/skills/showtime/setup/package.json@@ -1,6 +1,6 @@{"name": "showtime-runtime",- "version": "0.3.1",+ "version": "0.3.2","private": true,"description": "Node dependencies for showtime (installed by setup.py into ~/.showtime/node). Versions are pinned exactly. Icon sets are not installed here: they are fetched per icon on first use (manifest.json \"icon_packs\").","license": "MIT",diff --git a/skills/showtime/setup/setup.py b/skills/showtime/setup/setup.pyindex f2886b7..8937624 100755--- a/skills/showtime/setup/setup.py+++ b/skills/showtime/setup/setup.py@@ -50,6 +50,7 @@ LIB_DIR = SKILL_DIR / "lib"sys.path.insert(0, str(LIB_DIR))from st import __version__ # noqa: E402from st import platform as plat # noqa: E402+from st import mirror # noqa: E402UA = "showtime-setup/%s (+python urllib)" % __version__MANIFEST_PATH = SETUP_DIR / "manifest.json"@@ -383,6 +384,8 @@ def _download_urllib(url: str, part: Path, total: Optional[int], label: str,headers["Range"] = "bytes=%d-" % havereq = urllib.request.Request(url, headers=headers)with urllib.request.urlopen(req, timeout=60, context=ctx) as resp:+ if _looks_like_block_page(resp, url):+ raise mirror.Blocked("answered with a web page instead of the file (a proxy block page?)")code = getattr(resp, "status", 200)mode = "ab"if have and code != 206:@@ -410,46 +413,40 @@ def _download_curl(url: str, part: Path) -> None:raise RuntimeError("curl not available")cp = subprocess.run([curl, "-fL", "--retry", "3", "--connect-timeout", "30", "-A", UA,"-C", "-", "-o", str(part), url])+ if cp.returncode in (5, 6, 7, 22, 56): # no proxy/host, no connection, HTTP error, proxy refused+ raise mirror.Blocked("curl exited with %d" % cp.returncode)if cp.returncode not in (0, 33): # 33: range not satisfiable (already complete)raise RuntimeError("curl exited with %d" % cp.returncode)-def fetch(url: str, dest: Path, sha: Optional[str], size: Optional[int], seeds: Seeds,- label: str, verify: bool = False,- progress: Optional[Callable[[int, Optional[int]], None]] = None) -> str:- """Ensure `dest` holds the file. Returns 'present' | 'seeded' | 'downloaded'.+def _install_copy(src: Path, dest: Path) -> None:+ tmp = dest.with_name(dest.name + ".part")+ if tmp.exists():+ tmp.unlink()+ try:+ os.link(str(src), str(tmp)) # same filesystem: no second copy on disk+ except OSError:+ shutil.copyfile(str(src), str(tmp))+ replace_file(tmp, dest)- Seeds come first (a --seed folder, or a verified copy in a shared Hugging Face cache);- downloads resume from `<dest>.part`. `progress(done, total)` replaces the built-in- progress line (the runtime's lazy fetches report through showtime's own Progress)."""- dest.parent.mkdir(parents=True, exist_ok=True)- if dest.is_file() and (size is None or dest.stat().st_size == size):- if not verify or not sha or sha256_file(dest) == sha:- return "present"- say(" %s: checksum mismatch, re-downloading" % dest.name)- dest.unlink()- seeded = seeds.find(size, sha, url)- if seeded is not None:- tmp = dest.with_name(dest.name + ".part")- if tmp.exists():- tmp.unlink()- try:- os.link(str(seeded), str(tmp)) # same filesystem: no second copy on disk- except OSError:- shutil.copyfile(str(seeded), str(tmp))- replace_file(tmp, dest)- return "seeded"- if os.environ.get("SHOWTIME_OFFLINE", "") not in ("", "0", "false", "no"):- raise IOError("%s is not downloaded and SHOWTIME_OFFLINE is set (seed it with --seed DIR, "- "or run `showtime setup --full` on a connected machine)" % label)- part = dest.with_name(dest.name + ".part")++def _looks_like_block_page(resp: Any, url: str) -> bool:+ """A proxy that answers 200 with its own HTML page instead of the file."""+ ctype = str(resp.headers.get("Content-Type") or "").lower()+ return ctype.startswith("text/html") and not url.lower().split("?")[0].endswith((".html", ".htm"))+++def _fetch_from(url: str, part: Path, sha: Optional[str], size: Optional[int], label: str,+ progress: Optional[Callable[[int, Optional[int]], None]]) -> None:+ """Download `url` into `part` and verify it. Raises mirror.Blocked when this source will not serve the+ file (no retry), IOError after the retries for anything else. A checksum mismatch deletes the part."""last_err: Optional[BaseException] = Nonefor attempt in range(1, 5):try:try:_download_urllib(url, part, size, label, progress)except (ssl.SSLError, urllib.error.URLError) as e:- if isinstance(e, urllib.error.HTTPError) and e.code in (403, 404, 410):+ if mirror.blocked_reason(e) is not None:raiseif "CERTIFICATE" in str(e).upper() or isinstance(e, ssl.SSLError):say(" TLS verification failed in Python (%s); retrying with curl" % e)@@ -465,20 +462,67 @@ def fetch(url: str, dest: Path, sha: Optional[str], size: Optional[int], seeds:actual = sha256_file(part)if actual != sha:part.unlink()- raise IOError("sha256 mismatch for %s: got %s, expected %s" % (label, actual, sha))- replace_file(part, dest)- return "downloaded"- except urllib.error.HTTPError as e:- if e.code in (403, 404, 410):- raise IOError("%s: HTTP %d for %s" % (label, e.code, url))- last_err = e+ raise mirror.Blocked("sha256 mismatch: got %s, expected %s" % (actual, sha))+ returnexcept (IOError, OSError, RuntimeError, urllib.error.URLError, ssl.SSLError) as e:+ why = mirror.blocked_reason(e)+ if why is not None:+ raise mirror.Blocked(why)last_err = eif attempt < 4:wait = 3 * attemptsay(" %s: attempt %d failed (%s); retrying in %ds" % (label, attempt, last_err, wait))time.sleep(wait)- raise IOError("could not download %s: %s" % (label, last_err))+ raise IOError("%s" % last_err)+++def fetch(url: str, dest: Path, sha: Optional[str], size: Optional[int], seeds: Seeds,+ label: str, verify: bool = False,+ progress: Optional[Callable[[int, Optional[int]], None]] = None) -> str:+ """Ensure `dest` holds the file. Returns 'present' | 'seeded' | 'downloaded'.++ Seeds come first (a --seed folder, a verified copy in a shared Hugging Face cache, or a+ SHOWTIME_MODEL_MIRROR folder); downloads resume from `<dest>.part`. When the primary host is+ blocked (403, a proxy refusing the connection, no route) the file comes from the model mirror+ (st/mirror.py, mirror.json); every source is sha256-verified. `progress(done, total)` replaces+ the built-in progress line (the runtime's lazy fetches report through showtime's own Progress)."""+ dest.parent.mkdir(parents=True, exist_ok=True)+ if dest.is_file() and (size is None or dest.stat().st_size == size):+ if not verify or not sha or sha256_file(dest) == sha:+ return "present"+ say(" %s: checksum mismatch, re-downloading" % dest.name)+ dest.unlink()+ seeded = seeds.find(size, sha, url)+ if seeded is not None:+ _install_copy(seeded, dest)+ return "seeded"+ local = mirror.local_copy(url)+ if local is not None:+ if (size is None or local.stat().st_size == size) and (not sha or sha256_file(local) == sha):+ _install_copy(local, dest)+ return "seeded"+ say(" %s: %s in %s does not match the pinned checksum; ignored" % (label, local.name, local.parent))+ if os.environ.get("SHOWTIME_OFFLINE", "") not in ("", "0", "false", "no"):+ raise IOError("%s is not downloaded and SHOWTIME_OFFLINE is set (seed it with --seed DIR, "+ "or run `showtime setup --full` on a connected machine)" % label)+ part = dest.with_name(dest.name + ".part")+ tried: List[Tuple[str, str]] = []+ for src in mirror.sources(url):+ if tried:+ say(" %s: %s; trying the model mirror at %s" % (label, tried[-1][1], mirror.host(src)))+ try:+ _fetch_from(src, part, sha, size, label, progress)+ except mirror.Blocked as e:+ tried.append((src, str(e)))+ if src == url and not str(e).startswith("sha256"):+ mirror.mark_blocked(url, str(e))+ continue+ except IOError as e:+ tried.append((src, str(e)))+ continue+ replace_file(part, dest)+ return "downloaded"+ raise IOError(mirror.describe_failure(label, url, tried))# ==========================================================================@@ -1195,10 +1239,13 @@ class Installer:except ValueError:return "fail", "exit %d\n%s" % (cp.returncode, tail(cp.stdout, 8))done = len(rep.get("fetched", rep.get("installed", [])))- have = len(rep.get("cached", rep.get("skipped", [])))+ # music: "skipped" = tracks whose creator asks for no bulk downloads (they come on first use); packs: already there+ have = len(rep["cached"]) if "cached" in rep else len(rep.get("skipped", []))+ later = len(rep.get("skipped", [])) if "cached" in rep else 0failed = rep.get("failed") or []- msg = "%d downloaded, %d already present%s" % (done, have, ", %d failed (first: %s)" % (- len(failed), failed[0].get("error", "")[:120]) if failed else "")+ msg = "%d downloaded, %d already present%s%s" % (+ done, have, ", %d left for first use (their creator asks for no bulk downloads)" % later if later else "",+ ", %d failed (first: %s)" % (len(failed), failed[0].get("error", "")[:120]) if failed else "")return ("warn" if failed else "ok"), msgdef step_manimgl(self) -> Tuple[str, str]:diff --git a/skills/showtime/templates/data/audio/mix.json b/skills/showtime/templates/data/audio/mix.jsonindex 507b1f0..ade5a50 100644--- a/skills/showtime/templates/data/audio/mix.json+++ b/skills/showtime/templates/data/audio/mix.json@@ -2,7 +2,7 @@"_comment": "Generated music + sound design, no downloads. Times match index.html: sections start on the scenes (title, bars, lines, closing number) and the one chime lands when the count-up settles. A restrained underscore (strings, a soft piano pulse, no drums, no build or drop) keeps the numbers in front; no music is also fine for a team report (remove the bed). `showtime retime <project> -d <seconds>` moves them with the scenes. For narration add a voice track and duck the music under it.","sample_rate": 48000,"tracks": [- {"id": "bed", "kind": "music", "compose": {"style": "underscore", "key": "Dm", "sections": "0:intro,2.5:verse,7:chorus,11:outro", "seed": 1}, "gain_db": 0, "fade_out": 1.0},+ {"id": "bed", "kind": "music", "compose": {"style": "underscore", "sections": "0:intro,2.5:verse,7:chorus,11:outro", "seed": "auto"}, "gain_db": 0, "fade_out": 1.0},{"kind": "sfx", "synth": {"type": "chime", "key": "D", "intensity": 0.5, "seed": 5}, "at": 12.7, "align": "hit", "gain_db": -7}],"master": {"lufs": -14, "true_peak": -1}diff --git a/skills/showtime/templates/dom/audio/mix.json b/skills/showtime/templates/dom/audio/mix.jsonindex 451c327..a35fba6 100644--- a/skills/showtime/templates/dom/audio/mix.json+++ b/skills/showtime/templates/dom/audio/mix.json@@ -2,7 +2,7 @@"_comment": "Generated music + sound design, no downloads. Times are on the video timeline and match the scene cuts in index.html (music sections start on the scenes; each sfx sits on the beat it accents). `showtime retime <project> -d <seconds>` moves the scenes, these times and the poster together; after editing one scene by hand, move its sfx 'at' with it. Swap the music for a library track with {\"kind\": \"music\", \"lib\": \"<id>\", \"fit\": true} (showtime audio lib search --kind music --mood uplifting).","sample_rate": 48000,"tracks": [- {"id": "bed", "kind": "music", "compose": {"style": "upbeat-tech", "bpm": 120, "key": "D", "sections": "0:intro,6.8:build,9.8:drop,12.0:outro", "seed": 1}, "gain_db": 0, "fade_out": 1.0},+ {"id": "bed", "kind": "music", "compose": {"style": "upbeat-tech", "bpm": 120, "sections": "0:intro,6.8:build,9.8:drop,12.0:outro", "seed": "auto"}, "gain_db": 0, "fade_out": 1.0},{"kind": "sfx", "synth": {"type": "whoosh", "intensity": 0.6, "seed": 2}, "at": 2.4, "align": "hit", "gain_db": -3},{"kind": "sfx", "synth": {"type": "click", "seed": 3}, "at": 4.9, "align": "hit", "gain_db": -2},{"kind": "sfx", "synth": {"type": "keyclick", "seed": 4}, "at": 3.35, "align": "hit", "gain_db": -2},diff --git a/skills/showtime/templates/film/README.md b/skills/showtime/templates/film/README.mdindex 75a71d9..8e686e4 100644--- a/skills/showtime/templates/film/README.md+++ b/skills/showtime/templates/film/README.md@@ -4,7 +4,7 @@ A short explainer drawn on one canvas with the `Film` toolkit, scored with `Synt- `cues.js`: the ONE table of cut and hit times. Picture and music both read it, so a cut and its sound can never drift apart.- `scenes.js`: the picture. `scenes(T, g, F)` draws the whole frame for time T.-- `score.js`: the music and sound design, rendered offline to WAV by `showtime render`.+- `score.js`: the music and sound design, rendered offline to WAV by `showtime render`. `showtime new film` rewrites it for each project (key, tempo and meter, chords, motif, instruments, drums from the brief's mood, away from recent jobs' scores); `showtime audio film-score <dir> [--mood M]` writes another. For a mood piece "with music", a produced catalog track in a mix (`"audio"`) is usually the better bed (`references/music.md`).- `index.html`: loads fonts, the runtime and the three files above.Edit the words in `scenes.js`, then move cue times in `cues.js` if a section needs more room (scores read section lengths from the cue gaps).diff --git a/skills/showtime/templates/short/audio/mix.json b/skills/showtime/templates/short/audio/mix.jsonindex ccef85d..a372628 100644--- a/skills/showtime/templates/short/audio/mix.json+++ b/skills/showtime/templates/short/audio/mix.json@@ -2,7 +2,7 @@"_comment": "Generated music + sound design, no downloads. Times match index.html: the music sections start on the scenes, pops on the chat bubbles, ticks on the checklist's data-cues, the sting on the end card. `showtime retime <project> -d <seconds>` moves them with the scenes. When you add a voice track, put it here as {\"kind\": \"voice\", \"file\": \"voice/vo.wav\"} and add \"duck\": {\"under\": \"voice\"} to the music track. The mix follows the showtime.json duration.","sample_rate": 48000,"tracks": [- {"id": "bed", "kind": "music", "compose": {"style": "synthwave", "bpm": 100, "key": "Am", "sections": "0:intro,2.5:drop,9.8:outro", "seed": 1}, "gain_db": 0, "fade_out": 0.8},+ {"id": "bed", "kind": "music", "compose": {"style": "synthwave", "bpm": 100, "sections": "0:intro,2.5:drop,9.8:outro", "seed": "auto"}, "gain_db": 0, "fade_out": 0.8},{"kind": "sfx", "synth": {"type": "whoosh", "intensity": 0.5, "seed": 2}, "at": 2.5, "align": "hit", "gain_db": -4},{"kind": "sfx", "synth": {"type": "pop", "key": "A", "seed": 3}, "at": 2.8, "align": "hit", "gain_db": -3},{"kind": "sfx", "synth": {"type": "pop", "key": "E", "seed": 4}, "at": 4.4, "align": "hit", "gain_db": -3},diff --git a/skills/showtime/tests/test_downloads.py b/skills/showtime/tests/test_downloads.pyindex 3aced58..72c3782 100644--- a/skills/showtime/tests/test_downloads.py+++ b/skills/showtime/tests/test_downloads.py@@ -1,7 +1,7 @@#!/usr/bin/env python3"""Download tiers and first-use fetches: the manifest's tiers and `setup --plan` table, the lazy-fetchhook (announce, progress, resume, sha256, seeds, shared Hugging Face cache, offline errors) against a-local fixture server, audio packs, icon cache, headless-shell discovery, and the fp16 Kokoro NaN guard.+local fixture server, the model mirror for blocked hosts, audio packs, icon cache, headless-shell discovery, and the fp16 Kokoro NaN guard.No real network: every download comes from a 127.0.0.1 server started here.usage: python tests/test_downloads.py [--fast] [-v]@@ -48,6 +48,7 @@ def setup_mod():class _Handler(http.server.BaseHTTPRequestHandler):files: dict = {}hits: list = []+ codes: dict = {} # path -> HTTP status to answer instead (403: a proxy refusing the host)def log_message(self, *a): # quietpass@@ -55,6 +56,18 @@ class _Handler(http.server.BaseHTTPRequestHandler):def do_GET(self):body = self.files.get(self.path)self.hits.append((self.path, self.headers.get("Range")))+ if self.path in self.codes:+ self.send_response(self.codes[self.path])+ self.end_headers()+ return+ if isinstance(body, str): # a proxy's block page: 200, text/html+ page = body.encode("utf-8")+ self.send_response(200)+ self.send_header("Content-Type", "text/html; charset=utf-8")+ self.send_header("Content-Length", str(len(page)))+ self.end_headers()+ self.wfile.write(page)+ returnif body is None:self.send_response(404)self.end_headers()@@ -76,9 +89,10 @@ class _Handler(http.server.BaseHTTPRequestHandler):@contextlib.contextmanager-def fixture_server(files):+def fixture_server(files, codes=None):_Handler.files = dict(files)_Handler.hits = []+ _Handler.codes = dict(codes or {})srv = http.server.ThreadingHTTPServer(("127.0.0.1", 0), _Handler)t = threading.Thread(target=srv.serve_forever, daemon=True)t.start()@@ -398,6 +412,145 @@ class TestLazyFetch(unittest.TestCase):# ------------------------------------------------------------------ audio packs, icons, browser, kokoro+# ------------------------------------------------------------------ model mirror (blocked hosts)++def mirror_table(files, mirrors):+ """Swap mirror.json for `files` (primary url -> mirror file name) and `mirrors` (base URLs)."""+ from st import mirror+ saved = mirror.load()+ mirror.reset()+ mirror.load({"mirrors": list(mirrors), "files": [{"url": u, "file": n} for u, n in files.items()]})+ try:+ with env(SHOWTIME_MODEL_MIRROR=None):+ yield mirror+ finally:+ mirror.reset()+ mirror.load(saved)+++class TestModelMirror(unittest.TestCase):+ def test_primary_403_falls_back_to_mirror_and_remembers_the_host(self):+ a, b = os.urandom(40_000), os.urandom(30_000)+ with fixture_server({"/mirror/m--a.bin": a, "/mirror/m--b.bin": b},+ codes={"/hf/a.bin": 403, "/hf/b.bin": 403}) as (base, hits):+ it = item("fixture-mirror", base + "/hf/a.bin", a, "models/mm/a.bin")+ it["files"].append(item("x", base + "/hf/b.bin", b, "models/mm/b.bin")["files"][0])+ with fake_skill([it]) as (root, home), \+ mirror_table({base + "/hf/a.bin": "m--a.bin", base + "/hf/b.bin": "m--b.bin"}, [base + "/mirror/"]):+ _, err = capture_stderr(lambda: lazy.ensure_item("fixture-mirror", "a blocked host"))+ self.assertEqual((home / "models/mm/a.bin").read_bytes(), a)+ self.assertEqual((home / "models/mm/b.bin").read_bytes(), b)+ paths = [p for p, _r in hits]+ self.assertEqual(paths, ["/hf/a.bin", "/mirror/m--a.bin", "/mirror/m--b.bin"],+ "one 403 from a host sends its later files straight to the mirror")+ self.assertIn("HTTP 403", err)++ def test_block_page_and_bad_mirror_checksum(self):+ good = os.urandom(20_000)+ with fixture_server({"/hf/m.bin": "<html>Access denied by proxy</html>", "/bad/m--m.bin": os.urandom(20_000),+ "/good/m--m.bin": good}) as (base, hits):+ it = item("fixture-page", base + "/hf/m.bin", good, "models/pg/m.bin")+ with fake_skill([it]) as (root, home), \+ mirror_table({base + "/hf/m.bin": "m--m.bin"}, [base + "/bad/", base + "/good/"]):+ lazy.ensure_item("fixture-page", "a proxy block page")+ self.assertEqual((home / "models/pg/m.bin").read_bytes(), good,+ "a 200 web page is a block, a wrong checksum moves on to the next mirror")+ self.assertEqual([p for p, _r in hits], ["/hf/m.bin", "/bad/m--m.bin", "/good/m--m.bin"])++ def test_checksum_mismatch_is_an_error_and_nothing_is_kept(self):+ want = os.urandom(10_000)+ with fixture_server({"/mirror/m--m.bin": os.urandom(10_000)}, codes={"/hf/m.bin": 403}) as (base, hits):+ it = item("fixture-sha", base + "/hf/m.bin", want, "models/sha/m.bin")+ with fake_skill([it]) as (root, home), \+ mirror_table({base + "/hf/m.bin": "m--m.bin"}, [base + "/mirror/"]):+ with self.assertRaises(common.ShowtimeError) as cm:+ lazy.ensure_item("fixture-sha", "checksum test")+ self.assertIn("sha256 mismatch", str(cm.exception))+ self.assertFalse((home / "models/sha/m.bin").exists())+ self.assertFalse((home / "models/sha/m.bin.part").exists(), "a file failing its checksum is not kept")++ def test_env_override_folder_and_url(self):+ body = os.urandom(15_000)+ with fixture_server({"/own/m--m.bin": body, "/mirror/m--m.bin": body}, codes={"/hf/m.bin": 403}) as (base, hits):+ it = item("fixture-env", base + "/hf/m.bin", body, "models/env/m.bin")+ with fake_skill([it]) as (root, home), \+ mirror_table({base + "/hf/m.bin": "m--m.bin"}, [base + "/mirror/"]) as mirror:+ folder = root / "mirror-folder"+ folder.mkdir()+ (folder / "m--m.bin").write_bytes(body)+ with env(SHOWTIME_MODEL_MIRROR=folder):+ lazy.ensure_item("fixture-env", "a local mirror")+ self.assertEqual((home / "models/env/m.bin").read_bytes(), body)+ self.assertEqual(hits, [], "a mirror folder is used before any network")+ (home / "models/env/m.bin").unlink()+ with env(SHOWTIME_MODEL_MIRROR=folder, SHOWTIME_OFFLINE="1"):+ lazy.ensure_item("fixture-env", "a local mirror, offline")+ self.assertEqual((home / "models/env/m.bin").read_bytes(), body)+ (home / "models/env/m.bin").unlink()+ with env(SHOWTIME_MODEL_MIRROR=base + "/own"):+ self.assertEqual(mirror.bases(), [base + "/own/", base + "/mirror/"])+ lazy.ensure_item("fixture-env", "an own mirror")+ self.assertEqual([p for p, _r in hits], ["/hf/m.bin", "/own/m--m.bin"], "the override comes first")+ with env(SHOWTIME_MODEL_MIRROR="off"):+ self.assertEqual((mirror.bases(), mirror.local_dirs()), ([], []))+ self.assertEqual(mirror.sources(base + "/hf/m.bin"), [base + "/hf/m.bin"])++ def test_everything_blocked_names_hosts_and_the_override(self):+ body = os.urandom(5_000)+ with fixture_server({}, codes={"/hf/m.bin": 403, "/mirror/m--m.bin": 403}) as (base, hits):+ it = item("fixture-all", base + "/hf/m.bin", body, "models/all/m.bin")+ with fake_skill([it]) as (root, home), \+ mirror_table({base + "/hf/m.bin": "m--m.bin"}, [base + "/mirror/"]):+ with self.assertRaises(common.ShowtimeError) as cm:+ lazy.ensure_item("fixture-all", "everything blocked")+ msg = str(cm.exception)+ self.assertIn("127.0.0.1 (HTTP 403)", msg)+ self.assertIn("SHOWTIME_MODEL_MIRROR", msg)+ self.assertIn("m--m.bin", msg, "the file to put in a mirror folder is named")+ self.assertLess(len(msg), 600)++ def test_proxy_refusal_counts_as_blocked(self):+ import socket+ import urllib.error+ from st import mirror+ self.assertTrue(mirror.blocked_reason(urllib.error.URLError(OSError("Tunnel connection failed: 403 Forbidden"))))+ self.assertTrue(mirror.blocked_reason(urllib.error.URLError(socket.gaierror(8, "nodename nor servname"))))+ self.assertIsNone(mirror.blocked_reason(urllib.error.URLError(ConnectionResetError("reset"))), "retried")+ self.assertIsNone(mirror.blocked_reason(IOError("size mismatch for x: got 1, expected 2")), "resumed")++ def test_probe_mirror_folder(self):+ from st import sandbox+ with env(SHOWTIME_MODEL_MIRROR=TESTS_DIR):+ ok, detail = sandbox.probe_mirror()+ self.assertTrue(ok)+ self.assertIn(str(TESTS_DIR), detail)++ def test_mirror_json_matches_the_pinned_files(self):+ """Every mirrored file is a pinned download (same url, size and sha256) with a license, and the names are+ valid release-asset names; the default install's Hugging Face and GitHub LFS files are all mirrored."""+ import re+ from st import mirror+ from st.voice import models as vm+ data = json.loads(mirror.MANIFEST.read_text(encoding="utf-8"))+ self.assertEqual(data["mirrors"][0], "https://github.com/FavioVazquez/showtime/releases/download/%s/" % data["tag"])+ pinned = {f["url"]: (f["size"], f["sha256"]) for it in MAN["items"] for f in it.get("files", [])}+ for remote, _local, size, sha in (vm.W2V_VARIANTS["q8"], vm.W2V_VOCAB):+ pinned[vm.W2V_BASE + remote] = (size, sha)+ names = [f["file"] for f in data["files"]]+ self.assertEqual(len(names), len(set(names)))+ for f in data["files"]:+ self.assertEqual((f["size"], f["sha256"]), pinned.get(f["url"]), f["file"])+ self.assertRegex(f["file"], r"^[A-Za-z0-9._-]+$")+ self.assertTrue(f["license"] and f["license_url"].startswith("https://") and f["attribution"], f["file"])+ mirrored = {f["url"] for f in data["files"]}+ for it in MAN["items"]:+ if it.get("tier") in ("minimal", "core", "lazy"):+ for f in it.get("files", []):+ if re.match(r"https://(huggingface\.co|github\.com/[^/]+/[^/]+/raw/)", f["url"]):+ self.assertIn(f["url"], mirrored, "%s is not mirrored" % f["url"])++class TestPacksIconsBrowser(unittest.TestCase):def test_library_parts_partition(self):from st.audio import libparts as packsdiff --git a/skills/showtime/tests/test_floor.py b/skills/showtime/tests/test_floor.pynew file mode 100644index 0000000..c2e1eee--- /dev/null+++ b/skills/showtime/tests/test_floor.py@@ -0,0 +1,235 @@+#!/usr/bin/env python3+"""The quality floor (st.qa.floor): each looks-cheap detector fires on a synthetic frame that has the+pattern and stays quiet on one that does not.++ * player_chrome a progress bar with glyphs at both ends, inside a recorded page / a divider line alone+ * soft_footage screen text upscaled 4x / the same text rendered crisp+ * caption_boxes two stacked boxes of different widths / one plate for both lines+ * empty_borders a 16:9 recording across a square frame with flat borders / a filled frame, and a title+ on a flat ground (loose content, not a picture)+Then one encoded video through `showtime qa` (the hook, the time ranges, WARN only) and a clean one.++Stdlib + numpy + Pillow + ffmpeg (the showtime environment). usage: python tests/test_floor.py [--fast] [-v]+"""+from __future__ import annotations++import _isolate # noqa: F401 (run from a scratch folder: never write into the repository)++import json+import shutil+import subprocess+import sys+import tempfile+import time+import unittest+from pathlib import Path++TESTS_DIR = Path(__file__).resolve().parent+SKILL = TESTS_DIR.parent+LAUNCHER = SKILL / "lib" / "st" / "launcher.py"+sys.path.insert(0, str(SKILL / "lib"))++import numpy as np # noqa: E402+from PIL import Image, ImageDraw, ImageFont # noqa: E402++from st import ff # noqa: E402+from st.launcher import build_env, showtime_home # noqa: E402+from st.qa import floor # noqa: E402++ENV = build_env(showtime_home())+++def font(px):+ try:+ return ImageFont.load_default(size=max(6, int(px)))+ except TypeError: # Pillow < 10.1: a fixed bitmap font+ return ImageFont.load_default()+++def page(w, h, scale=1.0, ground=245, ink=30):+ """A recorded page: rows of code-like text and a panel outline (crisp at scale 1)."""+ im = Image.new("L", (w, h), ground)+ d = ImageDraw.Draw(im)+ f = font(22 * scale)+ for i in range(int(h / (34 * scale))):+ d.text((int(40 * scale), int((14 + i * 34) * scale)),+ "def step(batch_%02d): loss = model(batch_%02d).mean() # %s" % (i, i, "x" * (3 + (i * 7) % 20)),+ fill=ink, font=f)+ d.rectangle([int(w * 0.62), int(h * 0.08), int(w * 0.95), int(h * 0.45)], outline=60, width=max(1, int(2 * scale)))+ return im+++def with_player(im):+ """A web player's strip near the bottom of the recording: a thin bar, play and fullscreen glyphs."""+ w, h = im.size+ d = ImageDraw.Draw(im)+ y = int(h * 0.86)+ d.rectangle([0, y - int(h * 0.07), w, h], fill=20) # the dark control overlay+ x0, x1 = int(w * 0.06), int(w * 0.94)+ d.rectangle([x0, y, x1, y + 3], fill=110) # the track+ d.rectangle([x0, y, int(w * 0.4), y + 3], fill=235) # the played part+ gy = y - int(h * 0.05)+ d.rectangle([x0 + 4, gy, x0 + 9, gy + 16], fill=235) # pause+ d.rectangle([x0 + 14, gy, x0 + 19, gy + 16], fill=235)+ d.text((x0 + 34, gy), "0:12 / 0:45", fill=235, font=font(16))+ for k in range(3): # volume, fullscreen, menu+ cx = x1 - 10 - k * 34+ d.rectangle([cx - 8, gy, cx + 8, gy + 16], outline=235, width=2)+ return im+++def caption(im, lines, stepped, top_frac):+ """Burned captions: one box per line (stepped) or one plate for both."""+ w, h = im.size+ d = ImageDraw.Draw(im)+ f = font(h * 0.045)+ lh = int(h * 0.065)+ y = int(h * top_frac)+ widths = [int(d.textlength(t, font=f)) + int(w * 0.05) for t in lines]+ if not stepped:+ bw = max(widths)+ d.rectangle([(w - bw) // 2, y, (w + bw) // 2, y + lh * len(lines)], fill=45)+ for i, t in enumerate(lines):+ if stepped:+ d.rectangle([(w - widths[i]) // 2, y + i * lh, (w + widths[i]) // 2, y + (i + 1) * lh], fill=45)+ d.text(((w - widths[i]) // 2 + int(w * 0.025), y + i * lh + int(lh * 0.12)), t, fill=240, font=f)+ return im+++def framed(size=720, rec=(640, 360), top=60, ground=12, player=False, lines=None, stepped=True):+ """A recording pasted into a square frame with flat borders, captions below it."""+ im = Image.new("L", (size, size), ground)+ r = page(*rec, scale=rec[0] / 1280.0 * 1.6)+ if player:+ r = with_player(r)+ im.paste(r, ((size - rec[0]) // 2, top))+ if lines:+ caption(im, lines, stepped, (top + rec[1] + 24) / float(size))+ return im+++def arr(im):+ return np.asarray(im.convert("L"))+++class Findings:+ def __init__(self):+ self.items = []++ def add(self, rule, severity, message, **extra):+ self.items.append(dict(extra, rule=rule, severity=severity, message=message))+++class Detectors(unittest.TestCase):+ def test_player_chrome(self):+ rec = with_player(page(1280, 720))+ self.assertIsNotNone(floor.player_strip(arr(rec)))+ self.assertIsNone(floor.player_strip(arr(page(1280, 720))))+ line = page(1280, 720)+ ImageDraw.Draw(line).rectangle([100, 650, 1180, 652], fill=30) # a divider alone: no glyphs at its ends+ ImageDraw.Draw(line).rectangle([0, 600, 1280, 720], fill=245)+ ImageDraw.Draw(line).rectangle([100, 650, 1180, 652], fill=30)+ self.assertIsNone(floor.player_strip(arr(line)))++ def test_soft_footage(self):+ crisp = arr(page(1280, 720))+ soft = arr(page(320, 180, scale=0.25).resize((1280, 720), Image.BICUBIC))+ self.assertFalse(floor.is_soft(crisp)[0], floor.sharpness(crisp))+ ok, s = floor.is_soft(soft)+ self.assertTrue(ok, s)+ self.assertLess(s["ratio"], floor.SOFT_RATIO)++ def test_caption_boxes(self):+ two = ["One sentence in,", "a finished video out, every time"]+ st = arr(caption(page(1280, 720, ground=90, ink=160), two, True, 0.7))+ self.assertTrue(floor.stepped(floor.caption_boxes(st), 1280), floor.caption_boxes(st))+ one = arr(caption(page(1280, 720, ground=90, ink=160), two, False, 0.7))+ self.assertFalse(floor.stepped(floor.caption_boxes(one), 1280), floor.caption_boxes(one))++ def test_empty_borders(self):+ b = floor.picture_box(arr(framed()))+ self.assertIsNotNone(b)+ self.assertLess((b[2] - b[0]) * (b[3] - b[1]), 0.7 * 720 * 720)+ self.assertIsNone(floor.picture_box(arr(page(1280, 720)))) # the recording fills the frame+ title = Image.new("L", (1280, 720), 12)+ ImageDraw.Draw(title).text((380, 300), "Describe a video.", fill=240, font=font(64))+ self.assertIsNone(floor.picture_box(arr(title))) # loose content, not a picture++ def test_check_needs_repeats(self):+ """One stray frame never warns; the same pattern across sampled frames does, with its time range."""+ bad = arr(framed(player=True, lines=["One sentence in,", "a finished video out"]))+ good = arr(page(720, 720))+ F = Findings()+ floor.check(F, None, 9.0, 720, 720, frames=[(1.5, bad), (4.5, good), (7.5, good)])+ self.assertEqual(F.items, [])+ F = Findings()+ out = floor.check(F, None, 9.0, 720, 720, frames=[(1.5, bad), (4.5, bad), (7.5, good)])+ rules = {f["rule"]: f for f in F.items}+ self.assertEqual(set(rules), {"player_chrome", "caption_boxes", "empty_borders"}, F.items)+ self.assertTrue(all(f["severity"] == "WARN" for f in F.items))+ self.assertEqual((rules["caption_boxes"]["t"], rules["caption_boxes"]["end"]), (1.5, 4.5))+ self.assertIn("1.5-4.5s", rules["player_chrome"]["message"])+ self.assertEqual(out["frames"], 3)+ # pure motion graphics (no footage): no player or border judgement, captions still judged+ F = Findings()+ floor.check(F, None, 9.0, 720, 720, footage=False, frames=[(1.5, bad), (4.5, bad), (7.5, good)])+ self.assertEqual({f["rule"] for f in F.items}, {"caption_boxes"})+++def encode(frames, out, fps=2):+ h, w = frames[0].shape+ cp = subprocess.run([ff.ffmpeg_path(), "-v", "error", "-nostdin", "-y", "-f", "rawvideo", "-pix_fmt", "gray",+ "-s", "%dx%d" % (w, h), "-r", str(fps), "-i", "-", "-f", "lavfi", "-i",+ "sine=frequency=440:sample_rate=48000", "-shortest", "-c:v", "libx264", "-crf", "16",+ "-pix_fmt", "yuv420p", "-c:a", "aac", "-movflags", "+faststart", str(out)],+ input=b"".join(f.tobytes() for f in frames), stdout=subprocess.PIPE, stderr=subprocess.PIPE,+ timeout=120)+ assert cp.returncode == 0, cp.stderr.decode("utf-8", "replace")+++class QaRun(unittest.TestCase):+ @classmethod+ def setUpClass(cls):+ cls.tmp = Path(tempfile.mkdtemp(prefix="st-floor-"))++ @classmethod+ def tearDownClass(cls):+ shutil.rmtree(str(cls.tmp), ignore_errors=True)++ def qa(self, video):+ cp = subprocess.run([sys.executable, str(LAUNCHER), "qa", str(video), "--json"], env=ENV, stdout=subprocess.PIPE,+ stderr=subprocess.PIPE, encoding="utf-8", errors="replace", timeout=300)+ self.assertIn(cp.returncode, (0, 1), cp.stderr[-2000:])+ return json.loads(cp.stdout)++ def test_cheap_clip_warns_clean_clip_does_not(self):+ bad = arr(framed(player=True, lines=["One sentence in,", "a finished video out"]))+ encode([bad] * 12, self.tmp / "cheap.mp4")+ rep = self.qa(self.tmp / "cheap.mp4")+ got = {f["rule"]: f for f in rep["findings"] if f["rule"] in floor.RULES}+ self.assertEqual(set(got), {"player_chrome", "caption_boxes", "empty_borders"}, rep["findings"])+ self.assertTrue(all(f["severity"] == "WARN" and f.get("end") is not None for f in got.values()))+ self.assertIn("fix", got["caption_boxes"])+ self.assertEqual(rep["floor"]["frames"], len(floor.sample_times(6.0))) # 12 frames at 2 fps, one per 1.5 s+ clean = arr(caption(page(720, 720, ground=90, ink=160), ["One sentence in,", "a finished video out"], False, 0.75))+ encode([clean] * 12, self.tmp / "clean.mp4")+ rep = self.qa(self.tmp / "clean.mp4")+ self.assertEqual([f for f in rep["findings"] if f["rule"] in floor.RULES], [])++ def test_rules_are_documented(self):+ doc = (SKILL / "references" / "qa.md").read_text(encoding="utf-8")+ from st.qa import video as V+ for rule in floor.RULES:+ self.assertIn(rule, V.RULES)+ self.assertIn("`%s`" % rule, doc)+++if __name__ == "__main__":+ argv = [a for a in sys.argv if a != "--fast"]+ t0 = time.time()+ prog = unittest.main(argv=argv, exit=False, verbosity=2 if "-v" in argv else 1)+ res = prog.result+ n = res.testsRun - len(res.skipped)+ print("\n%d checks passed, %d skipped in %.1fs" % (n - len(res.failures) - len(res.errors), len(res.skipped),+ time.time() - t0))+ sys.exit(0 if res.wasSuccessful() else 1)diff --git a/skills/showtime/tests/test_music.py b/skills/showtime/tests/test_music.pyindex bc9f931..705bbb8 100644--- a/skills/showtime/tests/test_music.py+++ b/skills/showtime/tests/test_music.py@@ -41,6 +41,7 @@ import sysimport tempfileimport threadingimport time+from unittest import mockimport unittestimport zipfilefrom pathlib import Path@@ -310,6 +311,190 @@ class CatalogTests(unittest.TestCase):self.assertEqual(music.pick("launch")["id"], best)+class RotationTests(unittest.TestCase):+ """Music variety: recent jobs' tracks and composers rank lower, lists mix composers, the history+ warns on a repeated track or composer, `"seed": "auto"` moves a composed bed's key."""++ def setUp(self):+ music._CAT.clear()+ self.hist = Path(tempfile.mkdtemp(prefix="st-music-hist-"))+ self.old = {k: os.environ.get(k) for k in ("SHOWTIME_HISTORY_DIR", "SHOWTIME_HISTORY", "SHOWTIME_MUSIC_ROTATION",+ "SHOWTIME_MUSIC_CATALOG")}+ os.environ["SHOWTIME_HISTORY_DIR"] = str(self.hist)+ for k in ("SHOWTIME_HISTORY", "SHOWTIME_MUSIC_ROTATION", "SHOWTIME_MUSIC_CATALOG"):+ os.environ.pop(k, None)+ from st.variety import history+ self.h = history++ def tearDown(self):+ for k, v in self.old.items():+ if v is None:+ os.environ.pop(k, None)+ else:+ os.environ[k] = v+ music._CAT.clear()+ shutil.rmtree(self.hist, ignore_errors=True)++ def finish(self, name, t, query=None):+ """What `qa` records for a finished job whose mix used track t."""+ row = {"ref": "catalog:" + t["id"], "shelf": t["shelf"], "artist": music.artist_of(t)}+ if query:+ row["query"] = music.query_key(query)+ self.h.record({"job": name, "job_path": "/jobs/" + name, "project": "/projects/" + name, "music": [row]})++ def run_jobs(self, use, n=8):+ got = []+ for i in range(n):+ name = "%s-%d" % (use, i)+ t = music.resolve({"use": use}, dur=45, key="/projects/" + name)+ got.append(t)+ self.finish(name, t, {"use": use})+ return got++ def test_01_rotation_across_similar_jobs(self):+ for use in ("launch", "explainer", "social"):+ for f in self.hist.glob("*"):+ f.unlink()+ got = self.run_jobs(use)+ ids = [t["id"] for t in got]+ self.assertGreaterEqual(len(set(ids)), 6, (use, ids))+ top = max(ids.count(i) for i in ids)+ self.assertLessEqual(top, 2, (use, ids))+ per = {}+ for t in got:+ per[music.artist_of(t)] = per.get(music.artist_of(t), 0) + 1+ self.assertLessEqual(max(per.values()), 4, (use, per)) # no composer above 50 %+ # a track heard in the last jobs says so in the ranking+ res = music.search(use="social", limit=0)+ heard = [r for r in res if r["track"]["id"] in ids]+ self.assertTrue(heard and all("heard recently" in r["why"] for r in heard))++ def test_02_first_pick_is_the_best_and_ids_win(self):+ plain = music.pick("launch", dur=45, rotate=False)+ self.assertEqual(music.pick("launch", dur=45)["id"], plain["id"]) # nothing recorded yet+ self.finish("a", plain)+ self.assertNotEqual(music.pick("launch", dur=45)["id"], plain["id"])+ self.assertEqual(music.resolve(plain["id"])["id"], plain["id"]) # an explicit id always wins+ self.assertEqual(music.resolve({"id": plain["id"]})["id"], plain["id"])++ def test_03_reproducible_and_pinned(self):+ self.run_jobs("launch", 3)+ a = music.resolve({"use": "launch"}, dur=45, key="/projects/next")+ self.assertEqual(music.resolve({"use": "launch"}, dur=45, key="/projects/next")["id"], a["id"])+ self.finish("next", a, {"use": "launch"})+ self.run_jobs("launch", 2) # more jobs later: the recorded job keeps its track+ self.assertEqual(music.resolve({"use": "launch"}, dur=45, key="/projects/next")["id"], a["id"])++ def test_04_off_switches(self):+ plain = [r["track"]["id"] for r in music.search(use="launch", dur=45, rotate=False)]+ self.run_jobs("launch", 3)+ self.assertNotEqual([r["track"]["id"] for r in music.search(use="launch", dur=45)], plain)+ os.environ["SHOWTIME_MUSIC_ROTATION"] = "off"+ self.assertIsNone(music.rotation())+ self.assertEqual([r["track"]["id"] for r in music.search(use="launch", dur=45)], plain)+ os.environ.pop("SHOWTIME_MUSIC_ROTATION")+ os.environ["SHOWTIME_HISTORY"] = "off" # `showtime history off`: nothing recorded, nothing demoted+ self.assertEqual(music.rotation()["recent"], [])+ self.assertEqual([r["track"]["id"] for r in music.search(use="launch", dur=45)], plain)+ self.assertIsNone(self.h.record({"job": "x", "music": []}))++ def test_05_old_history_files_load(self):+ """Entries recorded before rows carried an artist (or a query) still rotate and warn."""+ self.h.file().parent.mkdir(parents=True, exist_ok=True)+ self.h.file().write_text(json.dumps({"schema": 1, "about": "showtime look history", "looks": [+ "junk", {"job": "old", "project": "/projects/old", "theme": "bold",+ "music": [{"ref": "catalog:buckley-with-these-hands", "shelf": "inspiring"},+ {"ref": "compose:underscore", "style": "underscore"}, {"ref": "score:synth"}]}]}),+ encoding="utf-8")+ rec = music.recent_music()+ self.assertEqual(rec[0]["tracks"], ["buckley-with-these-hands"])+ self.assertEqual(rec[0]["artists"], ["Scott Buckley"])+ self.assertEqual(rec[0]["composed"], ["underscore"])+ self.assertNotEqual(music.pick("launch", dur=45)["id"], "buckley-with-these-hands")++ def test_06_lists_mix_composers(self):+ for use in ("launch", "explainer", "social", "trailer", "data", "promo"):+ res = music.search(use=use, dur=45, limit=10)+ top = [music.artist_of(r["track"]) for r in res[:5]]+ self.assertLessEqual(max(top.count(a) for a in top), 2, (use, top))+ rows = [{"track": {"id": "t%d" % i, "artist": a}, "score": s} for i, (a, s) in enumerate(+ [("A", 5.0), ("A", 4.9), ("A", 4.8), ("B", 4.5), ("A", 4.4), ("C", 1.0)])]+ self.assertEqual([r["track"]["id"] for r in music.diversify(rows)], ["t0", "t1", "t3", "t2", "t4", "t5"])+ # a clearly better track keeps its place+ rows[3]["score"] = 3.0+ self.assertEqual([r["track"]["id"] for r in music.diversify(rows)][:3], ["t0", "t1", "t2"])++ def test_07_history_warns_on_track_and_composer(self):+ t = music.get("buckley-with-these-hands")+ self.finish("one", t)+ same = {"job": "two", "project": "/projects/two", "kind": "launch",+ "music": [{"ref": "catalog:" + t["id"], "shelf": t["shelf"], "artist": "Scott Buckley"}]}+ res = self.h.check(same)+ rep = next(r for r in res["repeats"] if r["aspect"] == "music")+ self.assertIn("the same track", rep["detail"])+ self.assertEqual(res["level"], "warning")+ self.assertEqual(len(rep["alternatives"]), 2)+ self.assertFalse([a for a in rep["alternatives"] if "Scott Buckley" in a or t["id"] in a], rep["alternatives"])+ other = music.get("buckley-aphelion")+ near = dict(same, music=[{"ref": "catalog:" + other["id"], "shelf": other["shelf"], "artist": "Scott Buckley"}])+ rep = next(r for r in self.h.check(near)["repeats"] if r["aspect"] == "music")+ self.assertIn("the same composer (Scott Buckley)", rep["detail"])+ self.assertIn("the same composer", self.h.message(self.h.check(near)))++ def test_08_composed_bed_key_follows_the_seed(self):+ from st.audio import compose+ self.assertEqual(compose.auto_key("underscore", 0), compose.STYLES["underscore"]["key"])+ keys = {compose.auto_key("underscore", s) for s in range(7)}+ self.assertGreaterEqual(len(keys), 5)+ self.assertTrue(all(k.endswith("m") for k in keys)) # the mode is kept+ self.assertTrue(all(not k.endswith("m") for k in (compose.auto_key("upbeat-tech", s) for s in range(7))))++ def film_project(self, name):+ p = self.hist / name+ shutil.copytree(SKILL / "templates" / "film", p, ignore=shutil.ignore_patterns("README.md"))+ return p++ def test_09_film_scores_vary(self):+ """The film template's score is written per project: 8 similar jobs in a row get different scores."""+ from st.audio import filmscore+ from st.variety import look+ prompts = ["Make a 12-second launch teaser for Tidepool, with music", "a birthday video with music",+ "a meditation app intro with music", "a sci-fi trailer with music", "a cooking channel intro with music",+ "a hackathon recap with music", "a quarterly update with music", "a launch teaser for Orbit, with music"]+ self.assertEqual([filmscore.mood_of(p) for p in prompts[1:4]], ["playful", "calm", "tension"])+ sigs = []+ for i, brief in enumerate(prompts):+ p = self.film_project("film-%d" % i)+ sig = filmscore.apply(p, brief=brief)+ self.assertEqual(filmscore.read_signature(p), sig)+ self.assertIn("bpm: %g," % sig["bpm"], (p / "cues.js").read_text(encoding="utf-8"))+ self.assertIn("beatsPerBar: %d" % sig["meter"], (p / "score.js").read_text(encoding="utf-8"))+ self.assertEqual(3.0 * sig["bpm"] / 60 % sig["meter"], 0, sig) # the 3 s cue gaps stay on bar lines+ lk = look.project_look(p)+ self.assertEqual(lk["music"][0]["signature"], sig)+ self.h.record(dict(lk, job="film-%d" % i))+ sigs.append(sig)+ self.assertGreaterEqual(len({filmscore.signature_id(s) for s in sigs}), 6)+ for a, b in zip(sigs, sigs[1:]):+ self.assertNotEqual((a["key"], a["bpm"]), (b["key"], b["bpm"]))+ # a hand-written score is kept; --force replaces it+ p = self.film_project("mine")+ (p / "score.js").write_text("var FILM_SCORE = null; // mine\n", encoding="utf-8")+ self.assertIsNone(filmscore.apply(p))+ self.assertTrue(filmscore.apply(p, force=True, mood="calm"))++ def test_10_history_warns_on_a_repeated_score(self):+ from st.variety import look+ a, b = self.film_project("same-a"), self.film_project("same-b") # the template's score, copied unchanged+ self.h.record(dict(look.project_look(a), job="same-a"))+ res = self.h.check(dict(look.project_look(b), job="same-b"))+ rep = next(r for r in res["repeats"] if r["aspect"] == "music")+ self.assertIn("the same score", rep["detail"])+ self.assertEqual(len(rep["alternatives"]), 2, rep["alternatives"])+ self.assertIn("showtime audio film-score", rep["alternatives"][0])+ self.assertTrue(rep["alternatives"][1].startswith("catalog:"), rep["alternatives"])++class FetchTests(unittest.TestCase):def setUp(self):self.srv_dir = Path(tempfile.mkdtemp(prefix="st-music-srv-"))@@ -486,8 +671,9 @@ class FetchTests(unittest.TestCase):def test_14_setup_prefetches_for_offline(self):- """`setup --with music-catalog` (part of the full tier) fetches every track; with --seed and no network it- copies them from a folder of earlier downloads."""+ """`setup --with music-catalog` (part of the full tier) fetches every track whose creator allows bulk+ downloads (Scott Buckley does not: his come on first use); with --seed and no network it copies them from a+ folder of earlier downloads."""with serve(self.srv_dir) as url, Env(fixture_catalog(url, self.blob)) as env:def setup(home, *extra, offline=False):home.mkdir(parents=True)@@ -506,12 +692,13 @@ class FetchTests(unittest.TestCase):rows = {r["component"]: r for r in json.loads(cp.stdout)["results"]}return rows["music-catalog"]r = setup(env.dir / "h1")- self.assertEqual((r["status"], r["detail"]), ("ok", "2 downloaded, 0 already present"), r)- self.assertEqual(len(list((env.dir / "h1" / "music").rglob("*.wav"))), 2)+ self.assertEqual((r["status"], r["detail"]), ("ok", "1 downloaded, 0 already present, 1 left for first use "+ "(their creator asks for no bulk downloads)"), r)+ self.assertEqual(len(list((env.dir / "h1" / "music").rglob("*.wav"))), 1)seed = env.dir / "h1" / "music"- r = setup(env.dir / "h2", "--seed", str(seed / "buckley"), "--seed", str(seed / "incompetech"), offline=True)+ r = setup(env.dir / "h2", "--seed", str(seed / "incompetech"), offline=True)self.assertEqual(r["status"], "ok", r)- self.assertEqual(len(list((env.dir / "h2" / "music").rglob("*.wav"))), 2)+ self.assertEqual(len(list((env.dir / "h2" / "music").rglob("*.wav"))), 1)class CreditsTests(unittest.TestCase):@@ -686,6 +873,25 @@ class OpenverseTests(unittest.TestCase):self.assertEqual((q["source"], q["category"]), (["jamendo"], ["music"]))+class BulkPolicyTests(unittest.TestCase):+ def test_45_bulk_skips_no_bulk_sources(self):+ # a creator who asks for no bulk downloads is never pre-fetched in bulk; a named track still is+ from st.audio import music+ ts = [t for t in music.tracks(include_vetoed=False) if t["source"] == "buckley"][:2] + \+ [t for t in music.tracks(include_vetoed=False) if t["source"] == "incompetech"][:1]+ got = []+ with mock.patch.object(music, "is_cached", lambda t: False), \+ mock.patch.object(music, "fetch", lambda t, **kw: got.append(t["id"])):+ rep = music.fetch_many(ts, bulk=True)+ self.assertEqual(got, [ts[2]["id"]])+ self.assertEqual(rep["skipped"], [ts[0]["id"], ts[1]["id"]])+ got.clear()+ rep = music.fetch_many(ts[:1])+ self.assertEqual(got, [ts[0]["id"]])+ self.assertFalse(music.bulk_allowed(ts[0]))+ self.assertTrue(music.bulk_allowed(ts[2]))++class CliTests(unittest.TestCase):def test_40_cli(self):r = json.loads(launcher("audio", "music", "search", "--for", "launch", "--limit", "3", "--json").stdout)diff --git a/skills/showtime/tests/test_pairwise.py b/skills/showtime/tests/test_pairwise.pyindex e7eb6b8..bde1efd 100644--- a/skills/showtime/tests/test_pairwise.py+++ b/skills/showtime/tests/test_pairwise.py@@ -81,6 +81,19 @@ class PairwiseRule(unittest.TestCase):for p1, p2 in (("X", "Y"), ("Y", "X"), ("tie", "tie"), ("X", "tie"), ("tie", "X"), ("Y", "Y")):self.assertFalse(pw.decide(p1, p2, "X")[0], (p1, p2))self.assertIn("split", pw.decide("X", "Y", "X")[1])++ def test_would_post(self):+ """The absolute verdict per video: either critic's "no" wins; a missing line is no answer."""+ from st.qa import pairwise as pw+ yes = pw.parse_findings(findings("X", "X", "Y", "WOULD I POST X: yes -- crisp\nWOULD I POST Y: no -- soft\n"))+ self.assertEqual(yes["would_post"], {"X": ("yes", "crisp"), "Y": ("no", "soft")})+ no = pw.parse_findings(findings("X", "Y", "X", "WOULD I POST X: no -- stepped caption boxes\n"+ "WOULD I POST Y: no -- soft\n"))+ self.assertEqual(pw.would_post([yes, no], "X"), {"answer": "no", "reason": "stepped caption boxes"})+ self.assertEqual(pw.would_post([yes, yes], "X")["answer"], "yes")+ self.assertIsNone(pw.would_post([yes, pw.parse_findings(findings("X", "X", "Y"))], "X")["answer"])+ tmpl = pw.parse_findings(findings("X", "X", "Y", "WOULD I POST X: yes | no -- one reason\n"))+ self.assertEqual(tmpl["would_post"], {})self.assertIn("old preferred in both", pw.decide("Y", "Y", "X")[1])def test_parse(self):@@ -177,7 +190,8 @@ class PairwisePack(unittest.TestCase):self.assertIn("compare-YX.jpg", b2)for b in (b1, b2):for word in ("PREFERENCE", "Blocker", "Should-fix", "Polish", "No scores", "DECLINED TO JUDGE",- "type detail pass", "timestamp and a frame path", "transcript"):+ "type detail pass", "timestamp and a frame path", "transcript", "WOULD I POST X",+ "WOULD I POST Y", "under your own name"):self.assertIn(word, b)self.assertNotIn("1-10", b)self.assertIn("`../X/frames/t0000.000s.jpg`", b)@@ -198,6 +212,8 @@ class PairwisePack(unittest.TestCase):self.assertTrue(v["improved"])self.assertEqual(Path(v["best"]).name, "final-2.mp4")self.assertTrue(v["blind"])+ self.assertIsNone(v["would_post"]["answer"]) # no WOULD I POST lines: not answered, so not done+ self.assertIn("WOULD I POST", v["next"])self.assertEqual({f["role"] for f in v["open_findings"]}, {"new"})self.assertEqual(sorted(f["severity"] for f in v["open_findings"]), ["blocker", "should-fix"])self.assertEqual(len(v["dropped"]), 2)diff --git a/skills/showtime/tests/test_portable.py b/skills/showtime/tests/test_portable.pyindex e3dda53..77c6fd3 100644--- a/skills/showtime/tests/test_portable.py+++ b/skills/showtime/tests/test_portable.py@@ -642,6 +642,7 @@ class TestDoctorSandbox(Tmp):def test_no_network(self):env = clean_env(SHOWTIME_HOME=self.tmp / "home", SHOWTIME_NET_PROBE="http://127.0.0.1:%d/" % closed_port(),+ SHOWTIME_MODEL_MIRROR="http://127.0.0.1:%d/" % closed_port(), # no mirror eitherCODEX_SANDBOX="seatbelt", CODEX_SANDBOX_NETWORK_DISABLED="1")rows, _ = self.doctor(env)net = rows["network"]diff --git a/skills/showtime/tests/test_qa.py b/skills/showtime/tests/test_qa.pyindex bc4c87d..2a723a7 100644--- a/skills/showtime/tests/test_qa.py+++ b/skills/showtime/tests/test_qa.py@@ -252,7 +252,7 @@ class QATests(unittest.TestCase):self.assertTrue((pack / name).is_file(), name)brief = (pack / "CRITIC.md").read_text(encoding="utf-8")for word in ("Blocker", "Should-fix", "Polish", "VERDICT", "DECLINED TO JUDGE", "timestamp", "at most 3",- "No scores"):+ "No scores", "WOULD I POST THIS", "under your own name"):self.assertIn(word, brief)self.assertTrue(all(Path(k["path"]).is_file() for k in m["key_frames"]))self.assertIn("type detail pass", brief)@@ -949,6 +949,69 @@ Film.start({ look: 'dark', design: [1920, 1080], scenes(T, g, F) {(Path(m["dir"]) / "FINDINGS.md").write_text("VERDICT: fix\n", encoding="utf-8")m = json.loads(showtime("review-pack", v, "--project", proj, "--json", timeout=600).stdout)self.assertEqual(m["cuts"], [2.5, 5.0, 7.5], m["scenes_source"])+ def test_24_footage_job_ignores_its_cards_subproject(self):+ """A footage job's edit render is judged by its own edit report, not by the job's cards/ sub-project+ (a 5.5 s showtime.json duration must not fail a 3 s edit without --expect)."""+ base = self.tmp / "footagejob"+ base.mkdir()+ job = Path(json.loads(showtime("job", "init", "talk", "--json", cwd=base).stdout)["job"])+ cards = job / "cards"+ cards.mkdir()+ (cards / "showtime.json").write_text(json.dumps({"duration": 5.5, "fps": 30}), encoding="utf-8")+ (cards / "index.html").write_text("<!doctype html><body></body>", encoding="utf-8")+ data = json.loads((job / "job.json").read_text(encoding="utf-8"))+ data["project"] = str(cards)+ (job / "job.json").write_text(json.dumps(data), encoding="utf-8")+ # the cards' own render.json names another output+ (job / "render.json").write_text(json.dumps({"project": str(cards), "output": str(job / "cards.mp4"),+ "duration": 5.5}), encoding="utf-8")+ v = synth_video(job / "final.mp4", dur=3, size="640x360")+ (job / "final.report.json").write_text(json.dumps({"output": str(v), "edl": str(job / "edit" / "edl.json"),+ "duration": 3.0}), encoding="utf-8")+ q = json.loads(showtime("qa", v, "--json", "--no-sheet", check=False).stdout)+ self.assertNotIn(("duration", "FAIL"), findings_of(q, "rule"))+ self.assertIsNone(q["project"])+ self.assertTrue(any("edit render report" in p for p in q["passed"]), q["passed"])+ # the edit report's length is still checked+ (job / "final.report.json").write_text(json.dumps({"output": str(v), "edl": "edl.json", "duration": 6.0}),+ encoding="utf-8")+ q = json.loads(showtime("qa", v, "--json", "--no-sheet", check=False).stdout)+ self.assertIn(("duration", "FAIL"), findings_of(q, "rule"))++ def test_25_poster_still_matches_its_frame(self):+ """qa compares the render's poster still with its video frame (mean luma) and flags PNG colour chunks."""+ import struct+ import zlib+ from st.qa import media as M+ d = self.tmp / "posters"+ d.mkdir()+ v = d / "final.mp4"+ ffmpeg("-f", "lavfi", "-i", "color=c=0x606870:s=320x180:r=30:d=2", "-c:v", "libx264", "-pix_fmt", "yuv420p", str(v))+ poster = d / "poster.png"+ ffmpeg("-ss", "1", "-i", v, "-frames:v", "1", poster)+ (d / "render.json").write_text(json.dumps({"output": str(v), "duration": 2,+ "poster": {"file": "poster.png", "time": 1.0}}), encoding="utf-8")+ rules = lambda: [f["rule"] for f in json.loads( # noqa: E731+ showtime("qa", v, "--json", "--no-sheet", check=False).stdout)["findings"]]+ self.assertEqual(M.png_colour_chunks(poster), [])+ self.assertNotIn("poster_mismatch", rules())+ # a darker still (taken from another frame or another grade)+ ffmpeg("-ss", "1", "-i", v, "-frames:v", "1", "-vf", "eq=brightness=-0.08", poster)+ self.assertIn("poster_mismatch", rules())+ # the same pixels with a gAMA chunk: a browser draws it darker than the video+ ffmpeg("-ss", "1", "-i", v, "-frames:v", "1", poster)+ raw = poster.read_bytes()+ body = b"gAMA" + struct.pack(">I", 45455)+ chunk = struct.pack(">I", 4) + body + struct.pack(">I", zlib.crc32(body) & 0xFFFFFFFF)+ poster.write_bytes(raw[:33] + chunk + raw[33:]) # right after the IHDR chunk+ self.assertEqual(M.png_colour_chunks(poster), ["gAMA"])+ self.assertIn("poster_mismatch", rules())+ # deliver poster writes PNGs without them (the same strip)+ self.assertEqual(M.strip_png_colour_chunks(poster), 1)+ self.assertEqual(M.png_colour_chunks(poster), [])+ self.assertEqual(poster.read_bytes(), raw)+ self.assertNotIn("poster_mismatch", rules())+if __name__ == "__main__":argv = [a for a in sys.argv if a != "--fast"]diff --git a/skills/showtime/tests/test_receipt.py b/skills/showtime/tests/test_receipt.pyindex 2f5ebdf..435077e 100644--- a/skills/showtime/tests/test_receipt.py+++ b/skills/showtime/tests/test_receipt.py@@ -3,7 +3,11 @@* usage: token sums from a hand-made Claude Code session log (a message logged twice counts once, thelargest count wins, sub-agent logs are added, the time window is honoured, an unpriced model makes a lower- bound and says so), the price arithmetic, a Codex rollout (tokens only), and every "not reported" path+ bound and says so), the price arithmetic, a Codex rollout (tokens only), a Devin sessions.db (numbers selected in+ SQL, a copied node counts once, only sessions in the job's folder, an estimate labelled "est.", Fusion token+ shares), and every "not reported" path+ * review rounds: a pairwise round counts both orders' FINDINGS; findings in a session with no sub-agent are+ flagged "not an independent critic"* privacy: nothing but numbers leaves a session log (prompt, reply and secrets never reach the receipt, andneither does the log's path); the request is masked for keys, e-mail addresses and home paths* receipt from a fixture job: the request as typed, assumptions, review rounds (self-review noticed),@@ -354,6 +358,180 @@ class ReceiptTests(unittest.TestCase):self.assertNotIn("ghp_" + "a" * 36, rec["request"]["text"])+DEVIN_SCHEMA = """+CREATE TABLE sessions (+ id TEXT PRIMARY KEY,+ working_directory TEXT NOT NULL,+ backend_type TEXT NOT NULL,+ model TEXT NOT NULL,+ agent_mode TEXT NOT NULL,+ created_at INTEGER NOT NULL,+ last_activity_at INTEGER NOT NULL, title TEXT, main_chain_id INTEGER, shell_last_seen_index INTEGER DEFAULT 0,+ cogs_json TEXT, workspace_dirs TEXT, hidden INTEGER NOT NULL DEFAULT 0, metadata TEXT);+CREATE TABLE message_nodes (+ row_id INTEGER PRIMARY KEY AUTOINCREMENT,+ session_id TEXT NOT NULL,+ node_id INTEGER NOT NULL,+ parent_node_id INTEGER,+ chat_message TEXT NOT NULL,+ created_at INTEGER NOT NULL, metadata TEXT,+ FOREIGN KEY (session_id) REFERENCES sessions(id),+ UNIQUE(session_id, node_id));+CREATE TABLE subagent_heads (+ session_id TEXT NOT NULL,+ agent_id TEXT NOT NULL,+ chain_node_id INTEGER NOT NULL,+ updated_at INTEGER NOT NULL,+ PRIMARY KEY (session_id, agent_id),+ FOREIGN KEY (session_id) REFERENCES sessions(id));+"""+++def devin_fixture(db: Path, workdir: Path, t0: float, subagent: bool = False) -> Path:+ """A tiny Devin CLI sessions.db (same tables and columns): a Fusion session in `workdir` (lead + sidekick,+ one message stored in two nodes, a user message) and a session in another folder that must not count."""+ import sqlite3+ db.parent.mkdir(parents=True, exist_ok=True)+ con = sqlite3.connect(str(db))+ con.executescript(DEVIN_SCHEMA)+ fusion = "fusion-claude-opus-5-5-high-sidekick-swe-2-medium"+ for sid, wd in (("s-fusion", str(workdir)), ("s-other", "/other-folder-xyz/project")):+ con.execute("INSERT INTO sessions (id, working_directory, backend_type, model, agent_mode, created_at, "+ "last_activity_at, title) VALUES (?, ?, 'windsurf', ?, 'normal', ?, ?, ?)",+ (sid, wd, fusion, int(t0), int(t0) + 600, "SECRET-TITLE"))++ def msg(mid, model, t, i, o, cr, cc):+ return json.dumps({"role": "assistant", "content": "SECRET-REPLY-TEXT", "message_id": mid, "tool_calls": [],+ "metadata": {"created_at": iso_utc(t), "generation_model": model, "request_id": "r-" + mid,+ "finish_reason": "stop", "metrics": {+ "input_tokens": i, "output_tokens": o, "cache_read_tokens": cr,+ "cache_creation_tokens": cc, "ttft_ms": 500, "total_time_ms": 900}}})+ rows = [+ ("s-fusion", 1, json.dumps({"role": "user", "content": SECRET_PROMPT}), t0 + 1),+ ("s-fusion", 2, msg("a1", "claude-opus-5-5-high", t0 + 5, 10, 1000, 100000, 20000), t0 + 5),+ ("s-fusion", 3, msg("a1", "claude-opus-5-5-high", t0 + 5, 10, 1000, 100000, 20000), t0 + 400), # a copied node+ ("s-fusion", 4, msg("b1", "swe-2-medium", t0 + 20, 50000, 3000, 400000, None), t0 + 20),+ ("s-fusion", 5, msg("b2", "swe-2-medium", t0 + 30, 50000, 1000, 400000, None), t0 + 30),+ ("s-fusion", 6, msg("z0", "swe-2-medium", t0 - 7200, 999999, 999999, 0, None), t0 - 7200), # before the job+ ("s-other", 1, msg("x1", "claude-opus-5-5-high", t0 + 10, 777777, 777777, 0, 0), t0 + 10),+ ]+ for sid, node, cm, t in rows:+ con.execute("INSERT INTO message_nodes (session_id, node_id, chat_message, created_at) VALUES (?, ?, ?, ?)",+ (sid, node, cm, int(t)))+ if subagent:+ con.execute("INSERT INTO subagent_heads VALUES ('s-fusion', 'critic', 3, ?)", (int(t0) + 60,))+ con.commit()+ con.close()+ return db+++class DevinTests(unittest.TestCase):+ @classmethod+ def setUpClass(cls):+ cls.tmp = Path(tempfile.mkdtemp(prefix="st-receipt-devin-"))++ @classmethod+ def tearDownClass(cls):+ shutil.rmtree(str(cls.tmp), ignore_errors=True)++ def job_and_db(self, name, subagent=False):+ job, _ = ledger.init(name, goal="demo", base=self.tmp / name, request="make a demo")+ (job / "final.mp4").write_bytes(b"x")+ ledger.note(job, stage="render", seconds=10, outputs=["final=%s" % (job / "final.mp4")],+ render={"kind": "full", "file": "final.mp4", "seconds": 10})+ t0 = ledger._parse_iso(ledger.load(job)["created"])+ db = devin_fixture(self.tmp / name / "private-devin-dir" / "sessions.db", self.tmp / name, t0, subagent)+ return job, db++ def test_devin_usage_numbers_only(self):+ job, db = self.job_and_db("devinusage")+ self.assertEqual(usage.sniff(db), "devin")+ t0 = ledger._parse_iso(ledger.load(job)["created"])+ u = usage.read_usage(db, since=t0, until=t0 + 3600, where=job)+ self.assertEqual((u["status"], u["host"], u["messages"]), ("reported", "devin", 3))+ m = u["models"]+ self.assertEqual(set(m), {"claude-opus-5-5-high", "swe-2-medium"}) # the other folder's session is out+ o, s = m["claude-opus-5-5-high"], m["swe-2-medium"]+ self.assertEqual((o["input"], o["output"], o["cache_read"], o["write_5m"], o["messages"]), (10, 1000, 100000, 20000, 1))+ self.assertEqual((s["input"], s["output"], s["cache_read"], s["messages"]), (100000, 4000, 800000, 2))+ self.assertAlmostEqual(o["cost_usd"], (10 * 4 + 1000 * 20 + 100000 * 0.2 + 20000 * 4) / 1e6, places=4)+ self.assertEqual(s["cost_usd"], 0.0)+ self.assertAlmostEqual(o["token_share"] + s["token_share"], 1.0, places=3)+ self.assertLess(o["token_share"], s["token_share"])+ self.assertIn("est.", u["cost_note"])+ self.assertIn(usage.DEVIN_PRICES_AS_OF, u["cost_note"])+ self.assertNotIn("lower bound", u["cost_note"])+ self.assertEqual(u["subagents"], 0)+ blob = json.dumps(u)+ for bad in ("SECRET", "sk-ant", "private-devin-dir", "other-folder-xyz", "r-a1"):+ self.assertNotIn(bad, blob)+ whole = usage.read_usage(db, where=job) # no window: the early message too+ self.assertEqual(whole["models"]["swe-2-medium"]["messages"], 3)+ self.assertEqual(usage.read_usage(db, where=self.tmp / "nowhere")["status"], "not_reported")++ def test_devin_receipt_found_by_itself_and_lead_review_flagged(self):+ job, db = self.job_and_db("devinreceipt")+ rd = job / "review" / "round-1"+ rd.mkdir(parents=True)+ (rd / "FINDINGS.md").write_text("Should-fix: 0:03 the title is small\nVERDICT: ship\n", encoding="utf-8")+ saved = {k: os.environ.get(k) for k in ("SHOWTIME_HOST", "XDG_DATA_HOME", "SHOWTIME_TRANSCRIPT")}+ data_home = self.tmp / "devinreceipt" / "private-devin-dir" / "data"+ (data_home / "devin" / "cli").mkdir(parents=True)+ shutil.copy(str(db), str(data_home / "devin" / "cli" / "sessions.db"))+ try:+ os.environ["SHOWTIME_HOST"] = "devin"+ os.environ["XDG_DATA_HOME"] = str(data_home)+ os.environ.pop("SHOWTIME_TRANSCRIPT", None)+ out = receipt.write(job)+ finally:+ for k, v in saved.items():+ if v is None:+ os.environ.pop(k, None)+ else:+ os.environ[k] = v+ rec = out["receipt"]+ self.assertEqual(rec["agent"], "Devin")+ self.assertEqual(rec["usage"]["status"], "reported")+ self.assertTrue(rec["review"]["lead_review"])+ md = (job / "receipt.md").read_text(encoding="utf-8")+ self.assertIn("Agent: Devin", md)+ self.assertIn("(est., at listed prices)", md)+ self.assertIn("claude-opus-5-5-high: 1 request,", md)+ self.assertIn("% of the tokens", md)+ self.assertIn("not an independent critic", md)+ text = md + (job / "receipt.json").read_text(encoding="utf-8") + (job / "share.txt").read_text(encoding="utf-8")+ for bad in ("SECRET", "private-devin-dir", "other-folder-xyz"):+ self.assertNotIn(bad, text)+ # with a critic sub-agent in the session, no flag+ job2, db2 = self.job_and_db("devincritic", subagent=True)+ rd = job2 / "review" / "round-1"+ rd.mkdir(parents=True)+ (rd / "FINDINGS.md").write_text("VERDICT: ship\n", encoding="utf-8")+ rec = receipt.write(job2, transcript=str(db2))["receipt"]+ self.assertEqual(rec["usage"]["subagents"], 1)+ self.assertFalse(rec["review"]["lead_review"])+ self.assertNotIn("not an independent critic", (job2 / "receipt.md").read_text(encoding="utf-8"))++ def test_pairwise_findings_count_both_orders(self):+ job, _ = ledger.init("pairs", goal="demo", base=self.tmp / "pairs")+ rv = job / "review"+ (rv / ".pairwise-keys").mkdir(parents=True)+ for n, orders in ((1, (1, 2)), (3, (1,))):+ (rv / ".pairwise-keys" / ("round-%d.json" % n)).write_text(json.dumps({"new": {"video": "a.mp4"},+ "old": {"video": "b.mp4"}}), encoding="utf-8")+ for k in orders:+ (rv / ("round-%d" % n) / ("order-%d" % k)).mkdir(parents=True)+ (rv / ("round-%d" % n) / ("order-%d" % k) / "FINDINGS.md").write_text("PREFER: A\n", encoding="utf-8")+ (rv / "round-2").mkdir()+ (rv / "round-2" / "FINDINGS.md").write_text("VERDICT: ship\n", encoding="utf-8")+ r = receipt.build(job)["review"]+ self.assertEqual((r["packed"], r["pairwise"], r["with_findings"], r["findings_files"]), (3, 2, 2, 4))+ self.assertFalse(r["lead_review"]) # no session log: not known+ md = receipt.to_markdown(receipt.build(job))+ self.assertIn("2 pairwise (blind A/B, both orders)", md)+ self.assertIn("4 FINDINGS files", md)++class CliTests(unittest.TestCase):@classmethoddef setUpClass(cls):diff --git a/skills/showtime/tests/test_render_fixes.py b/skills/showtime/tests/test_render_fixes.pynew file mode 100644index 0000000..95d61f4--- /dev/null+++ b/skills/showtime/tests/test_render_fixes.py@@ -0,0 +1,295 @@+#!/usr/bin/env python3+"""Small render fixes.++ 1 snap stills carry no colour chunks (cICP/cHRM/gAMA/iCCP/sRGB): a browser drew a still decoded+ from a BT.709 video darker than the same frame in <video>. The PNG chunk filter is unit-tested+ on a synthetic PNG (fast); a snap of a tagged video is checked end to end (needs ffmpeg)+ 2 `showtime check`: text inside data-st-decor (and its descendants) is UI-mockup detail, never+ short_text; the same text outside decor still is (needs a browser)+ 3 chart: a positive yMin is the axis floor (ticks start there, bars grow from it) instead of being+ clamped to zero (needs a browser)+ 4 `export html` packs every image of a per-frame sequence (one file per frame, swapped by the page), not+ only the ones its 0.5 s probe happened to land on (needs a browser)+usage: python tests/test_render_fixes.py [--fast] [-v]+"""+from __future__ import annotations++import _isolate # noqa: F401 (run from a scratch folder: never write into the repository)++import json+import shutil+import struct+import subprocess+import sys+import tempfile+import unittest+import zlib+from pathlib import Path++TESTS_DIR = Path(__file__).resolve().parent+SKILL = TESTS_DIR.parent+LAUNCHER = SKILL / "lib" / "st" / "launcher.py"+sys.path.insert(0, str(SKILL / "lib"))++from st import platform as plat # noqa: E402+from st.launcher import build_env, showtime_home # noqa: E402++FAST = "--fast" in sys.argv+ENV = build_env(showtime_home())+++def node_exe():+ return ENV.get("SHOWTIME_NODE") or plat.which("node") or shutil.which("node") or "node"+++def showtime(*args, check=True, timeout=600):+ cp = subprocess.run([sys.executable, str(LAUNCHER)] + [str(a) for a in args], env=ENV,+ stdout=subprocess.PIPE, stderr=subprocess.PIPE, encoding="utf-8", errors="replace", timeout=timeout)+ if check and cp.returncode != 0:+ raise AssertionError("showtime %s failed (rc=%d):\n%s\n%s" % (" ".join(map(str, args)), cp.returncode,+ cp.stdout[-3000:], cp.stderr[-3000:]))+ return cp+++def chunk(kind: bytes, data: bytes) -> bytes:+ return struct.pack(">I", len(data)) + kind + data + struct.pack(">I", zlib.crc32(kind + data) & 0xFFFFFFFF)+++def png_chunks(buf: bytes) -> list:+ out, i = [], 8+ while i + 12 <= len(buf):+ n = struct.unpack(">I", buf[i:i + 4])[0]+ out.append(buf[i + 4:i + 8].decode("latin1"))+ i += 12 + n+ return out+++def synthetic_png() -> bytes:+ """A 2x2 RGB PNG tagged like an ffmpeg still of a BT.709 video (plus iCCP and sRGB)."""+ raw = b"".join(b"\x00" + bytes([200, 100, 50] * 2) for _ in range(2))+ return (b"\x89PNG\r\n\x1a\n" + chunk(b"IHDR", struct.pack(">IIBBBBB", 2, 2, 8, 2, 0, 0, 0))+ + chunk(b"pHYs", struct.pack(">IIB", 1, 1, 0)) + chunk(b"cICP", bytes([1, 1, 0, 1]))+ + chunk(b"cHRM", b"\x00" * 32) + chunk(b"gAMA", struct.pack(">I", 45455))+ + chunk(b"iCCP", b"x\x00\x00" + zlib.compress(b"profile")) + chunk(b"sRGB", b"\x00")+ + chunk(b"IDAT", zlib.compress(raw)) + chunk(b"IEND", b""))+++PNG_UNIT = r"""+import fs from 'node:fs';+import path from 'node:path';+import { pathToFileURL } from 'node:url';+const png = await import(pathToFileURL(path.join(process.argv[2], 'scripts', 'lib', 'png.mjs')).href);+const src = fs.readFileSync(process.argv[3]);+const out = png.stripColorChunks(src);+fs.writeFileSync(process.argv[4], out);+const jpg = Buffer.from([0xff, 0xd8, 0xff, 0xe0, 1, 2, 3]);+console.log(JSON.stringify({ before: png.pngChunks(src), after: png.pngChunks(out), jpgSame: png.stripColorChunks(jpg) === jpg,+ cleanSame: png.stripColorChunks(out) === out }));+"""+++class Tmp(unittest.TestCase):+ def setUp(self):+ self.tmp = Path(tempfile.mkdtemp(prefix="st-renderfix-"))++ def tearDown(self):+ shutil.rmtree(str(self.tmp), ignore_errors=True)+++# ------------------------------------------------------------------ 1. snap colour chunks++class SnapColour(Tmp):+ def test_chunk_filter(self):+ src, dst, f = self.tmp / "in.png", self.tmp / "out.png", self.tmp / "u.mjs"+ src.write_bytes(synthetic_png())+ f.write_text(PNG_UNIT, encoding="utf-8")+ cp = subprocess.run([node_exe(), str(f), str(SKILL), str(src), str(dst)], env=ENV, stdout=subprocess.PIPE,+ stderr=subprocess.PIPE, encoding="utf-8", timeout=60)+ self.assertEqual(cp.returncode, 0, cp.stderr)+ r = json.loads(cp.stdout)+ self.assertEqual(r["before"], ["IHDR", "pHYs", "cICP", "cHRM", "gAMA", "iCCP", "sRGB", "IDAT", "IEND"])+ self.assertEqual(r["after"], ["IHDR", "pHYs", "IDAT", "IEND"])+ self.assertTrue(r["jpgSame"])+ self.assertTrue(r["cleanSame"])+ # the kept chunks are intact (CRCs checked by a real decoder when Pillow is there)+ out = dst.read_bytes()+ i = 8+ while i < len(out):+ n = struct.unpack(">I", out[i:i + 4])[0]+ self.assertEqual(struct.unpack(">I", out[i + 8 + n:i + 12 + n])[0], zlib.crc32(out[i + 4:i + 8 + n]) & 0xFFFFFFFF)+ i += 12 + n+ try:+ from PIL import Image # type: ignore+ except ImportError:+ return+ with Image.open(str(dst)) as im:+ self.assertEqual(im.convert("RGB").getpixel((1, 1)), (200, 100, 50))++ @unittest.skipIf(FAST, "renders a tagged clip with ffmpeg and snaps it")+ def test_snap_of_a_bt709_video_has_no_colour_chunks(self):+ from st import ff+ clip = self.tmp / "clip.mp4"+ ff.run_ffmpeg(["-f", "lavfi", "-i", "testsrc2=s=320x180:r=30:d=1", "-pix_fmt", "yuv420p",+ "-color_primaries", "bt709", "-color_trc", "bt709", "-colorspace", "bt709", "-color_range", "tv",+ "-c:v", "libx264", str(clip)])+ out = self.tmp / "still.png"+ showtime("snap", clip, "--at", "0.5", "-o", out)+ chunks = png_chunks(out.read_bytes())+ self.assertIn("IDAT", chunks)+ for c in ("cICP", "cHRM", "gAMA", "iCCP", "sRGB"):+ self.assertNotIn(c, chunks)+++# ------------------------------------------------------------------ 2. decor is not short_text++DECOR_PAGE = """<!doctype html><html><head><script src="/_st/stage.js"></script>+<style>body{margin:0;background:#f2eee3}.s{position:absolute;inset:0;background:#f2eee3;color:#141414;+font:700 60px sans-serif;padding:60px 80px}</style></head><body>+<section class="s" data-start="0" data-dur="0.4">%s</section>+<section class="s" data-start="0.4" data-dur="3"><p>Hold</p></section>+</body></html>"""+LONG = "A settings panel with many readable words in it"++[email protected](FAST, "browser check (skipped with --fast)")+class DecorShortText(Tmp):+ def check(self, name, body):+ proj = self.tmp / name+ proj.mkdir()+ (proj / "index.html").write_text(DECOR_PAGE % body, encoding="utf-8")+ (proj / "showtime.json").write_text(json.dumps({"width": 640, "height": 360, "fps": 30, "duration": 3.4}), encoding="utf-8")+ cp = showtime("check", proj, "--json", "--no-determinism", "--no-history", check=False)+ rep = json.loads(cp.stdout)+ return [f for f in rep["findings"] if f["code"] == "short_text"]++ def test_decor_and_its_descendants_are_exempt(self):+ self.assertEqual(self.check("decor", '<div data-st-decor><div><p>%s</p></div></div>' % LONG), [])+ self.assertEqual(self.check("decor-self", '<p data-st-decor>%s</p>' % LONG), [])++ def test_the_same_text_outside_decor_is_short_text(self):+ self.assertTrue(self.check("plain", '<div><p>%s</p></div>' % LONG))+++# ------------------------------------------------------------------ 3. chart yMin++CHART_PAGE = """<!doctype html><html lang="en"><head><meta charset="utf-8">+<script src="/_st/stage.js"></script><script>ST.config({"width": 1280, "height": 720, "fps": 30, "duration": 4});</script>+<link rel="stylesheet" href="/_st/themes/editorial.css">+<script type="module" src="/_st/components/index.js"></script>+<style>.chart{position:absolute;inset:60px 80px 80px}</style></head>+<body><div class="stage"><section class="scene" data-start="0" data-dur="4">+<div class="chart" id="ch" data-st="chart" data-type="@TYPE@" data-at="0.1" data-options='@OPTS@'></div>+</section></div></body></html>"""++CHART_PROBE = r"""+import path from 'node:path';+import { pathToFileURL } from 'node:url';+const skill = process.argv[2], dir = process.argv[3];+const imp = (p) => import(pathToFileURL(path.join(skill, 'scripts', p)).href);+const { startServer } = await imp('server.mjs');+const { openBrowser, openStage } = await imp('lib/stagehost.mjs');+const server = await startServer({ root: dir, port: 0 });+const b = await openBrowser({ gpu: 'auto' });+const R = {};+try {+ for (const name of ['bar', 'line', 'auto']) {+ const s = await openStage(b.browser, { url: server.url, page: name + '.html', config: {} });+ await s.seek(3.9);+ R[name] = await s.page.evaluate(() => {+ const shown = (e) => getComputedStyle(e).display !== 'none';+ const ticks = [...document.querySelectorAll('#ch .st-chart-tick')].filter(shown).map((e) => e.textContent);+ const plot = [...document.querySelectorAll('#ch .st-chart-grid line')].filter(shown).map((l) => l.getBoundingClientRect().bottom);+ const bars = [...document.querySelectorAll('#ch .st-chart-bar')].map((r) => { const q = r.getBoundingClientRect(); return [q.top, q.bottom]; });+ const path = document.querySelector('#ch path.st-chart-line, #ch .st-chart-line path, #ch path[class*=line]');+ const pb = path ? path.getBoundingClientRect() : null;+ return { ticks, gridBottom: Math.max(...plot), bars, line: pb ? [pb.top, pb.bottom] : null };+ });+ await s.close();+ }+} finally { await b.browser.close(); await server.close(); }+console.log(JSON.stringify(R));+"""++[email protected](FAST, "needs a browser")+class ChartYMin(unittest.TestCase):+ @classmethod+ def setUpClass(cls):+ cls.tmp = Path(tempfile.mkdtemp(prefix="st-chartymin-"))+ proj = cls.tmp / "proj"+ proj.mkdir()+ (proj / "showtime.json").write_text(json.dumps({"width": 1280, "height": 720, "fps": 30, "duration": 4}), encoding="utf-8")+ data = [{"label": str(2019 + i), "value": v} for i, v in enumerate([92, 94, 95, 97, 99])]+ for name, typ, opts in (("bar", "bar", {"yMin": 90, "yMax": 100, "count": False, "data": data}),+ ("line", "line", {"yMin": 90, "yMax": 100, "data": data}),+ ("auto", "bar", {"count": False, "data": data})):+ (proj / (name + ".html")).write_text(CHART_PAGE.replace("@TYPE@", typ).replace("@OPTS@", json.dumps(opts)), encoding="utf-8")+ probe = cls.tmp / "probe.mjs"+ probe.write_text(CHART_PROBE, encoding="utf-8")+ cp = subprocess.run([node_exe(), str(probe), str(SKILL), str(proj)], env=ENV, stdout=subprocess.PIPE,+ stderr=subprocess.PIPE, encoding="utf-8", errors="replace", timeout=300)+ if cp.returncode != 0:+ raise AssertionError("probe failed:\n%s\n%s" % (cp.stdout[-3000:], cp.stderr[-3000:]))+ cls.R = json.loads(cp.stdout.strip().splitlines()[-1])++ @classmethod+ def tearDownClass(cls):+ shutil.rmtree(str(cls.tmp), ignore_errors=True)++ def nums(self, ticks):+ return [float(t.replace("−", "-")) for t in ticks]++ def test_positive_ymin_is_the_axis_floor(self):+ r = self.R["bar"]+ ticks = self.nums(r["ticks"])+ self.assertTrue(ticks, r)+ self.assertGreaterEqual(min(ticks), 90, r["ticks"])+ self.assertLessEqual(max(ticks), 100, r["ticks"])+ # bars grow from the floor: they end at the plot's bottom, and the 92 bar is far shorter than the 99 one+ heights = [b - t for t, b in r["bars"]]+ for t, b in r["bars"]:+ self.assertAlmostEqual(b, r["gridBottom"], delta=2.5)+ self.assertLess(heights[0] * 2.5, heights[-1], heights)++ def test_line_uses_the_floor(self):+ r = self.R["line"]+ self.assertGreaterEqual(min(self.nums(r["ticks"])), 90, r["ticks"])++ def test_without_ymin_the_axis_starts_at_zero(self):+ self.assertEqual(min(self.nums(self.R["auto"]["ticks"])), 0, self.R["auto"]["ticks"])+++[email protected](FAST, "needs a browser")+class ExportSequenceTests(unittest.TestCase):+ def test_every_frame_of_an_image_sequence_is_packed(self):+ tmp = Path(tempfile.mkdtemp(prefix="st-export-seq-"))+ try:+ proj = tmp / "seq"+ (proj / "seq").mkdir(parents=True)+ png = b"\x89PNG\r\n\x1a\n" + chunk(b"IHDR", struct.pack(">IIBBBBB", 1, 1, 8, 0, 0, 0, 0)) + \+ chunk(b"IDAT", zlib.compress(b"\x00\x80")) + chunk(b"IEND", b"")+ for i in range(30): # frames 30-59: one image per frame from 1.0 s+ (proj / "seq" / ("f_%04d.png" % (30 + i))).write_bytes(png)+ (proj / "showtime.json").write_text(json.dumps({"title": "Seq", "width": 320, "height": 180, "fps": 30,+ "duration": 3}), encoding="utf-8")+ (proj / "index.html").write_text(+ '<!doctype html><html><head><script src="/_st/stage.js"></script></head><body style="margin:0">'+ '<img id="im" width="320" height="180"><script>'+ "ST.onSeek(function (t, frame) { var f = frame; var im = document.getElementById('im');"+ " if (f >= 30 && f < 60) { var s = 'seq/f_' + String(f).padStart(4, '0') + '.png';"+ " if (im.getAttribute('src') !== s) im.setAttribute('src', s); } });"+ "</script></body></html>", encoding="utf-8")+ out = tmp / "out" / "seq.html"+ rep = json.loads(showtime("export", "html", proj, "-o", out, "--json", "-q", "--folder").stdout)+ html = "".join(p.read_text(encoding="utf-8", errors="replace") for p in Path(rep["output"]).parent.rglob("*")+ if p.is_file() and p.suffix in (".html", ".js"))+ names = {n for n in ("f_%04d.png" % (30 + i) for i in range(30))+ if n in html or any(q.name == n for q in Path(rep["output"]).parent.rglob(n))}+ self.assertEqual(len(names), 30, sorted(set("f_%04d.png" % (30 + i) for i in range(30)) - names))+ finally:+ shutil.rmtree(str(tmp), ignore_errors=True)++if __name__ == "__main__":+ argv = [a for a in sys.argv if a != "--fast"]+ unittest.main(argv=argv)diff --git a/skills/showtime/tests/test_review_mode.py b/skills/showtime/tests/test_review_mode.pyindex 8d0cf52..cb5b74b 100644--- a/skills/showtime/tests/test_review_mode.py+++ b/skills/showtime/tests/test_review_mode.py@@ -275,7 +275,8 @@ class TestReviewState(Base):s = review_state.state(j)self.assertEqual(s["status"], "waiting")self.assertIn("review-verdict", s["next"])- (r2 / "verdict.json").write_text(json.dumps({"improved": True, "best": str(f3)}), encoding="utf-8")+ (r2 / "verdict.json").write_text(json.dumps({"improved": True, "best": str(f3), "would_post": {"answer": "yes"}}),+ encoding="utf-8")s = review_state.state(j)self.assertEqual((s["status"], s["pending"]), ("done", False))self.assertIn("new version wins", s["message"])@@ -285,7 +286,7 @@ class TestReviewState(Base):def test_ship_after_fixes_and_cap(self):j = self.job()f = self.final(j)- self.round(j, 1, "VERDICT: ship after fixes -- the year label\n", video=f)+ self.round(j, 1, "VERDICT: ship after fixes -- the year label\nWOULD I POST THIS: yes -- clean\n", video=f)s = review_state.state(j)self.assertEqual(s["status"], "done")g = self.final(j, "final-2.mp4")@@ -306,6 +307,89 @@ class TestReviewState(Base):self.final(j, "final.poster.mp4")self.assertIn("fix the blockers", review_state.state(j)["next"])+ def test_parse_would_post(self):+ pw = review_state.parse_would_post+ self.assertEqual(pw("WOULD I POST THIS: no -- captions in stepped boxes"), {"": ("no", "captions in stepped boxes")})+ self.assertEqual(pw("**WOULD I POST THIS:** yes - clean and sharp"), {"": ("yes", "clean and sharp")})+ self.assertEqual(pw("WOULD I POST THIS: yes | no -- one reason"), {}) # the template left as is+ self.assertEqual(pw("WOULD I POST X: no -- soft footage\nWOULD I POST Y: yes -- fine"),+ {"X": ("no", "soft footage"), "Y": ("yes", "fine")})+ self.assertEqual(pw("VERDICT: ship -- ok"), {})++ def test_absolute_verdict_holds_delivery(self):+ j = self.job()+ f = self.final(j)+ r1 = self.round(j, 1, "VERDICT: ship -- fine\n", video=f)+ s = review_state.state(j)+ self.assertEqual((s["status"], s["pending"]), ("waiting", True)) # the absolute line is required+ self.assertIn("WOULD I POST THIS", s["next"])+ (r1 / "FINDINGS.md").write_text("VERDICT: ship -- fine\nWOULD I POST THIS: no -- it looks cheap at full size\n",+ encoding="utf-8")+ s = review_state.state(j)+ self.assertEqual((s["status"], s["pending"]), ("would not post", True))+ self.assertIn("looks cheap", s["message"])+ self.assertIn("WARN", review_state.pending_line(s))+ # a pairwise round the new version won, but a critic would not post it: still held+ k = self.job()+ fa = self.final(k)+ fb = self.final(k, "final-2.mp4")+ r = k / "review" / "round-1"+ for o in (1, 2):+ (r / ("order-%d" % o)).mkdir(parents=True)+ (r / ("order-%d" % o) / "FINDINGS.md").write_text("PREFERENCE: X\n", encoding="utf-8")+ (k / "review" / ".pairwise-keys").mkdir(parents=True)+ (k / "review" / ".pairwise-keys" / "round-1.json").write_text(json.dumps(+ {"new": {"label": "X", "video": str(fb)}, "old": {"label": "Y", "video": str(fa)}}), encoding="utf-8")+ (r / "verdict.json").write_text(json.dumps({"improved": True, "best": str(fb), "would_post": {+ "answer": "no", "reason": "player controls in the footage"}}), encoding="utf-8")+ s = review_state.state(k)+ self.assertEqual((s["status"], s["pending"]), ("would not post", True))+ self.assertIn("player controls", s["message"])+ # lean mode never holds on it+ m = self.job("--mode", "lean")+ fm = self.final(m)+ self.round(m, 1, "VERDICT: ship -- ok\nWOULD I POST THIS: no -- soft\n", video=fm)+ self.assertFalse(review_state.state(m)["pending"])++ def test_caption_should_fix_needs_an_answer(self):+ cs = review_state.caption_should_fixes+ text = ("VERDICT: ship after fixes -- captions\nWOULD I POST THIS: yes -- after the fix\nBLOCKERS:\n- none\n"+ "SHOULD-FIX:\n- t=4.00s frames/t0004.000s.jpg captions sit in two stepped boxes -> one plate\n"+ "- t=9.00s frames/t0009.000s.jpg the hook holds 3 s -> cut to 1.5 s\nPOLISH:\n- subtitles font -> Inter\n")+ self.assertEqual(len(cs(text)), 1) # polish is not held+ self.assertTrue(review_state.resolves_captions("- fixed: the captions are one plate now"))+ self.assertTrue(review_state.resolves_captions("won't fix: the captions box style is the brand's"))+ self.assertFalse(review_state.resolves_captions("- not fixed: captions still stepped"))+ self.assertFalse(review_state.resolves_captions("won't fix: the hook")) # names no captions+ j = self.job()+ f = self.final(j)+ r1 = self.round(j, 1, text, video=f)+ s = review_state.state(j)+ self.assertEqual((s["status"], s["pending"]), ("caption fix open", True))+ self.assertIn("stepped boxes", s["message"])+ self.assertIn("RESPONSE.md", s["next"])+ # a later round that does not answer it keeps it open; "not fixed" is no answer+ g = self.final(j, "final-2.mp4")+ r2 = self.round(j, 2, "VERDICT: ship -- ok\nWOULD I POST THIS: yes -- ok\nPREVIOUS:\n- not fixed: captions\n",+ video=g)+ self.assertEqual(review_state.state(j)["status"], "caption fix open")+ (r2 / "FINDINGS.md").write_text("VERDICT: ship -- ok\nWOULD I POST THIS: yes -- ok\nPREVIOUS:\n"+ "- fixed: captions in one plate\n", encoding="utf-8")+ self.assertEqual(review_state.state(j)["status"], "done")+ # the maker's explanation also closes it+ (r2 / "FINDINGS.md").write_text("VERDICT: ship -- ok\nWOULD I POST THIS: yes -- ok\n", encoding="utf-8")+ self.assertEqual(review_state.state(j)["status"], "caption fix open")+ (r1 / "RESPONSE.md").write_text("won't fix: the stepped caption boxes are the client's house style\n",+ encoding="utf-8")+ self.assertEqual(review_state.state(j)["status"], "done")+ # lean: a loud WARN, never pending+ m = self.job("--mode", "lean")+ fm = self.final(m)+ self.round(m, 1, text, video=fm)+ s = review_state.state(m)+ self.assertFalse(s["pending"])+ self.assertIn("caption should-fix", review_state.pending_line(s))+def test_lean_is_never_pending(self):j = self.job("--mode", "lean")self.final(j)@@ -395,7 +479,7 @@ class TestQaLine(Base):# after a critic round with a verdict: no WARN line, a done line instead; the verdict is unchangedd = j / "review" / "round-1"d.mkdir(parents=True)- (d / "FINDINGS.md").write_text("VERDICT: ship -- fine\n", encoding="utf-8")+ (d / "FINDINGS.md").write_text("VERDICT: ship -- fine\nWOULD I POST THIS: yes -- fine\n", encoding="utf-8")(d / "manifest.json").write_text(json.dumps({"video": str(j / "final.mp4")}), encoding="utf-8")out = self.st("qa", str(j), "--no-sheet", check=False).stdoutself.assertNotIn("review pending", out)diff --git a/skills/showtime/tests/test_variety.py b/skills/showtime/tests/test_variety.pyindex 643d80a..cb4b001 100644--- a/skills/showtime/tests/test_variety.py+++ b/skills/showtime/tests/test_variety.py@@ -230,7 +230,7 @@ class TestHistory(HistoryCase):def test_repeats_and_alternatives(self):from st.variety import history as hh.record(self.look("one"))- h.record(self.look("two", theme="paper", display="Fraunces", accent="#2f6fbf", catalog="buckley-aphelion",+ h.record(self.look("two", theme="paper", display="Fraunces", accent="#2f6fbf", catalog="incompetech-crossing-the-chasm",transitions=("crossfade 0.5",), camera=False))res = h.check(self.look("three"))self.assertEqual(res["compared"], ["two", "one"])@@ -244,7 +244,7 @@ class TestHistory(HistoryCase):# alternatives never propose what the recent jobs usedself.assertFalse(any("theme bold" in x or "theme paper" in x for x in aspects["theme"]["alternatives"]))self.assertFalse(any(x.startswith(("push ", "dip ", "crossfade ")) for x in aspects["transitions"]["alternatives"]))- self.assertFalse(any("buckley-with-these-hands" in x or "buckley-aphelion" in x+ self.assertFalse(any("buckley-with-these-hands" in x or "incompetech-crossing-the-chasm" in xfor x in aspects["music"]["alternatives"]))self.assertIn("theme (look) bold", res["message"])self.assertIn("theme (look):", res["fix"])@@ -260,7 +260,7 @@ class TestHistory(HistoryCase):self.assertEqual(res["compared"], [])self.assertIn("no earlier jobs", h.format_text(res))b = self.look("b", theme="terminal", display="JetBrains Mono", body="JetBrains Mono", accent="#5cff8a",- catalog="buckley-aphelion", transitions=("", "", "", ""), camera=False, template="film")+ catalog="incompetech-crossing-the-chasm", transitions=("", "", "", ""), camera=False, template="film")res = h.check(b)self.assertEqual(res["level"], "ok", res["repeats"])self.assertIn("look is fresh", h.format_text(res))@@ -269,17 +269,17 @@ class TestHistory(HistoryCase):from st.variety import history as hh.record(self.look("push-led", transitions=("push left 0.5", "push left 0.5", "push left 0.5", "blur-dissolve 0.6","dip 0.6")))- b = self.look("push-only", theme="paper", display="Fraunces", accent="#2f6fbf", catalog="buckley-aphelion",+ b = self.look("push-only", theme="paper", display="Fraunces", accent="#2f6fbf", catalog="incompetech-crossing-the-chasm",transitions=("push left 0.4",) * 4, camera=False)self.assertIn("transitions", {r["aspect"] for r in h.check(b)["repeats"]})- c = self.look("dip-led", theme="paper", display="Fraunces", accent="#2f6fbf", catalog="buckley-aphelion",+ c = self.look("dip-led", theme="paper", display="Fraunces", accent="#2f6fbf", catalog="incompetech-crossing-the-chasm",transitions=("dip 0.6",) * 3 + ("push left 0.5",), camera=False)self.assertNotIn("transitions", {r["aspect"] for r in h.check(c)["repeats"]})def test_same_brand_shares_palette_and_type(self):from st.variety import history as ha, b = self.look("brand-a"), self.look("brand-b", transitions=("crossfade 0.5",), camera=False,- catalog="buckley-aphelion")+ catalog="incompetech-crossing-the-chasm")a["brand"] = b["brand"] = "Acme"h.record(a)aspects = {r["aspect"] for r in h.check(b)["repeats"]}@@ -292,7 +292,7 @@ class TestHistory(HistoryCase):h.record(self.look("old"))for i in range(5):h.record(self.look("other%d" % i, theme="neon", display="Unbounded", accent="#29e7ff",- catalog="buckley-aphelion", transitions=("crossfade 0.5",), camera=False))+ catalog="incompetech-crossing-the-chasm", transitions=("crossfade 0.5",), camera=False))res = h.check(self.look("new"))self.assertNotIn("old", res["compared"])self.assertFalse(any("old" in r["jobs"] for r in res["repeats"]))