@automovie/template 0.0.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -18
- package/generated/pnpm-workspace.json +54 -0
- package/{lib → generated}/skills/3d-modeling/conditioning.md +24 -27
- package/generated/skills/3d-modeling/crafting/SKILL.md +16 -0
- package/generated/skills/3d-modeling/crafting/construction.md +70 -0
- package/generated/skills/3d-modeling/crafting/lofting.md +73 -0
- package/generated/skills/3d-modeling/crafting/recovery.md +25 -0
- package/generated/skills/3d-modeling/diffusion/image-hints.md +30 -0
- package/generated/skills/3d-modeling/diffusion/models.md +27 -0
- package/generated/skills/3d-modeling/diffusion/prompts.md +9 -0
- package/generated/skills/3d-modeling/diffusion/request.md +16 -0
- package/generated/skills/3d-modeling/diffusion/shape-hints.md +31 -0
- package/generated/skills/3d-modeling/inspection.md +55 -0
- package/generated/skills/3d-modeling/modularization.md +25 -0
- package/{lib → generated}/skills/3d-modeling/rigging.md +21 -27
- package/{lib → generated}/skills/3d-modeling/sources.md +6 -6
- package/{lib → generated}/skills/contracts/development/design.md +2 -3
- package/{lib → generated}/skills/contracts/development/implementation.md +4 -4
- package/{lib → generated}/skills/contracts/development/testing.md +1 -1
- package/generated/skills/development/repair.md +13 -0
- package/{lib → generated}/skills/documentation/SKILL.md +2 -8
- package/generated/skills/documentation/writing.md +63 -0
- package/{lib/skills/motion → generated/skills/motion/laws}/authoring.md +13 -9
- package/{lib/skills/motion → generated/skills/motion/laws}/contacts.md +3 -1
- package/{lib/skills/motion/laws.md → generated/skills/motion/laws/declaration.md} +8 -8
- package/generated/skills/motion/laws/transitions.md +37 -0
- package/{lib/skills/motion → generated/skills/motion/laws}/variation.md +5 -5
- package/{lib/skills/motion → generated/skills/motion/laws}/verification.md +7 -13
- package/generated/skills/prompting/SKILL.md +82 -0
- package/{lib → generated}/skills/visual-debugging/capture.md +13 -11
- package/{lib → generated}/skills/visual-debugging/comparison.md +7 -9
- package/{lib → generated}/skills/visual-debugging/correction-rounds.md +13 -13
- package/{lib → generated}/skills/visual-debugging/passes.md +9 -9
- package/lib/IAutoMovieScaffoldProps.d.ts +14 -6
- package/lib/assertScaffoldProjectName.d.ts +1 -1
- package/lib/assertScaffoldProjectName.js +1 -1
- package/lib/createAutoMovieScaffold.d.ts +27 -0
- package/lib/createAutoMovieScaffold.js +145 -0
- package/lib/createAutoMovieScaffold.js.map +1 -0
- package/lib/index.d.ts +1 -45
- package/lib/index.js +1 -45
- package/lib/index.js.map +1 -1
- package/lib/listAutoMovieScaffoldFiles.d.ts +2 -2
- package/lib/listAutoMovieScaffoldFiles.js +2 -2
- package/package.json +9 -12
- package/scaffold/instructions/.agents/skills/3d-modeling/SKILL.md +14 -11
- package/scaffold/instructions/.agents/skills/3d-modeling/coarse-forms.md +7 -9
- package/scaffold/instructions/.agents/skills/3d-modeling/diffusion/SKILL.md +20 -0
- package/scaffold/instructions/.agents/skills/audio/SKILL.md +10 -21
- package/scaffold/instructions/.agents/skills/audio/acquisition.md +24 -12
- package/scaffold/instructions/.agents/skills/audio/film-sound.md +25 -0
- package/scaffold/instructions/.agents/skills/audio/generated-sound.md +15 -0
- package/scaffold/instructions/.agents/skills/audio/sound-effects.md +11 -17
- package/scaffold/instructions/.agents/skills/audio/soundtrack.md +5 -0
- package/scaffold/instructions/.agents/skills/contracts/SKILL.md +10 -16
- package/scaffold/instructions/.agents/skills/contracts/development/SKILL.md +5 -5
- package/scaffold/instructions/.agents/skills/contracts/development/behaviors.md +5 -7
- package/scaffold/instructions/.agents/skills/contracts/development/composition.md +12 -8
- package/scaffold/instructions/.agents/skills/contracts/development/entities.md +7 -6
- package/scaffold/instructions/.agents/skills/contracts/development/statements/behaviors.md +20 -20
- package/scaffold/instructions/.agents/skills/contracts/development/statements/composition.md +18 -16
- package/scaffold/instructions/.agents/skills/contracts/development/statements/entities.md +13 -12
- package/scaffold/instructions/.agents/skills/contracts/story/SKILL.md +13 -15
- package/scaffold/instructions/.agents/skills/contracts/story/shared/discovery/brief.md +3 -3
- package/scaffold/instructions/.agents/skills/contracts/story/shared/discovery/common.md +2 -2
- package/scaffold/instructions/.agents/skills/contracts/story/shared/discovery/narratives.md +1 -1
- package/scaffold/instructions/.agents/skills/contracts/story/shared/discovery/screenplay.md +1 -1
- package/scaffold/instructions/.agents/skills/contracts/story/shared/discovery/scripts.md +2 -2
- package/scaffold/instructions/.agents/skills/contracts/story/shared/discovery/settings.md +1 -1
- package/scaffold/instructions/.agents/skills/contracts/story/shared/discovery/treatments.md +1 -1
- package/scaffold/instructions/.agents/skills/contracts/story/shared/naturalness/common.md +6 -6
- package/scaffold/instructions/.agents/skills/contracts/story/shared/naturalness/obligations/common.md +3 -3
- package/scaffold/instructions/.agents/skills/contracts/story/shared/naturalness/obligations/realized.md +4 -4
- package/scaffold/instructions/.agents/skills/contracts/story/shared/naturalness/obligations/scripts.md +2 -2
- package/scaffold/instructions/.agents/skills/contracts/story/shared/naturalness/realized.md +4 -4
- package/scaffold/instructions/.agents/skills/contracts/story/shared/naturalness/scripts.md +3 -3
- package/scaffold/instructions/.agents/skills/contracts/story/shared/obligations/brief.md +3 -3
- package/scaffold/instructions/.agents/skills/contracts/story/shared/obligations/common.md +3 -7
- package/scaffold/instructions/.agents/skills/contracts/story/shared/obligations/index.md +3 -7
- package/scaffold/instructions/.agents/skills/contracts/story/shared/obligations/narratives.md +5 -5
- package/scaffold/instructions/.agents/skills/contracts/story/shared/obligations/review.md +3 -3
- package/scaffold/instructions/.agents/skills/contracts/story/shared/obligations/screenplay.md +4 -4
- package/scaffold/instructions/.agents/skills/contracts/story/shared/obligations/scripts.md +4 -4
- package/scaffold/instructions/.agents/skills/contracts/story/shared/obligations/settings.md +3 -7
- package/scaffold/instructions/.agents/skills/contracts/story/shared/obligations/treatments.md +4 -4
- package/scaffold/instructions/.agents/skills/contracts/story/shared/principles/brief.md +2 -6
- package/scaffold/instructions/.agents/skills/contracts/story/shared/principles/common.md +2 -6
- package/scaffold/instructions/.agents/skills/contracts/story/shared/principles/index.md +2 -6
- package/scaffold/instructions/.agents/skills/contracts/story/shared/principles/narratives.md +5 -5
- package/scaffold/instructions/.agents/skills/contracts/story/shared/principles/realized.md +2 -6
- package/scaffold/instructions/.agents/skills/contracts/story/shared/principles/research.md +4 -4
- package/scaffold/instructions/.agents/skills/contracts/story/shared/principles/review.md +5 -5
- package/scaffold/instructions/.agents/skills/contracts/story/shared/principles/screenplay.md +5 -9
- package/scaffold/instructions/.agents/skills/contracts/story/shared/principles/scripts.md +3 -7
- package/scaffold/instructions/.agents/skills/contracts/story/shared/principles/settings.md +2 -6
- package/scaffold/instructions/.agents/skills/contracts/story/shared/principles/treatments.md +3 -3
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/discovery/brief.md +4 -7
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/discovery/common.md +7 -7
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/discovery/narratives.md +2 -2
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/discovery/screenplay.md +3 -4
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/discovery/scripts.md +4 -4
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/discovery/settings.md +5 -7
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/discovery/treatments.md +2 -2
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/naturalness/common.md +37 -44
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/naturalness/obligations/common.md +7 -8
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/naturalness/obligations/realized.md +4 -4
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/naturalness/obligations/scripts.md +5 -8
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/naturalness/realized.md +12 -11
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/naturalness/scripts.md +3 -3
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/obligations/brief.md +12 -12
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/obligations/common.md +16 -16
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/obligations/index.md +7 -5
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/obligations/narratives.md +14 -14
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/obligations/review.md +16 -20
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/obligations/screenplay.md +7 -10
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/obligations/scripts.md +5 -6
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/obligations/settings.md +29 -22
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/obligations/treatments.md +13 -15
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/principles/brief.md +9 -17
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/principles/common.md +4 -7
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/principles/index.md +8 -7
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/principles/narratives.md +29 -25
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/principles/realized.md +11 -10
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/principles/research.md +18 -18
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/principles/review.md +13 -25
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/principles/screenplay.md +41 -45
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/principles/scripts.md +16 -16
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/principles/settings.md +8 -24
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/principles/treatments.md +12 -17
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/upstream/screenplay.md +7 -8
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/upstream/scripts.md +4 -5
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/upstream/treatments.md +3 -4
- package/scaffold/instructions/.agents/skills/contracts/story/shared/upstream/screenplay.md +3 -3
- package/scaffold/instructions/.agents/skills/contracts/story/shared/upstream/scripts.md +3 -3
- package/scaffold/instructions/.agents/skills/contracts/story/shared/upstream/treatments.md +3 -3
- package/scaffold/instructions/.agents/skills/development/SKILL.md +5 -7
- package/scaffold/instructions/.agents/skills/development/entities.md +20 -20
- package/scaffold/instructions/.agents/skills/development/reuse.md +19 -18
- package/scaffold/instructions/.agents/skills/development/source-layout.md +32 -24
- package/scaffold/instructions/.agents/skills/development/testing.md +13 -10
- package/scaffold/instructions/.agents/skills/direct-film/SKILL.md +51 -0
- package/scaffold/instructions/.agents/skills/evidence/SKILL.md +1 -1
- package/scaffold/instructions/.agents/skills/evidence/adoption.md +4 -4
- package/scaffold/instructions/.agents/skills/evidence/answering.md +2 -4
- package/scaffold/instructions/.agents/skills/evidence/configuration.md +8 -8
- package/scaffold/instructions/.agents/skills/image/SKILL.md +16 -58
- package/scaffold/instructions/.agents/skills/image/canon-references.md +27 -0
- package/scaffold/instructions/.agents/skills/image/conditioning.md +27 -0
- package/scaffold/instructions/.agents/skills/image/consistency.md +23 -0
- package/scaffold/instructions/.agents/skills/image/editing.md +15 -0
- package/scaffold/instructions/.agents/skills/image/finishing.md +11 -0
- package/scaffold/instructions/.agents/skills/image/models.md +18 -0
- package/scaffold/instructions/.agents/skills/image/prompting.md +25 -0
- package/scaffold/instructions/.agents/skills/image/turnaround-views.md +13 -0
- package/scaffold/instructions/.agents/skills/motion/SKILL.md +31 -47
- package/scaffold/instructions/.agents/skills/motion/catalog-cases.md +24 -4
- package/scaffold/instructions/.agents/skills/motion/compose/composition.md +58 -0
- package/scaffold/instructions/.agents/skills/motion/compose/refusals.md +15 -0
- package/scaffold/instructions/.agents/skills/motion/control-channels.md +20 -8
- package/scaffold/instructions/.agents/skills/motion/diffusion/SKILL.md +24 -0
- package/scaffold/instructions/.agents/skills/motion/diffusion/clips.md +17 -0
- package/scaffold/instructions/.agents/skills/motion/diffusion/hints.md +37 -0
- package/scaffold/instructions/.agents/skills/motion/diffusion/models.md +24 -0
- package/scaffold/instructions/.agents/skills/motion/diffusion/tracing.md +53 -0
- package/scaffold/instructions/.agents/skills/motion/frame-evaluation.md +8 -12
- package/scaffold/instructions/.agents/skills/motion/laws/$verification.md +0 -0
- package/scaffold/instructions/.agents/skills/motion/laws/SKILL.md +19 -0
- package/scaffold/instructions/.agents/skills/motion/laws/extension.md +35 -0
- package/scaffold/instructions/.agents/skills/motion/laws/method-references.md +21 -0
- package/scaffold/instructions/.agents/skills/motion/physical-feedback.md +16 -16
- package/scaffold/instructions/.agents/skills/motion/retargeting.md +8 -10
- package/scaffold/instructions/.agents/skills/motion/segment-review.md +4 -6
- package/scaffold/instructions/.agents/skills/motion/staging.md +21 -13
- package/scaffold/instructions/.agents/skills/production/SKILL.md +19 -19
- package/scaffold/instructions/.agents/skills/production/assembly.md +14 -12
- package/scaffold/instructions/.agents/skills/production/captions.md +15 -0
- package/scaffold/instructions/.agents/skills/production/media-records.md +13 -12
- package/scaffold/instructions/.agents/skills/production/project-context.md +33 -12
- package/scaffold/instructions/.agents/skills/production/reorganization.md +13 -0
- package/scaffold/instructions/.agents/skills/production/stage-caches.md +11 -11
- package/scaffold/instructions/.agents/skills/production/sustained-runs.md +9 -9
- package/scaffold/instructions/.agents/skills/review/SKILL.md +3 -5
- package/scaffold/instructions/.agents/skills/review/delivery-review.md +25 -29
- package/scaffold/instructions/.agents/skills/review/estimation.md +10 -10
- package/scaffold/instructions/.agents/skills/review/independent-reading.md +10 -18
- package/scaffold/instructions/.agents/skills/review/narrative-rounds.md +10 -36
- package/scaffold/instructions/.agents/skills/review/source-review.md +6 -18
- package/scaffold/instructions/.agents/skills/story/SKILL.md +11 -11
- package/scaffold/instructions/.agents/skills/story/answers.md +27 -0
- package/scaffold/instructions/.agents/skills/story/correction/inspection.md +8 -12
- package/scaffold/instructions/.agents/skills/story/correction/repair.md +8 -12
- package/scaffold/instructions/.agents/skills/story/document-layout.md +9 -12
- package/scaffold/instructions/.agents/skills/story/layers/SKILL.md +10 -9
- package/scaffold/instructions/.agents/skills/story/layers/brief.md +7 -19
- package/scaffold/instructions/.agents/skills/story/layers/notation.md +25 -16
- package/scaffold/instructions/.agents/skills/story/layers/screenplay.md +23 -7
- package/scaffold/instructions/.agents/skills/story/layers/scripts.md +4 -4
- package/scaffold/instructions/.agents/skills/story/layers/settings.md +10 -16
- package/scaffold/instructions/.agents/skills/story/layers/shots.md +27 -0
- package/scaffold/instructions/.agents/skills/story/layers/treatments.md +4 -4
- package/scaffold/instructions/.agents/skills/story/planning/SKILL.md +4 -4
- package/scaffold/instructions/.agents/skills/story/planning/direction.md +4 -4
- package/scaffold/instructions/.agents/skills/story/planning/discovery.md +8 -7
- package/scaffold/instructions/.agents/skills/story/planning/requirements.md +11 -11
- package/scaffold/instructions/.agents/skills/story/planning/research.md +24 -11
- package/scaffold/instructions/.agents/skills/story/workflow/SKILL.md +14 -0
- package/scaffold/instructions/.agents/skills/story/workflow/long.md +38 -0
- package/scaffold/instructions/.agents/skills/story/workflow/routes.md +40 -0
- package/scaffold/instructions/.agents/skills/story/workflow/short.md +33 -0
- package/scaffold/instructions/.agents/skills/video/SKILL.md +12 -21
- package/scaffold/instructions/.agents/skills/video/diffusion/SKILL.md +21 -0
- package/scaffold/instructions/.agents/skills/video/diffusion/continuity.md +21 -0
- package/scaffold/instructions/.agents/skills/video/diffusion/hints.md +14 -0
- package/scaffold/instructions/.agents/skills/video/diffusion/models.md +26 -0
- package/scaffold/instructions/.agents/skills/video/diffusion/prompts.md +45 -0
- package/scaffold/instructions/.agents/skills/video/finishing.md +44 -0
- package/scaffold/instructions/.agents/skills/video/generation.md +24 -13
- package/scaffold/instructions/.agents/skills/video/requests.md +46 -0
- package/scaffold/instructions/.agents/skills/visual-debugging/SKILL.md +5 -6
- package/scaffold/instructions/AGENTS.md +30 -56
- package/scaffold/production/PROJECT.md +1 -1
- package/scaffold/production/README.md +50 -96
- package/scaffold/production/_gitignore +1 -2
- package/scaffold/production/index.html +4 -8
- package/scaffold/production/lint.config.ts +1 -1
- package/scaffold/production/package.json +31 -31
- package/scaffold/production/src/IFilm.ts +3 -3
- package/scaffold/production/src/IFilmProduction.ts +16 -5
- package/scaffold/production/src/composition/films/index.ts +3 -2
- package/scaffold/production/src/composition/films/starter.ts +2 -2
- package/scaffold/production/src/main.ts +9 -195
- package/scaffold/production/src/markFilmProduction.ts +43 -0
- package/scaffold/production/src/selectFilm.ts +3 -5
- package/scaffold/production/src/subjects.ts +59 -0
- package/scaffold/production/vite.config.ts +4 -2
- package/scaffold/workspace/README.md +5 -7
- package/scaffold/workspace/package.json +1 -1
- package/src/IAutoMovieScaffoldProps.ts +15 -6
- package/src/assertScaffoldProjectName.ts +1 -1
- package/src/createAutoMovieScaffold.ts +152 -0
- package/src/index.ts +1 -46
- package/src/listAutoMovieScaffoldFiles.ts +2 -2
- package/build/resolveTemplateVersions.ts +0 -92
- package/build/syncScaffoldInstructions.ts +0 -28
- package/lib/AUTOMOVIE_TEMPLATE_CATALOGS.d.ts +0 -14
- package/lib/AUTOMOVIE_TEMPLATE_CATALOGS.js +0 -52
- package/lib/AUTOMOVIE_TEMPLATE_CATALOGS.js.map +0 -1
- package/lib/AUTOMOVIE_TEMPLATE_VERSIONS.d.ts +0 -2
- package/lib/AUTOMOVIE_TEMPLATE_VERSIONS.js +0 -42
- package/lib/AUTOMOVIE_TEMPLATE_VERSIONS.js.map +0 -1
- package/lib/AutoMovieScaffoldLayer.d.ts +0 -15
- package/lib/AutoMovieScaffoldLayer.js +0 -3
- package/lib/AutoMovieScaffoldLayer.js.map +0 -1
- package/lib/FILE_ATTRIBUTE_DIRECTORY.d.ts +0 -2
- package/lib/FILE_ATTRIBUTE_DIRECTORY.js +0 -6
- package/lib/FILE_ATTRIBUTE_DIRECTORY.js.map +0 -1
- package/lib/IAutoMovieCatalogVersionProps.d.ts +0 -16
- package/lib/IAutoMovieCatalogVersionProps.js +0 -3
- package/lib/IAutoMovieCatalogVersionProps.js.map +0 -1
- package/lib/IAutoMovieScaffoldSourceEntry.d.ts +0 -18
- package/lib/IAutoMovieScaffoldSourceEntry.js +0 -3
- package/lib/IAutoMovieScaffoldSourceEntry.js.map +0 -1
- package/lib/IAutoMovieTemplateDependencyVersionsProps.d.ts +0 -17
- package/lib/IAutoMovieTemplateDependencyVersionsProps.js +0 -3
- package/lib/IAutoMovieTemplateDependencyVersionsProps.js.map +0 -1
- package/lib/IAutoMovieWorkspacePackageVersions.d.ts +0 -34
- package/lib/IAutoMovieWorkspacePackageVersions.js +0 -3
- package/lib/IAutoMovieWorkspacePackageVersions.js.map +0 -1
- package/lib/IBoundChild.d.ts +0 -71
- package/lib/IBoundChild.js +0 -3
- package/lib/IBoundChild.js.map +0 -1
- package/lib/IBoundChildStatus.d.ts +0 -20
- package/lib/IBoundChildStatus.js +0 -3
- package/lib/IBoundChildStatus.js.map +0 -1
- package/lib/IBoundParent.d.ts +0 -61
- package/lib/IBoundParent.js +0 -3
- package/lib/IBoundParent.js.map +0 -1
- package/lib/IBoundParentStatus.d.ts +0 -14
- package/lib/IBoundParentStatus.js +0 -3
- package/lib/IBoundParentStatus.js.map +0 -1
- package/lib/ICreateResult.d.ts +0 -27
- package/lib/ICreateResult.js +0 -3
- package/lib/ICreateResult.js.map +0 -1
- package/lib/IScaffoldCompletedFilePublicationOutcome.d.ts +0 -16
- package/lib/IScaffoldCompletedFilePublicationOutcome.js +0 -3
- package/lib/IScaffoldCompletedFilePublicationOutcome.js.map +0 -1
- package/lib/IScaffoldCompletedPublication.d.ts +0 -15
- package/lib/IScaffoldCompletedPublication.js +0 -3
- package/lib/IScaffoldCompletedPublication.js.map +0 -1
- package/lib/IScaffoldFileSnapshot.d.ts +0 -24
- package/lib/IScaffoldFileSnapshot.js +0 -3
- package/lib/IScaffoldFileSnapshot.js.map +0 -1
- package/lib/IScaffoldParentPublicationRequest.d.ts +0 -26
- package/lib/IScaffoldParentPublicationRequest.js +0 -3
- package/lib/IScaffoldParentPublicationRequest.js.map +0 -1
- package/lib/IScaffoldPartialFilePublicationOutcome.d.ts +0 -22
- package/lib/IScaffoldPartialFilePublicationOutcome.js +0 -3
- package/lib/IScaffoldPartialFilePublicationOutcome.js.map +0 -1
- package/lib/IScaffoldPhysicalDirectory.d.ts +0 -20
- package/lib/IScaffoldPhysicalDirectory.js +0 -3
- package/lib/IScaffoldPhysicalDirectory.js.map +0 -1
- package/lib/IScaffoldPosixConstants.d.ts +0 -24
- package/lib/IScaffoldPosixConstants.js +0 -3
- package/lib/IScaffoldPosixConstants.js.map +0 -1
- package/lib/IScaffoldPublicationEntry.d.ts +0 -20
- package/lib/IScaffoldPublicationEntry.js +0 -3
- package/lib/IScaffoldPublicationEntry.js.map +0 -1
- package/lib/IScaffoldPublicationFailure.d.ts +0 -18
- package/lib/IScaffoldPublicationFailure.js +0 -3
- package/lib/IScaffoldPublicationFailure.js.map +0 -1
- package/lib/IScaffoldPublicationOptions.d.ts +0 -17
- package/lib/IScaffoldPublicationOptions.js +0 -3
- package/lib/IScaffoldPublicationOptions.js.map +0 -1
- package/lib/IScaffoldPublicationReceipt.d.ts +0 -25
- package/lib/IScaffoldPublicationReceipt.js +0 -3
- package/lib/IScaffoldPublicationReceipt.js.map +0 -1
- package/lib/IScaffoldRefusedFilePublicationOutcome.d.ts +0 -18
- package/lib/IScaffoldRefusedFilePublicationOutcome.js +0 -3
- package/lib/IScaffoldRefusedFilePublicationOutcome.js.map +0 -1
- package/lib/IScaffoldSyncPlan.d.ts +0 -25
- package/lib/IScaffoldSyncPlan.js +0 -3
- package/lib/IScaffoldSyncPlan.js.map +0 -1
- package/lib/IScaffoldSyncProps.d.ts +0 -16
- package/lib/IScaffoldSyncProps.js +0 -3
- package/lib/IScaffoldSyncProps.js.map +0 -1
- package/lib/IWindowsFileInformation.d.ts +0 -20
- package/lib/IWindowsFileInformation.js +0 -3
- package/lib/IWindowsFileInformation.js.map +0 -1
- package/lib/IWindowsLibrary.d.ts +0 -127
- package/lib/IWindowsLibrary.js +0 -3
- package/lib/IWindowsLibrary.js.map +0 -1
- package/lib/SCAFFOLD_SYNC_STATE_FILE.d.ts +0 -4
- package/lib/SCAFFOLD_SYNC_STATE_FILE.js +0 -8
- package/lib/SCAFFOLD_SYNC_STATE_FILE.js.map +0 -1
- package/lib/ScaffoldFilePublicationOutcome.d.ts +0 -14
- package/lib/ScaffoldFilePublicationOutcome.js +0 -3
- package/lib/ScaffoldFilePublicationOutcome.js.map +0 -1
- package/lib/ScaffoldParentChangedError.d.ts +0 -11
- package/lib/ScaffoldParentChangedError.js +0 -19
- package/lib/ScaffoldParentChangedError.js.map +0 -1
- package/lib/ScaffoldPublicationError.d.ts +0 -17
- package/lib/ScaffoldPublicationError.js +0 -46
- package/lib/ScaffoldPublicationError.js.map +0 -1
- package/lib/assertOrdinaryFile.d.ts +0 -13
- package/lib/assertOrdinaryFile.js +0 -20
- package/lib/assertOrdinaryFile.js.map +0 -1
- package/lib/assertOrdinarySingleLinkFile.d.ts +0 -13
- package/lib/assertOrdinarySingleLinkFile.js +0 -22
- package/lib/assertOrdinarySingleLinkFile.js.map +0 -1
- package/lib/assertScaffoldOwnership.d.ts +0 -13
- package/lib/assertScaffoldOwnership.js +0 -24
- package/lib/assertScaffoldOwnership.js.map +0 -1
- package/lib/assertScaffoldPhysicalDirectory.d.ts +0 -16
- package/lib/assertScaffoldPhysicalDirectory.js +0 -26
- package/lib/assertScaffoldPhysicalDirectory.js.map +0 -1
- package/lib/attachScaffoldSyncState.d.ts +0 -18
- package/lib/attachScaffoldSyncState.js +0 -30
- package/lib/attachScaffoldSyncState.js.map +0 -1
- package/lib/captureEmptyScaffoldPhysicalDirectory.d.ts +0 -13
- package/lib/captureEmptyScaffoldPhysicalDirectory.js +0 -69
- package/lib/captureEmptyScaffoldPhysicalDirectory.js.map +0 -1
- package/lib/captureScaffoldFile.d.ts +0 -13
- package/lib/captureScaffoldFile.js +0 -67
- package/lib/captureScaffoldFile.js.map +0 -1
- package/lib/captureScaffoldPhysicalDirectory.d.ts +0 -13
- package/lib/captureScaffoldPhysicalDirectory.js +0 -63
- package/lib/captureScaffoldPhysicalDirectory.js.map +0 -1
- package/lib/combineScaffoldFailures.d.ts +0 -19
- package/lib/combineScaffoldFailures.js +0 -32
- package/lib/combineScaffoldFailures.js.map +0 -1
- package/lib/createAutoMovieCatalogVersionResolver.d.ts +0 -17
- package/lib/createAutoMovieCatalogVersionResolver.js +0 -64
- package/lib/createAutoMovieCatalogVersionResolver.js.map +0 -1
- package/lib/createScaffoldSyncState.d.ts +0 -12
- package/lib/createScaffoldSyncState.js +0 -26
- package/lib/createScaffoldSyncState.js.map +0 -1
- package/lib/createScaffoldVariables.d.ts +0 -25
- package/lib/createScaffoldVariables.js +0 -41
- package/lib/createScaffoldVariables.js.map +0 -1
- package/lib/ensureScaffoldBaseDirectory.d.ts +0 -19
- package/lib/ensureScaffoldBaseDirectory.js +0 -89
- package/lib/ensureScaffoldBaseDirectory.js.map +0 -1
- package/lib/ensureScaffoldFileDirectory.d.ts +0 -25
- package/lib/ensureScaffoldFileDirectory.js +0 -103
- package/lib/ensureScaffoldFileDirectory.js.map +0 -1
- package/lib/inside.d.ts +0 -12
- package/lib/inside.js +0 -57
- package/lib/inside.js.map +0 -1
- package/lib/isScaffoldInstruction.d.ts +0 -12
- package/lib/isScaffoldInstruction.js +0 -29
- package/lib/isScaffoldInstruction.js.map +0 -1
- package/lib/loadWindowsLibrary.d.ts +0 -13
- package/lib/loadWindowsLibrary.js +0 -180
- package/lib/loadWindowsLibrary.js.map +0 -1
- package/lib/mergeScaffoldFiles.d.ts +0 -18
- package/lib/mergeScaffoldFiles.js +0 -37
- package/lib/mergeScaffoldFiles.js.map +0 -1
- package/lib/missingPath.d.ts +0 -12
- package/lib/missingPath.js +0 -18
- package/lib/missingPath.js.map +0 -1
- package/lib/nativeError.d.ts +0 -12
- package/lib/nativeError.js +0 -17
- package/lib/nativeError.js.map +0 -1
- package/lib/openPosixParent.d.ts +0 -13
- package/lib/openPosixParent.js +0 -135
- package/lib/openPosixParent.js.map +0 -1
- package/lib/openWindowsParent.d.ts +0 -13
- package/lib/openWindowsParent.js +0 -224
- package/lib/openWindowsParent.js.map +0 -1
- package/lib/overwriteScaffoldFile.d.ts +0 -22
- package/lib/overwriteScaffoldFile.js +0 -214
- package/lib/overwriteScaffoldFile.js.map +0 -1
- package/lib/physicalDirectoryIdentity.d.ts +0 -15
- package/lib/physicalDirectoryIdentity.js +0 -65
- package/lib/physicalDirectoryIdentity.js.map +0 -1
- package/lib/physicalVersion.d.ts +0 -13
- package/lib/physicalVersion.js +0 -18
- package/lib/physicalVersion.js.map +0 -1
- package/lib/planScaffoldPublication.d.ts +0 -22
- package/lib/planScaffoldPublication.js +0 -100
- package/lib/planScaffoldPublication.js.map +0 -1
- package/lib/planScaffoldSync.d.ts +0 -14
- package/lib/planScaffoldSync.js +0 -102
- package/lib/planScaffoldSync.js.map +0 -1
- package/lib/publishFiles.d.ts +0 -23
- package/lib/publishFiles.js +0 -124
- package/lib/publishFiles.js.map +0 -1
- package/lib/publishNativeScaffoldFile.d.ts +0 -21
- package/lib/publishNativeScaffoldFile.js +0 -211
- package/lib/publishNativeScaffoldFile.js.map +0 -1
- package/lib/publishScaffoldCandidate.d.ts +0 -24
- package/lib/publishScaffoldCandidate.js +0 -70
- package/lib/publishScaffoldCandidate.js.map +0 -1
- package/lib/readAutoMovieScaffoldSources.d.ts +0 -20
- package/lib/readAutoMovieScaffoldSources.js +0 -103
- package/lib/readAutoMovieScaffoldSources.js.map +0 -1
- package/lib/readScaffoldSyncFile.d.ts +0 -16
- package/lib/readScaffoldSyncFile.js +0 -64
- package/lib/readScaffoldSyncFile.js.map +0 -1
- package/lib/renderScaffold.d.ts +0 -19
- package/lib/renderScaffold.js +0 -33
- package/lib/renderScaffold.js.map +0 -1
- package/lib/renderScaffoldEntries.d.ts +0 -20
- package/lib/renderScaffoldEntries.js +0 -106
- package/lib/renderScaffoldEntries.js.map +0 -1
- package/lib/renderScaffoldInstructions.d.ts +0 -17
- package/lib/renderScaffoldInstructions.js +0 -23
- package/lib/renderScaffoldInstructions.js.map +0 -1
- package/lib/renderScaffoldLayer.d.ts +0 -20
- package/lib/renderScaffoldLayer.js +0 -28
- package/lib/renderScaffoldLayer.js.map +0 -1
- package/lib/renderTemplate.d.ts +0 -19
- package/lib/renderTemplate.js +0 -56
- package/lib/renderTemplate.js.map +0 -1
- package/lib/renderWorkspaceProductionScaffold.d.ts +0 -19
- package/lib/renderWorkspaceProductionScaffold.js +0 -30
- package/lib/renderWorkspaceProductionScaffold.js.map +0 -1
- package/lib/renderWorkspaceScaffold.d.ts +0 -19
- package/lib/renderWorkspaceScaffold.js +0 -33
- package/lib/renderWorkspaceScaffold.js.map +0 -1
- package/lib/replaceSharedScaffoldFile.d.ts +0 -30
- package/lib/replaceSharedScaffoldFile.js +0 -106
- package/lib/replaceSharedScaffoldFile.js.map +0 -1
- package/lib/resolveAutoMovieCatalogVersion.d.ts +0 -19
- package/lib/resolveAutoMovieCatalogVersion.js +0 -24
- package/lib/resolveAutoMovieCatalogVersion.js.map +0 -1
- package/lib/resolveAutoMovieTemplateDependencyVersions.d.ts +0 -19
- package/lib/resolveAutoMovieTemplateDependencyVersions.js +0 -62
- package/lib/resolveAutoMovieTemplateDependencyVersions.js.map +0 -1
- package/lib/resolveScaffoldPosixConstants.d.ts +0 -13
- package/lib/resolveScaffoldPosixConstants.js +0 -44
- package/lib/resolveScaffoldPosixConstants.js.map +0 -1
- package/lib/scaffoldAssetDirectory.d.ts +0 -19
- package/lib/scaffoldAssetDirectory.js +0 -63
- package/lib/scaffoldAssetDirectory.js.map +0 -1
- package/lib/scaffoldPhysicalIdentity.d.ts +0 -18
- package/lib/scaffoldPhysicalIdentity.js +0 -22
- package/lib/scaffoldPhysicalIdentity.js.map +0 -1
- package/lib/scaffoldSharedSkillDirectory.d.ts +0 -17
- package/lib/scaffoldSharedSkillDirectory.js +0 -62
- package/lib/scaffoldSharedSkillDirectory.js.map +0 -1
- package/lib/skills/3d-modeling/crafting.md +0 -82
- package/lib/skills/3d-modeling/diffusion.md +0 -34
- package/lib/skills/3d-modeling/inspection.md +0 -54
- package/lib/skills/3d-modeling/lofting.md +0 -43
- package/lib/skills/3d-modeling/modularization.md +0 -31
- package/lib/skills/3d-modeling/recovery.md +0 -29
- package/lib/skills/development/repair.md +0 -13
- package/lib/skills/documentation/writing.md +0 -51
- package/lib/skills/motion/layers.md +0 -7
- package/lib/skills/motion/transitions.md +0 -27
- package/lib/skills/prompting/SKILL.md +0 -80
- package/lib/syncScaffold.d.ts +0 -19
- package/lib/syncScaffold.js +0 -28
- package/lib/syncScaffold.js.map +0 -1
- package/lib/writeFiles.d.ts +0 -20
- package/lib/writeFiles.js +0 -33
- package/lib/writeFiles.js.map +0 -1
- package/lib/writeScaffoldFile.d.ts +0 -35
- package/lib/writeScaffoldFile.js +0 -107
- package/lib/writeScaffoldFile.js.map +0 -1
- package/lib/writtenVersion.d.ts +0 -13
- package/lib/writtenVersion.js +0 -18
- package/lib/writtenVersion.js.map +0 -1
- package/scaffold/instructions/.agents/skills/audio/local-speech.md +0 -11
- package/scaffold/instructions/.agents/skills/contracts/story/shared/naturalness/obligations/screenplay.md +0 -9
- package/scaffold/instructions/.agents/skills/contracts/story/shared/naturalness/screenplay.md +0 -13
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/naturalness/obligations/screenplay.md +0 -11
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/naturalness/screenplay.md +0 -25
- package/scaffold/instructions/.agents/skills/motion/method-references.md +0 -23
- package/scaffold/instructions/.agents/skills/production/sync-and-reorganization.md +0 -21
- package/scaffold/instructions/.agents/skills/story/correction/SKILL.md +0 -13
- package/scaffold/instructions/.agents/skills/story/evidence/SKILL.md +0 -13
- package/scaffold/instructions/.agents/skills/story/evidence/answer-placement.md +0 -13
- package/scaffold/instructions/.agents/skills/story/evidence/answer-writing.md +0 -23
- package/scaffold/instructions/.agents/skills/story/naturalness/SKILL.md +0 -13
- package/scaffold/instructions/.agents/skills/story/naturalness/rewriting.md +0 -17
- package/scaffold/instructions/.agents/skills/story/naturalness/transfer.md +0 -11
- package/scaffold/instructions/.agents/skills/story/workflow.md +0 -61
- package/scaffold/instructions/.agents/skills/video/diffusion.md +0 -33
- package/scaffold/instructions/.agents/skills/video/prompts.md +0 -51
- package/scaffold/production/evidence.config.ts +0 -12
- package/scaffold/production/src/executable/capture.ts +0 -487
- package/scaffold/production/src/executable/planCaptureStills.ts +0 -65
- package/scaffold/production/src/executable/render/headlessCapture/AutoMovieHeadlessCaptureError.ts +0 -1
- package/scaffold/production/src/executable/render/headlessCapture/AutoMovieHeadlessCaptureErrorCode.ts +0 -1
- package/scaffold/production/src/executable/render/headlessCapture/AutoMovieHeadlessWaitUntil.ts +0 -1
- package/scaffold/production/src/executable/render/headlessCapture/IAutoMovieHeadlessCaptureOptions.ts +0 -79
- package/scaffold/production/src/executable/render/headlessCapture/IAutoMovieHeadlessCaptureSession.ts +0 -39
- package/scaffold/production/src/executable/render/headlessCapture/IAutoMovieHeadlessFrameWriter.ts +0 -20
- package/scaffold/production/src/executable/render/headlessCapture/IAutoMovieHeadlessLocator.ts +0 -1
- package/scaffold/production/src/executable/render/headlessCapture/IAutoMovieHeadlessPage.ts +0 -1
- package/scaffold/production/src/executable/render/headlessCapture/createHeadlessCaptureAdapter.ts +0 -92
- package/scaffold/production/src/executable/render/headlessCapture/index.ts +0 -9
- package/scaffold/production/src/executable/render/node/IAutoMovieViewerVideoOptions.ts +0 -128
- package/scaffold/production/src/executable/render/node/IAutoMovieViewerVideoResult.ts +0 -43
- package/scaffold/production/src/executable/render/node/IProductionRenditionClip.ts +0 -44
- package/scaffold/production/src/executable/render/node/acquireViewerBrowser.ts +0 -24
- package/scaffold/production/src/executable/render/node/addProductionMp4Sample.ts +0 -89
- package/scaffold/production/src/executable/render/node/appendLosslessVideoClip.ts +0 -62
- package/scaffold/production/src/executable/render/node/assembleProductionChunkVideoMp4.ts +0 -167
- package/scaffold/production/src/executable/render/node/assertProductionFeatureUsesRenditionClips.ts +0 -184
- package/scaffold/production/src/executable/render/node/assertProductionFeatureUsesRenditionVideo.ts +0 -127
- package/scaffold/production/src/executable/render/node/assertProductionRenditionClipDelivery.ts +0 -102
- package/scaffold/production/src/executable/render/node/cache/IAutoMovieDirectoryArtifactStore.ts +0 -59
- package/scaffold/production/src/executable/render/node/cache/IAutoMovieViewerFrameCacheReport.ts +0 -30
- package/scaffold/production/src/executable/render/node/cache/cacheViewerCaptureSession.ts +0 -187
- package/scaffold/production/src/executable/render/node/cache/composeViewerFrameKeys.ts +0 -55
- package/scaffold/production/src/executable/render/node/cache/createAutoMovieArtifactMiddleware.ts +0 -107
- package/scaffold/production/src/executable/render/node/cache/createAutoMovieDirectoryArtifactStore.ts +0 -203
- package/scaffold/production/src/executable/render/node/cache/digestAutoMovieSourceTree.ts +0 -66
- package/scaffold/production/src/executable/render/node/cache/readViewerFrameStates.ts +0 -95
- package/scaffold/production/src/executable/render/node/capture/DEFAULT_CHROME_EXECUTABLE.ts +0 -11
- package/scaffold/production/src/executable/render/node/capture/IAutoMoviePageOperationFailure.ts +0 -13
- package/scaffold/production/src/executable/render/node/capture/IAutoMoviePageRenderAndSeeArtifact.ts +0 -30
- package/scaffold/production/src/executable/render/node/capture/IAutoMoviePageRenderAndSeeOptions.ts +0 -51
- package/scaffold/production/src/executable/render/node/capture/IAutoMoviePageSequenceMetadata.ts +0 -27
- package/scaffold/production/src/executable/render/node/capture/IAutoMoviePageSequenceRenderArtifact.ts +0 -44
- package/scaffold/production/src/executable/render/node/capture/IAutoMoviePageSequenceRenderOptions.ts +0 -43
- package/scaffold/production/src/executable/render/node/capture/IAutoMovieSequenceDissolvePixelCheck.ts +0 -39
- package/scaffold/production/src/executable/render/node/capture/captureRenderAndSee.ts +0 -233
- package/scaffold/production/src/executable/render/node/capture/captureSequenceRenderAndSee.ts +0 -377
- package/scaffold/production/src/executable/render/node/capture/index.ts +0 -14
- package/scaffold/production/src/executable/render/node/capture/preserveCleanupFailure.ts +0 -34
- package/scaffold/production/src/executable/render/node/capture/renderAndSeeCommand.ts +0 -169
- package/scaffold/production/src/executable/render/node/capture/renderSequenceAndSeeCommand.ts +0 -165
- package/scaffold/production/src/executable/render/node/capture/verifySequenceDissolvePixels.ts +0 -179
- package/scaffold/production/src/executable/render/node/conformProductionRenditionVideoMp4.ts +0 -86
- package/scaffold/production/src/executable/render/node/conformProductionVisualDeliveryVideoMp4.ts +0 -230
- package/scaffold/production/src/executable/render/node/decodeAutoMovieDelivery.ts +0 -253
- package/scaffold/production/src/executable/render/node/equalRational.ts +0 -36
- package/scaffold/production/src/executable/render/node/exactProductionClockProduct.ts +0 -26
- package/scaffold/production/src/executable/render/node/exportModelToGLB.ts +0 -267
- package/scaffold/production/src/executable/render/node/index.ts +0 -27
- package/scaffold/production/src/executable/render/node/loadModelGltfCore.ts +0 -18
- package/scaffold/production/src/executable/render/node/mixAutoMovieAudioCues.ts +0 -74
- package/scaffold/production/src/executable/render/node/muxProductionFeatureMp4.ts +0 -170
- package/scaffold/production/src/executable/render/node/neutralTrackPresentation.ts +0 -59
- package/scaffold/production/src/executable/render/node/normalizeProductionH264Mp4.ts +0 -110
- package/scaffold/production/src/executable/render/node/openLosslessVideoTrack.ts +0 -81
- package/scaffold/production/src/executable/render/node/parseMp4.ts +0 -46
- package/scaffold/production/src/executable/render/node/parseProductionMp4Output.ts +0 -70
- package/scaffold/production/src/executable/render/node/parseProductionRenditionClip.ts +0 -92
- package/scaffold/production/src/executable/render/node/planViewerVideo.ts +0 -140
- package/scaffold/production/src/executable/render/node/probeParsedProductionVideoMp4.ts +0 -48
- package/scaffold/production/src/executable/render/node/probeProductionPngPicture.ts +0 -223
- package/scaffold/production/src/executable/render/node/probeProductionRenderedMedia.ts +0 -355
- package/scaffold/production/src/executable/render/node/probeProductionVideoMp4.ts +0 -27
- package/scaffold/production/src/executable/render/node/probeVideoTrack.ts +0 -220
- package/scaffold/production/src/executable/render/node/productionRenditionVideoPlan.ts +0 -149
- package/scaffold/production/src/executable/render/node/recordViewerPlayback.ts +0 -137
- package/scaffold/production/src/executable/render/node/renderViewerFrames.ts +0 -139
- package/scaffold/production/src/executable/render/node/renderViewerVideo.ts +0 -301
- package/scaffold/production/src/executable/render/node/renderViewerVideoSession.ts +0 -75
- package/scaffold/production/src/executable/render/node/residentMp4Box.ts +0 -36
- package/scaffold/production/src/executable/render/node/residentPngJs.ts +0 -26
- package/scaffold/production/src/executable/render/node/runViewerVideoEncoder.ts +0 -58
- package/scaffold/production/src/executable/render/node/sameSampleDescription.ts +0 -43
- package/scaffold/production/src/executable/render/node/sameSampleFlags.ts +0 -28
- package/scaffold/production/src/executable/render/node/sampleBytes.ts +0 -46
- package/scaffold/production/src/executable/render/node/sampleDescription.ts +0 -40
- package/scaffold/production/src/executable/render/node/sampleOptions.ts +0 -37
- package/scaffold/production/src/executable/render/node/serializeDescriptionBox.ts +0 -29
- package/scaffold/production/src/executable/render/node/trimProductionAudioPresentation.ts +0 -115
- package/scaffold/production/src/executable/render/node/verifySampleStorage.ts +0 -86
- package/scaffold/production/src/executable/render/node/writeViewerFrameSheet.ts +0 -101
- package/scaffold/production/src/executable/render.ts +0 -92
- package/scaffold/production/src/executable/review.ts +0 -54
- package/scaffold/production/src/executable/viewer/inspection/createViewerDiskSource.ts +0 -119
- package/scaffold/production/src/executable/viewer/inspection/readViewerMaintainedSourceFiles.ts +0 -64
- package/scaffold/production/src/executable/viewer/node/capture/AutoMovieHeadlessCaptureError.ts +0 -41
- package/scaffold/production/src/executable/viewer/node/capture/AutoMovieHeadlessCaptureErrorCode.ts +0 -22
- package/scaffold/production/src/executable/viewer/node/capture/AutoMovieHeadlessWaitUntil.ts +0 -18
- package/scaffold/production/src/executable/viewer/node/capture/IAutoMovieHeadlessLocator.ts +0 -32
- package/scaffold/production/src/executable/viewer/node/capture/IAutoMovieHeadlessPage.ts +0 -130
- package/scaffold/production/src/executable/viewer/node/capture/IViewerCaptureOptions.ts +0 -38
- package/scaffold/production/src/executable/viewer/node/capture/IViewerCaptureSession.ts +0 -41
- package/scaffold/production/src/executable/viewer/node/capture/createViewerCaptureSession.ts +0 -154
- package/scaffold/production/src/executable/viewer/node/capture/index.ts +0 -8
- package/scaffold/production/src/executable/viewer/node/index.ts +0 -2
- package/scaffold/production/src/executable/viewer/node/raster/AutoMovieRasterLighting.ts +0 -221
- package/scaffold/production/src/executable/viewer/node/raster/AutoMovieRasterSheet.ts +0 -175
- package/scaffold/production/src/executable/viewer/node/raster/AutoMovieRasterTarget.ts +0 -282
- package/scaffold/production/src/executable/viewer/node/raster/IAutoMovieSceneRaster.ts +0 -62
- package/scaffold/production/src/executable/viewer/node/raster/IRasterizeAutoMovieSceneProps.ts +0 -34
- package/scaffold/production/src/executable/viewer/node/raster/encodeAutoMovieRasterPng.ts +0 -77
- package/scaffold/production/src/executable/viewer/node/raster/index.ts +0 -8
- package/scaffold/production/src/executable/viewer/node/raster/rasterizeAutoMovieScene.ts +0 -594
- package/scaffold/production/src/executable/viewer/node/raster/stampAutoMovieRasterLabel.ts +0 -120
- package/scaffold/production/src/executable/viewer/process/ProcessOwnership.ts +0 -102
- package/scaffold/production/src/executable/viewer/process/internal/IProcessChildObservation.ts +0 -18
- package/scaffold/production/src/executable/viewer/process/internal/IProcessOwnershipHost.ts +0 -70
- package/scaffold/production/src/executable/viewer/process/internal/ProcessOwnershipController.ts +0 -125
- package/scaffold/production/src/executable/viewer/process/internal/WindowsProcessOwnershipPrograms.ts +0 -52
- package/scaffold/production/src/executable/viewer/process/internal/createNodeProcessOwnershipHost.ts +0 -41
- package/scaffold/production/src/executable/viewer/process/internal/decodeLinuxProcessIdentity.ts +0 -22
- package/scaffold/production/src/executable/viewer/process/internal/decodePosixProcessIdentity.ts +0 -24
- package/scaffold/production/src/executable/viewer/process/internal/decodeWindowsProcessResult.ts +0 -24
- package/scaffold/production/src/executable/viewer/process/internal/readNativeProcessIdentity.ts +0 -45
- package/scaffold/production/src/executable/viewer/process/internal/requireProcessId.ts +0 -15
- package/scaffold/production/src/executable/viewer/process/internal/resolveProcessIdentityReadError.ts +0 -15
- package/scaffold/production/src/executable/viewer/process/internal/runWindowsProcessOperation.ts +0 -41
- package/scaffold/production/src/executable/viewer/process/internal/selectProcessOwnershipTree.ts +0 -68
- package/scaffold/production/test/features/executable/test_plan_capture_stills.ts +0 -75
- package/scaffold/workspace/pnpm-workspace.yaml +0 -46
- package/src/AUTOMOVIE_TEMPLATE_CATALOGS.ts +0 -48
- package/src/AUTOMOVIE_TEMPLATE_VERSIONS.ts +0 -39
- package/src/AutoMovieScaffoldLayer.ts +0 -18
- package/src/FILE_ATTRIBUTE_DIRECTORY.ts +0 -2
- package/src/IAutoMovieCatalogVersionProps.ts +0 -18
- package/src/IAutoMovieScaffoldSourceEntry.ts +0 -19
- package/src/IAutoMovieTemplateDependencyVersionsProps.ts +0 -19
- package/src/IAutoMovieWorkspacePackageVersions.ts +0 -44
- package/src/IBoundChild.ts +0 -86
- package/src/IBoundChildStatus.ts +0 -24
- package/src/IBoundParent.ts +0 -65
- package/src/IBoundParentStatus.ts +0 -15
- package/src/ICreateResult.ts +0 -35
- package/src/IScaffoldCompletedFilePublicationOutcome.ts +0 -17
- package/src/IScaffoldCompletedPublication.ts +0 -17
- package/src/IScaffoldFileSnapshot.ts +0 -28
- package/src/IScaffoldParentPublicationRequest.ts +0 -29
- package/src/IScaffoldPartialFilePublicationOutcome.ts +0 -25
- package/src/IScaffoldPhysicalDirectory.ts +0 -22
- package/src/IScaffoldPosixConstants.ts +0 -30
- package/src/IScaffoldPublicationEntry.ts +0 -22
- package/src/IScaffoldPublicationFailure.ts +0 -18
- package/src/IScaffoldPublicationOptions.ts +0 -19
- package/src/IScaffoldPublicationReceipt.ts +0 -29
- package/src/IScaffoldRefusedFilePublicationOutcome.ts +0 -20
- package/src/IScaffoldSyncPlan.ts +0 -26
- package/src/IScaffoldSyncProps.ts +0 -16
- package/src/IWindowsFileInformation.ts +0 -24
- package/src/IWindowsLibrary.ts +0 -148
- package/src/SCAFFOLD_SYNC_STATE_FILE.ts +0 -5
- package/src/ScaffoldFilePublicationOutcome.ts +0 -18
- package/src/ScaffoldParentChangedError.ts +0 -14
- package/src/ScaffoldPublicationError.ts +0 -58
- package/src/assertOrdinaryFile.ts +0 -20
- package/src/assertOrdinarySingleLinkFile.ts +0 -26
- package/src/assertScaffoldOwnership.ts +0 -29
- package/src/assertScaffoldPhysicalDirectory.ts +0 -29
- package/src/attachScaffoldSyncState.ts +0 -30
- package/src/captureEmptyScaffoldPhysicalDirectory.ts +0 -45
- package/src/captureScaffoldFile.ts +0 -34
- package/src/captureScaffoldPhysicalDirectory.ts +0 -34
- package/src/combineScaffoldFailures.ts +0 -35
- package/src/createAutoMovieCatalogVersionResolver.ts +0 -117
- package/src/createScaffoldSyncState.ts +0 -33
- package/src/createScaffoldVariables.ts +0 -50
- package/src/ensureScaffoldBaseDirectory.ts +0 -55
- package/src/ensureScaffoldFileDirectory.ts +0 -75
- package/src/inside.ts +0 -25
- package/src/isScaffoldInstruction.ts +0 -29
- package/src/loadWindowsLibrary.ts +0 -277
- package/src/mergeScaffoldFiles.ts +0 -39
- package/src/missingPath.ts +0 -16
- package/src/nativeError.ts +0 -15
- package/src/openPosixParent.ts +0 -155
- package/src/openWindowsParent.ts +0 -305
- package/src/overwriteScaffoldFile.ts +0 -262
- package/src/physicalDirectoryIdentity.ts +0 -33
- package/src/physicalVersion.ts +0 -18
- package/src/planScaffoldPublication.ts +0 -100
- package/src/planScaffoldSync.ts +0 -122
- package/src/publishFiles.ts +0 -120
- package/src/publishNativeScaffoldFile.ts +0 -287
- package/src/publishScaffoldCandidate.ts +0 -94
- package/src/readAutoMovieScaffoldSources.ts +0 -82
- package/src/readScaffoldSyncFile.ts +0 -66
- package/src/renderScaffold.ts +0 -43
- package/src/renderScaffoldEntries.ts +0 -110
- package/src/renderScaffoldInstructions.ts +0 -22
- package/src/renderScaffoldLayer.ts +0 -38
- package/src/renderTemplate.ts +0 -62
- package/src/renderWorkspaceProductionScaffold.ts +0 -35
- package/src/renderWorkspaceScaffold.ts +0 -43
- package/src/replaceSharedScaffoldFile.ts +0 -88
- package/src/resolveAutoMovieCatalogVersion.ts +0 -27
- package/src/resolveAutoMovieTemplateDependencyVersions.ts +0 -70
- package/src/resolveScaffoldPosixConstants.ts +0 -50
- package/src/scaffoldAssetDirectory.ts +0 -30
- package/src/scaffoldPhysicalIdentity.ts +0 -21
- package/src/scaffoldSharedSkillDirectory.ts +0 -25
- package/src/syncScaffold.ts +0 -38
- package/src/writeFiles.ts +0 -48
- package/src/writeScaffoldFile.ts +0 -88
- package/src/writtenVersion.ts +0 -19
- /package/{lib → generated}/skills/contracts/development/common.md +0 -0
- /package/{lib → generated}/skills/visual-debugging/rendering-cost.md +0 -0
- /package/scaffold/instructions/.agents/skills/3d-modeling/{$crafting.md → $crafting} +0 -0
- /package/scaffold/instructions/.agents/skills/3d-modeling/{$diffusion.md → diffusion/$image-hints.md} +0 -0
- /package/scaffold/instructions/.agents/skills/3d-modeling/{$lofting.md → diffusion/$models.md} +0 -0
- /package/scaffold/instructions/.agents/skills/3d-modeling/{$recovery.md → diffusion/$prompts.md} +0 -0
- /package/scaffold/instructions/.agents/skills/{motion/$authoring.md → 3d-modeling/diffusion/$request.md} +0 -0
- /package/scaffold/instructions/.agents/skills/{motion/$contacts.md → 3d-modeling/diffusion/$shape-hints.md} +0 -0
- /package/scaffold/instructions/.agents/skills/motion/{$laws.md → laws/$authoring.md} +0 -0
- /package/scaffold/instructions/.agents/skills/motion/{$layers.md → laws/$contacts.md} +0 -0
- /package/scaffold/instructions/.agents/skills/motion/{$transitions.md → laws/$declaration.md} +0 -0
- /package/scaffold/instructions/.agents/skills/motion/{$variation.md → laws/$transitions.md} +0 -0
- /package/scaffold/instructions/.agents/skills/motion/{$verification.md → laws/$variation.md} +0 -0
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
import type { IAutoMovieProductionVideoProbe } from "@automovie/interface";
|
|
2
|
-
import {
|
|
3
|
-
AUTOMOVIE_MP4_SRGB_COLOUR,
|
|
4
|
-
assertProductionVideoProfile,
|
|
5
|
-
resolveProductionVideoProfile,
|
|
6
|
-
} from "@automovie/render";
|
|
7
|
-
import type { BoxKind, Movie, Sample, Track, createFile } from "mp4box";
|
|
8
|
-
|
|
9
|
-
import { addProductionMp4Sample } from "./addProductionMp4Sample";
|
|
10
|
-
import { openLosslessVideoTrack } from "./openLosslessVideoTrack";
|
|
11
|
-
import { parseMp4 } from "./parseMp4";
|
|
12
|
-
import { probeProductionVideoMp4 } from "./probeProductionVideoMp4";
|
|
13
|
-
import { residentMp4Box } from "./residentMp4Box";
|
|
14
|
-
import { sampleBytes } from "./sampleBytes";
|
|
15
|
-
import { sampleDescription } from "./sampleDescription";
|
|
16
|
-
import { sampleOptions } from "./sampleOptions";
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Rewrite a single-track H.264 MP4 so its sample entry declares sRGB through an `nclx` colour box, copying every coded sample unchanged.
|
|
20
|
-
*
|
|
21
|
-
* The output has one track on the source's media timescale, a duration of `samples * firstSampleDuration` ticks, the source's raster and language, no edit list, and the source's sample entry with every `colr` box, `nclx` or ICC, replaced by one `nclx` box spelling `AUTOMOVIE_MP4_SRGB_COLOUR`. The written file is re-probed and must pass the delivery profile resolved from its own raster and frame rate before it is returned.
|
|
22
|
-
*
|
|
23
|
-
* The rewrite relabels; it never converts pixels and does not read the colour description in the stream's own parameter sets. It is correct only for a stream whose samples were encoded from full-range sRGB with BT.709 coefficients, and a stream encoded otherwise is mislabelled, not refused.
|
|
24
|
-
*
|
|
25
|
-
* Throws `H.264 normalization requires exactly one video track.`, `H.264 normalization requires a video raster.`, `H.264 normalization requires resident video samples.`, the parser's and the container helpers' refusals, and the probe's or the delivery profile's refusal of the written file. No production module calls it at present; the test fixtures that author H.264 inputs reach it.
|
|
26
|
-
*
|
|
27
|
-
* @evidence contracts/development/implementation.md#principled-implementation Samples are copied byte for byte with their own timing and flags, so the elementary stream is untouched, and the `nclx` payload is the H.273 code points in the ISO layout written through the colour box's inherited raw-payload writer; dropping a source edit list and declaring `samples * firstSampleDuration` cannot change an admitted output, because the profile then requires one constant duration, a media duration of exactly that product, and no edit other than one full-length edit at media time zero. The unresolved limitation is the relabelling premise stated in the doc.
|
|
28
|
-
* @evidence contracts/development/implementation.md#clear-and-simple-structure The output container comes from `openLosslessVideoTrack`, sample payloads from `sampleBytes` and their options from `sampleOptions`, the same helpers the lossless splice writers use, so this function owns only the colour-box replacement and the final profile proof. The gap is that no production consumer remains.
|
|
29
|
-
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The colour box is built with mp4box's own `colr` class and its public `data` payload rather than by replacing a writer method, the profile is resolved from the written file rather than assumed, and no input is special-cased; the relabelling of a differently encoded stream remains the violation the doc names.
|
|
30
|
-
* @evidence contracts/development/common.md#meaningful-documentation The doc states the output's clock, raster, edit list and sample entry, the final verification, the relabelling limitation, every refusal, and that only test fixtures call it.
|
|
31
|
-
* @evidence contracts/development/implementation.md#efficient-algorithms The input is parsed once, each of S samples is appended once from a byte view that mp4box copies into a media box, and the serialized output is parsed once. Byte copying and serialization scale with the encoded bytes; the output probe additionally performs O(M + S log(M + 1)) residency work for M output media boxes and inspects the parsed boxes and returned lists, so the full rewrite is not strictly linear in the encoded bytes.
|
|
32
|
-
* @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work Each call rewrites the bytes it is handed and keeps no result; equal inputs give byte-identical output that a caller may store.
|
|
33
|
-
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources During verification the input parse and its copied buffer, source sample views, output sample payloads and boxes, serialized output, and output probe's copied buffer and tables can coexist. Their sizes depend on the uncapped input bytes, sample count and box structure; an exact peak ratio is not established. These objects become collectable when their calls finish, and this function retains only the returned array through its caller, with no handle or background task.
|
|
34
|
-
*/
|
|
35
|
-
export const normalizeProductionH264Mp4: (bytes: Uint8Array) => Uint8Array = (
|
|
36
|
-
bytes: Uint8Array,
|
|
37
|
-
): Uint8Array => {
|
|
38
|
-
const source: { file: ReturnType<typeof createFile>; movie: Movie } =
|
|
39
|
-
parseMp4(bytes);
|
|
40
|
-
const track: Track | undefined = source.movie.videoTracks[0];
|
|
41
|
-
if (track === undefined || source.movie.tracks.length !== 1)
|
|
42
|
-
throw new Error("H.264 normalization requires exactly one video track.");
|
|
43
|
-
if (track.video === undefined)
|
|
44
|
-
throw new Error("H.264 normalization requires a video raster.");
|
|
45
|
-
const samples: Sample[] = source.file.getTrackSamplesInfo(track.id) ?? [];
|
|
46
|
-
const first: Sample | undefined = samples[0];
|
|
47
|
-
if (first === undefined)
|
|
48
|
-
throw new Error("H.264 normalization requires resident video samples.");
|
|
49
|
-
const description: ReturnType<typeof sampleDescription> =
|
|
50
|
-
sampleDescription(first);
|
|
51
|
-
const output: { file: ReturnType<typeof createFile>; track: number } =
|
|
52
|
-
openLosslessVideoTrack({
|
|
53
|
-
label: "Normalized H.264 video",
|
|
54
|
-
name: "AutoMovie explicit sRGB H.264",
|
|
55
|
-
timescale: track.timescale,
|
|
56
|
-
sampleDuration: first.duration,
|
|
57
|
-
frames: samples.length,
|
|
58
|
-
description: {
|
|
59
|
-
type: description.type,
|
|
60
|
-
boxes: [
|
|
61
|
-
...description.boxes.filter(
|
|
62
|
-
(box: BoxKind): boolean => box.type !== "colr",
|
|
63
|
-
),
|
|
64
|
-
productionSrgbColorBox(),
|
|
65
|
-
],
|
|
66
|
-
},
|
|
67
|
-
width: track.video.width,
|
|
68
|
-
height: track.video.height,
|
|
69
|
-
language: track.language,
|
|
70
|
-
});
|
|
71
|
-
for (const sample of samples)
|
|
72
|
-
addProductionMp4Sample(
|
|
73
|
-
output.file,
|
|
74
|
-
output.track,
|
|
75
|
-
sampleBytes(bytes, sample),
|
|
76
|
-
sampleOptions(sample),
|
|
77
|
-
);
|
|
78
|
-
const normalized: Uint8Array = new Uint8Array(output.file.getBuffer().buffer);
|
|
79
|
-
const probe: IAutoMovieProductionVideoProbe =
|
|
80
|
-
probeProductionVideoMp4(normalized);
|
|
81
|
-
assertProductionVideoProfile({
|
|
82
|
-
expected: resolveProductionVideoProfile({
|
|
83
|
-
width: probe.width,
|
|
84
|
-
height: probe.height,
|
|
85
|
-
frameRate: probe.frameRate,
|
|
86
|
-
}),
|
|
87
|
-
actual: probe,
|
|
88
|
-
});
|
|
89
|
-
return normalized;
|
|
90
|
-
};
|
|
91
|
-
|
|
92
|
-
/**
|
|
93
|
-
* An `nclx` colour box spelling `AUTOMOVIE_MP4_SRGB_COLOUR`.
|
|
94
|
-
*
|
|
95
|
-
* The eleven-byte payload is the ISO `colr` layout: the four-character colour type, the three 16-bit H.273 code points, and a final byte whose high bit is the full-range flag. mp4box's `colr` class has no field writer and writes its `data` payload with its own size and header accounting, so the payload is supplied through that public field.
|
|
96
|
-
*/
|
|
97
|
-
const productionSrgbColorBox: () => BoxKind = (): BoxKind => {
|
|
98
|
-
const box: InstanceType<
|
|
99
|
-
ReturnType<typeof residentMp4Box>["BoxParser"]["box"]["colr"]
|
|
100
|
-
> = new (residentMp4Box().BoxParser.box.colr)();
|
|
101
|
-
const payload: Uint8Array = new Uint8Array(11);
|
|
102
|
-
payload.set([0x6e, 0x63, 0x6c, 0x78]);
|
|
103
|
-
const fields: DataView = new DataView(payload.buffer);
|
|
104
|
-
fields.setUint16(4, AUTOMOVIE_MP4_SRGB_COLOUR.primaries);
|
|
105
|
-
fields.setUint16(6, AUTOMOVIE_MP4_SRGB_COLOUR.transfer);
|
|
106
|
-
fields.setUint16(8, AUTOMOVIE_MP4_SRGB_COLOUR.matrix);
|
|
107
|
-
payload[10] = Number(AUTOMOVIE_MP4_SRGB_COLOUR.fullRange) << 7;
|
|
108
|
-
box.data = payload;
|
|
109
|
-
return box;
|
|
110
|
-
};
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import type { createFile } from "mp4box";
|
|
2
|
-
|
|
3
|
-
import { residentMp4Box } from "./residentMp4Box";
|
|
4
|
-
import type { sampleDescription } from "./sampleDescription";
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Open a new in-memory MP4 with one empty video track that copied H.264 samples are appended to.
|
|
8
|
-
*
|
|
9
|
-
* The movie and media clocks both use `timescale`, and the declared duration is `frames * sampleDuration` ticks on that clock. The track reuses the source `description` boxes by reference, retaining their decoder configuration for copied samples. Throws `<label> duration exceeds the exact MP4 clock range.` when that duration is not a safe integer, before any file is created; individual ISO field representability remains the writer's responsibility rather than a consequence of JavaScript safe-integer admission.
|
|
10
|
-
*
|
|
11
|
-
* @evidence contracts/development/implementation.md#principled-implementation The duration is written as exact integer ticks after a safe-integer check, because an MP4 clock is an integer count and a rounded product would declare a runtime the samples do not have; the brands are the ISO base-media set every production video already carries.
|
|
12
|
-
* @evidence contracts/development/implementation.md#clear-and-simple-structure Chunk assembly, repaint conform, visual-lane conform and H.264 normalization open their output through this helper, so the container shape and safe-integer duration refusal live here once and each writer supplies its track name and source facts.
|
|
13
|
-
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The function copies the caller's description, raster and language without substitution and refuses an unrepresentable duration instead of clamping it.
|
|
14
|
-
* @evidence contracts/development/common.md#meaningful-documentation The doc states the clock both boxes use, how the duration is formed and in what unit, why the description is reused, and the refusal with its message.
|
|
15
|
-
* @evidence contracts/development/implementation.md#efficient-algorithms Cost is constant in the frame count: one multiplication, one box tree of fixed shape, and the description boxes attached by reference, since mp4box's `addTrack` adds them to the sample entry without copying.
|
|
16
|
-
* @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work Each call opens a distinct output file for one writer invocation, so no two calls produce interchangeable results.
|
|
17
|
-
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources The returned file object is the caller's and holds the track, the referenced source description boxes and every sample later appended to it until the caller drops it; it opens no OS handle or task.
|
|
18
|
-
*/
|
|
19
|
-
export const openLosslessVideoTrack: (props: {
|
|
20
|
-
label: string;
|
|
21
|
-
name: string;
|
|
22
|
-
timescale: number;
|
|
23
|
-
sampleDuration: number;
|
|
24
|
-
frames: number;
|
|
25
|
-
description: ReturnType<typeof sampleDescription>;
|
|
26
|
-
width: number;
|
|
27
|
-
height: number;
|
|
28
|
-
language: string;
|
|
29
|
-
}) => { file: ReturnType<typeof createFile>; track: number } = (props: {
|
|
30
|
-
/** Subject of the clock-range refusal, such as `Assembled chunk video`. */
|
|
31
|
-
label: string;
|
|
32
|
-
|
|
33
|
-
/** Human-readable track name written into the handler box. */
|
|
34
|
-
name: string;
|
|
35
|
-
|
|
36
|
-
/** Media and movie timescale, in ticks per second. */
|
|
37
|
-
timescale: number;
|
|
38
|
-
|
|
39
|
-
/** Duration of every sample to be appended, in ticks. */
|
|
40
|
-
sampleDuration: number;
|
|
41
|
-
|
|
42
|
-
/** Number of samples the track will hold. */
|
|
43
|
-
frames: number;
|
|
44
|
-
|
|
45
|
-
/** Sample entry the appended samples were encoded under. */
|
|
46
|
-
description: ReturnType<typeof sampleDescription>;
|
|
47
|
-
|
|
48
|
-
/** Coded raster width in pixels. */
|
|
49
|
-
width: number;
|
|
50
|
-
|
|
51
|
-
/** Coded raster height in pixels. */
|
|
52
|
-
height: number;
|
|
53
|
-
|
|
54
|
-
/** ISO 639-2/T track language copied from the source track. */
|
|
55
|
-
language: string;
|
|
56
|
-
}): { file: ReturnType<typeof createFile>; track: number } => {
|
|
57
|
-
const duration: number = props.frames * props.sampleDuration;
|
|
58
|
-
if (Number.isSafeInteger(duration) === false)
|
|
59
|
-
throw new Error(
|
|
60
|
-
`${props.label} duration exceeds the exact MP4 clock range.`,
|
|
61
|
-
);
|
|
62
|
-
const file: ReturnType<typeof createFile> = residentMp4Box().createFile();
|
|
63
|
-
file.init({
|
|
64
|
-
brands: ["isom", "iso2", "mp41"],
|
|
65
|
-
timescale: props.timescale,
|
|
66
|
-
duration,
|
|
67
|
-
});
|
|
68
|
-
const track: number = file.addTrack({
|
|
69
|
-
type: props.description.type,
|
|
70
|
-
hdlr: "vide",
|
|
71
|
-
name: props.name,
|
|
72
|
-
timescale: props.timescale,
|
|
73
|
-
media_duration: duration,
|
|
74
|
-
duration,
|
|
75
|
-
width: props.width,
|
|
76
|
-
height: props.height,
|
|
77
|
-
language: props.language,
|
|
78
|
-
description_boxes: props.description.boxes,
|
|
79
|
-
});
|
|
80
|
-
return { file, track };
|
|
81
|
-
};
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import type { Movie, createFile } from "mp4box";
|
|
2
|
-
|
|
3
|
-
import { residentMp4Box } from "./residentMp4Box";
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Parse MP4 bytes and answer with the parsed file and its movie summary.
|
|
7
|
-
*
|
|
8
|
-
* Errors the parser reports through its error callback are collected and thrown together as `MP4 parser rejected input: <module>: <message>; ...`; an exception the parser throws synchronously propagates unchanged. When the parser never reports a ready movie, the summary is read from the file as parsed, so a file without a movie box yields a summary with no tracks rather than a refusal.
|
|
9
|
-
*
|
|
10
|
-
* Callers either probed the bytes already or verify the parsed fields themselves afterwards, which is why this admits a stream the delivered-output gate would refuse. It is deliberately not merged with `parseProductionMp4Output`: that one is the strict delivery gate, and requiring its leading file-type box and parsed movie header here would refuse inputs these writers compare sample by sample before trusting anything about them.
|
|
11
|
-
*
|
|
12
|
-
* @evidence contracts/development/implementation.md#principled-implementation The whole stream is appended at file offset zero and flushed, which mp4box documents as the way to parse a complete in-memory file; the bytes are copied into a fresh `ArrayBuffer` because the parser takes an `ArrayBuffer` it tags with its file offset and keeps, and the caller's array may be a view or shared memory.
|
|
13
|
-
* @evidence contracts/development/implementation.md#clear-and-simple-structure The normalizer, the feature mux and the two splice proofs share this permissive parse and apply their own checks, while the strict gate stays separate for the reason the doc gives.
|
|
14
|
-
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Every parser error refuses the input; none is filtered, and nothing on the parser is replaced, its callbacks being the published hooks for these events.
|
|
15
|
-
* @evidence contracts/development/common.md#meaningful-documentation The doc states what is returned, the refusal and its message, that synchronous exceptions propagate, how a missing movie reads, and why this parse is not the strict gate.
|
|
16
|
-
* @evidence contracts/development/implementation.md#efficient-algorithms One copy costs O(B) for B encoded bytes, then one append/flush delegates box parsing and expanded sample-table construction to mp4box. Those costs also depend on parsed box and sample populations, including counts represented compactly in the input tables; this boundary establishes no strict byte-only time or memory bound and imposes no population cap.
|
|
17
|
-
* @evidence contracts/development/implementation.md#reuse-equivalent-work This entry creates a new parse and keeps no cross-call cache. Some callers already probed the same bytes, notably the feature mux's audio input, but that probe returns facts without a parser handle; the caller therefore parses again for copying rather than reusing the hidden admission parse.
|
|
18
|
-
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources The returned file holds a copied input buffer, parsed boxes and expanded sample tables for its caller-owned lifetime; source bytes and parser error arrays can coexist during the call. None of these input-dependent populations has an admission cap here, and the parser opens no file handle or background task.
|
|
19
|
-
*/
|
|
20
|
-
export const parseMp4: (bytes: Uint8Array) => {
|
|
21
|
-
file: ReturnType<typeof createFile>;
|
|
22
|
-
movie: Movie;
|
|
23
|
-
} = (
|
|
24
|
-
bytes: Uint8Array,
|
|
25
|
-
): { file: ReturnType<typeof createFile>; movie: Movie } => {
|
|
26
|
-
const file: ReturnType<typeof createFile> = residentMp4Box().createFile();
|
|
27
|
-
let movie: Movie | null = null;
|
|
28
|
-
const errors: string[] = [];
|
|
29
|
-
file.onReady = (value: Movie): void => {
|
|
30
|
-
movie = value;
|
|
31
|
-
};
|
|
32
|
-
file.onError = (module: string, message: string): void => {
|
|
33
|
-
errors.push(`${module}: ${message}`);
|
|
34
|
-
};
|
|
35
|
-
file.appendBuffer(
|
|
36
|
-
residentMp4Box().MP4BoxBuffer.fromArrayBuffer(
|
|
37
|
-
Uint8Array.from(bytes).buffer,
|
|
38
|
-
0,
|
|
39
|
-
),
|
|
40
|
-
true,
|
|
41
|
-
);
|
|
42
|
-
file.flush();
|
|
43
|
-
if (errors.length !== 0)
|
|
44
|
-
throw new Error(`MP4 parser rejected input: ${errors.join("; ")}`);
|
|
45
|
-
return { file, movie: movie ?? file.getInfo() };
|
|
46
|
-
};
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import type { Movie, createFile } from "mp4box";
|
|
2
|
-
|
|
3
|
-
import { residentMp4Box } from "./residentMp4Box";
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Parse delivered or intermediate MP4 bytes under the strict output gate.
|
|
7
|
-
*
|
|
8
|
-
* Admission requires at least 16 bytes, a leading ISO file-type box whose declared size is at least 16 and fits the stream and whose major brand is not blank, a parsed movie box, and no parser error. Throws, in that order, `MP4 output is too short to contain a media track.`, `MP4 output has no leading ISO base-media compatible brand box.`, `MP4 parser rejected output: <detail>` for a parser error or a synchronous parser exception, and `MP4 output has no parsed movie metadata.` Every video probe and the rendered media probe run it before reading a track.
|
|
9
|
-
*
|
|
10
|
-
* This is deliberately not merged with `parseMp4`: that one admits bytes whose fields its callers verify afterwards, sample by sample, while this one refuses a stream that does not announce itself as ISO base media before anything reads a track from it.
|
|
11
|
-
*
|
|
12
|
-
* @evidence contracts/development/implementation.md#principled-implementation ISO/IEC 14496-12 requires the file-type box first in a conforming file, so the header is checked by its big-endian size and four-character type before the parser runs; the parse then appends the whole stream at offset zero and flushes, and the movie summary must report a movie box because a track cannot exist without one.
|
|
13
|
-
* @evidence contracts/development/implementation.md#clear-and-simple-structure One gate decides admission for every probe that reads delivered media, and it normalizes both parser failure channels, the error callback and a thrown exception, into one refusal, so the probes start from a parsed file or a named refusal.
|
|
14
|
-
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts A thrown parser exception is converted into a refusal with its original text, never swallowed, and no brand is required beyond being present, because which brands are acceptable is the delivery profile's question.
|
|
15
|
-
* @evidence contracts/development/common.md#meaningful-documentation The doc lists every admission condition and each refusal with its message in order, who runs the gate, and why it differs from `parseMp4`.
|
|
16
|
-
* @evidence contracts/development/implementation.md#efficient-algorithms The header gate reads twelve bytes through a view, and copying B encoded bytes costs O(B). One append/flush then delegates box parsing and expanded sample-table construction to mp4box; parsed box and sample populations also drive that work, including compact table counts. No byte-only worst-case guarantee or parsed-population cap is established here.
|
|
17
|
-
* @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work Callers that need both the parse and a probe pass this parse on to `probeParsedProductionVideoMp4`, and no call re-parses bytes another call already parsed.
|
|
18
|
-
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources The returned file holds the copied buffer and the parsed box tree until the caller drops it; on refusal everything is local and collectable, and no handle or task is opened.
|
|
19
|
-
*/
|
|
20
|
-
export const parseProductionMp4Output: (bytes: Uint8Array) => {
|
|
21
|
-
file: ReturnType<typeof createFile>;
|
|
22
|
-
movie: Movie;
|
|
23
|
-
} = (
|
|
24
|
-
bytes: Uint8Array,
|
|
25
|
-
): { file: ReturnType<typeof createFile>; movie: Movie } => {
|
|
26
|
-
if (bytes.byteLength < 16)
|
|
27
|
-
throw new Error("MP4 output is too short to contain a media track.");
|
|
28
|
-
const header: Buffer = Buffer.from(
|
|
29
|
-
bytes.buffer,
|
|
30
|
-
bytes.byteOffset,
|
|
31
|
-
bytes.byteLength,
|
|
32
|
-
);
|
|
33
|
-
const ftypSize: number = header.readUInt32BE(0);
|
|
34
|
-
if (
|
|
35
|
-
header.toString("ascii", 4, 8) !== "ftyp" ||
|
|
36
|
-
ftypSize < 16 ||
|
|
37
|
-
ftypSize > bytes.byteLength ||
|
|
38
|
-
header.toString("ascii", 8, 12).trim().length === 0
|
|
39
|
-
)
|
|
40
|
-
throw new Error(
|
|
41
|
-
"MP4 output has no leading ISO base-media compatible brand box.",
|
|
42
|
-
);
|
|
43
|
-
const file: ReturnType<typeof createFile> = residentMp4Box().createFile();
|
|
44
|
-
const errors: string[] = [];
|
|
45
|
-
let ready: Movie | null = null;
|
|
46
|
-
file.onError = (module: string, message: string): void => {
|
|
47
|
-
errors.push(`${module}: ${message}`);
|
|
48
|
-
};
|
|
49
|
-
file.onReady = (info: Movie): void => {
|
|
50
|
-
ready = info;
|
|
51
|
-
};
|
|
52
|
-
try {
|
|
53
|
-
file.appendBuffer(
|
|
54
|
-
residentMp4Box().MP4BoxBuffer.fromArrayBuffer(
|
|
55
|
-
Uint8Array.from(bytes).buffer,
|
|
56
|
-
0,
|
|
57
|
-
),
|
|
58
|
-
true,
|
|
59
|
-
);
|
|
60
|
-
file.flush();
|
|
61
|
-
} catch (error) {
|
|
62
|
-
throw new Error(`MP4 parser rejected output: ${String(error)}`);
|
|
63
|
-
}
|
|
64
|
-
const movie: Movie = ready ?? file.getInfo();
|
|
65
|
-
if (errors.length !== 0)
|
|
66
|
-
throw new Error(`MP4 parser rejected output: ${errors.join("; ")}`);
|
|
67
|
-
if (movie.hasMoov === false)
|
|
68
|
-
throw new Error("MP4 output has no parsed movie metadata.");
|
|
69
|
-
return { file, movie };
|
|
70
|
-
};
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import type { IAutoMovieProductionVideoProbe } from "@automovie/interface";
|
|
2
|
-
import type { Movie, Sample, Track, createFile } from "mp4box";
|
|
3
|
-
|
|
4
|
-
import type { IProductionRenditionClip } from "./IProductionRenditionClip";
|
|
5
|
-
import { neutralTrackPresentation } from "./neutralTrackPresentation";
|
|
6
|
-
import { parseProductionMp4Output } from "./parseProductionMp4Output";
|
|
7
|
-
import { probeParsedProductionVideoMp4 } from "./probeParsedProductionVideoMp4";
|
|
8
|
-
import { sameSampleDescription } from "./sameSampleDescription";
|
|
9
|
-
import { sampleDescription } from "./sampleDescription";
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Parse one H.264 MP4 clip that is to be spliced without decoding it: a repaint shot, one range of a chunked render, or a visual-lane source.
|
|
13
|
-
*
|
|
14
|
-
* The bytes must pass the strict output gate and the single-video probe, whose refusals propagate unlabelled. The clip must then start with a sync sample, declare a track header raster equal to the probed raster, keep every clock term a safe integer, give every sample one positive duration with decode times `0, d, 2d, ...` and a media duration of exactly `count * d`, code every sample under one sample entry, present the samples as a permutation of whole frames from its earliest composition time, and present that media untransformed (`neutralTrackPresentation`). Any of these failing throws `<label> must start independently, use one decoder configuration, and expose one complete untransformed rational-clock presentation.`, where `label` names the clip so a multi-clip splice says which one failed.
|
|
15
|
-
*
|
|
16
|
-
* @evidence contracts/development/implementation.md#principled-implementation A lossless splice re-times samples by whole frames and copies their payloads; sample tables require one duration, a sync declaration on the first sample, one decoder configuration and unedited presentation, with composition times covering exactly frame indices `0` to `count - 1` once each. Independent decoding remains a premise of truthful sync metadata: this container admission does not decode H.264 pictures or verify an IDR payload.
|
|
17
|
-
* @evidence contracts/development/implementation.md#clear-and-simple-structure Chunk assembly, rendition conform, visual-lane conform, the rendition plan and the clip delivery assertion all splice through this one admission, and the record it returns carries every fact they read.
|
|
18
|
-
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts No clip, timescale or frame rate is special-cased and no failing clip is repaired; the conditions are the ones lossless re-timing needs.
|
|
19
|
-
* @evidence contracts/development/common.md#meaningful-documentation The doc names the clip kinds, the delegated refusals, every admission condition, the one labelled refusal and what `label` is for.
|
|
20
|
-
* @evidence contracts/development/implementation.md#efficient-algorithms The bytes are parsed once and shared with the video probe, whose residency proof costs O(M + S log(M + 1)) for S samples and M media boxes in addition to box inspection. This function finds the earliest composition time in O(S), allocates an O(S) frame-index array, and checks the samples in O(S) without sorting composition times; sample-entry comparison costs a pointer check per child box when samples share the same entry, and serialization proportional to differing boxes otherwise.
|
|
21
|
-
* @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work Each call admits one clip handed to it, and the returned record is itself what the splice paths share.
|
|
22
|
-
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources The returned record keeps the caller's bytes, the probe, the parser's track and sample table, and through them the parse with its copy of the bytes, until the caller drops it; the frame-index array is released on return.
|
|
23
|
-
*/
|
|
24
|
-
export const parseProductionRenditionClip: (
|
|
25
|
-
bytes: Uint8Array,
|
|
26
|
-
label: string,
|
|
27
|
-
) => IProductionRenditionClip = (
|
|
28
|
-
bytes: Uint8Array,
|
|
29
|
-
label: string,
|
|
30
|
-
): IProductionRenditionClip => {
|
|
31
|
-
const parsed: { file: ReturnType<typeof createFile>; movie: Movie } =
|
|
32
|
-
parseProductionMp4Output(bytes);
|
|
33
|
-
const probe: IAutoMovieProductionVideoProbe = probeParsedProductionVideoMp4(
|
|
34
|
-
bytes,
|
|
35
|
-
parsed,
|
|
36
|
-
);
|
|
37
|
-
// The probe proved exactly one video track with a resident, non-empty
|
|
38
|
-
// sample table.
|
|
39
|
-
const track: Track = parsed.movie.videoTracks[0]!;
|
|
40
|
-
const samples: Sample[] = parsed.file.getTrackSamplesInfo(track.id) ?? [];
|
|
41
|
-
const first: Sample = samples[0]!;
|
|
42
|
-
const sampleDuration: number = first.duration;
|
|
43
|
-
const description: ReturnType<typeof sampleDescription> =
|
|
44
|
-
sampleDescription(first);
|
|
45
|
-
const presentationStart: number = samples.reduce(
|
|
46
|
-
(minimum: number, sample: Sample): number => Math.min(minimum, sample.cts),
|
|
47
|
-
first.cts,
|
|
48
|
-
);
|
|
49
|
-
const presented: boolean[] = new Array<boolean>(samples.length).fill(false);
|
|
50
|
-
const admissible: (sample: Sample, index: number) => boolean = (
|
|
51
|
-
sample: Sample,
|
|
52
|
-
index: number,
|
|
53
|
-
): boolean => {
|
|
54
|
-
const frame: number = (sample.cts - presentationStart) / sampleDuration;
|
|
55
|
-
if (
|
|
56
|
-
Number.isSafeInteger(sample.dts) === false ||
|
|
57
|
-
Number.isSafeInteger(sample.cts) === false ||
|
|
58
|
-
sample.dts !== index * sampleDuration ||
|
|
59
|
-
Number.isSafeInteger(frame) === false ||
|
|
60
|
-
frame >= samples.length ||
|
|
61
|
-
presented[frame] === true ||
|
|
62
|
-
sameSampleDescription(description, sampleDescription(sample)) === false
|
|
63
|
-
)
|
|
64
|
-
return false;
|
|
65
|
-
presented[frame] = true;
|
|
66
|
-
return true;
|
|
67
|
-
};
|
|
68
|
-
if (
|
|
69
|
-
first.is_sync !== true ||
|
|
70
|
-
track.track_width !== probe.width ||
|
|
71
|
-
track.track_height !== probe.height ||
|
|
72
|
-
Number.isSafeInteger(track.timescale) === false ||
|
|
73
|
-
Number.isSafeInteger(track.duration) === false ||
|
|
74
|
-
Number.isSafeInteger(sampleDuration) === false ||
|
|
75
|
-
sampleDuration <= 0 ||
|
|
76
|
-
track.duration !== samples.length * sampleDuration ||
|
|
77
|
-
samples.every(admissible) === false ||
|
|
78
|
-
neutralTrackPresentation(track, presentationStart) === false
|
|
79
|
-
)
|
|
80
|
-
throw new Error(
|
|
81
|
-
`${label} must start independently, use one decoder configuration, and expose one complete untransformed rational-clock presentation.`,
|
|
82
|
-
);
|
|
83
|
-
return {
|
|
84
|
-
bytes,
|
|
85
|
-
probe,
|
|
86
|
-
track,
|
|
87
|
-
samples,
|
|
88
|
-
sampleDuration,
|
|
89
|
-
decodeStart: first.dts,
|
|
90
|
-
presentationStart,
|
|
91
|
-
};
|
|
92
|
-
};
|
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
import { ffmpegArgs, framePattern } from "@automovie/render";
|
|
2
|
-
|
|
3
|
-
import type { IAutoMovieViewerVideoOptions } from "./IAutoMovieViewerVideoOptions";
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Admit an exact finite capture clock and construct one video/audio encode vector.
|
|
7
|
-
*
|
|
8
|
-
* @evidence contracts/development/implementation.md#principled-implementation A finite safe integral duration-times-fps product admits exact frame count before renderVideo's rounded schedule. FFmpeg maps explicit streams and pads/trims audio against that clock, never against the shortest input.
|
|
9
|
-
* @evidence contracts/development/implementation.md#clear-and-simple-structure Portable admission and argument construction are separated from process/browser effects so invalid requests fail before allocation.
|
|
10
|
-
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts No duration is rounded into acceptance; the existing video encoder vector remains the basis for both silent and sound output.
|
|
11
|
-
* @evidence contracts/development/common.md#meaningful-documentation Documents exact frame admission, explicit stream mapping and soundtrack extent.
|
|
12
|
-
* @evidence contracts/development/implementation.md#efficient-algorithms Fixed-size validation and argument construction cost O(1) in frame count and allocate no frame schedule.
|
|
13
|
-
* @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work Each request is admitted once and no effectful work is shared.
|
|
14
|
-
* @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Returns only frame count and argument strings; acquires no native resource.
|
|
15
|
-
*/
|
|
16
|
-
export function planViewerVideo(options: IAutoMovieViewerVideoOptions): {
|
|
17
|
-
frameCount: number;
|
|
18
|
-
args: string[];
|
|
19
|
-
} {
|
|
20
|
-
const {
|
|
21
|
-
fps,
|
|
22
|
-
width,
|
|
23
|
-
height,
|
|
24
|
-
}: IAutoMovieViewerVideoOptions["spec"]["frameFormat"] =
|
|
25
|
-
options.spec.frameFormat;
|
|
26
|
-
const frameCount: number = options.durationSeconds * fps;
|
|
27
|
-
if (
|
|
28
|
-
!Number.isFinite(fps) ||
|
|
29
|
-
fps <= 0 ||
|
|
30
|
-
!Number.isFinite(options.durationSeconds) ||
|
|
31
|
-
options.durationSeconds <= 0 ||
|
|
32
|
-
!Number.isSafeInteger(frameCount) ||
|
|
33
|
-
frameCount < 1 ||
|
|
34
|
-
frameCount > (options.maxFrames ?? 1000000)
|
|
35
|
-
)
|
|
36
|
-
throw new Error(
|
|
37
|
-
"Viewer video requires a positive integral frame count within maxFrames",
|
|
38
|
-
);
|
|
39
|
-
if (
|
|
40
|
-
![width, height].every(
|
|
41
|
-
(size: number): boolean =>
|
|
42
|
-
Number.isSafeInteger(size) && size > 0 && size % 2 === 0,
|
|
43
|
-
)
|
|
44
|
-
)
|
|
45
|
-
throw new Error(
|
|
46
|
-
"Viewer video requires positive even integer raster dimensions",
|
|
47
|
-
);
|
|
48
|
-
if (
|
|
49
|
-
!Number.isSafeInteger(options.maxFrames ?? 1000000) ||
|
|
50
|
-
(options.maxFrames ?? 1000000) < 1 ||
|
|
51
|
-
!Number.isSafeInteger(options.maxFrameBytes ?? 8 * 1024 ** 3) ||
|
|
52
|
-
(options.maxFrameBytes ?? 8 * 1024 ** 3) < 1 ||
|
|
53
|
-
!Number.isFinite(options.timeoutMs ?? 240000) ||
|
|
54
|
-
(options.timeoutMs ?? 240000) <= 0
|
|
55
|
-
)
|
|
56
|
-
throw new Error(
|
|
57
|
-
"Viewer video resource limits must be positive finite values",
|
|
58
|
-
);
|
|
59
|
-
if (
|
|
60
|
-
!Number.isFinite(options.encoderTimeoutMs ?? 1800000) ||
|
|
61
|
-
(options.encoderTimeoutMs ?? 1800000) <= 0 ||
|
|
62
|
-
(options.encoderTimeoutMs ?? 1800000) > 2147483647
|
|
63
|
-
)
|
|
64
|
-
throw new Error(
|
|
65
|
-
"Viewer video encoder timeout must fit a positive Node timer",
|
|
66
|
-
);
|
|
67
|
-
if (
|
|
68
|
-
!Number.isFinite(options.spec.crf) ||
|
|
69
|
-
options.spec.crf < 0 ||
|
|
70
|
-
options.spec.crf > 51
|
|
71
|
-
)
|
|
72
|
-
throw new Error(
|
|
73
|
-
"Viewer video H.264 CRF must be finite and within 0 through 51",
|
|
74
|
-
);
|
|
75
|
-
if (!["http:", "https:"].includes(new URL(options.url).protocol))
|
|
76
|
-
throw new Error("Viewer video URL must use HTTP or HTTPS");
|
|
77
|
-
for (const value of [
|
|
78
|
-
options.frameDir,
|
|
79
|
-
options.outputPath,
|
|
80
|
-
options.chromeExecutable,
|
|
81
|
-
options.ffmpegExecutable,
|
|
82
|
-
])
|
|
83
|
-
if (value.trim().length === 0)
|
|
84
|
-
throw new Error("Viewer video paths must be nonempty");
|
|
85
|
-
if (
|
|
86
|
-
(options.cacheDirectory !== undefined &&
|
|
87
|
-
options.cacheDirectory.trim().length === 0) ||
|
|
88
|
-
(options.cacheVerifyEvery !== undefined &&
|
|
89
|
-
!(
|
|
90
|
-
Number.isSafeInteger(options.cacheVerifyEvery) &&
|
|
91
|
-
options.cacheVerifyEvery > 0
|
|
92
|
-
))
|
|
93
|
-
)
|
|
94
|
-
throw new Error(
|
|
95
|
-
"Viewer video cacheDirectory must be nonempty and cacheVerifyEvery a positive integer",
|
|
96
|
-
);
|
|
97
|
-
if (options.audioMix !== undefined && options.audioMix.trim().length === 0)
|
|
98
|
-
throw new Error("Viewer video audioMix must be nonempty when supplied");
|
|
99
|
-
const base: string[] = ffmpegArgs(
|
|
100
|
-
options.spec,
|
|
101
|
-
`${options.frameDir}/${framePattern()}`,
|
|
102
|
-
options.outputPath,
|
|
103
|
-
);
|
|
104
|
-
const codec: number = base.indexOf("-c:v");
|
|
105
|
-
const args: string[] = [
|
|
106
|
-
"-v",
|
|
107
|
-
"warning",
|
|
108
|
-
...base.slice(0, codec),
|
|
109
|
-
...(options.audioMix === undefined ? [] : ["-i", options.audioMix]),
|
|
110
|
-
...base.slice(codec, -1),
|
|
111
|
-
"-threads",
|
|
112
|
-
"4",
|
|
113
|
-
"-preset",
|
|
114
|
-
"medium",
|
|
115
|
-
"-frames:v",
|
|
116
|
-
String(frameCount),
|
|
117
|
-
"-map",
|
|
118
|
-
"0:v:0",
|
|
119
|
-
...(options.audioMix === undefined
|
|
120
|
-
? ["-an"]
|
|
121
|
-
: [
|
|
122
|
-
"-map",
|
|
123
|
-
"1:a:0",
|
|
124
|
-
"-af",
|
|
125
|
-
"apad",
|
|
126
|
-
"-c:a",
|
|
127
|
-
"aac",
|
|
128
|
-
"-b:a",
|
|
129
|
-
"192k",
|
|
130
|
-
"-ar",
|
|
131
|
-
"48000",
|
|
132
|
-
"-ac",
|
|
133
|
-
"2",
|
|
134
|
-
]),
|
|
135
|
-
"-t",
|
|
136
|
-
String(options.durationSeconds),
|
|
137
|
-
options.outputPath,
|
|
138
|
-
];
|
|
139
|
-
return { frameCount, args };
|
|
140
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import type { IAutoMovieProductionMediaProbe } from "@automovie/interface";
|
|
2
|
-
import type { Movie, createFile } from "mp4box";
|
|
3
|
-
|
|
4
|
-
import { probeVideoTrack } from "./probeVideoTrack";
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Probe one already-parsed MP4, `parsed` from `bytes`, as a file whose only
|
|
8
|
-
* track is one H.264 video track.
|
|
9
|
-
*
|
|
10
|
-
* Throws `Production video MP4 contains <n> video tracks; exactly one is
|
|
11
|
-
* required.` or `... <n> total tracks; exactly one is required.` before the
|
|
12
|
-
* track is read, then whatever `probeVideoTrack` refuses. Callers pass the
|
|
13
|
-
* result of `parseProductionMp4Output` for the same bytes, so the strict
|
|
14
|
-
* container gate has already run.
|
|
15
|
-
*
|
|
16
|
-
* @evidence contracts/development/implementation.md#principled-implementation The two track counts are read from the parser's movie summary, which lists every track of the `moov` box, so a file with an extra audio, text or data track is refused before the video reading starts.
|
|
17
|
-
* @evidence contracts/development/implementation.md#clear-and-simple-structure The standalone video probe, the rendered-media probe's guide-pass arm, the feature mux and the splice clip parser need the same single-track rule and differ only in whether they already hold the parse, so the parsed form is the shared one and `probeProductionVideoMp4` parses and delegates.
|
|
18
|
-
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts No track kind is ignored to make a file fit, and the track is read by the same `probeVideoTrack` every other video reading uses.
|
|
19
|
-
* @evidence contracts/development/common.md#meaningful-documentation The doc states the single-track condition, both refusals, the delegated refusals and the parse callers are expected to supply.
|
|
20
|
-
* @evidenceExclude contracts/development/implementation.md#efficient-algorithms Two length checks precede the delegated reading, whose cost is answered on `probeVideoTrack`.
|
|
21
|
-
* @evidence contracts/development/implementation.md#reuse-equivalent-work Taking the parse as an argument lets a caller that already parsed the bytes, such as the feature mux or the clip parser, reuse that parse instead of parsing again; equivalence holds because the caller passes the parse of the same `bytes`.
|
|
22
|
-
* @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources The function retains nothing; the parse stays the caller's and the returned record holds no parser object.
|
|
23
|
-
*/
|
|
24
|
-
export const probeParsedProductionVideoMp4: (
|
|
25
|
-
bytes: Uint8Array,
|
|
26
|
-
parsed: {
|
|
27
|
-
file: ReturnType<typeof createFile>;
|
|
28
|
-
movie: Movie;
|
|
29
|
-
},
|
|
30
|
-
) => Extract<
|
|
31
|
-
IAutoMovieProductionMediaProbe,
|
|
32
|
-
{
|
|
33
|
-
kind: "video";
|
|
34
|
-
}
|
|
35
|
-
> = (
|
|
36
|
-
bytes: Uint8Array,
|
|
37
|
-
parsed: { file: ReturnType<typeof createFile>; movie: Movie },
|
|
38
|
-
): Extract<IAutoMovieProductionMediaProbe, { kind: "video" }> => {
|
|
39
|
-
if (parsed.movie.videoTracks.length !== 1)
|
|
40
|
-
throw new Error(
|
|
41
|
-
`Production video MP4 contains ${parsed.movie.videoTracks.length} video tracks; exactly one is required.`,
|
|
42
|
-
);
|
|
43
|
-
if (parsed.movie.tracks.length !== 1)
|
|
44
|
-
throw new Error(
|
|
45
|
-
`Production video MP4 contains ${parsed.movie.tracks.length} total tracks; exactly one is required.`,
|
|
46
|
-
);
|
|
47
|
-
return probeVideoTrack(bytes, parsed.file, parsed.movie.videoTracks[0]!);
|
|
48
|
-
};
|