lib.video-gen
Provider-neutral contracts and orchestration primitives for video generation.
@lssm-tech/lib.video-genbun add @lssm-tech/lib.video-genManifest 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/compositionsis part of the package's public or composition surface.src/designis part of the package's public or composition surface.src/docs/contains docblocks and documentation-facing exports.src/generatorsis part of the package's public or composition surface.src/i18nis part of the package's public or composition surface.src/index.tsis the root public barrel and package entrypoint.src/playeris part of the package's public or composition surface.src/types.tsis shared public type definitions.
Public Entry Points
- Export
.resolves through./src/index.ts. - Export
./compositionsresolves through./src/compositions/index.ts. - Export
./compositions/api-overviewresolves 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/primitivesresolves through./src/compositions/primitives/index.ts. - Export
./compositions/primitives/animated-textresolves through./src/compositions/primitives/animated-text.tsx. - Export
./compositions/primitives/brand-frameresolves through./src/compositions/primitives/brand-frame.tsx. - Export
./compositions/primitives/code-blockresolves through./src/compositions/primitives/code-block.tsx. - Export
./compositions/primitives/progress-barresolves through./src/compositions/primitives/progress-bar.tsx. - Export
./compositions/primitives/terminalresolves through./src/compositions/primitives/terminal.tsx. - Export
./compositions/primitives/transitionresolves through./src/compositions/primitives/transition.tsx. - Export
./design/companyos-campaign— Remotion-local token definitions (companyOsCampaignFilmTokens) mirroring thecompanyos.design.room-for-workcampaign 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-computedOwnersFirstArticleTimelinefromcomputeOwnersFirstArticleTimelineaudioSrc(optional): path to the final mix WAV under the studiopublic/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 givenCompanyOsFilmLocale. Throws for unsupported locales; never falls back silently to English.getCompanyOsStoryScripts(locale)— returnsCompanyOsStoryScripts(array ofCompanyOsStoryBeatper story id).COMPANYOS_FILM_LOCALES—['en', 'fr', 'es']as const.companyOsFilmTranslations— translation specs registered with the shared runtime for all supported locales; keys are undervideo-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 devbun run build— contractspec-bun-build buildbun run test— bun test --pass-with-no-testsbun run lint— bun lint:fixbun run lint:check— biome check .bun run lint:fix— biome check --write --unsafe --only=nursery/useSortedClasses . && biome check --write .bun run typecheck— tsgo --noEmitbun run publish:pkg— bun publish --tolerate-republish --ignore-scripts --verbosebun run publish:pkg:canary— bun publish:pkg --tag canarybun run clean— rimraf dist .turbobun run build:bundle— contractspec-bun-build transpilebun run build:types— contractspec-bun-build typesbun 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
Arrows point from a package to its direct dependency. Counts are derived from captured workspace manifests.
12 declarations
@fontsource/ibm-plex-sans5.3.0
@fontsource/inter5.3.0
@lssm-tech/lib.contracts-spec-coreworkspace:^
Read the package manual ↗@lssm-tech/lib.contracts-integrationsworkspace:^
Read the package manual ↗@lssm-tech/lib.ai-providersworkspace:^
Read the package manual ↗@lssm-tech/lib.surface-runtimeworkspace:^
Read the package manual ↗
Declared capabilities
Provider-neutral contracts and orchestration primitives for video generation.
Scripts
publish:pkgbun publish --tolerate-republish --ignore-scripts --verbosepublish:pkg:canarybun publish:pkg --tag canarybuildcontractspec-bun-build buildbuild:bundlecontractspec-bun-build transpilebuild:typescontractspec-bun-build typesdevcontractspec-bun-build devcleanrimraf dist .turbolintbun lint:fixlint: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-testsprebuildcontractspec-bun-build prebuildtypechecktsgo --noEmit