OpenMontage/tools/video
calesthio a8d1ebdf6f docmontage: corpus builder hardening from P1 + P2 audit observations
All of these changes came out of running the P1 and P2 documentary-montage
audits end-to-end and watching specific things break. Grouping them into
one commit because they share a theme: making the corpus builder and its
stock source adapters robust enough that a real brief can produce a
real corpus without special-casing.

corpus_builder.py + new clip_cache.py + test_clip_cache.py
  Phase 1 of the shared-corpus architecture. Adds
  ~/.openmontage/clips_cache/ — a process-safe, LRU-evicted cache of
  downloaded clip files keyed by clip_id. Before each candidate download,
  corpus_builder asks the cache whether the bytes already exist on disk
  from a previous run; on a hit it hard-links (or copies on cross-drive)
  the blob into the caller's corpus dir and skips the network fetch. On
  a miss it downloads as usual and ingests the fresh file. Motivation:
  re-running the P1 audit after every tool fix was re-downloading gigs
  of archive.org footage that had already been fetched in the prior run.
  Cache faults never block the pipeline — they degrade gracefully to
  normal downloads. The cache bubbles counters into the corpus_builder
  return payload so the production report can show hit/miss/bytes-saved.
  Default 20 GB cap, overridable via OPENMONTAGE_CACHE_MAX_GB.
  Full test coverage: try_link, ingest, stats, LRU eviction, manifest
  persistence, lock behavior. 23 tests, tmp_path-scoped.

stock_sources/archive_org.py
  1. Three-strategy query cascade (phrase_prox_10 → distinctive_and →
     distinctive_or). Motivation: natural-language documentary queries
     against archive.org Solr were zeroing out — "1950s family watching
     television" returned 0 hits because Solr's default multi-term AND
     over-intersects. Walks strict to loose and returns the first
     non-empty strategy. Stop words, source hints ("prelinger",
     "archive", "footage"), and year tokens ("1950s") are excluded from
     the distinctive-token picks since they don't correlate with
     Prelinger title tokens.
  2. 150 MB per-rendition size cap. archive.org routinely hosts
     multi-hundred-megabyte h.264 masters and one 2 GB Prelinger item
     poisons corpus build wall-time and disk. Within a format bucket
     we now pick the largest rendition under the cap; if nothing fits
     we fall through to the next format rather than dropping the item.
  3. 180 s default max-duration ceiling when the caller hasn't set one
     — archive.org is the only source that routinely hosts feature-
     length material and a naive fan-out pulls them into corpora that
     only ever want a few seconds per clip.

stock_sources/wikimedia.py
  Parallel 3-strategy cascade (full → top2_or → single_best). Motivation:
  Commons CirrusSearch also defaults to AND across multi-word queries;
  our first P2 diagnostic pass returned 0 video results for 10/10
  queries. Same stop-word / source-hint / year-token stripping as
  archive_org so the two adapters stay symmetric.

test_stock_source_adapters.py
  Rewrote the wikimedia query-builder tests against the new cascade
  API. Added coverage for multi-word fallback + source-hint/year
  stripping.

video_compose.py
  Two small fixes for the Remotion renderer on Windows:
  1. Resolve output_path to absolute before invoking the CLI so the
     binary can write wherever the caller asked regardless of cwd.
  2. Pass cwd=composer_dir to run_command so npx can find the local
     Remotion binary under node_modules/.bin. Without this, Windows
     npx returns "could not determine executable to run" because it
     resolves .bin relative to the process cwd rather than the
     script's parent.
2026-04-11 00:46:06 -07:00
..
stock_sources docmontage: corpus builder hardening from P1 + P2 audit observations 2026-04-11 00:46:06 -07:00
__init__.py Initial release — OpenMontage: the first open-source agentic video production system 2026-03-29 08:25:17 -07:00
_shared.py Fix video generation pipeline gaps found during UAT 2026-04-04 11:55:54 -07:00
auto_reframe.py Talking-head pipeline: 8 new tools, Remotion TalkingHead composition, and skill rewrites 2026-04-01 10:00:15 -07:00
clip_cache.py docmontage: corpus builder hardening from P1 + P2 audit observations 2026-04-11 00:46:06 -07:00
clip_search.py Add documentary-montage pipeline for retrieval-first motion-clip montage 2026-04-10 16:04:28 -07:00
cogvideo_video.py Initial release — OpenMontage: the first open-source agentic video production system 2026-03-29 08:25:17 -07:00
corpus_builder.py docmontage: corpus builder hardening from P1 + P2 audit observations 2026-04-11 00:46:06 -07:00
green_screen_composite.py Green screen pipeline: new tools, AnimatedBackground, caption burn fixes 2026-04-02 11:54:30 -07:00
green_screen_processor.py Green screen pipeline: new tools, AnimatedBackground, caption burn fixes 2026-04-02 11:54:30 -07:00
grok_video.py Add Grok media providers and improve selector routing 2026-04-05 15:31:37 -07:00
heygen_video.py Initial release — OpenMontage: the first open-source agentic video production system 2026-03-29 08:25:17 -07:00
higgsfield_video.py Add Higgsfield provider and update Runway to v0.2.0 2026-04-08 12:57:43 -07:00
hunyuan_video.py Initial release — OpenMontage: the first open-source agentic video production system 2026-03-29 08:25:17 -07:00
kling_video.py Fix video generation pipeline gaps found during UAT 2026-04-04 11:55:54 -07:00
ltx_video_local.py Initial release — OpenMontage: the first open-source agentic video production system 2026-03-29 08:25:17 -07:00
ltx_video_modal.py Initial release — OpenMontage: the first open-source agentic video production system 2026-03-29 08:25:17 -07:00
minimax_video.py Fix fal.ai video tools and enforce pipeline-first production 2026-03-29 12:50:29 -07:00
pexels_video.py Initial release — OpenMontage: the first open-source agentic video production system 2026-03-29 08:25:17 -07:00
pixabay_video.py Initial release — OpenMontage: the first open-source agentic video production system 2026-03-29 08:25:17 -07:00
remotion_caption_burn.py Green screen pipeline: new tools, AnimatedBackground, caption burn fixes 2026-04-02 11:54:30 -07:00
runway_video.py Add Higgsfield provider and update Runway to v0.2.0 2026-04-08 12:57:43 -07:00
showcase_card.py Implementation spec: governance, decision intelligence, theme system, and E2E bug fixes 2026-04-03 09:35:09 -07:00
silence_cutter.py Talking-head pipeline: 8 new tools, Remotion TalkingHead composition, and skill rewrites 2026-04-01 10:00:15 -07:00
veo_video.py Harden cinematic pipeline and add reusable renderer 2026-03-29 15:49:49 -07:00
video_compose.py docmontage: corpus builder hardening from P1 + P2 audit observations 2026-04-11 00:46:06 -07:00
video_selector.py Add Grok media providers and improve selector routing 2026-04-05 15:31:37 -07:00
video_stitch.py Initial release — OpenMontage: the first open-source agentic video production system 2026-03-29 08:25:17 -07:00
video_trimmer.py Initial release — OpenMontage: the first open-source agentic video production system 2026-03-29 08:25:17 -07:00
wan_video.py Initial release — OpenMontage: the first open-source agentic video production system 2026-03-29 08:25:17 -07:00