Skip to content
ContractSpec
Start here

Package manual · domains

·Content, growth and creator operations

lib.video-gen

Provider-neutral contracts and orchestration primitives for video generation.

domainslibraryv5.0.5stableservernode
@lssm-tech/lib.video-gen
bun add @lssm-tech/lib.video-gen
Package source ↗Manifest ↗

Manifest declarations describe the current workspace; they do not verify registry publication or runtime execution.

Package guide

AI-powered video generation with Remotion: compositions, rendering, and design integration.

What It Provides

  • Layer: lib.
  • Consumers: bundles, video-studio app.
  • src/docs/ contains docblocks and documentation-facing exports.
  • Related ContractSpec packages include @lssm-tech/lib.ai-providers, @lssm-tech/lib.content-gen, @lssm-tech/lib.contracts-integrations, @lssm-tech/lib.contracts-spec, @lssm-tech/lib.design-system, @lssm-tech/lib.image-gen, ...
  • src/docs/ contains docblocks and documentation-facing exports.

Installation

npm install @lssm-tech/lib.video-gen

or

bun add @lssm-tech/lib.video-gen

Usage

Import the root entrypoint from @lssm-tech/lib.video-gen, or choose a documented subpath when you only need one part of the package surface.

Architecture

  • src/compositions is part of the package's public or composition surface.
  • src/design is part of the package's public or composition surface.
  • src/docs/ contains docblocks and documentation-facing exports.
  • src/generators is part of the package's public or composition surface.
  • src/i18n is part of the package's public or composition surface.
  • src/index.ts is the root public barrel and package entrypoint.
  • src/player is part of the package's public or composition surface.
  • src/types.ts is shared public type definitions.

Public Entry Points

  • Export . resolves through ./src/index.ts.
  • Export ./compositions resolves through ./src/compositions/index.ts.
  • Export ./compositions/api-overview resolves through ./src/compositions/api-overview.tsx.
  • Export ./compositions/companyos/timeline — computeOwnersFirstArticleTimeline, OwnersFirstArticleTimeline, COMPANYOS_FILM_FPS, NarrationMeasure. The timeline is audio-led: beat durations (question circled on paper, match cut, decide line, silent decision, brand close) are derived from measured narration durations, not hardcoded frame counts.
  • Export ./compositions/primitives resolves through ./src/compositions/primitives/index.ts.
  • Export ./compositions/primitives/animated-text resolves through ./src/compositions/primitives/animated-text.tsx.
  • Export ./compositions/primitives/brand-frame resolves through ./src/compositions/primitives/brand-frame.tsx.
  • Export ./compositions/primitives/code-block resolves through ./src/compositions/primitives/code-block.tsx.
  • Export ./compositions/primitives/progress-bar resolves through ./src/compositions/primitives/progress-bar.tsx.
  • Export ./compositions/primitives/terminal resolves through ./src/compositions/primitives/terminal.tsx.
  • Export ./compositions/primitives/transition resolves through ./src/compositions/primitives/transition.tsx.
  • Export ./design/companyos-campaign — Remotion-local token definitions (companyOsCampaignFilmTokens) mirroring the companyos.design.room-for-work campaign palette. Remotion frames cannot read CSS variables from the host app, so semantic values are reproduced here as a token object.
  • Export ./i18n/companyos-film — en/fr/es narration keys, story scripts, and locale helpers for the CompanyOS film (see below).
  • The package publishes 48 total export subpaths; keep docs aligned with package.json.

CompanyOS film compositions

OwnersFirstArticle (in src/compositions/companyos/) is the first Remotion composition for the "Room for the real work" campaign. It targets an 8–12 s runtime and plays four beats: a question circled on the paper proposal (narrated), a match cut to the same proposal inside CompanyOS (narrated), a silent human decision, and the brand close. Product frames are labelled on screen as an illustrative reconstruction.

Props (OwnersFirstArticleProps):

  • locale: one of 'en' | 'fr' | 'es'
  • timeline: a pre-computed OwnersFirstArticleTimeline from computeOwnersFirstArticleTimeline
  • audioSrc (optional): path to the final mix WAV under the studio public/ folder; omit for silent previews

The timeline must be computed from measured narration durations (NarrationMeasure.durationSec), not estimated. Durations come from the narration manifest written by the companyos:narrate script in @lssm-tech/app.video-studio.

CompanyOS film i18n (./i18n/companyos-film)

Provides localized copy and story scripts for the owners-first-article film.

  • getCompanyOsFilmMessages(locale) — returns narration key/value messages for the given CompanyOsFilmLocale. Throws for unsupported locales; never falls back silently to English.
  • getCompanyOsStoryScripts(locale) — returns CompanyOsStoryScripts (array of CompanyOsStoryBeat per story id).
  • COMPANYOS_FILM_LOCALES — ['en', 'fr', 'es'] as const.
  • companyOsFilmTranslations — translation specs registered with the shared runtime for all supported locales; keys are under video-gen.companyos-film.
  • COMPANYOS_FILM_KEYS, COMPANYOS_STORY_IDS, CompanyOsFilmMessageKey, CompanyOsFilmMessages, CompanyOsStoryId, CompanyOsStoryBeat — exported types and key registries.

Translation content carries stability: 'experimental' and description: 'CompanyOS campaign film frames and narration (draft for native review)'. Native-speaker review is required before production narration is approved.

Local Commands

  • bun run dev — contractspec-bun-build dev
  • bun run build — contractspec-bun-build build
  • bun run test — bun test --pass-with-no-tests
  • bun run lint — bun lint:fix
  • bun run lint:check — biome check .
  • bun run lint:fix — biome check --write --unsafe --only=nursery/useSortedClasses . && biome check --write .
  • bun run typecheck — tsgo --noEmit
  • bun run publish:pkg — bun publish --tolerate-republish --ignore-scripts --verbose
  • bun run publish:pkg:canary — bun publish:pkg --tag canary
  • bun run clean — rimraf dist .turbo
  • bun run build:bundle — contractspec-bun-build transpile
  • bun run build:types — contractspec-bun-build types
  • bun run prebuild — contractspec-bun-build prebuild

Recent Updates

  • Replace eslint+prettier by biomejs to optimize speed.
  • Resolve lint, build, and type errors across nine packages.
  • Add first-class transport, auth, versioning, and BYOK support across all integrations.
  • Add AI provider ranking system with ranking-driven model selection.
  • Resolve lint/test regressions after voice capability updates.
  • Add @lssm-tech/lib.voice package for TTS, STT, and conversational voice.

Notes

  • Remotion composition API is version-sensitive — pin and test upgrades carefully.
  • Renderer interface is the adapter boundary — do not leak Remotion internals.
  • Depends on voice, content-gen, image-gen, design-system — coordinate cross-lib changes.

Relationships

THIS PACKAGElib.video-gen48 import paths

Arrows point from a package to its direct dependency. Counts are derived from captured workspace manifests.

12 declarations

Declared capabilities

Lib Video Gen

Provider-neutral contracts and orchestration primitives for video generation.

Scripts

  • publish:pkgbun publish --tolerate-republish --ignore-scripts --verbose
  • publish:pkg:canarybun publish:pkg --tag canary
  • buildcontractspec-bun-build build
  • build:bundlecontractspec-bun-build transpile
  • build:typescontractspec-bun-build types
  • devcontractspec-bun-build dev
  • cleanrimraf dist .turbo
  • lintbun lint:fix
  • lint:fixnode ../../../../scripts/biome.cjs check --write --unsafe --only=nursery/useSortedClasses . && node ../../../../scripts/biome.cjs check --write .
  • lint:checknode ../../../../scripts/biome.cjs check .
  • testbun test --pass-with-no-tests
  • prebuildcontractspec-bun-build prebuild
  • typechecktsgo --noEmit