Skip to content

media: extract the shared rendiv kit - #171

Merged
simontaurus merged 1 commit into
mainfrom
feat/shared-render-kit
Sep 19, 2026
Merged

simontaurus merged 1 commit into
mainfrom
feat/shared-render-kit

Conversation

@simontaurus

Copy link
Copy Markdown
Contributor

media/kit holds the rendiv mechanics the explainer, the tutorial series and the Prototype Fund pitch deck all repeat. The pitch deck lives in the private project-management repo and already pins this one for the design system, so it pulls the kit through the same pin instead of keeping a third copy.

Bugs this fixes

  • Tutorials never patched their own node_modules. postinstall ran ../explainer/scripts/patch-rendiv.mjs, which resolved its root relative to the script, so it patched the explainer's install. Latent until a checkout path contains a backslash escape; media/tutorials under a path with \t fails every render with Rollup failed to resolve import "C:<TAB>mp...". patch-rendiv now resolves the root from the working directory, which is what npm sets for a lifecycle script.
  • --theme and --suffix ate the first positional filter. Both callers open-coded argv.indexOf(flag) and skipped index i + 1; with the flag absent i is -1, so i + 1 is 0 and the first filter was dropped. build-all.mjs ep1 silently rendered nothing. Now one parseArgs.
  • render-series.mjs hardcoded ffmpeg.exe, so it could not run on a Linux runner.

Segmented rendering

renderSegmented renders each segment as its own composition and concatenates with -c copy, so editing one segment costs one segment's render.

It is only sound when segments hard-cut. A cross-dissolve composites the outgoing scene under the incoming one; rendered alone, a segment's entry fade resolves against a transparent canvas and encodes as black. Measured on the pitch deck: a black flash at all 8 boundaries and no dissolve anywhere, with both the render and the concat reporting success. So renderSegmented refuses a non-zero overlap and assertNoBlackFrames checks the stitched file.

The explainer and the tutorial episodes cross-dissolve, so both keep rendering the whole timeline in one pass; their behaviour is unchanged.

Verified

  • npm run stills -- 04-clarity (explainer), npm run sheet
  • npm run stills -- --theme light ep1 (tutorials), 18 stills, after the patch fix
  • npm run typecheck in both projects
  • parseArgs against the four argument shapes the callers use

- media/kit holds the mechanics all three video projects repeat: CLI and
  ffmpeg resolution, filter parsing, still and render calls, segment
  stitching. The pitch deck in project-management pulls it through the
  design pin it already uses, so there is one copy rather than three
- patch-rendiv resolves its root from the working directory. It took it
  from its own location, so the tutorials postinstall patched the
  explainer's node_modules and left its own unpatched: ep1 stills failed
  on any path containing a backslash escape
- parseArgs keeps a flag's value out of the positional filters. Both
  callers had open-coded this and both dropped the first filter when the
  flag was absent
- render-series no longer hardcodes ffmpeg.exe
- renderSegmented refuses a non-zero overlap, and assertNoBlackFrames
  checks the stitched file: a cross-dissolve rendered segment by segment
  fades in over nothing and encodes as black at every boundary
@github-actions

Copy link
Copy Markdown
Contributor

Explainer frames

contact sheet

Beats, in reading order
1. 01-hook-panels
2. 02-hook-broken
3. 03-hook-punch
4. 04-clarity
5. 05-merge-apart
6. 06-merge-union
7. 07-code-reveal
8. 08-code-wash
9. 09-outputs
10. 10-domains
11. 11-domains-closing
12. 12-proof-story
13. 13-proof-facts
14. 14-end-card

Rendered from cf51d634a3801df8536f2a8da2baab196e77d000. Images live on the ci-review-images prerelease, not in the repository.

@simontaurus
simontaurus merged commit f0fac5a into main Sep 19, 2026
7 checks passed
@simontaurus
simontaurus deleted the feat/shared-render-kit branch September 19, 2026 07:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant