@automovie/render 0.0.0-stage → 0.0.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/LICENSE +21 -0
- package/README.md +37 -2
- package/lib/AUTOMOVIE_GUIDE_PASSES.d.ts +11 -0
- package/lib/AUTOMOVIE_GUIDE_PASSES.js +21 -0
- package/lib/AUTOMOVIE_GUIDE_PASSES.js.map +1 -0
- package/lib/IAutoMovieCaptionEntry.d.ts +28 -0
- package/lib/IAutoMovieCaptionEntry.js +3 -0
- package/lib/IAutoMovieCaptionEntry.js.map +1 -0
- package/lib/IAutoMovieCaptionSidecar.d.ts +25 -0
- package/lib/IAutoMovieCaptionSidecar.js +3 -0
- package/lib/IAutoMovieCaptionSidecar.js.map +1 -0
- package/lib/IAutoMovieCapturedFrame.d.ts +22 -0
- package/lib/IAutoMovieCapturedFrame.js +3 -0
- package/lib/IAutoMovieCapturedFrame.js.map +1 -0
- package/lib/IAutoMovieGuidePassOutput.d.ts +23 -0
- package/lib/IAutoMovieGuidePassOutput.js +3 -0
- package/lib/IAutoMovieGuidePassOutput.js.map +1 -0
- package/lib/IAutoMoviePoseKeypointActor.d.ts +36 -0
- package/lib/IAutoMoviePoseKeypointActor.js +3 -0
- package/lib/IAutoMoviePoseKeypointActor.js.map +1 -0
- package/lib/IAutoMoviePoseKeypointFrame.d.ts +25 -0
- package/lib/IAutoMoviePoseKeypointFrame.js +3 -0
- package/lib/IAutoMoviePoseKeypointFrame.js.map +1 -0
- package/lib/IAutoMoviePoseKeypointSidecar.d.ts +21 -0
- package/lib/IAutoMoviePoseKeypointSidecar.js +3 -0
- package/lib/IAutoMoviePoseKeypointSidecar.js.map +1 -0
- package/lib/IAutoMovieRenderAdapters.d.ts +34 -0
- package/lib/IAutoMovieRenderAdapters.js +3 -0
- package/lib/IAutoMovieRenderAdapters.js.map +1 -0
- package/lib/IAutoMovieRenderAndSeeRequest.d.ts +32 -0
- package/lib/IAutoMovieRenderAndSeeRequest.js +3 -0
- package/lib/IAutoMovieRenderAndSeeRequest.js.map +1 -0
- package/lib/IAutoMovieRenderAndSeeResult.d.ts +20 -0
- package/lib/IAutoMovieRenderAndSeeResult.js +3 -0
- package/lib/IAutoMovieRenderAndSeeResult.js.map +1 -0
- package/lib/IAutoMovieRenderChunk.d.ts +48 -0
- package/lib/IAutoMovieRenderChunk.js +3 -0
- package/lib/IAutoMovieRenderChunk.js.map +1 -0
- package/lib/IAutoMovieRenderChunkPlan.d.ts +32 -0
- package/lib/IAutoMovieRenderChunkPlan.js +3 -0
- package/lib/IAutoMovieRenderChunkPlan.js.map +1 -0
- package/lib/IAutoMovieRenderPassManifest.d.ts +21 -0
- package/lib/IAutoMovieRenderPassManifest.js +3 -0
- package/lib/IAutoMovieRenderPassManifest.js.map +1 -0
- package/lib/IAutoMovieRenderReassembly.d.ts +24 -0
- package/lib/IAutoMovieRenderReassembly.js +3 -0
- package/lib/IAutoMovieRenderReassembly.js.map +1 -0
- package/lib/IAutoMovieRenderResult.d.ts +39 -0
- package/lib/IAutoMovieRenderResult.js +3 -0
- package/lib/IAutoMovieRenderResult.js.map +1 -0
- package/lib/IAutoMovieSequenceRenderAdapters.d.ts +36 -0
- package/lib/IAutoMovieSequenceRenderAdapters.js +3 -0
- package/lib/IAutoMovieSequenceRenderAdapters.js.map +1 -0
- package/lib/IAutoMovieSequenceRenderAndSeeRequest.d.ts +36 -0
- package/lib/IAutoMovieSequenceRenderAndSeeRequest.js +3 -0
- package/lib/IAutoMovieSequenceRenderAndSeeRequest.js.map +1 -0
- package/lib/IAutoMovieSequenceRenderAndSeeResult.d.ts +23 -0
- package/lib/IAutoMovieSequenceRenderAndSeeResult.js +3 -0
- package/lib/IAutoMovieSequenceRenderAndSeeResult.js.map +1 -0
- package/lib/IAutoMovieSequenceRenderFrame.d.ts +41 -0
- package/lib/IAutoMovieSequenceRenderFrame.js +3 -0
- package/lib/IAutoMovieSequenceRenderFrame.js.map +1 -0
- package/lib/IAutoMovieSequenceRenderPlan.d.ts +76 -0
- package/lib/IAutoMovieSequenceRenderPlan.js +3 -0
- package/lib/IAutoMovieSequenceRenderPlan.js.map +1 -0
- package/lib/IAutoMovieSequenceRenderResult.d.ts +44 -0
- package/lib/IAutoMovieSequenceRenderResult.js +3 -0
- package/lib/IAutoMovieSequenceRenderResult.js.map +1 -0
- package/lib/IAutoMovieSequenceRenderShotSpan.d.ts +39 -0
- package/lib/IAutoMovieSequenceRenderShotSpan.js +3 -0
- package/lib/IAutoMovieSequenceRenderShotSpan.js.map +1 -0
- package/lib/IAutoMovieSequenceRenderTransitionSpan.d.ts +39 -0
- package/lib/IAutoMovieSequenceRenderTransitionSpan.js +3 -0
- package/lib/IAutoMovieSequenceRenderTransitionSpan.js.map +1 -0
- package/lib/audio/encodeAutoMovieWavPcm16.d.ts +21 -0
- package/lib/audio/encodeAutoMovieWavPcm16.js +59 -0
- package/lib/audio/encodeAutoMovieWavPcm16.js.map +1 -0
- package/lib/audio/index.d.ts +2 -0
- package/lib/audio/index.js +19 -0
- package/lib/audio/index.js.map +1 -0
- package/lib/audio/mixAutoMovieAudioPcm.d.ts +64 -0
- package/lib/audio/mixAutoMovieAudioPcm.js +86 -0
- package/lib/audio/mixAutoMovieAudioPcm.js.map +1 -0
- package/lib/auditAutoMovieRenderObservation.d.ts +31 -0
- package/lib/auditAutoMovieRenderObservation.js +63 -0
- package/lib/auditAutoMovieRenderObservation.js.map +1 -0
- package/lib/cache/createAutoMovieHttpArtifactStore.d.ts +28 -0
- package/lib/cache/createAutoMovieHttpArtifactStore.js +66 -0
- package/lib/cache/createAutoMovieHttpArtifactStore.js.map +1 -0
- package/lib/caption/IAutoMovieBeatCaption.d.ts +22 -0
- package/lib/caption/IAutoMovieBeatCaption.js +3 -0
- package/lib/caption/IAutoMovieBeatCaption.js.map +1 -0
- package/lib/caption/autoMovieCaptionLanguageComparisonKey.d.ts +18 -0
- package/lib/caption/autoMovieCaptionLanguageComparisonKey.js +24 -0
- package/lib/caption/autoMovieCaptionLanguageComparisonKey.js.map +1 -0
- package/lib/caption/beatCaptions.d.ts +22 -0
- package/lib/caption/beatCaptions.js +50 -0
- package/lib/caption/beatCaptions.js.map +1 -0
- package/lib/caption/canonicalProductionWebVtt.d.ts +23 -0
- package/lib/caption/canonicalProductionWebVtt.js +60 -0
- package/lib/caption/canonicalProductionWebVtt.js.map +1 -0
- package/lib/caption/canonicalizeAutoMovieCaptionText.d.ts +18 -0
- package/lib/caption/canonicalizeAutoMovieCaptionText.js +24 -0
- package/lib/caption/canonicalizeAutoMovieCaptionText.js.map +1 -0
- package/lib/caption/escapeWebVttText.d.ts +17 -0
- package/lib/caption/escapeWebVttText.js +25 -0
- package/lib/caption/escapeWebVttText.js.map +1 -0
- package/lib/caption/index.d.ts +11 -0
- package/lib/caption/index.js +28 -0
- package/lib/caption/index.js.map +1 -0
- package/lib/caption/inspectAutoMovieCaptionReadabilityWithRuntime.d.ts +37 -0
- package/lib/caption/inspectAutoMovieCaptionReadabilityWithRuntime.js +129 -0
- package/lib/caption/inspectAutoMovieCaptionReadabilityWithRuntime.js.map +1 -0
- package/lib/caption/isAutoMovieWebVttIdentifier.d.ts +21 -0
- package/lib/caption/isAutoMovieWebVttIdentifier.js +28 -0
- package/lib/caption/isAutoMovieWebVttIdentifier.js.map +1 -0
- package/lib/caption/parseAutoMovieCaptionLanguage.d.ts +34 -0
- package/lib/caption/parseAutoMovieCaptionLanguage.js +121 -0
- package/lib/caption/parseAutoMovieCaptionLanguage.js.map +1 -0
- package/lib/caption/serializeAutoMovieWebVttCueText.d.ts +17 -0
- package/lib/caption/serializeAutoMovieWebVttCueText.js +27 -0
- package/lib/caption/serializeAutoMovieWebVttCueText.js.map +1 -0
- package/lib/caption/serializeAutoMovieWebVttIdentifier.d.ts +17 -0
- package/lib/caption/serializeAutoMovieWebVttIdentifier.js +27 -0
- package/lib/caption/serializeAutoMovieWebVttIdentifier.js.map +1 -0
- package/lib/caption/serializeAutoMovieWebVttSingleLineText.d.ts +19 -0
- package/lib/caption/serializeAutoMovieWebVttSingleLineText.js +26 -0
- package/lib/caption/serializeAutoMovieWebVttSingleLineText.js.map +1 -0
- package/lib/caption/webVttCaptionLanguage.d.ts +18 -0
- package/lib/caption/webVttCaptionLanguage.js +29 -0
- package/lib/caption/webVttCaptionLanguage.js.map +1 -0
- package/lib/caption/webVttTime.d.ts +19 -0
- package/lib/caption/webVttTime.js +30 -0
- package/lib/caption/webVttTime.js.map +1 -0
- package/lib/captionPlan.d.ts +1 -0
- package/lib/captionPlan.js +18 -0
- package/lib/captionPlan.js.map +1 -0
- package/lib/captionSidecar.d.ts +3 -0
- package/lib/captionSidecar.js +20 -0
- package/lib/captionSidecar.js.map +1 -0
- package/lib/captionSlice.d.ts +1 -0
- package/lib/captionSlice.js +18 -0
- package/lib/captionSlice.js.map +1 -0
- package/lib/chunkSequenceRender.d.ts +5 -0
- package/lib/chunkSequenceRender.js +22 -0
- package/lib/chunkSequenceRender.js.map +1 -0
- package/lib/delivery/AUTOMOVIE_MP4_SRGB_COLOUR.d.ts +16 -0
- package/lib/delivery/AUTOMOVIE_MP4_SRGB_COLOUR.js +20 -0
- package/lib/delivery/AUTOMOVIE_MP4_SRGB_COLOUR.js.map +1 -0
- package/lib/delivery/AUTOMOVIE_MP4_UNITY_MATRIX.d.ts +11 -0
- package/lib/delivery/AUTOMOVIE_MP4_UNITY_MATRIX.js +14 -0
- package/lib/delivery/AUTOMOVIE_MP4_UNITY_MATRIX.js.map +1 -0
- package/lib/delivery/AUTOMOVIE_PRODUCTION_OPUS_PROFILE.d.ts +15 -0
- package/lib/delivery/AUTOMOVIE_PRODUCTION_OPUS_PROFILE.js +19 -0
- package/lib/delivery/AUTOMOVIE_PRODUCTION_OPUS_PROFILE.js.map +1 -0
- package/lib/delivery/AutoMovieProductionPngRole.d.ts +14 -0
- package/lib/delivery/AutoMovieProductionPngRole.js +3 -0
- package/lib/delivery/AutoMovieProductionPngRole.js.map +1 -0
- package/lib/delivery/IAutoMovieProductionPngProfile.d.ts +41 -0
- package/lib/delivery/IAutoMovieProductionPngProfile.js +3 -0
- package/lib/delivery/IAutoMovieProductionPngProfile.js.map +1 -0
- package/lib/delivery/IAutoMovieProductionVideoProfile.d.ts +46 -0
- package/lib/delivery/IAutoMovieProductionVideoProfile.js +3 -0
- package/lib/delivery/IAutoMovieProductionVideoProfile.js.map +1 -0
- package/lib/delivery/assertAutoMovieCaptureClock.d.ts +26 -0
- package/lib/delivery/assertAutoMovieCaptureClock.js +29 -0
- package/lib/delivery/assertAutoMovieCaptureClock.js.map +1 -0
- package/lib/delivery/assertProductionOpusProfile.d.ts +23 -0
- package/lib/delivery/assertProductionOpusProfile.js +160 -0
- package/lib/delivery/assertProductionOpusProfile.js.map +1 -0
- package/lib/delivery/assertProductionPngPicture.d.ts +24 -0
- package/lib/delivery/assertProductionPngPicture.js +47 -0
- package/lib/delivery/assertProductionPngPicture.js.map +1 -0
- package/lib/delivery/assertProductionVideoProfile.d.ts +30 -0
- package/lib/delivery/assertProductionVideoProfile.js +150 -0
- package/lib/delivery/assertProductionVideoProfile.js.map +1 -0
- package/lib/delivery/auditAutoMovieDecodedFrames.d.ts +56 -0
- package/lib/delivery/auditAutoMovieDecodedFrames.js +92 -0
- package/lib/delivery/auditAutoMovieDecodedFrames.js.map +1 -0
- package/lib/delivery/auditAutoMovieEncodedPresentation.d.ts +27 -0
- package/lib/delivery/auditAutoMovieEncodedPresentation.js +62 -0
- package/lib/delivery/auditAutoMovieEncodedPresentation.js.map +1 -0
- package/lib/delivery/index.d.ts +14 -0
- package/lib/delivery/index.js +31 -0
- package/lib/delivery/index.js.map +1 -0
- package/lib/delivery/planAutoMovieCaptureUrl.d.ts +18 -0
- package/lib/delivery/planAutoMovieCaptureUrl.js +31 -0
- package/lib/delivery/planAutoMovieCaptureUrl.js.map +1 -0
- package/lib/delivery/productionOpusDescription.d.ts +41 -0
- package/lib/delivery/productionOpusDescription.js +125 -0
- package/lib/delivery/productionOpusDescription.js.map +1 -0
- package/lib/delivery/resolveProductionPngProfile.d.ts +27 -0
- package/lib/delivery/resolveProductionPngProfile.js +53 -0
- package/lib/delivery/resolveProductionPngProfile.js.map +1 -0
- package/lib/delivery/resolveProductionVideoProfile.d.ts +27 -0
- package/lib/delivery/resolveProductionVideoProfile.js +36 -0
- package/lib/delivery/resolveProductionVideoProfile.js.map +1 -0
- package/lib/ffmpegArgs.d.ts +33 -0
- package/lib/ffmpegArgs.js +56 -0
- package/lib/ffmpegArgs.js.map +1 -0
- package/lib/film/AutoMovieOrderedScalar.d.ts +15 -0
- package/lib/film/AutoMovieOrderedScalar.js +3 -0
- package/lib/film/AutoMovieOrderedScalar.js.map +1 -0
- package/lib/film/IAutoMovieProductionAudioAssetIdentity.d.ts +28 -0
- package/lib/film/IAutoMovieProductionAudioAssetIdentity.js +3 -0
- package/lib/film/IAutoMovieProductionAudioAssetIdentity.js.map +1 -0
- package/lib/film/IAutoMovieProductionAudioAssetIdentityBase.d.ts +29 -0
- package/lib/film/IAutoMovieProductionAudioAssetIdentityBase.js +3 -0
- package/lib/film/IAutoMovieProductionAudioAssetIdentityBase.js.map +1 -0
- package/lib/film/IAutoMovieProductionEncoderIdentity.d.ts +36 -0
- package/lib/film/IAutoMovieProductionEncoderIdentity.js +3 -0
- package/lib/film/IAutoMovieProductionEncoderIdentity.js.map +1 -0
- package/lib/film/IAutoMovieProductionRenderChunk.d.ts +39 -0
- package/lib/film/IAutoMovieProductionRenderChunk.js +3 -0
- package/lib/film/IAutoMovieProductionRenderChunk.js.map +1 -0
- package/lib/film/IAutoMovieProductionRenderJobPlan.d.ts +53 -0
- package/lib/film/IAutoMovieProductionRenderJobPlan.js +3 -0
- package/lib/film/IAutoMovieProductionRenderJobPlan.js.map +1 -0
- package/lib/film/IAutoMovieProductionRenderRuntimeIdentity.d.ts +31 -0
- package/lib/film/IAutoMovieProductionRenderRuntimeIdentity.js +3 -0
- package/lib/film/IAutoMovieProductionRenderRuntimeIdentity.js.map +1 -0
- package/lib/film/IAutoMovieProductionRenderTier.d.ts +25 -0
- package/lib/film/IAutoMovieProductionRenderTier.js +3 -0
- package/lib/film/IAutoMovieProductionRenderTier.js.map +1 -0
- package/lib/film/assertSingleGuidePass.d.ts +19 -0
- package/lib/film/assertSingleGuidePass.js +35 -0
- package/lib/film/assertSingleGuidePass.js.map +1 -0
- package/lib/film/equalOrderedScalars.d.ts +27 -0
- package/lib/film/equalOrderedScalars.js +52 -0
- package/lib/film/equalOrderedScalars.js.map +1 -0
- package/lib/film/index.d.ts +9 -0
- package/lib/film/index.js +26 -0
- package/lib/film/index.js.map +1 -0
- package/lib/film/normalizeAudioAssets.d.ts +21 -0
- package/lib/film/normalizeAudioAssets.js +56 -0
- package/lib/film/normalizeAudioAssets.js.map +1 -0
- package/lib/film/normalizeRenderTier.d.ts +19 -0
- package/lib/film/normalizeRenderTier.js +45 -0
- package/lib/film/normalizeRenderTier.js.map +1 -0
- package/lib/film/planProductionRenderJob.d.ts +48 -0
- package/lib/film/planProductionRenderJob.js +196 -0
- package/lib/film/planProductionRenderJob.js.map +1 -0
- package/lib/film/productionVisualDeliveryOccurrence.d.ts +20 -0
- package/lib/film/productionVisualDeliveryOccurrence.js +24 -0
- package/lib/film/productionVisualDeliveryOccurrence.js.map +1 -0
- package/lib/film/resolveProductionRenderTierFrameFormat.d.ts +21 -0
- package/lib/film/resolveProductionRenderTierFrameFormat.js +46 -0
- package/lib/film/resolveProductionRenderTierFrameFormat.js.map +1 -0
- package/lib/film/validDigest.d.ts +18 -0
- package/lib/film/validDigest.js +25 -0
- package/lib/film/validDigest.js.map +1 -0
- package/lib/film/validWaveAudioIdentity.d.ts +25 -0
- package/lib/film/validWaveAudioIdentity.js +76 -0
- package/lib/film/validWaveAudioIdentity.js.map +1 -0
- package/lib/frameName.d.ts +19 -0
- package/lib/frameName.js +24 -0
- package/lib/frameName.js.map +1 -0
- package/lib/framePattern.d.ts +16 -0
- package/lib/framePattern.js +21 -0
- package/lib/framePattern.js.map +1 -0
- package/lib/frameTimes.d.ts +20 -0
- package/lib/frameTimes.js +33 -0
- package/lib/frameTimes.js.map +1 -0
- package/lib/guidePassFrameName.d.ts +15 -0
- package/lib/guidePassFrameName.js +21 -0
- package/lib/guidePassFrameName.js.map +1 -0
- package/lib/guidePassFramePattern.d.ts +15 -0
- package/lib/guidePassFramePattern.js +21 -0
- package/lib/guidePassFramePattern.js.map +1 -0
- package/lib/guidePasses.d.ts +7 -0
- package/lib/guidePasses.js +24 -0
- package/lib/guidePasses.js.map +1 -0
- package/lib/guidePassesInternal/passExtension.d.ts +14 -0
- package/lib/guidePassesInternal/passExtension.js +18 -0
- package/lib/guidePassesInternal/passExtension.js.map +1 -0
- package/lib/index.d.ts +69 -0
- package/lib/index.js +86 -0
- package/lib/index.js.map +1 -0
- package/lib/isGuidePass.d.ts +15 -0
- package/lib/isGuidePass.js +20 -0
- package/lib/isGuidePass.js.map +1 -0
- package/lib/normalizeGuidePasses.d.ts +15 -0
- package/lib/normalizeGuidePasses.js +32 -0
- package/lib/normalizeGuidePasses.js.map +1 -0
- package/lib/planCaptionSidecar.d.ts +23 -0
- package/lib/planCaptionSidecar.js +56 -0
- package/lib/planCaptionSidecar.js.map +1 -0
- package/lib/planChunkedSequenceRender.d.ts +26 -0
- package/lib/planChunkedSequenceRender.js +132 -0
- package/lib/planChunkedSequenceRender.js.map +1 -0
- package/lib/planGuidePassOutputs.d.ts +19 -0
- package/lib/planGuidePassOutputs.js +31 -0
- package/lib/planGuidePassOutputs.js.map +1 -0
- package/lib/planPoseKeypointSidecar.d.ts +27 -0
- package/lib/planPoseKeypointSidecar.js +141 -0
- package/lib/planPoseKeypointSidecar.js.map +1 -0
- package/lib/planSequenceRender.d.ts +20 -0
- package/lib/planSequenceRender.js +99 -0
- package/lib/planSequenceRender.js.map +1 -0
- package/lib/planViewerFrameTimes.d.ts +33 -0
- package/lib/planViewerFrameTimes.js +74 -0
- package/lib/planViewerFrameTimes.js.map +1 -0
- package/lib/renderAndSee.d.ts +14 -0
- package/lib/renderAndSee.js +22 -0
- package/lib/renderAndSee.js.map +1 -0
- package/lib/renderBudgetPreflight/IAutoMovieRenderBudgetAssessment.d.ts +41 -0
- package/lib/renderBudgetPreflight/IAutoMovieRenderBudgetAssessment.js +3 -0
- package/lib/renderBudgetPreflight/IAutoMovieRenderBudgetAssessment.js.map +1 -0
- package/lib/renderBudgetPreflight/IAutoMovieRenderBudgetEvidence.d.ts +53 -0
- package/lib/renderBudgetPreflight/IAutoMovieRenderBudgetEvidence.js +3 -0
- package/lib/renderBudgetPreflight/IAutoMovieRenderBudgetEvidence.js.map +1 -0
- package/lib/renderBudgetPreflight/IAutoMovieRenderGraphicsIdentity.d.ts +27 -0
- package/lib/renderBudgetPreflight/IAutoMovieRenderGraphicsIdentity.js +3 -0
- package/lib/renderBudgetPreflight/IAutoMovieRenderGraphicsIdentity.js.map +1 -0
- package/lib/renderBudgetPreflight/assessAutoMovieRenderBudget.d.ts +28 -0
- package/lib/renderBudgetPreflight/assessAutoMovieRenderBudget.js +77 -0
- package/lib/renderBudgetPreflight/assessAutoMovieRenderBudget.js.map +1 -0
- package/lib/renderBudgetPreflight/autoMovieRenderBudgetEvidence.d.ts +23 -0
- package/lib/renderBudgetPreflight/autoMovieRenderBudgetEvidence.js +55 -0
- package/lib/renderBudgetPreflight/autoMovieRenderBudgetEvidence.js.map +1 -0
- package/lib/renderBudgetPreflight/autoMovieRenderBudgetRefusal.d.ts +17 -0
- package/lib/renderBudgetPreflight/autoMovieRenderBudgetRefusal.js +51 -0
- package/lib/renderBudgetPreflight/autoMovieRenderBudgetRefusal.js.map +1 -0
- package/lib/renderBudgetPreflight/autoMovieRenderTargetRendererOfGraphics.d.ts +22 -0
- package/lib/renderBudgetPreflight/autoMovieRenderTargetRendererOfGraphics.js +32 -0
- package/lib/renderBudgetPreflight/autoMovieRenderTargetRendererOfGraphics.js.map +1 -0
- package/lib/renderBudgetPreflight/autoMovieRenderTargetSettingsOfShot.d.ts +23 -0
- package/lib/renderBudgetPreflight/autoMovieRenderTargetSettingsOfShot.js +35 -0
- package/lib/renderBudgetPreflight/autoMovieRenderTargetSettingsOfShot.js.map +1 -0
- package/lib/renderBudgetPreflight/index.d.ts +9 -0
- package/lib/renderBudgetPreflight/index.js +26 -0
- package/lib/renderBudgetPreflight/index.js.map +1 -0
- package/lib/renderBudgetPreflight/selectAutoMovieRenderBudget.d.ts +18 -0
- package/lib/renderBudgetPreflight/selectAutoMovieRenderBudget.js +22 -0
- package/lib/renderBudgetPreflight/selectAutoMovieRenderBudget.js.map +1 -0
- package/lib/renderCaptionSidecar.d.ts +13 -0
- package/lib/renderCaptionSidecar.js +17 -0
- package/lib/renderCaptionSidecar.js.map +1 -0
- package/lib/renderObservationAudit.d.ts +1 -0
- package/lib/renderObservationAudit.js +18 -0
- package/lib/renderObservationAudit.js.map +1 -0
- package/lib/renderPathStem.d.ts +22 -0
- package/lib/renderPathStem.js +64 -0
- package/lib/renderPathStem.js.map +1 -0
- package/lib/renderPoseKeypointSidecar.d.ts +15 -0
- package/lib/renderPoseKeypointSidecar.js +19 -0
- package/lib/renderPoseKeypointSidecar.js.map +1 -0
- package/lib/renderSequenceAndSee.d.ts +14 -0
- package/lib/renderSequenceAndSee.js +32 -0
- package/lib/renderSequenceAndSee.js.map +1 -0
- package/lib/renderSequenceVideo.d.ts +15 -0
- package/lib/renderSequenceVideo.js +35 -0
- package/lib/renderSequenceVideo.js.map +1 -0
- package/lib/renderVideo.d.ts +17 -0
- package/lib/renderVideo.js +45 -0
- package/lib/renderVideo.js.map +1 -0
- package/lib/screenplay/index.d.ts +1 -0
- package/lib/screenplay/index.js +18 -0
- package/lib/screenplay/index.js.map +1 -0
- package/lib/screenplay/renderScreenplay.d.ts +25 -0
- package/lib/screenplay/renderScreenplay.js +101 -0
- package/lib/screenplay/renderScreenplay.js.map +1 -0
- package/lib/screenplay/screenplaySceneSlug.d.ts +17 -0
- package/lib/screenplay/screenplaySceneSlug.js +21 -0
- package/lib/screenplay/screenplaySceneSlug.js.map +1 -0
- package/lib/sequenceRenderPlan.d.ts +5 -0
- package/lib/sequenceRenderPlan.js +22 -0
- package/lib/sequenceRenderPlan.js.map +1 -0
- package/lib/sequenceRenderVideo.d.ts +6 -0
- package/lib/sequenceRenderVideo.js +23 -0
- package/lib/sequenceRenderVideo.js.map +1 -0
- package/lib/shotBeat.d.ts +18 -0
- package/lib/shotBeat.js +23 -0
- package/lib/shotBeat.js.map +1 -0
- package/lib/sliceCaptionSidecar.d.ts +15 -0
- package/lib/sliceCaptionSidecar.js +57 -0
- package/lib/sliceCaptionSidecar.js.map +1 -0
- package/package.json +46 -3
- package/src/AUTOMOVIE_GUIDE_PASSES.ts +19 -0
- package/src/IAutoMovieCaptionEntry.ts +32 -0
- package/src/IAutoMovieCaptionSidecar.ts +29 -0
- package/src/IAutoMovieCapturedFrame.ts +24 -0
- package/src/IAutoMovieGuidePassOutput.ts +27 -0
- package/src/IAutoMoviePoseKeypointActor.ts +39 -0
- package/src/IAutoMoviePoseKeypointFrame.ts +28 -0
- package/src/IAutoMoviePoseKeypointSidecar.ts +25 -0
- package/src/IAutoMovieRenderAdapters.ts +39 -0
- package/src/IAutoMovieRenderAndSeeRequest.ts +38 -0
- package/src/IAutoMovieRenderAndSeeResult.ts +23 -0
- package/src/IAutoMovieRenderChunk.ts +62 -0
- package/src/IAutoMovieRenderChunkPlan.ts +40 -0
- package/src/IAutoMovieRenderPassManifest.ts +25 -0
- package/src/IAutoMovieRenderReassembly.ts +28 -0
- package/src/IAutoMovieRenderResult.ts +46 -0
- package/src/IAutoMovieSequenceRenderAdapters.ts +41 -0
- package/src/IAutoMovieSequenceRenderAndSeeRequest.ts +47 -0
- package/src/IAutoMovieSequenceRenderAndSeeResult.ts +23 -0
- package/src/IAutoMovieSequenceRenderFrame.ts +48 -0
- package/src/IAutoMovieSequenceRenderPlan.ts +88 -0
- package/src/IAutoMovieSequenceRenderResult.ts +52 -0
- package/src/IAutoMovieSequenceRenderShotSpan.ts +46 -0
- package/src/IAutoMovieSequenceRenderTransitionSpan.ts +46 -0
- package/src/audio/encodeAutoMovieWavPcm16.ts +65 -0
- package/src/audio/index.ts +2 -0
- package/src/audio/mixAutoMovieAudioPcm.ts +137 -0
- package/src/auditAutoMovieRenderObservation.ts +79 -0
- package/src/cache/createAutoMovieHttpArtifactStore.ts +84 -0
- package/src/caption/IAutoMovieBeatCaption.ts +23 -0
- package/src/caption/autoMovieCaptionLanguageComparisonKey.ts +23 -0
- package/src/caption/beatCaptions.ts +59 -0
- package/src/caption/canonicalProductionWebVtt.ts +76 -0
- package/src/caption/canonicalizeAutoMovieCaptionText.ts +24 -0
- package/src/caption/escapeWebVttText.ts +23 -0
- package/src/caption/index.ts +11 -0
- package/src/caption/inspectAutoMovieCaptionReadabilityWithRuntime.ts +231 -0
- package/src/caption/isAutoMovieWebVttIdentifier.ts +26 -0
- package/src/caption/parseAutoMovieCaptionLanguage.ts +160 -0
- package/src/caption/serializeAutoMovieWebVttCueText.ts +28 -0
- package/src/caption/serializeAutoMovieWebVttIdentifier.ts +27 -0
- package/src/caption/serializeAutoMovieWebVttSingleLineText.ts +26 -0
- package/src/caption/webVttCaptionLanguage.ts +30 -0
- package/src/caption/webVttTime.ts +30 -0
- package/src/captionPlan.ts +1 -0
- package/src/captionSidecar.ts +3 -0
- package/src/captionSlice.ts +1 -0
- package/src/chunkSequenceRender.ts +5 -0
- package/src/delivery/AUTOMOVIE_MP4_SRGB_COLOUR.ts +21 -0
- package/src/delivery/AUTOMOVIE_MP4_UNITY_MATRIX.ts +14 -0
- package/src/delivery/AUTOMOVIE_PRODUCTION_OPUS_PROFILE.ts +28 -0
- package/src/delivery/AutoMovieProductionPngRole.ts +18 -0
- package/src/delivery/IAutoMovieProductionPngProfile.ts +52 -0
- package/src/delivery/IAutoMovieProductionVideoProfile.ts +48 -0
- package/src/delivery/assertAutoMovieCaptureClock.ts +37 -0
- package/src/delivery/assertProductionOpusProfile.ts +179 -0
- package/src/delivery/assertProductionPngPicture.ts +62 -0
- package/src/delivery/assertProductionVideoProfile.ts +180 -0
- package/src/delivery/auditAutoMovieDecodedFrames.ts +157 -0
- package/src/delivery/auditAutoMovieEncodedPresentation.ts +86 -0
- package/src/delivery/index.ts +14 -0
- package/src/delivery/planAutoMovieCaptureUrl.ts +32 -0
- package/src/delivery/productionOpusDescription.ts +173 -0
- package/src/delivery/resolveProductionPngProfile.ts +70 -0
- package/src/delivery/resolveProductionVideoProfile.ts +48 -0
- package/src/ffmpegArgs.ts +61 -0
- package/src/film/AutoMovieOrderedScalar.ts +15 -0
- package/src/film/IAutoMovieProductionAudioAssetIdentity.ts +40 -0
- package/src/film/IAutoMovieProductionAudioAssetIdentityBase.ts +34 -0
- package/src/film/IAutoMovieProductionEncoderIdentity.ts +42 -0
- package/src/film/IAutoMovieProductionRenderChunk.ts +47 -0
- package/src/film/IAutoMovieProductionRenderJobPlan.ts +73 -0
- package/src/film/IAutoMovieProductionRenderRuntimeIdentity.ts +37 -0
- package/src/film/IAutoMovieProductionRenderTier.ts +27 -0
- package/src/film/assertSingleGuidePass.ts +38 -0
- package/src/film/equalOrderedScalars.ts +56 -0
- package/src/film/index.ts +9 -0
- package/src/film/normalizeAudioAssets.ts +74 -0
- package/src/film/normalizeRenderTier.ts +51 -0
- package/src/film/planProductionRenderJob.ts +353 -0
- package/src/film/productionVisualDeliveryOccurrence.ts +28 -0
- package/src/film/resolveProductionRenderTierFrameFormat.ts +60 -0
- package/src/film/validDigest.ts +23 -0
- package/src/film/validWaveAudioIdentity.ts +88 -0
- package/src/frameName.ts +24 -0
- package/src/framePattern.ts +19 -0
- package/src/frameTimes.ts +36 -0
- package/src/guidePassFrameName.ts +29 -0
- package/src/guidePassFramePattern.ts +27 -0
- package/src/guidePasses.ts +7 -0
- package/src/guidePassesInternal/passExtension.ts +19 -0
- package/src/index.ts +69 -0
- package/src/isGuidePass.ts +21 -0
- package/src/normalizeGuidePasses.ts +33 -0
- package/src/planCaptionSidecar.ts +98 -0
- package/src/planChunkedSequenceRender.ts +200 -0
- package/src/planGuidePassOutputs.ts +47 -0
- package/src/planPoseKeypointSidecar.ts +289 -0
- package/src/planSequenceRender.ts +175 -0
- package/src/planViewerFrameTimes.ts +98 -0
- package/src/renderAndSee.ts +30 -0
- package/src/renderBudgetPreflight/IAutoMovieRenderBudgetAssessment.ts +53 -0
- package/src/renderBudgetPreflight/IAutoMovieRenderBudgetEvidence.ts +61 -0
- package/src/renderBudgetPreflight/IAutoMovieRenderGraphicsIdentity.ts +29 -0
- package/src/renderBudgetPreflight/assessAutoMovieRenderBudget.ts +137 -0
- package/src/renderBudgetPreflight/autoMovieRenderBudgetEvidence.ts +100 -0
- package/src/renderBudgetPreflight/autoMovieRenderBudgetRefusal.ts +82 -0
- package/src/renderBudgetPreflight/autoMovieRenderTargetRendererOfGraphics.ts +40 -0
- package/src/renderBudgetPreflight/autoMovieRenderTargetSettingsOfShot.ts +59 -0
- package/src/renderBudgetPreflight/index.ts +9 -0
- package/src/renderBudgetPreflight/selectAutoMovieRenderBudget.ts +28 -0
- package/src/renderCaptionSidecar.ts +17 -0
- package/src/renderObservationAudit.ts +1 -0
- package/src/renderPathStem.ts +61 -0
- package/src/renderPoseKeypointSidecar.ts +19 -0
- package/src/renderSequenceAndSee.ts +34 -0
- package/src/renderSequenceVideo.ts +44 -0
- package/src/renderVideo.ts +65 -0
- package/src/screenplay/index.ts +1 -0
- package/src/screenplay/renderScreenplay.ts +128 -0
- package/src/screenplay/screenplaySceneSlug.ts +29 -0
- package/src/sequenceRenderPlan.ts +5 -0
- package/src/sequenceRenderVideo.ts +6 -0
- package/src/shotBeat.ts +19 -0
- package/src/sliceCaptionSidecar.ts +85 -0
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
import {
|
|
2
|
+
IAutoMoviePlaybackSample,
|
|
3
|
+
IAutoMoviePlaybackTimeline,
|
|
4
|
+
foldRoot,
|
|
5
|
+
playbackCursor,
|
|
6
|
+
projectToNdc,
|
|
7
|
+
resolveCameraAt,
|
|
8
|
+
resolvePoseKeypoints,
|
|
9
|
+
sampleMotion,
|
|
10
|
+
sceneFogTransmittance,
|
|
11
|
+
sequenceTimeline,
|
|
12
|
+
} from "@automovie/engine";
|
|
13
|
+
import type {
|
|
14
|
+
IAutoMovieCamera,
|
|
15
|
+
IAutoMovieDeliveryCrop,
|
|
16
|
+
IAutoMovieMotion,
|
|
17
|
+
IAutoMoviePose,
|
|
18
|
+
IAutoMovieScene,
|
|
19
|
+
IAutoMovieSceneNode,
|
|
20
|
+
IAutoMovieSequence,
|
|
21
|
+
IAutoMovieShot,
|
|
22
|
+
IAutoMovieSkeleton,
|
|
23
|
+
IAutoMovieVector3,
|
|
24
|
+
} from "@automovie/interface";
|
|
25
|
+
|
|
26
|
+
import type { IAutoMoviePoseKeypointActor } from "./IAutoMoviePoseKeypointActor";
|
|
27
|
+
import type { IAutoMoviePoseKeypointFrame } from "./IAutoMoviePoseKeypointFrame";
|
|
28
|
+
import type { IAutoMoviePoseKeypointSidecar } from "./IAutoMoviePoseKeypointSidecar";
|
|
29
|
+
import { frameTimes } from "./frameTimes";
|
|
30
|
+
import { shotBeat } from "./shotBeat";
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Plan the pose-keypoint sidecar of one sequence render.
|
|
34
|
+
*
|
|
35
|
+
* The cut is laid on the output clock by `sequenceTimeline`, the output frames are the `frameTimes` schedule the render captures at `fps`, and a forward `playbackCursor` finds the live shot and its shot-local time on each frame. Every performance of that shot whose motion, skeleton and scene node resolve is sampled at `max(0, time - startOffset)`, and its joints are projected through the shot's camera by `resolvePoseKeypoints` with the given aspect and crop. A frame whose scene or camera does not resolve, and a performance without a motion or with an unresolved reference, contribute no keypoints rather than throwing, so the sidecar still covers every output frame; an unresolved cut shot is refused by the timeline builder.
|
|
36
|
+
*
|
|
37
|
+
* When the scene declares fog, each actor also carries the fog transmittance at the camera depth of its world root, its staged placement with the sampled pose root folded in, through the engine's `sceneFogTransmittance`, the law the viewer hands its shader. Throws for an `fps` that is not a finite positive number, for a cut `sequenceTimeline` cannot lay out, and for a runtime that rounds to zero frames. The host writes the result through `renderPoseKeypointSidecar`.
|
|
38
|
+
*
|
|
39
|
+
* @evidence contracts/development/implementation.md#principled-implementation Frames use frameTimes' independently computed binary64 i/fps schedule, whose positive clock supplies the non-decreasing queries the forward cursor requires. Motion sampling, projection and fog use engine functions. Camera depth is projectToNdc's pre-divide depth, unaffected by the discarded frustum-scaled coordinates, so unit frustum arguments preserve that depth; root-sampled fog approximates depth variation across each actor.
|
|
40
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure The planner owns only the frame walk and the per-actor record, the clock, shot resolution, sampling, projection and fog are the engine's, and the beat label is `shotBeat`, shared with the caption plan.
|
|
41
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Unresolvable references contribute nothing rather than a placeholder, `atmosphere` is omitted for a fogless scene rather than written as a default, and no shot, actor or fixture is special-cased.
|
|
42
|
+
* @evidence contracts/development/common.md#meaningful-documentation The doc states the clock, how each frame's shot and each actor's pose are resolved, what is skipped rather than refused, when and how `atmosphere` is derived, every refusal, and who writes the file, and each property states its role and unit.
|
|
43
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms Initial maps index all supplied shots, scenes, motions and skeletons, including unused extras, while timeline and cursor work costs O(E + F) for E cut entries and F output samples. Each first-live shot scans its scene's cameras and indexes that scene's nodes; different shots sharing a scene rebuild that node index. Every frame scans its live shot's performances, and each resolved actor pays sampleMotion's key/joint/expression work plus resolvePoseKeypoints' forward kinematics, joint projection and camera-clip sampling. Fog requests sample the camera again per actor. These delegated populations drive cost beyond a constant per-performance bound, and none of the input arrays or output populations is capped here.
|
|
44
|
+
* @evidence contracts/development/implementation.md#reuse-equivalent-work A shot's staging, its scene, camera and node index, is resolved once per call and shared by all its frames, which is equivalent because the inputs are immutable for the call and the staging depends only on the shot's `scene` and `camera` ids; the cache is dropped on return.
|
|
45
|
+
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources Call-local maps reference every supplied shot, scene, motion and skeleton; at most one staging entry per supplied shot also holds a camera and node map, which can repeat one scene's node population across shots. The F-time schedule, motion samples and projection intermediates become collectable when their calls finish. The caller retains every returned frame, actor and keypoint, with no frame or population cap here; no native handle or background task is acquired.
|
|
46
|
+
*/
|
|
47
|
+
export const planPoseKeypointSidecar: (props: {
|
|
48
|
+
sequence: IAutoMovieSequence;
|
|
49
|
+
shots: IAutoMovieShot[];
|
|
50
|
+
scenes: readonly IAutoMovieScene[];
|
|
51
|
+
motions: readonly IAutoMovieMotion[];
|
|
52
|
+
skeletons: readonly IAutoMovieSkeleton[];
|
|
53
|
+
fps: number;
|
|
54
|
+
aspect?: number;
|
|
55
|
+
crop?: IAutoMovieDeliveryCrop;
|
|
56
|
+
}) => IAutoMoviePoseKeypointSidecar = (props: {
|
|
57
|
+
/** The cut being rendered. */
|
|
58
|
+
sequence: IAutoMovieSequence;
|
|
59
|
+
|
|
60
|
+
/** Every shot the cut references; extra shots are ignored. */
|
|
61
|
+
shots: IAutoMovieShot[];
|
|
62
|
+
|
|
63
|
+
/** The staged scenes the shots play over. */
|
|
64
|
+
scenes: readonly IAutoMovieScene[];
|
|
65
|
+
|
|
66
|
+
/** The motions the shots' performances reference. */
|
|
67
|
+
motions: readonly IAutoMovieMotion[];
|
|
68
|
+
|
|
69
|
+
/** The skeletons the motions target. */
|
|
70
|
+
skeletons: readonly IAutoMovieSkeleton[];
|
|
71
|
+
|
|
72
|
+
/** Output frames per second, the render clock, not necessarily `sequence.fps`. */
|
|
73
|
+
fps: number;
|
|
74
|
+
|
|
75
|
+
/** Render aspect, width over height; `resolvePoseKeypoints` assumes 16/9 when omitted. */
|
|
76
|
+
aspect?: number;
|
|
77
|
+
|
|
78
|
+
/** Normalized delivery crop the keypoints are expressed in; the whole frame when omitted. */
|
|
79
|
+
crop?: IAutoMovieDeliveryCrop;
|
|
80
|
+
}): IAutoMoviePoseKeypointSidecar => {
|
|
81
|
+
if (Number.isFinite(props.fps) === false || props.fps <= 0)
|
|
82
|
+
throw new Error(`fps must be a finite number > 0, but was ${props.fps}`);
|
|
83
|
+
const timeline: IAutoMoviePlaybackTimeline = sequenceTimeline(
|
|
84
|
+
props.sequence,
|
|
85
|
+
props.shots,
|
|
86
|
+
);
|
|
87
|
+
const times: number[] = frameTimes(props.fps, timeline.runtime);
|
|
88
|
+
if (times.length === 0)
|
|
89
|
+
throw new Error(
|
|
90
|
+
`planPoseKeypointSidecar requires at least one frame; fps ${props.fps} and duration ${timeline.runtime} produced zero frames`,
|
|
91
|
+
);
|
|
92
|
+
const shotById: Map<string, IAutoMovieShot> = new Map(
|
|
93
|
+
props.shots.map((shot: IAutoMovieShot): [string, IAutoMovieShot] => [
|
|
94
|
+
shot.id,
|
|
95
|
+
shot,
|
|
96
|
+
]),
|
|
97
|
+
);
|
|
98
|
+
const sceneById: Map<string, IAutoMovieScene> = new Map(
|
|
99
|
+
props.scenes.map((scene: IAutoMovieScene): [string, IAutoMovieScene] => [
|
|
100
|
+
scene.id,
|
|
101
|
+
scene,
|
|
102
|
+
]),
|
|
103
|
+
);
|
|
104
|
+
const lookups: IPoseLookups = {
|
|
105
|
+
motionById: new Map(
|
|
106
|
+
props.motions.map(
|
|
107
|
+
(motion: IAutoMovieMotion): [string, IAutoMovieMotion] => [
|
|
108
|
+
motion.id,
|
|
109
|
+
motion,
|
|
110
|
+
],
|
|
111
|
+
),
|
|
112
|
+
),
|
|
113
|
+
skeletonById: new Map(
|
|
114
|
+
props.skeletons.map(
|
|
115
|
+
(skeleton: IAutoMovieSkeleton): [string, IAutoMovieSkeleton] => [
|
|
116
|
+
skeleton.id,
|
|
117
|
+
skeleton,
|
|
118
|
+
],
|
|
119
|
+
),
|
|
120
|
+
),
|
|
121
|
+
aspect: props.aspect,
|
|
122
|
+
crop: props.crop,
|
|
123
|
+
};
|
|
124
|
+
const stagingByShot: Map<string, IShotStaging | null> = new Map();
|
|
125
|
+
const cursor: (seconds: number) => IAutoMoviePlaybackSample = playbackCursor(
|
|
126
|
+
props.sequence,
|
|
127
|
+
timeline,
|
|
128
|
+
);
|
|
129
|
+
const frames: IAutoMoviePoseKeypointFrame[] = times.map(
|
|
130
|
+
(time: number, frame: number): IAutoMoviePoseKeypointFrame => {
|
|
131
|
+
const sample: IAutoMoviePlaybackSample = cursor(time);
|
|
132
|
+
// sequenceTimeline already threw for any entry whose shot was not
|
|
133
|
+
// provided, so every cursor sample names a known shot.
|
|
134
|
+
const shot: IAutoMovieShot = shotById.get(sample.shot)!;
|
|
135
|
+
let staging: IShotStaging | null | undefined = stagingByShot.get(shot.id);
|
|
136
|
+
if (staging === undefined) {
|
|
137
|
+
staging = stageShot(shot, sceneById);
|
|
138
|
+
stagingByShot.set(shot.id, staging);
|
|
139
|
+
}
|
|
140
|
+
return {
|
|
141
|
+
frame,
|
|
142
|
+
beat: shotBeat(sample.shot),
|
|
143
|
+
actors:
|
|
144
|
+
staging === null ? [] : actorsAt(shot, staging, sample.time, lookups),
|
|
145
|
+
};
|
|
146
|
+
},
|
|
147
|
+
);
|
|
148
|
+
return {
|
|
149
|
+
target: props.sequence.id,
|
|
150
|
+
fps: props.fps,
|
|
151
|
+
frameCount: frames.length,
|
|
152
|
+
frames,
|
|
153
|
+
};
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
/** The call-wide lookups every frame's actor projection reads. */
|
|
157
|
+
interface IPoseLookups {
|
|
158
|
+
motionById: ReadonlyMap<string, IAutoMovieMotion>;
|
|
159
|
+
skeletonById: ReadonlyMap<string, IAutoMovieSkeleton>;
|
|
160
|
+
aspect: number | undefined;
|
|
161
|
+
crop: IAutoMovieDeliveryCrop | undefined;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/** A shot's resolved scene, camera and node index, shared by all its frames. */
|
|
165
|
+
interface IShotStaging {
|
|
166
|
+
scene: IAutoMovieScene;
|
|
167
|
+
camera: IAutoMovieCamera;
|
|
168
|
+
nodeById: ReadonlyMap<string, IAutoMovieSceneNode>;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/** Resolve a shot's scene and camera, or null when either is missing. */
|
|
172
|
+
const stageShot: (
|
|
173
|
+
shot: IAutoMovieShot,
|
|
174
|
+
sceneById: ReadonlyMap<string, IAutoMovieScene>,
|
|
175
|
+
) => IShotStaging | null = (
|
|
176
|
+
shot: IAutoMovieShot,
|
|
177
|
+
sceneById: ReadonlyMap<string, IAutoMovieScene>,
|
|
178
|
+
): IShotStaging | null => {
|
|
179
|
+
const scene: IAutoMovieScene | undefined = sceneById.get(shot.scene);
|
|
180
|
+
const camera: IAutoMovieCamera | undefined = scene?.cameras.find(
|
|
181
|
+
(candidate: IAutoMovieCamera): boolean => candidate.id === shot.camera,
|
|
182
|
+
);
|
|
183
|
+
if (scene === undefined || camera === undefined) return null;
|
|
184
|
+
return {
|
|
185
|
+
scene,
|
|
186
|
+
camera,
|
|
187
|
+
nodeById: new Map(
|
|
188
|
+
scene.nodes.map(
|
|
189
|
+
(node: IAutoMovieSceneNode): [string, IAutoMovieSceneNode] => [
|
|
190
|
+
node.id,
|
|
191
|
+
node,
|
|
192
|
+
],
|
|
193
|
+
),
|
|
194
|
+
),
|
|
195
|
+
};
|
|
196
|
+
};
|
|
197
|
+
|
|
198
|
+
/** Project every resolvable performing actor of one shot at a shot-local instant. */
|
|
199
|
+
const actorsAt: (
|
|
200
|
+
shot: IAutoMovieShot,
|
|
201
|
+
staging: IShotStaging,
|
|
202
|
+
time: number,
|
|
203
|
+
lookups: IPoseLookups,
|
|
204
|
+
) => IAutoMoviePoseKeypointActor[] = (
|
|
205
|
+
shot: IAutoMovieShot,
|
|
206
|
+
staging: IShotStaging,
|
|
207
|
+
time: number,
|
|
208
|
+
lookups: IPoseLookups,
|
|
209
|
+
): IAutoMoviePoseKeypointActor[] => {
|
|
210
|
+
const actors: IAutoMoviePoseKeypointActor[] = [];
|
|
211
|
+
for (const performance of shot.performances) {
|
|
212
|
+
if (performance.motion === null) continue;
|
|
213
|
+
const motion: IAutoMovieMotion | undefined = lookups.motionById.get(
|
|
214
|
+
performance.motion,
|
|
215
|
+
);
|
|
216
|
+
const node: IAutoMovieSceneNode | undefined = staging.nodeById.get(
|
|
217
|
+
performance.node,
|
|
218
|
+
);
|
|
219
|
+
if (motion === undefined || node === undefined) continue;
|
|
220
|
+
const skeleton: IAutoMovieSkeleton | undefined = lookups.skeletonById.get(
|
|
221
|
+
motion.skeleton,
|
|
222
|
+
);
|
|
223
|
+
if (skeleton === undefined) continue;
|
|
224
|
+
const pose: IAutoMoviePose = sampleMotion(
|
|
225
|
+
motion,
|
|
226
|
+
Math.max(0, time - performance.startOffset),
|
|
227
|
+
).pose;
|
|
228
|
+
const fog: IAutoMovieScene["fog"] = staging.scene.fog;
|
|
229
|
+
actors.push({
|
|
230
|
+
node: performance.node,
|
|
231
|
+
keypoints: resolvePoseKeypoints({
|
|
232
|
+
pose,
|
|
233
|
+
skeleton,
|
|
234
|
+
node,
|
|
235
|
+
camera: staging.camera,
|
|
236
|
+
cameraMotion: shot.cameraMotion,
|
|
237
|
+
time,
|
|
238
|
+
aspect: lookups.aspect,
|
|
239
|
+
crop: lookups.crop,
|
|
240
|
+
}),
|
|
241
|
+
// Spread only when the scene declares fog, so a fogless scene's sidecar
|
|
242
|
+
// carries no `atmosphere` key at all. The depth sample is the actor's
|
|
243
|
+
// world root, its staged placement with the sampled pose root folded
|
|
244
|
+
// in, because the staged placement alone would keep the atmosphere an
|
|
245
|
+
// actor had at frame zero while its clip carries it away.
|
|
246
|
+
...(fog === undefined || fog === null
|
|
247
|
+
? {}
|
|
248
|
+
: {
|
|
249
|
+
atmosphere: sceneFogTransmittance(
|
|
250
|
+
fog,
|
|
251
|
+
cameraDepth(
|
|
252
|
+
staging.camera,
|
|
253
|
+
shot.cameraMotion,
|
|
254
|
+
time,
|
|
255
|
+
foldRoot(node.transform, pose.root).translation,
|
|
256
|
+
),
|
|
257
|
+
),
|
|
258
|
+
}),
|
|
259
|
+
});
|
|
260
|
+
}
|
|
261
|
+
return actors;
|
|
262
|
+
};
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* The distance of `point` along the camera's forward axis at `time`, the
|
|
266
|
+
* length the fog is integrated over and what the fog shader interpolates as
|
|
267
|
+
* `vFogDepth`.
|
|
268
|
+
*
|
|
269
|
+
* `projectToNdc` computes that depth as `-localZ` before its perspective
|
|
270
|
+
* divide, so the frustum half-height and aspect, which only scale the
|
|
271
|
+
* discarded `ndcX` and `ndcY`, are passed as 1.
|
|
272
|
+
*/
|
|
273
|
+
const cameraDepth: (
|
|
274
|
+
camera: IAutoMovieCamera,
|
|
275
|
+
cameraMotion: IAutoMovieShot["cameraMotion"],
|
|
276
|
+
time: number,
|
|
277
|
+
point: IAutoMovieVector3,
|
|
278
|
+
) => number = (
|
|
279
|
+
camera: IAutoMovieCamera,
|
|
280
|
+
cameraMotion: IAutoMovieShot["cameraMotion"],
|
|
281
|
+
time: number,
|
|
282
|
+
point: IAutoMovieVector3,
|
|
283
|
+
): number =>
|
|
284
|
+
projectToNdc(
|
|
285
|
+
resolveCameraAt(camera.transform, cameraMotion, camera.id, time),
|
|
286
|
+
point,
|
|
287
|
+
1,
|
|
288
|
+
1,
|
|
289
|
+
).depth;
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import {
|
|
2
|
+
IAutoMoviePlaybackTimeline,
|
|
3
|
+
playbackCursor,
|
|
4
|
+
sequenceTimeline,
|
|
5
|
+
} from "@automovie/engine";
|
|
6
|
+
import {
|
|
7
|
+
IAutoMovieRenderSpec,
|
|
8
|
+
IAutoMovieSequence,
|
|
9
|
+
IAutoMovieShot,
|
|
10
|
+
} from "@automovie/interface";
|
|
11
|
+
|
|
12
|
+
import type { IAutoMovieSequenceRenderFrame } from "./IAutoMovieSequenceRenderFrame";
|
|
13
|
+
import type { IAutoMovieSequenceRenderPlan } from "./IAutoMovieSequenceRenderPlan";
|
|
14
|
+
import type { IAutoMovieSequenceRenderTransitionSpan } from "./IAutoMovieSequenceRenderTransitionSpan";
|
|
15
|
+
import { ffmpegArgs } from "./ffmpegArgs";
|
|
16
|
+
import { frameName } from "./frameName";
|
|
17
|
+
import { framePattern } from "./framePattern";
|
|
18
|
+
import { frameTimes } from "./frameTimes";
|
|
19
|
+
import { renderPathStem } from "./renderPathStem";
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Build the render-layer manifest for a committed sequence. The output FPS is controlled by the render spec; the cut's fps is preserved as editorial metadata. Trim and transition arithmetic is delegated to the engine playback timeline, then copied into the manifest so the capture host has no hidden timing rules.
|
|
23
|
+
*
|
|
24
|
+
* @evidence contracts/development/implementation.md#principled-implementation sequenceTimeline owns trim and overlap arithmetic, frameTimes supplies increasing half-open output samples, and one playbackCursor resolves those samples without changing the sequence's editorial fps.
|
|
25
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure The manifest gathers timeline spans, resolved frame samples and paths so a capture host reads one plan instead of independently implementing the cut.
|
|
26
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts A mismatched render target or empty schedule refuses; output path overrides are caller data and no sequence identity is specially recognized.
|
|
27
|
+
* @evidence contracts/development/common.md#meaningful-documentation The planner documents editorial versus output fps and target equality; manifest members state seconds, trim offsets, blend weights and host paths.
|
|
28
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms For S supplied shots, E timeline entries and F output frames, the engine first indexes all S shots, including unused extras; layout and the forward cursor then cost O(E+F), for O(S+E+F) planning time and peak metadata space. The returned manifest retains O(E+F) records and no per-frame full timeline scan occurs.
|
|
29
|
+
* @evidence contracts/development/implementation.md#reuse-equivalent-work One resolved timeline feeds shot spans, transitions and every frame sample; the forward cursor retains its current entry across increasing sample times only within this call.
|
|
30
|
+
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources The returned plan retains shot-span and frame metadata proportional to the output schedule; the temporary cursor and timeline are released on return, and planning opens no host resource.
|
|
31
|
+
*/
|
|
32
|
+
export const planSequenceRender: (props: {
|
|
33
|
+
sequence: IAutoMovieSequence;
|
|
34
|
+
shots: IAutoMovieShot[];
|
|
35
|
+
spec: IAutoMovieRenderSpec;
|
|
36
|
+
frameDir?: string;
|
|
37
|
+
outputPath?: string;
|
|
38
|
+
}) => IAutoMovieSequenceRenderPlan = (props: {
|
|
39
|
+
/** Sequence being rendered. */
|
|
40
|
+
sequence: IAutoMovieSequence;
|
|
41
|
+
|
|
42
|
+
/** Committed shots referenced by the sequence. */
|
|
43
|
+
shots: IAutoMovieShot[];
|
|
44
|
+
|
|
45
|
+
/** Render parameters whose `target` must equal `sequence.id`. */
|
|
46
|
+
spec: IAutoMovieRenderSpec;
|
|
47
|
+
|
|
48
|
+
/** Optional frame directory override. */
|
|
49
|
+
frameDir?: string;
|
|
50
|
+
|
|
51
|
+
/** Optional encoded output path override. */
|
|
52
|
+
outputPath?: string;
|
|
53
|
+
}): IAutoMovieSequenceRenderPlan => {
|
|
54
|
+
if (props.spec.target !== props.sequence.id)
|
|
55
|
+
throw new Error(
|
|
56
|
+
`render spec target "${props.spec.target}" must equal sequence "${props.sequence.id}"`,
|
|
57
|
+
);
|
|
58
|
+
|
|
59
|
+
const timeline: IAutoMoviePlaybackTimeline = sequenceTimeline(
|
|
60
|
+
props.sequence,
|
|
61
|
+
props.shots,
|
|
62
|
+
);
|
|
63
|
+
const times: number[] = frameTimes(
|
|
64
|
+
props.spec.frameFormat.fps,
|
|
65
|
+
timeline.runtime,
|
|
66
|
+
);
|
|
67
|
+
if (times.length === 0)
|
|
68
|
+
throw new Error(
|
|
69
|
+
`planSequenceRender requires at least one frame; fps ${props.spec.frameFormat.fps} and duration ${timeline.runtime} produced zero frames`,
|
|
70
|
+
);
|
|
71
|
+
|
|
72
|
+
const stem: string = renderPathStem(props.sequence.id);
|
|
73
|
+
const frameDir: string = props.frameDir ?? `frames/${stem}`;
|
|
74
|
+
const outputPath: string = props.outputPath ?? `${stem}.mp4`;
|
|
75
|
+
const inputPattern: string = `${frameDir}/${framePattern()}`;
|
|
76
|
+
return {
|
|
77
|
+
target: { kind: "sequence", id: props.sequence.id },
|
|
78
|
+
sequenceFps: props.sequence.fps,
|
|
79
|
+
renderFps: props.spec.frameFormat.fps,
|
|
80
|
+
durationSeconds: timeline.runtime,
|
|
81
|
+
frameCount: times.length,
|
|
82
|
+
times,
|
|
83
|
+
shots: timeline.entries.map(
|
|
84
|
+
(
|
|
85
|
+
entry: IAutoMoviePlaybackTimeline["entries"][number],
|
|
86
|
+
): IAutoMovieSequenceRenderPlan["shots"][number] => ({
|
|
87
|
+
entry: entry.entry,
|
|
88
|
+
shot: entry.shot,
|
|
89
|
+
start: entry.start,
|
|
90
|
+
end: entry.start + entry.played,
|
|
91
|
+
played: entry.played,
|
|
92
|
+
offset: entry.offset,
|
|
93
|
+
trim: props.sequence.shots[entry.entry]!.trim,
|
|
94
|
+
}),
|
|
95
|
+
),
|
|
96
|
+
transitionSpans: transitionSpans(props.sequence, timeline),
|
|
97
|
+
frames: frameSamples(props.sequence, timeline, times, frameDir),
|
|
98
|
+
frameDir,
|
|
99
|
+
firstFrame: `${frameDir}/${frameName(0)}`,
|
|
100
|
+
lastFrame: `${frameDir}/${frameName(times.length - 1)}`,
|
|
101
|
+
inputPattern,
|
|
102
|
+
outputPath,
|
|
103
|
+
ffmpegArgs: ffmpegArgs(props.spec, inputPattern, outputPath),
|
|
104
|
+
};
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
const transitionSpans: (
|
|
108
|
+
sequence: IAutoMovieSequence,
|
|
109
|
+
timeline: IAutoMoviePlaybackTimeline,
|
|
110
|
+
) => IAutoMovieSequenceRenderTransitionSpan[] = (
|
|
111
|
+
sequence: IAutoMovieSequence,
|
|
112
|
+
timeline: IAutoMoviePlaybackTimeline,
|
|
113
|
+
): IAutoMovieSequenceRenderTransitionSpan[] =>
|
|
114
|
+
timeline.entries.flatMap(
|
|
115
|
+
(
|
|
116
|
+
entry: IAutoMoviePlaybackTimeline["entries"][number],
|
|
117
|
+
): IAutoMovieSequenceRenderTransitionSpan[] => {
|
|
118
|
+
const transition: IAutoMovieSequence["shots"][number]["transition"] =
|
|
119
|
+
sequence.shots[entry.entry]!.transition;
|
|
120
|
+
if (transition === null) return [];
|
|
121
|
+
const outgoing: IAutoMoviePlaybackTimeline["entries"][number] =
|
|
122
|
+
timeline.entries[entry.entry - 1]!;
|
|
123
|
+
return [
|
|
124
|
+
{
|
|
125
|
+
entry: entry.entry,
|
|
126
|
+
from: outgoing.shot,
|
|
127
|
+
to: entry.shot,
|
|
128
|
+
kind: transition.kind,
|
|
129
|
+
start: entry.start,
|
|
130
|
+
end: entry.start + transition.duration,
|
|
131
|
+
duration: transition.duration,
|
|
132
|
+
},
|
|
133
|
+
];
|
|
134
|
+
},
|
|
135
|
+
);
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Resolve every output frame in one forward sweep. Frame times come from {@link frameTimes} (`i / fps`, strictly increasing), so a single {@link playbackCursor} walks the timeline once, O(frames + entries) instead of a per-frame scan, landing on the same live entry a per-frame resolve would, so the samples are byte-identical.
|
|
139
|
+
*/
|
|
140
|
+
const frameSamples: (
|
|
141
|
+
sequence: IAutoMovieSequence,
|
|
142
|
+
timeline: IAutoMoviePlaybackTimeline,
|
|
143
|
+
times: number[],
|
|
144
|
+
frameDir: string,
|
|
145
|
+
) => IAutoMovieSequenceRenderFrame[] = (
|
|
146
|
+
sequence: IAutoMovieSequence,
|
|
147
|
+
timeline: IAutoMoviePlaybackTimeline,
|
|
148
|
+
times: number[],
|
|
149
|
+
frameDir: string,
|
|
150
|
+
): IAutoMovieSequenceRenderFrame[] => {
|
|
151
|
+
const cursor: ReturnType<typeof playbackCursor> = playbackCursor(
|
|
152
|
+
sequence,
|
|
153
|
+
timeline,
|
|
154
|
+
);
|
|
155
|
+
return times.map(
|
|
156
|
+
(time: number, index: number): IAutoMovieSequenceRenderFrame => {
|
|
157
|
+
const sample: ReturnType<typeof cursor> = cursor(time);
|
|
158
|
+
return {
|
|
159
|
+
index,
|
|
160
|
+
timeSeconds: time,
|
|
161
|
+
path: `${frameDir}/${frameName(index)}`,
|
|
162
|
+
shot: sample.shot,
|
|
163
|
+
shotTimeSeconds: sample.time,
|
|
164
|
+
blend:
|
|
165
|
+
sample.blend === null
|
|
166
|
+
? null
|
|
167
|
+
: {
|
|
168
|
+
shot: sample.blend.shot,
|
|
169
|
+
shotTimeSeconds: sample.blend.time,
|
|
170
|
+
alpha: sample.blend.alpha,
|
|
171
|
+
},
|
|
172
|
+
};
|
|
173
|
+
},
|
|
174
|
+
);
|
|
175
|
+
};
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Plan the film seconds whose frames a still capture writes.
|
|
3
|
+
*
|
|
4
|
+
* Give either explicit `at` seconds, or a `from`–`to` range sampled every
|
|
5
|
+
* `every` frames or every `step` seconds. Range samples are aligned to the
|
|
6
|
+
* film's frame grid at `fps`, so each still matches a frame the video encodes;
|
|
7
|
+
* explicit seconds are kept as given. The result is sorted, without repeats,
|
|
8
|
+
* and every second lies in `[0, durationSeconds]`.
|
|
9
|
+
*
|
|
10
|
+
* @evidence contracts/development/common.md#meaningful-documentation The comment states both request forms, the frame-grid alignment of ranges, the kept explicit seconds and the result's order and bounds; each option states its unit.
|
|
11
|
+
* @evidence contracts/development/implementation.md#principled-implementation A range is enumerated in whole frame indices, from the first index at or after `from` to the last at or before `to`, so floating-point step sums never drift off the encoded grid; a `step` is converted to the nearest frame index per sample and repeats are removed.
|
|
12
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure One pure function owns request validation and enumeration; capture and naming belong to renderViewerFrames.
|
|
13
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts No default range or interval is invented: a request without `at` or a complete range, or with both forms, throws.
|
|
14
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms Enumeration is linear in the number of planned frames, plus a sort of explicit seconds; nothing scans the whole film when a short range is requested.
|
|
15
|
+
* @evidence contracts/development/implementation.md#reuse-equivalent-work Each call plans from its arguments alone; there is no shared work to reuse.
|
|
16
|
+
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources Only the returned array is allocated, bounded by the requested range divided by its interval.
|
|
17
|
+
*/
|
|
18
|
+
export function planViewerFrameTimes(request: {
|
|
19
|
+
/** Frames per second of the film's encoded grid. */
|
|
20
|
+
fps: number;
|
|
21
|
+
|
|
22
|
+
/** Film running time in seconds. */
|
|
23
|
+
durationSeconds: number;
|
|
24
|
+
|
|
25
|
+
/** Explicit film seconds, kept as given. */
|
|
26
|
+
at?: readonly number[];
|
|
27
|
+
|
|
28
|
+
/** Start of the range in film seconds, inclusive. */
|
|
29
|
+
from?: number;
|
|
30
|
+
|
|
31
|
+
/** End of the range in film seconds, inclusive. */
|
|
32
|
+
to?: number;
|
|
33
|
+
|
|
34
|
+
/** Range interval in whole frames. */
|
|
35
|
+
every?: number;
|
|
36
|
+
|
|
37
|
+
/** Range interval in seconds, rounded to the nearest frame per sample. */
|
|
38
|
+
step?: number;
|
|
39
|
+
}): number[] {
|
|
40
|
+
const fps: number = request.fps;
|
|
41
|
+
const durationSeconds: number = request.durationSeconds;
|
|
42
|
+
if (!Number.isFinite(fps) || fps <= 0)
|
|
43
|
+
throw new Error("fps must be positive and finite");
|
|
44
|
+
if (!Number.isFinite(durationSeconds) || durationSeconds <= 0)
|
|
45
|
+
throw new Error("durationSeconds must be positive and finite");
|
|
46
|
+
const inFilm: (seconds: number) => boolean = (seconds: number): boolean =>
|
|
47
|
+
Number.isFinite(seconds) && seconds >= 0 && seconds <= durationSeconds;
|
|
48
|
+
const ranged: boolean =
|
|
49
|
+
request.from !== undefined ||
|
|
50
|
+
request.to !== undefined ||
|
|
51
|
+
request.every !== undefined ||
|
|
52
|
+
request.step !== undefined;
|
|
53
|
+
if ((request.at !== undefined) === ranged)
|
|
54
|
+
throw new Error("Give either at seconds or a from-to range, not both");
|
|
55
|
+
|
|
56
|
+
if (request.at !== undefined) {
|
|
57
|
+
if (request.at.length === 0)
|
|
58
|
+
throw new Error("at needs at least one second");
|
|
59
|
+
for (const seconds of request.at)
|
|
60
|
+
if (!inFilm(seconds))
|
|
61
|
+
throw new Error(`${seconds} lies outside 0-${durationSeconds} s`);
|
|
62
|
+
return [...new Set(request.at)].sort(
|
|
63
|
+
(a: number, b: number): number => a - b,
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
const from: number | undefined = request.from;
|
|
68
|
+
const to: number | undefined = request.to;
|
|
69
|
+
const every: number | undefined = request.every;
|
|
70
|
+
const step: number | undefined = request.step;
|
|
71
|
+
if (from === undefined || to === undefined)
|
|
72
|
+
throw new Error("A range needs both from and to");
|
|
73
|
+
if (!inFilm(from) || !inFilm(to) || from > to)
|
|
74
|
+
throw new Error(
|
|
75
|
+
`The range must satisfy 0 <= from <= to <= ${durationSeconds}`,
|
|
76
|
+
);
|
|
77
|
+
if ((every === undefined) === (step === undefined))
|
|
78
|
+
throw new Error("A range needs exactly one of every or step");
|
|
79
|
+
if (every !== undefined && (!Number.isSafeInteger(every) || every <= 0))
|
|
80
|
+
throw new Error("every must be a positive whole number of frames");
|
|
81
|
+
if (step !== undefined && (!Number.isFinite(step) || step <= 0))
|
|
82
|
+
throw new Error("step must be positive and finite");
|
|
83
|
+
|
|
84
|
+
// Enumerate whole frame indices so the samples stay on the encoded grid.
|
|
85
|
+
const first: number = Math.ceil(from * fps - 1e-9);
|
|
86
|
+
const last: number = Math.floor(to * fps + 1e-9);
|
|
87
|
+
const frames: number[] = [];
|
|
88
|
+
if (every !== undefined)
|
|
89
|
+
for (let index: number = first; index <= last; index += every)
|
|
90
|
+
frames.push(index);
|
|
91
|
+
else
|
|
92
|
+
for (let sample: number = 0; ; sample++) {
|
|
93
|
+
const index: number = Math.round((from + sample * step!) * fps);
|
|
94
|
+
if (index > last) break;
|
|
95
|
+
if (index >= first && frames.at(-1) !== index) frames.push(index);
|
|
96
|
+
}
|
|
97
|
+
return frames.map((index: number): number => index / fps);
|
|
98
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { IAutoMovieRenderAndSeeRequest } from "./IAutoMovieRenderAndSeeRequest";
|
|
2
|
+
import type { IAutoMovieRenderAndSeeResult } from "./IAutoMovieRenderAndSeeResult";
|
|
3
|
+
import { renderVideo } from "./renderVideo";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Render a clip and return the encoded output plus explicit frame artifacts. The function still performs only deterministic orchestration over injected host I/O; its value is the metadata contract that lets an agent inspect what was captured without guessing paths or sample times.
|
|
7
|
+
*
|
|
8
|
+
* @evidence contracts/development/implementation.md#principled-implementation The wrapper executes renderVideo with the supplied spec and seconds, then attaches the requested duration and a shallow spec copy; nested spec objects remain shared with the caller.
|
|
9
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure Clip execution stays in renderVideo while this entry owns the inspectable artifact envelope used by a host or agent.
|
|
10
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The wrapper neither invents capture paths nor suppresses adapter errors, and the returned frames are those the delegated capture loop received.
|
|
11
|
+
* @evidence contracts/development/common.md#meaningful-documentation Request members identify seconds, output paths and adapter ownership; the result documents the spec snapshot, whose nested values callers must keep stable while rendering.
|
|
12
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms Beyond the delegated O(F) frame capture and metadata work, the wrapper performs a constant-size shallow spec copy and object merge.
|
|
13
|
+
* @evidence contracts/development/implementation.md#reuse-equivalent-work This wrapper performs one effectful render per invocation; the returned artifact can be retained by its caller but an equal spec does not authorize sharing host I/O.
|
|
14
|
+
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources The returned artifact owns its metadata arrays while host adapters own written files and running work; failures propagate from renderVideo without acquiring additional resources.
|
|
15
|
+
*/
|
|
16
|
+
export const renderAndSee: (
|
|
17
|
+
request: IAutoMovieRenderAndSeeRequest,
|
|
18
|
+
) => Promise<IAutoMovieRenderAndSeeResult> = async (
|
|
19
|
+
request: IAutoMovieRenderAndSeeRequest,
|
|
20
|
+
): Promise<IAutoMovieRenderAndSeeResult> => ({
|
|
21
|
+
spec: { ...request.spec },
|
|
22
|
+
durationSeconds: request.durationSeconds,
|
|
23
|
+
...(await renderVideo(
|
|
24
|
+
request.spec,
|
|
25
|
+
request.durationSeconds,
|
|
26
|
+
request.frameDir,
|
|
27
|
+
request.outputPath,
|
|
28
|
+
request.adapters,
|
|
29
|
+
)),
|
|
30
|
+
});
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import {
|
|
2
|
+
IAutoMovieRenderInventory,
|
|
3
|
+
IAutoMovieRenderReport,
|
|
4
|
+
IAutoMovieRenderTarget,
|
|
5
|
+
IAutoMovieSemanticMask,
|
|
6
|
+
} from "@automovie/interface";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* One caller-supplied shot's measured inventory and explicit budget assessment, without proving an actual draw or automatic render-job gate.
|
|
10
|
+
*
|
|
11
|
+
* @evidence contracts/development/design.md#principled-representation A shot assessment distinguishes not-run from a report's incomplete status and uses nullable inventory, mask and target fields when no renderer was identified.
|
|
12
|
+
* @evidence contracts/development/design.md#minimal-and-owned-surface This record keeps measurement, attribution and sealed target together for one compiled shot's budget decision.
|
|
13
|
+
* @evidence contracts/development/design.md#prohibited-design-shortcuts Absent graphics identity is represented by not-run and a reason, not a fabricated renderer or empty passing report.
|
|
14
|
+
* @evidence contracts/development/common.md#meaningful-documentation Members explain nullable state, the not-run versus incomplete distinction and how semantic owners resolve through the mask.
|
|
15
|
+
*/
|
|
16
|
+
export interface IAutoMovieRenderBudgetAssessment {
|
|
17
|
+
/**
|
|
18
|
+
* Compiled shot the measurement belongs to.
|
|
19
|
+
*/
|
|
20
|
+
shot: string;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* The verdict, including the two that are not a pass.
|
|
24
|
+
*
|
|
25
|
+
* `not-run` is this record's own: no report exists because no renderer identity was supplied. A report's `incomplete` retains its measured findings while one or more analyses have unresolved inputs or bounds; neither state is clearance.
|
|
26
|
+
*/
|
|
27
|
+
status: IAutoMovieRenderReport["status"] | "not-run";
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Why no report exists, or `null` when one does.
|
|
31
|
+
*/
|
|
32
|
+
reason: string | null;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* The bounded verdict, or `null` when the assessment did not run.
|
|
36
|
+
*/
|
|
37
|
+
report: IAutoMovieRenderReport | null;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* The measured cost, or `null` when the assessment did not run.
|
|
41
|
+
*/
|
|
42
|
+
inventory: IAutoMovieRenderInventory | null;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* The palette the report's owners resolve in, or `null` as above.
|
|
46
|
+
*/
|
|
47
|
+
mask: IAutoMovieSemanticMask | null;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* The sealed target, or `null` when the renderer was never identified.
|
|
51
|
+
*/
|
|
52
|
+
target: IAutoMovieRenderTarget | null;
|
|
53
|
+
}
|