@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.
Files changed (503) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +37 -2
  3. package/lib/AUTOMOVIE_GUIDE_PASSES.d.ts +11 -0
  4. package/lib/AUTOMOVIE_GUIDE_PASSES.js +21 -0
  5. package/lib/AUTOMOVIE_GUIDE_PASSES.js.map +1 -0
  6. package/lib/IAutoMovieCaptionEntry.d.ts +28 -0
  7. package/lib/IAutoMovieCaptionEntry.js +3 -0
  8. package/lib/IAutoMovieCaptionEntry.js.map +1 -0
  9. package/lib/IAutoMovieCaptionSidecar.d.ts +25 -0
  10. package/lib/IAutoMovieCaptionSidecar.js +3 -0
  11. package/lib/IAutoMovieCaptionSidecar.js.map +1 -0
  12. package/lib/IAutoMovieCapturedFrame.d.ts +22 -0
  13. package/lib/IAutoMovieCapturedFrame.js +3 -0
  14. package/lib/IAutoMovieCapturedFrame.js.map +1 -0
  15. package/lib/IAutoMovieGuidePassOutput.d.ts +23 -0
  16. package/lib/IAutoMovieGuidePassOutput.js +3 -0
  17. package/lib/IAutoMovieGuidePassOutput.js.map +1 -0
  18. package/lib/IAutoMoviePoseKeypointActor.d.ts +36 -0
  19. package/lib/IAutoMoviePoseKeypointActor.js +3 -0
  20. package/lib/IAutoMoviePoseKeypointActor.js.map +1 -0
  21. package/lib/IAutoMoviePoseKeypointFrame.d.ts +25 -0
  22. package/lib/IAutoMoviePoseKeypointFrame.js +3 -0
  23. package/lib/IAutoMoviePoseKeypointFrame.js.map +1 -0
  24. package/lib/IAutoMoviePoseKeypointSidecar.d.ts +21 -0
  25. package/lib/IAutoMoviePoseKeypointSidecar.js +3 -0
  26. package/lib/IAutoMoviePoseKeypointSidecar.js.map +1 -0
  27. package/lib/IAutoMovieRenderAdapters.d.ts +34 -0
  28. package/lib/IAutoMovieRenderAdapters.js +3 -0
  29. package/lib/IAutoMovieRenderAdapters.js.map +1 -0
  30. package/lib/IAutoMovieRenderAndSeeRequest.d.ts +32 -0
  31. package/lib/IAutoMovieRenderAndSeeRequest.js +3 -0
  32. package/lib/IAutoMovieRenderAndSeeRequest.js.map +1 -0
  33. package/lib/IAutoMovieRenderAndSeeResult.d.ts +20 -0
  34. package/lib/IAutoMovieRenderAndSeeResult.js +3 -0
  35. package/lib/IAutoMovieRenderAndSeeResult.js.map +1 -0
  36. package/lib/IAutoMovieRenderChunk.d.ts +48 -0
  37. package/lib/IAutoMovieRenderChunk.js +3 -0
  38. package/lib/IAutoMovieRenderChunk.js.map +1 -0
  39. package/lib/IAutoMovieRenderChunkPlan.d.ts +32 -0
  40. package/lib/IAutoMovieRenderChunkPlan.js +3 -0
  41. package/lib/IAutoMovieRenderChunkPlan.js.map +1 -0
  42. package/lib/IAutoMovieRenderPassManifest.d.ts +21 -0
  43. package/lib/IAutoMovieRenderPassManifest.js +3 -0
  44. package/lib/IAutoMovieRenderPassManifest.js.map +1 -0
  45. package/lib/IAutoMovieRenderReassembly.d.ts +24 -0
  46. package/lib/IAutoMovieRenderReassembly.js +3 -0
  47. package/lib/IAutoMovieRenderReassembly.js.map +1 -0
  48. package/lib/IAutoMovieRenderResult.d.ts +39 -0
  49. package/lib/IAutoMovieRenderResult.js +3 -0
  50. package/lib/IAutoMovieRenderResult.js.map +1 -0
  51. package/lib/IAutoMovieSequenceRenderAdapters.d.ts +36 -0
  52. package/lib/IAutoMovieSequenceRenderAdapters.js +3 -0
  53. package/lib/IAutoMovieSequenceRenderAdapters.js.map +1 -0
  54. package/lib/IAutoMovieSequenceRenderAndSeeRequest.d.ts +36 -0
  55. package/lib/IAutoMovieSequenceRenderAndSeeRequest.js +3 -0
  56. package/lib/IAutoMovieSequenceRenderAndSeeRequest.js.map +1 -0
  57. package/lib/IAutoMovieSequenceRenderAndSeeResult.d.ts +23 -0
  58. package/lib/IAutoMovieSequenceRenderAndSeeResult.js +3 -0
  59. package/lib/IAutoMovieSequenceRenderAndSeeResult.js.map +1 -0
  60. package/lib/IAutoMovieSequenceRenderFrame.d.ts +41 -0
  61. package/lib/IAutoMovieSequenceRenderFrame.js +3 -0
  62. package/lib/IAutoMovieSequenceRenderFrame.js.map +1 -0
  63. package/lib/IAutoMovieSequenceRenderPlan.d.ts +76 -0
  64. package/lib/IAutoMovieSequenceRenderPlan.js +3 -0
  65. package/lib/IAutoMovieSequenceRenderPlan.js.map +1 -0
  66. package/lib/IAutoMovieSequenceRenderResult.d.ts +44 -0
  67. package/lib/IAutoMovieSequenceRenderResult.js +3 -0
  68. package/lib/IAutoMovieSequenceRenderResult.js.map +1 -0
  69. package/lib/IAutoMovieSequenceRenderShotSpan.d.ts +39 -0
  70. package/lib/IAutoMovieSequenceRenderShotSpan.js +3 -0
  71. package/lib/IAutoMovieSequenceRenderShotSpan.js.map +1 -0
  72. package/lib/IAutoMovieSequenceRenderTransitionSpan.d.ts +39 -0
  73. package/lib/IAutoMovieSequenceRenderTransitionSpan.js +3 -0
  74. package/lib/IAutoMovieSequenceRenderTransitionSpan.js.map +1 -0
  75. package/lib/audio/encodeAutoMovieWavPcm16.d.ts +21 -0
  76. package/lib/audio/encodeAutoMovieWavPcm16.js +59 -0
  77. package/lib/audio/encodeAutoMovieWavPcm16.js.map +1 -0
  78. package/lib/audio/index.d.ts +2 -0
  79. package/lib/audio/index.js +19 -0
  80. package/lib/audio/index.js.map +1 -0
  81. package/lib/audio/mixAutoMovieAudioPcm.d.ts +64 -0
  82. package/lib/audio/mixAutoMovieAudioPcm.js +86 -0
  83. package/lib/audio/mixAutoMovieAudioPcm.js.map +1 -0
  84. package/lib/auditAutoMovieRenderObservation.d.ts +31 -0
  85. package/lib/auditAutoMovieRenderObservation.js +63 -0
  86. package/lib/auditAutoMovieRenderObservation.js.map +1 -0
  87. package/lib/cache/createAutoMovieHttpArtifactStore.d.ts +28 -0
  88. package/lib/cache/createAutoMovieHttpArtifactStore.js +66 -0
  89. package/lib/cache/createAutoMovieHttpArtifactStore.js.map +1 -0
  90. package/lib/caption/IAutoMovieBeatCaption.d.ts +22 -0
  91. package/lib/caption/IAutoMovieBeatCaption.js +3 -0
  92. package/lib/caption/IAutoMovieBeatCaption.js.map +1 -0
  93. package/lib/caption/autoMovieCaptionLanguageComparisonKey.d.ts +18 -0
  94. package/lib/caption/autoMovieCaptionLanguageComparisonKey.js +24 -0
  95. package/lib/caption/autoMovieCaptionLanguageComparisonKey.js.map +1 -0
  96. package/lib/caption/beatCaptions.d.ts +22 -0
  97. package/lib/caption/beatCaptions.js +50 -0
  98. package/lib/caption/beatCaptions.js.map +1 -0
  99. package/lib/caption/canonicalProductionWebVtt.d.ts +23 -0
  100. package/lib/caption/canonicalProductionWebVtt.js +60 -0
  101. package/lib/caption/canonicalProductionWebVtt.js.map +1 -0
  102. package/lib/caption/canonicalizeAutoMovieCaptionText.d.ts +18 -0
  103. package/lib/caption/canonicalizeAutoMovieCaptionText.js +24 -0
  104. package/lib/caption/canonicalizeAutoMovieCaptionText.js.map +1 -0
  105. package/lib/caption/escapeWebVttText.d.ts +17 -0
  106. package/lib/caption/escapeWebVttText.js +25 -0
  107. package/lib/caption/escapeWebVttText.js.map +1 -0
  108. package/lib/caption/index.d.ts +11 -0
  109. package/lib/caption/index.js +28 -0
  110. package/lib/caption/index.js.map +1 -0
  111. package/lib/caption/inspectAutoMovieCaptionReadabilityWithRuntime.d.ts +37 -0
  112. package/lib/caption/inspectAutoMovieCaptionReadabilityWithRuntime.js +129 -0
  113. package/lib/caption/inspectAutoMovieCaptionReadabilityWithRuntime.js.map +1 -0
  114. package/lib/caption/isAutoMovieWebVttIdentifier.d.ts +21 -0
  115. package/lib/caption/isAutoMovieWebVttIdentifier.js +28 -0
  116. package/lib/caption/isAutoMovieWebVttIdentifier.js.map +1 -0
  117. package/lib/caption/parseAutoMovieCaptionLanguage.d.ts +34 -0
  118. package/lib/caption/parseAutoMovieCaptionLanguage.js +121 -0
  119. package/lib/caption/parseAutoMovieCaptionLanguage.js.map +1 -0
  120. package/lib/caption/serializeAutoMovieWebVttCueText.d.ts +17 -0
  121. package/lib/caption/serializeAutoMovieWebVttCueText.js +27 -0
  122. package/lib/caption/serializeAutoMovieWebVttCueText.js.map +1 -0
  123. package/lib/caption/serializeAutoMovieWebVttIdentifier.d.ts +17 -0
  124. package/lib/caption/serializeAutoMovieWebVttIdentifier.js +27 -0
  125. package/lib/caption/serializeAutoMovieWebVttIdentifier.js.map +1 -0
  126. package/lib/caption/serializeAutoMovieWebVttSingleLineText.d.ts +19 -0
  127. package/lib/caption/serializeAutoMovieWebVttSingleLineText.js +26 -0
  128. package/lib/caption/serializeAutoMovieWebVttSingleLineText.js.map +1 -0
  129. package/lib/caption/webVttCaptionLanguage.d.ts +18 -0
  130. package/lib/caption/webVttCaptionLanguage.js +29 -0
  131. package/lib/caption/webVttCaptionLanguage.js.map +1 -0
  132. package/lib/caption/webVttTime.d.ts +19 -0
  133. package/lib/caption/webVttTime.js +30 -0
  134. package/lib/caption/webVttTime.js.map +1 -0
  135. package/lib/captionPlan.d.ts +1 -0
  136. package/lib/captionPlan.js +18 -0
  137. package/lib/captionPlan.js.map +1 -0
  138. package/lib/captionSidecar.d.ts +3 -0
  139. package/lib/captionSidecar.js +20 -0
  140. package/lib/captionSidecar.js.map +1 -0
  141. package/lib/captionSlice.d.ts +1 -0
  142. package/lib/captionSlice.js +18 -0
  143. package/lib/captionSlice.js.map +1 -0
  144. package/lib/chunkSequenceRender.d.ts +5 -0
  145. package/lib/chunkSequenceRender.js +22 -0
  146. package/lib/chunkSequenceRender.js.map +1 -0
  147. package/lib/delivery/AUTOMOVIE_MP4_SRGB_COLOUR.d.ts +16 -0
  148. package/lib/delivery/AUTOMOVIE_MP4_SRGB_COLOUR.js +20 -0
  149. package/lib/delivery/AUTOMOVIE_MP4_SRGB_COLOUR.js.map +1 -0
  150. package/lib/delivery/AUTOMOVIE_MP4_UNITY_MATRIX.d.ts +11 -0
  151. package/lib/delivery/AUTOMOVIE_MP4_UNITY_MATRIX.js +14 -0
  152. package/lib/delivery/AUTOMOVIE_MP4_UNITY_MATRIX.js.map +1 -0
  153. package/lib/delivery/AUTOMOVIE_PRODUCTION_OPUS_PROFILE.d.ts +15 -0
  154. package/lib/delivery/AUTOMOVIE_PRODUCTION_OPUS_PROFILE.js +19 -0
  155. package/lib/delivery/AUTOMOVIE_PRODUCTION_OPUS_PROFILE.js.map +1 -0
  156. package/lib/delivery/AutoMovieProductionPngRole.d.ts +14 -0
  157. package/lib/delivery/AutoMovieProductionPngRole.js +3 -0
  158. package/lib/delivery/AutoMovieProductionPngRole.js.map +1 -0
  159. package/lib/delivery/IAutoMovieProductionPngProfile.d.ts +41 -0
  160. package/lib/delivery/IAutoMovieProductionPngProfile.js +3 -0
  161. package/lib/delivery/IAutoMovieProductionPngProfile.js.map +1 -0
  162. package/lib/delivery/IAutoMovieProductionVideoProfile.d.ts +46 -0
  163. package/lib/delivery/IAutoMovieProductionVideoProfile.js +3 -0
  164. package/lib/delivery/IAutoMovieProductionVideoProfile.js.map +1 -0
  165. package/lib/delivery/assertAutoMovieCaptureClock.d.ts +26 -0
  166. package/lib/delivery/assertAutoMovieCaptureClock.js +29 -0
  167. package/lib/delivery/assertAutoMovieCaptureClock.js.map +1 -0
  168. package/lib/delivery/assertProductionOpusProfile.d.ts +23 -0
  169. package/lib/delivery/assertProductionOpusProfile.js +160 -0
  170. package/lib/delivery/assertProductionOpusProfile.js.map +1 -0
  171. package/lib/delivery/assertProductionPngPicture.d.ts +24 -0
  172. package/lib/delivery/assertProductionPngPicture.js +47 -0
  173. package/lib/delivery/assertProductionPngPicture.js.map +1 -0
  174. package/lib/delivery/assertProductionVideoProfile.d.ts +30 -0
  175. package/lib/delivery/assertProductionVideoProfile.js +150 -0
  176. package/lib/delivery/assertProductionVideoProfile.js.map +1 -0
  177. package/lib/delivery/auditAutoMovieDecodedFrames.d.ts +56 -0
  178. package/lib/delivery/auditAutoMovieDecodedFrames.js +92 -0
  179. package/lib/delivery/auditAutoMovieDecodedFrames.js.map +1 -0
  180. package/lib/delivery/auditAutoMovieEncodedPresentation.d.ts +27 -0
  181. package/lib/delivery/auditAutoMovieEncodedPresentation.js +62 -0
  182. package/lib/delivery/auditAutoMovieEncodedPresentation.js.map +1 -0
  183. package/lib/delivery/index.d.ts +14 -0
  184. package/lib/delivery/index.js +31 -0
  185. package/lib/delivery/index.js.map +1 -0
  186. package/lib/delivery/planAutoMovieCaptureUrl.d.ts +18 -0
  187. package/lib/delivery/planAutoMovieCaptureUrl.js +31 -0
  188. package/lib/delivery/planAutoMovieCaptureUrl.js.map +1 -0
  189. package/lib/delivery/productionOpusDescription.d.ts +41 -0
  190. package/lib/delivery/productionOpusDescription.js +125 -0
  191. package/lib/delivery/productionOpusDescription.js.map +1 -0
  192. package/lib/delivery/resolveProductionPngProfile.d.ts +27 -0
  193. package/lib/delivery/resolveProductionPngProfile.js +53 -0
  194. package/lib/delivery/resolveProductionPngProfile.js.map +1 -0
  195. package/lib/delivery/resolveProductionVideoProfile.d.ts +27 -0
  196. package/lib/delivery/resolveProductionVideoProfile.js +36 -0
  197. package/lib/delivery/resolveProductionVideoProfile.js.map +1 -0
  198. package/lib/ffmpegArgs.d.ts +33 -0
  199. package/lib/ffmpegArgs.js +56 -0
  200. package/lib/ffmpegArgs.js.map +1 -0
  201. package/lib/film/AutoMovieOrderedScalar.d.ts +15 -0
  202. package/lib/film/AutoMovieOrderedScalar.js +3 -0
  203. package/lib/film/AutoMovieOrderedScalar.js.map +1 -0
  204. package/lib/film/IAutoMovieProductionAudioAssetIdentity.d.ts +28 -0
  205. package/lib/film/IAutoMovieProductionAudioAssetIdentity.js +3 -0
  206. package/lib/film/IAutoMovieProductionAudioAssetIdentity.js.map +1 -0
  207. package/lib/film/IAutoMovieProductionAudioAssetIdentityBase.d.ts +29 -0
  208. package/lib/film/IAutoMovieProductionAudioAssetIdentityBase.js +3 -0
  209. package/lib/film/IAutoMovieProductionAudioAssetIdentityBase.js.map +1 -0
  210. package/lib/film/IAutoMovieProductionEncoderIdentity.d.ts +36 -0
  211. package/lib/film/IAutoMovieProductionEncoderIdentity.js +3 -0
  212. package/lib/film/IAutoMovieProductionEncoderIdentity.js.map +1 -0
  213. package/lib/film/IAutoMovieProductionRenderChunk.d.ts +39 -0
  214. package/lib/film/IAutoMovieProductionRenderChunk.js +3 -0
  215. package/lib/film/IAutoMovieProductionRenderChunk.js.map +1 -0
  216. package/lib/film/IAutoMovieProductionRenderJobPlan.d.ts +53 -0
  217. package/lib/film/IAutoMovieProductionRenderJobPlan.js +3 -0
  218. package/lib/film/IAutoMovieProductionRenderJobPlan.js.map +1 -0
  219. package/lib/film/IAutoMovieProductionRenderRuntimeIdentity.d.ts +31 -0
  220. package/lib/film/IAutoMovieProductionRenderRuntimeIdentity.js +3 -0
  221. package/lib/film/IAutoMovieProductionRenderRuntimeIdentity.js.map +1 -0
  222. package/lib/film/IAutoMovieProductionRenderTier.d.ts +25 -0
  223. package/lib/film/IAutoMovieProductionRenderTier.js +3 -0
  224. package/lib/film/IAutoMovieProductionRenderTier.js.map +1 -0
  225. package/lib/film/assertSingleGuidePass.d.ts +19 -0
  226. package/lib/film/assertSingleGuidePass.js +35 -0
  227. package/lib/film/assertSingleGuidePass.js.map +1 -0
  228. package/lib/film/equalOrderedScalars.d.ts +27 -0
  229. package/lib/film/equalOrderedScalars.js +52 -0
  230. package/lib/film/equalOrderedScalars.js.map +1 -0
  231. package/lib/film/index.d.ts +9 -0
  232. package/lib/film/index.js +26 -0
  233. package/lib/film/index.js.map +1 -0
  234. package/lib/film/normalizeAudioAssets.d.ts +21 -0
  235. package/lib/film/normalizeAudioAssets.js +56 -0
  236. package/lib/film/normalizeAudioAssets.js.map +1 -0
  237. package/lib/film/normalizeRenderTier.d.ts +19 -0
  238. package/lib/film/normalizeRenderTier.js +45 -0
  239. package/lib/film/normalizeRenderTier.js.map +1 -0
  240. package/lib/film/planProductionRenderJob.d.ts +48 -0
  241. package/lib/film/planProductionRenderJob.js +196 -0
  242. package/lib/film/planProductionRenderJob.js.map +1 -0
  243. package/lib/film/productionVisualDeliveryOccurrence.d.ts +20 -0
  244. package/lib/film/productionVisualDeliveryOccurrence.js +24 -0
  245. package/lib/film/productionVisualDeliveryOccurrence.js.map +1 -0
  246. package/lib/film/resolveProductionRenderTierFrameFormat.d.ts +21 -0
  247. package/lib/film/resolveProductionRenderTierFrameFormat.js +46 -0
  248. package/lib/film/resolveProductionRenderTierFrameFormat.js.map +1 -0
  249. package/lib/film/validDigest.d.ts +18 -0
  250. package/lib/film/validDigest.js +25 -0
  251. package/lib/film/validDigest.js.map +1 -0
  252. package/lib/film/validWaveAudioIdentity.d.ts +25 -0
  253. package/lib/film/validWaveAudioIdentity.js +76 -0
  254. package/lib/film/validWaveAudioIdentity.js.map +1 -0
  255. package/lib/frameName.d.ts +19 -0
  256. package/lib/frameName.js +24 -0
  257. package/lib/frameName.js.map +1 -0
  258. package/lib/framePattern.d.ts +16 -0
  259. package/lib/framePattern.js +21 -0
  260. package/lib/framePattern.js.map +1 -0
  261. package/lib/frameTimes.d.ts +20 -0
  262. package/lib/frameTimes.js +33 -0
  263. package/lib/frameTimes.js.map +1 -0
  264. package/lib/guidePassFrameName.d.ts +15 -0
  265. package/lib/guidePassFrameName.js +21 -0
  266. package/lib/guidePassFrameName.js.map +1 -0
  267. package/lib/guidePassFramePattern.d.ts +15 -0
  268. package/lib/guidePassFramePattern.js +21 -0
  269. package/lib/guidePassFramePattern.js.map +1 -0
  270. package/lib/guidePasses.d.ts +7 -0
  271. package/lib/guidePasses.js +24 -0
  272. package/lib/guidePasses.js.map +1 -0
  273. package/lib/guidePassesInternal/passExtension.d.ts +14 -0
  274. package/lib/guidePassesInternal/passExtension.js +18 -0
  275. package/lib/guidePassesInternal/passExtension.js.map +1 -0
  276. package/lib/index.d.ts +69 -0
  277. package/lib/index.js +86 -0
  278. package/lib/index.js.map +1 -0
  279. package/lib/isGuidePass.d.ts +15 -0
  280. package/lib/isGuidePass.js +20 -0
  281. package/lib/isGuidePass.js.map +1 -0
  282. package/lib/normalizeGuidePasses.d.ts +15 -0
  283. package/lib/normalizeGuidePasses.js +32 -0
  284. package/lib/normalizeGuidePasses.js.map +1 -0
  285. package/lib/planCaptionSidecar.d.ts +23 -0
  286. package/lib/planCaptionSidecar.js +56 -0
  287. package/lib/planCaptionSidecar.js.map +1 -0
  288. package/lib/planChunkedSequenceRender.d.ts +26 -0
  289. package/lib/planChunkedSequenceRender.js +132 -0
  290. package/lib/planChunkedSequenceRender.js.map +1 -0
  291. package/lib/planGuidePassOutputs.d.ts +19 -0
  292. package/lib/planGuidePassOutputs.js +31 -0
  293. package/lib/planGuidePassOutputs.js.map +1 -0
  294. package/lib/planPoseKeypointSidecar.d.ts +27 -0
  295. package/lib/planPoseKeypointSidecar.js +141 -0
  296. package/lib/planPoseKeypointSidecar.js.map +1 -0
  297. package/lib/planSequenceRender.d.ts +20 -0
  298. package/lib/planSequenceRender.js +99 -0
  299. package/lib/planSequenceRender.js.map +1 -0
  300. package/lib/planViewerFrameTimes.d.ts +33 -0
  301. package/lib/planViewerFrameTimes.js +74 -0
  302. package/lib/planViewerFrameTimes.js.map +1 -0
  303. package/lib/renderAndSee.d.ts +14 -0
  304. package/lib/renderAndSee.js +22 -0
  305. package/lib/renderAndSee.js.map +1 -0
  306. package/lib/renderBudgetPreflight/IAutoMovieRenderBudgetAssessment.d.ts +41 -0
  307. package/lib/renderBudgetPreflight/IAutoMovieRenderBudgetAssessment.js +3 -0
  308. package/lib/renderBudgetPreflight/IAutoMovieRenderBudgetAssessment.js.map +1 -0
  309. package/lib/renderBudgetPreflight/IAutoMovieRenderBudgetEvidence.d.ts +53 -0
  310. package/lib/renderBudgetPreflight/IAutoMovieRenderBudgetEvidence.js +3 -0
  311. package/lib/renderBudgetPreflight/IAutoMovieRenderBudgetEvidence.js.map +1 -0
  312. package/lib/renderBudgetPreflight/IAutoMovieRenderGraphicsIdentity.d.ts +27 -0
  313. package/lib/renderBudgetPreflight/IAutoMovieRenderGraphicsIdentity.js +3 -0
  314. package/lib/renderBudgetPreflight/IAutoMovieRenderGraphicsIdentity.js.map +1 -0
  315. package/lib/renderBudgetPreflight/assessAutoMovieRenderBudget.d.ts +28 -0
  316. package/lib/renderBudgetPreflight/assessAutoMovieRenderBudget.js +77 -0
  317. package/lib/renderBudgetPreflight/assessAutoMovieRenderBudget.js.map +1 -0
  318. package/lib/renderBudgetPreflight/autoMovieRenderBudgetEvidence.d.ts +23 -0
  319. package/lib/renderBudgetPreflight/autoMovieRenderBudgetEvidence.js +55 -0
  320. package/lib/renderBudgetPreflight/autoMovieRenderBudgetEvidence.js.map +1 -0
  321. package/lib/renderBudgetPreflight/autoMovieRenderBudgetRefusal.d.ts +17 -0
  322. package/lib/renderBudgetPreflight/autoMovieRenderBudgetRefusal.js +51 -0
  323. package/lib/renderBudgetPreflight/autoMovieRenderBudgetRefusal.js.map +1 -0
  324. package/lib/renderBudgetPreflight/autoMovieRenderTargetRendererOfGraphics.d.ts +22 -0
  325. package/lib/renderBudgetPreflight/autoMovieRenderTargetRendererOfGraphics.js +32 -0
  326. package/lib/renderBudgetPreflight/autoMovieRenderTargetRendererOfGraphics.js.map +1 -0
  327. package/lib/renderBudgetPreflight/autoMovieRenderTargetSettingsOfShot.d.ts +23 -0
  328. package/lib/renderBudgetPreflight/autoMovieRenderTargetSettingsOfShot.js +35 -0
  329. package/lib/renderBudgetPreflight/autoMovieRenderTargetSettingsOfShot.js.map +1 -0
  330. package/lib/renderBudgetPreflight/index.d.ts +9 -0
  331. package/lib/renderBudgetPreflight/index.js +26 -0
  332. package/lib/renderBudgetPreflight/index.js.map +1 -0
  333. package/lib/renderBudgetPreflight/selectAutoMovieRenderBudget.d.ts +18 -0
  334. package/lib/renderBudgetPreflight/selectAutoMovieRenderBudget.js +22 -0
  335. package/lib/renderBudgetPreflight/selectAutoMovieRenderBudget.js.map +1 -0
  336. package/lib/renderCaptionSidecar.d.ts +13 -0
  337. package/lib/renderCaptionSidecar.js +17 -0
  338. package/lib/renderCaptionSidecar.js.map +1 -0
  339. package/lib/renderObservationAudit.d.ts +1 -0
  340. package/lib/renderObservationAudit.js +18 -0
  341. package/lib/renderObservationAudit.js.map +1 -0
  342. package/lib/renderPathStem.d.ts +22 -0
  343. package/lib/renderPathStem.js +64 -0
  344. package/lib/renderPathStem.js.map +1 -0
  345. package/lib/renderPoseKeypointSidecar.d.ts +15 -0
  346. package/lib/renderPoseKeypointSidecar.js +19 -0
  347. package/lib/renderPoseKeypointSidecar.js.map +1 -0
  348. package/lib/renderSequenceAndSee.d.ts +14 -0
  349. package/lib/renderSequenceAndSee.js +32 -0
  350. package/lib/renderSequenceAndSee.js.map +1 -0
  351. package/lib/renderSequenceVideo.d.ts +15 -0
  352. package/lib/renderSequenceVideo.js +35 -0
  353. package/lib/renderSequenceVideo.js.map +1 -0
  354. package/lib/renderVideo.d.ts +17 -0
  355. package/lib/renderVideo.js +45 -0
  356. package/lib/renderVideo.js.map +1 -0
  357. package/lib/screenplay/index.d.ts +1 -0
  358. package/lib/screenplay/index.js +18 -0
  359. package/lib/screenplay/index.js.map +1 -0
  360. package/lib/screenplay/renderScreenplay.d.ts +25 -0
  361. package/lib/screenplay/renderScreenplay.js +101 -0
  362. package/lib/screenplay/renderScreenplay.js.map +1 -0
  363. package/lib/screenplay/screenplaySceneSlug.d.ts +17 -0
  364. package/lib/screenplay/screenplaySceneSlug.js +21 -0
  365. package/lib/screenplay/screenplaySceneSlug.js.map +1 -0
  366. package/lib/sequenceRenderPlan.d.ts +5 -0
  367. package/lib/sequenceRenderPlan.js +22 -0
  368. package/lib/sequenceRenderPlan.js.map +1 -0
  369. package/lib/sequenceRenderVideo.d.ts +6 -0
  370. package/lib/sequenceRenderVideo.js +23 -0
  371. package/lib/sequenceRenderVideo.js.map +1 -0
  372. package/lib/shotBeat.d.ts +18 -0
  373. package/lib/shotBeat.js +23 -0
  374. package/lib/shotBeat.js.map +1 -0
  375. package/lib/sliceCaptionSidecar.d.ts +15 -0
  376. package/lib/sliceCaptionSidecar.js +57 -0
  377. package/lib/sliceCaptionSidecar.js.map +1 -0
  378. package/package.json +46 -3
  379. package/src/AUTOMOVIE_GUIDE_PASSES.ts +19 -0
  380. package/src/IAutoMovieCaptionEntry.ts +32 -0
  381. package/src/IAutoMovieCaptionSidecar.ts +29 -0
  382. package/src/IAutoMovieCapturedFrame.ts +24 -0
  383. package/src/IAutoMovieGuidePassOutput.ts +27 -0
  384. package/src/IAutoMoviePoseKeypointActor.ts +39 -0
  385. package/src/IAutoMoviePoseKeypointFrame.ts +28 -0
  386. package/src/IAutoMoviePoseKeypointSidecar.ts +25 -0
  387. package/src/IAutoMovieRenderAdapters.ts +39 -0
  388. package/src/IAutoMovieRenderAndSeeRequest.ts +38 -0
  389. package/src/IAutoMovieRenderAndSeeResult.ts +23 -0
  390. package/src/IAutoMovieRenderChunk.ts +62 -0
  391. package/src/IAutoMovieRenderChunkPlan.ts +40 -0
  392. package/src/IAutoMovieRenderPassManifest.ts +25 -0
  393. package/src/IAutoMovieRenderReassembly.ts +28 -0
  394. package/src/IAutoMovieRenderResult.ts +46 -0
  395. package/src/IAutoMovieSequenceRenderAdapters.ts +41 -0
  396. package/src/IAutoMovieSequenceRenderAndSeeRequest.ts +47 -0
  397. package/src/IAutoMovieSequenceRenderAndSeeResult.ts +23 -0
  398. package/src/IAutoMovieSequenceRenderFrame.ts +48 -0
  399. package/src/IAutoMovieSequenceRenderPlan.ts +88 -0
  400. package/src/IAutoMovieSequenceRenderResult.ts +52 -0
  401. package/src/IAutoMovieSequenceRenderShotSpan.ts +46 -0
  402. package/src/IAutoMovieSequenceRenderTransitionSpan.ts +46 -0
  403. package/src/audio/encodeAutoMovieWavPcm16.ts +65 -0
  404. package/src/audio/index.ts +2 -0
  405. package/src/audio/mixAutoMovieAudioPcm.ts +137 -0
  406. package/src/auditAutoMovieRenderObservation.ts +79 -0
  407. package/src/cache/createAutoMovieHttpArtifactStore.ts +84 -0
  408. package/src/caption/IAutoMovieBeatCaption.ts +23 -0
  409. package/src/caption/autoMovieCaptionLanguageComparisonKey.ts +23 -0
  410. package/src/caption/beatCaptions.ts +59 -0
  411. package/src/caption/canonicalProductionWebVtt.ts +76 -0
  412. package/src/caption/canonicalizeAutoMovieCaptionText.ts +24 -0
  413. package/src/caption/escapeWebVttText.ts +23 -0
  414. package/src/caption/index.ts +11 -0
  415. package/src/caption/inspectAutoMovieCaptionReadabilityWithRuntime.ts +231 -0
  416. package/src/caption/isAutoMovieWebVttIdentifier.ts +26 -0
  417. package/src/caption/parseAutoMovieCaptionLanguage.ts +160 -0
  418. package/src/caption/serializeAutoMovieWebVttCueText.ts +28 -0
  419. package/src/caption/serializeAutoMovieWebVttIdentifier.ts +27 -0
  420. package/src/caption/serializeAutoMovieWebVttSingleLineText.ts +26 -0
  421. package/src/caption/webVttCaptionLanguage.ts +30 -0
  422. package/src/caption/webVttTime.ts +30 -0
  423. package/src/captionPlan.ts +1 -0
  424. package/src/captionSidecar.ts +3 -0
  425. package/src/captionSlice.ts +1 -0
  426. package/src/chunkSequenceRender.ts +5 -0
  427. package/src/delivery/AUTOMOVIE_MP4_SRGB_COLOUR.ts +21 -0
  428. package/src/delivery/AUTOMOVIE_MP4_UNITY_MATRIX.ts +14 -0
  429. package/src/delivery/AUTOMOVIE_PRODUCTION_OPUS_PROFILE.ts +28 -0
  430. package/src/delivery/AutoMovieProductionPngRole.ts +18 -0
  431. package/src/delivery/IAutoMovieProductionPngProfile.ts +52 -0
  432. package/src/delivery/IAutoMovieProductionVideoProfile.ts +48 -0
  433. package/src/delivery/assertAutoMovieCaptureClock.ts +37 -0
  434. package/src/delivery/assertProductionOpusProfile.ts +179 -0
  435. package/src/delivery/assertProductionPngPicture.ts +62 -0
  436. package/src/delivery/assertProductionVideoProfile.ts +180 -0
  437. package/src/delivery/auditAutoMovieDecodedFrames.ts +157 -0
  438. package/src/delivery/auditAutoMovieEncodedPresentation.ts +86 -0
  439. package/src/delivery/index.ts +14 -0
  440. package/src/delivery/planAutoMovieCaptureUrl.ts +32 -0
  441. package/src/delivery/productionOpusDescription.ts +173 -0
  442. package/src/delivery/resolveProductionPngProfile.ts +70 -0
  443. package/src/delivery/resolveProductionVideoProfile.ts +48 -0
  444. package/src/ffmpegArgs.ts +61 -0
  445. package/src/film/AutoMovieOrderedScalar.ts +15 -0
  446. package/src/film/IAutoMovieProductionAudioAssetIdentity.ts +40 -0
  447. package/src/film/IAutoMovieProductionAudioAssetIdentityBase.ts +34 -0
  448. package/src/film/IAutoMovieProductionEncoderIdentity.ts +42 -0
  449. package/src/film/IAutoMovieProductionRenderChunk.ts +47 -0
  450. package/src/film/IAutoMovieProductionRenderJobPlan.ts +73 -0
  451. package/src/film/IAutoMovieProductionRenderRuntimeIdentity.ts +37 -0
  452. package/src/film/IAutoMovieProductionRenderTier.ts +27 -0
  453. package/src/film/assertSingleGuidePass.ts +38 -0
  454. package/src/film/equalOrderedScalars.ts +56 -0
  455. package/src/film/index.ts +9 -0
  456. package/src/film/normalizeAudioAssets.ts +74 -0
  457. package/src/film/normalizeRenderTier.ts +51 -0
  458. package/src/film/planProductionRenderJob.ts +353 -0
  459. package/src/film/productionVisualDeliveryOccurrence.ts +28 -0
  460. package/src/film/resolveProductionRenderTierFrameFormat.ts +60 -0
  461. package/src/film/validDigest.ts +23 -0
  462. package/src/film/validWaveAudioIdentity.ts +88 -0
  463. package/src/frameName.ts +24 -0
  464. package/src/framePattern.ts +19 -0
  465. package/src/frameTimes.ts +36 -0
  466. package/src/guidePassFrameName.ts +29 -0
  467. package/src/guidePassFramePattern.ts +27 -0
  468. package/src/guidePasses.ts +7 -0
  469. package/src/guidePassesInternal/passExtension.ts +19 -0
  470. package/src/index.ts +69 -0
  471. package/src/isGuidePass.ts +21 -0
  472. package/src/normalizeGuidePasses.ts +33 -0
  473. package/src/planCaptionSidecar.ts +98 -0
  474. package/src/planChunkedSequenceRender.ts +200 -0
  475. package/src/planGuidePassOutputs.ts +47 -0
  476. package/src/planPoseKeypointSidecar.ts +289 -0
  477. package/src/planSequenceRender.ts +175 -0
  478. package/src/planViewerFrameTimes.ts +98 -0
  479. package/src/renderAndSee.ts +30 -0
  480. package/src/renderBudgetPreflight/IAutoMovieRenderBudgetAssessment.ts +53 -0
  481. package/src/renderBudgetPreflight/IAutoMovieRenderBudgetEvidence.ts +61 -0
  482. package/src/renderBudgetPreflight/IAutoMovieRenderGraphicsIdentity.ts +29 -0
  483. package/src/renderBudgetPreflight/assessAutoMovieRenderBudget.ts +137 -0
  484. package/src/renderBudgetPreflight/autoMovieRenderBudgetEvidence.ts +100 -0
  485. package/src/renderBudgetPreflight/autoMovieRenderBudgetRefusal.ts +82 -0
  486. package/src/renderBudgetPreflight/autoMovieRenderTargetRendererOfGraphics.ts +40 -0
  487. package/src/renderBudgetPreflight/autoMovieRenderTargetSettingsOfShot.ts +59 -0
  488. package/src/renderBudgetPreflight/index.ts +9 -0
  489. package/src/renderBudgetPreflight/selectAutoMovieRenderBudget.ts +28 -0
  490. package/src/renderCaptionSidecar.ts +17 -0
  491. package/src/renderObservationAudit.ts +1 -0
  492. package/src/renderPathStem.ts +61 -0
  493. package/src/renderPoseKeypointSidecar.ts +19 -0
  494. package/src/renderSequenceAndSee.ts +34 -0
  495. package/src/renderSequenceVideo.ts +44 -0
  496. package/src/renderVideo.ts +65 -0
  497. package/src/screenplay/index.ts +1 -0
  498. package/src/screenplay/renderScreenplay.ts +128 -0
  499. package/src/screenplay/screenplaySceneSlug.ts +29 -0
  500. package/src/sequenceRenderPlan.ts +5 -0
  501. package/src/sequenceRenderVideo.ts +6 -0
  502. package/src/shotBeat.ts +19 -0
  503. package/src/sliceCaptionSidecar.ts +85 -0
@@ -0,0 +1,19 @@
1
+ import type { IAutoMoviePoseKeypointSidecar } from "./IAutoMoviePoseKeypointSidecar";
2
+
3
+ /**
4
+ * Serialize a pose-keypoint sidecar for the host to write: JSON indented by two spaces, properties in declaration order, ending with one newline.
5
+ *
6
+ * The same sidecar always serializes to the same text, and an absent `atmosphere` writes no key, so a fogless scene's file matches one written before that field existed.
7
+ *
8
+ * @evidence contracts/development/implementation.md#principled-implementation `JSON.stringify` writes own properties in insertion order and no key for a property that is absent, and the planner inserts them in declaration order, so the text is a deterministic function of the sidecar.
9
+ * @evidence contracts/development/implementation.md#clear-and-simple-structure Serialization is separate from planning, so the plan stays a value a host can inspect or slice, and this function only fixes the text format.
10
+ * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The sidecar is written as given, with no field added, rounded or reordered.
11
+ * @evidence contracts/development/common.md#meaningful-documentation The doc states the exact text format, its determinism and the absent-field behavior.
12
+ * @evidence contracts/development/implementation.md#efficient-algorithms One `JSON.stringify` pass is linear in the sidecar's size.
13
+ * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A host serializes a sidecar once to write it.
14
+ * @evidence contracts/development/implementation.md#bound-retention-and-release-resources The returned string, about the sidecar's serialized size, is the caller's; nothing is retained and no file is opened, since the host writes it.
15
+ */
16
+ export const renderPoseKeypointSidecar: (
17
+ sidecar: IAutoMoviePoseKeypointSidecar,
18
+ ) => string = (sidecar: IAutoMoviePoseKeypointSidecar): string =>
19
+ `${JSON.stringify(sidecar, null, 2)}\n`;
@@ -0,0 +1,34 @@
1
+ import type { IAutoMovieSequenceRenderAndSeeRequest } from "./IAutoMovieSequenceRenderAndSeeRequest";
2
+ import type { IAutoMovieSequenceRenderAndSeeResult } from "./IAutoMovieSequenceRenderAndSeeResult";
3
+ import { planSequenceRender } from "./planSequenceRender";
4
+ import { renderSequenceVideo } from "./renderSequenceVideo";
5
+
6
+ /**
7
+ * Build a sequence render manifest, execute it through host adapters, and return an artifact an agent can inspect without recomputing the cut.
8
+ *
9
+ * @evidence contracts/development/implementation.md#principled-implementation planSequenceRender resolves the cut once, and renderSequenceVideo executes that same manifest; the envelope records sequence id, editorial fps and a shallow spec snapshot.
10
+ * @evidence contracts/development/implementation.md#clear-and-simple-structure Planning, host execution and the agent-facing envelope have separate owners, so this composition adds no second timing or capture implementation.
11
+ * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts A planning or adapter failure escapes unchanged and no missing shot is replaced by an unrelated source; all frame metadata comes from the executed plan.
12
+ * @evidence contracts/development/common.md#meaningful-documentation The request explains sequence target equality and adapter ownership; the result names editorial fps and the spec snapshot, including its shared nested values.
13
+ * @evidence contracts/development/implementation.md#efficient-algorithms For S supplied shots, E cut entries and F frames, delegated planning and scheduling take O(S+E+F) metadata work and the envelope adds a constant-size merge; actual drawing and encoding costs remain host-dependent and are not bounded by this record count.
14
+ * @evidence contracts/development/implementation.md#reuse-equivalent-work The manifest produced once is shared by capture and the returned artifact, ensuring inspection uses the same resolution that drove rendering.
15
+ * @evidence contracts/development/implementation.md#bound-retention-and-release-resources Only the result envelope is added to the retained manifest and frame records; frame files, capture sessions and encoder lifetimes stay with the supplied host adapters.
16
+ */
17
+ export const renderSequenceAndSee: (
18
+ request: IAutoMovieSequenceRenderAndSeeRequest,
19
+ ) => Promise<IAutoMovieSequenceRenderAndSeeResult> = async (
20
+ request: IAutoMovieSequenceRenderAndSeeRequest,
21
+ ): Promise<IAutoMovieSequenceRenderAndSeeResult> => {
22
+ const plan: ReturnType<typeof planSequenceRender> = planSequenceRender({
23
+ sequence: request.sequence,
24
+ shots: request.shots,
25
+ spec: request.spec,
26
+ frameDir: request.frameDir,
27
+ outputPath: request.outputPath,
28
+ });
29
+ return {
30
+ spec: { ...request.spec },
31
+ sequence: { id: request.sequence.id, fps: request.sequence.fps },
32
+ ...(await renderSequenceVideo(plan, request.adapters)),
33
+ };
34
+ };
@@ -0,0 +1,44 @@
1
+ import type { IAutoMovieSequenceRenderAdapters } from "./IAutoMovieSequenceRenderAdapters";
2
+ import { IAutoMovieSequenceRenderFrame } from "./IAutoMovieSequenceRenderFrame";
3
+ import { IAutoMovieSequenceRenderPlan } from "./IAutoMovieSequenceRenderPlan";
4
+ import type { IAutoMovieSequenceRenderResult } from "./IAutoMovieSequenceRenderResult";
5
+
6
+ /**
7
+ * Render a prepared sequence manifest: capture each resolved frame sample in order, then encode the planned frame sequence with the planned ffmpeg args. This is the sequence-level analogue of `renderVideo`, but the capture host gets sequence semantics rather than only a clip-local second.
8
+ *
9
+ * @evidence contracts/development/implementation.md#principled-implementation The prepared plan supplies exact resolved frame samples; sequential awaits preserve that sample order before one encode call, including outgoing blend information without recomputing editorial timing.
10
+ * @evidence contracts/development/implementation.md#clear-and-simple-structure This sequence loop receives resolved manifest records instead of reproducing playback arithmetic, and adapters remain the boundary for capture and encoding effects.
11
+ * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Captured paths come from the host and all capture or encode errors propagate; no shot-specific fallback or synthetic frame replaces a failed capture.
12
+ * @evidence contracts/development/common.md#meaningful-documentation The comment describes manifest execution and sequence-local semantics; adapter and result members document frame records, paths and encoder arguments, with host-owned file cleanup.
13
+ * @evidence contracts/development/implementation.md#efficient-algorithms For F prepared frames the loop performs F captures and F shallow record copies, retaining O(F) result records; encoder and drawing costs belong to the adapters.
14
+ * @evidence contracts/development/implementation.md#reuse-equivalent-work The sequence plan is reused unchanged for every capture and the result rather than rebuilt per frame; distinct capture effects are awaited separately.
15
+ * @evidence contracts/development/implementation.md#bound-retention-and-release-resources No browser or process is opened here; the host owns those and frame-file cleanup. Result frames and the referenced plan remain reachable until the caller releases the artifact.
16
+ */
17
+ export const renderSequenceVideo: (
18
+ plan: IAutoMovieSequenceRenderPlan,
19
+ adapters: IAutoMovieSequenceRenderAdapters,
20
+ ) => Promise<IAutoMovieSequenceRenderResult> = async (
21
+ plan: IAutoMovieSequenceRenderPlan,
22
+ adapters: IAutoMovieSequenceRenderAdapters,
23
+ ): Promise<IAutoMovieSequenceRenderResult> => {
24
+ const frames: IAutoMovieSequenceRenderFrame[] = [];
25
+ for (const frame of plan.frames)
26
+ frames.push({
27
+ ...frame,
28
+ path: await adapters.captureFrame(frame, plan),
29
+ });
30
+ const output: string = await adapters.encode(
31
+ plan.ffmpegArgs,
32
+ plan.outputPath,
33
+ );
34
+ return {
35
+ output,
36
+ frameCount: frames.length,
37
+ times: plan.times,
38
+ frames,
39
+ frameDir: plan.frameDir,
40
+ inputPattern: plan.inputPattern,
41
+ ffmpegArgs: plan.ffmpegArgs,
42
+ plan,
43
+ };
44
+ };
@@ -0,0 +1,65 @@
1
+ import { IAutoMovieRenderSpec } from "@automovie/interface";
2
+
3
+ import type { IAutoMovieRenderAdapters } from "./IAutoMovieRenderAdapters";
4
+ import type { IAutoMovieRenderResult } from "./IAutoMovieRenderResult";
5
+ import { ffmpegArgs } from "./ffmpegArgs";
6
+ import { framePattern } from "./framePattern";
7
+ import { frameTimes } from "./frameTimes";
8
+
9
+ /**
10
+ * Render a clip of `durationSeconds` into a video, deterministically: compute the frame schedule, capture each frame through the host adapter at its exact `t = i / fps`, then encode the sequence with the pinned ffmpeg args.
11
+ *
12
+ * The schedule and effect order are deterministic; pixel and encoder output depend on the supplied host. The host also owns file and task cleanup when capture or encoding fails.
13
+ *
14
+ * @evidence contracts/development/implementation.md#principled-implementation Frame times are the half-open schedule i/fps from frameTimes; awaiting each capture before encoding preserves capture order and propagates the first host failure. The encoder owns pixel and container correctness, which this orchestration cannot prove.
15
+ * @evidence contracts/development/implementation.md#clear-and-simple-structure The clip loop coordinates the capture and encode seams only; naming, scheduling and ffmpeg arguments remain their existing shared functions.
16
+ * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts An empty schedule refuses before host I/O, and capture or encoding failures escape unchanged; no frame, path or adapter is replaced to satisfy a consumer.
17
+ * @evidence contracts/development/common.md#meaningful-documentation The comment names seconds, capture order and host ownership; result members specify paths, sample times and the argument vector. Frame files belong to the host even after failure.
18
+ * @evidence contracts/development/implementation.md#efficient-algorithms For F frames, scheduling, sequential capture and metadata assembly each traverse F records; retaining paths and timestamps costs O(F), in addition to host capture and encoder work.
19
+ * @evidence contracts/development/implementation.md#reuse-equivalent-work Captures are effectful operations and cannot be shared solely because two timestamps match; this call captures its requested sequence once and returns metadata for caller reuse.
20
+ * @evidence contracts/development/implementation.md#bound-retention-and-release-resources The host owns frame files, encoder tasks and their cleanup on success or failure; this function retains O(F) paths and times until the result is discarded and acquires no native handle itself.
21
+ */
22
+ export const renderVideo: (
23
+ spec: IAutoMovieRenderSpec,
24
+ durationSeconds: number,
25
+ dir: string,
26
+ outputPath: string,
27
+ adapters: IAutoMovieRenderAdapters,
28
+ ) => Promise<IAutoMovieRenderResult> = async (
29
+ spec: IAutoMovieRenderSpec,
30
+ durationSeconds: number,
31
+ dir: string,
32
+ outputPath: string,
33
+ adapters: IAutoMovieRenderAdapters,
34
+ ): Promise<IAutoMovieRenderResult> => {
35
+ const times: number[] = frameTimes(spec.frameFormat.fps, durationSeconds);
36
+ if (times.length === 0)
37
+ throw new Error(
38
+ `renderVideo requires at least one frame; fps ${spec.frameFormat.fps} and duration ${durationSeconds} produced zero frames`,
39
+ );
40
+
41
+ const frames: string[] = [];
42
+ for (let i: number = 0; i < times.length; ++i)
43
+ frames.push(await adapters.captureFrame(times[i]!, i, dir));
44
+ const inputPattern: string = `${dir}/${framePattern()}`;
45
+ const args: string[] = ffmpegArgs(spec, inputPattern, outputPath);
46
+ const output: string = await adapters.encode(args, outputPath);
47
+ return {
48
+ output,
49
+ frameCount: frames.length,
50
+ times,
51
+ frames: frames.map(
52
+ (
53
+ path: string,
54
+ index: number,
55
+ ): IAutoMovieRenderResult["frames"][number] => ({
56
+ index,
57
+ timeSeconds: times[index]!,
58
+ path,
59
+ }),
60
+ ),
61
+ frameDir: dir,
62
+ inputPattern,
63
+ ffmpegArgs: args,
64
+ };
65
+ };
@@ -0,0 +1 @@
1
+ export * from "./renderScreenplay";
@@ -0,0 +1,128 @@
1
+ import {
2
+ IAutoMovieDialogueLine,
3
+ IAutoMovieScript,
4
+ IAutoMovieScriptNode,
5
+ } from "@automovie/interface";
6
+
7
+ import { screenplaySceneSlug } from "./screenplaySceneSlug";
8
+
9
+ /**
10
+ * Serialize a validated script into plain screenplay text with one terminal
11
+ * newline. A script with no beats throws before serialization.
12
+ *
13
+ * A tree supplies the intent header and is walked depth-first in declared
14
+ * child order. Script commit must already have validated its single intent,
15
+ * acyclicity and one-to-one beat join. A treeless script uses the flat logline,
16
+ * theme and ordered beat summaries.
17
+ *
18
+ * Tree output uses `ACT, <purpose>`, uppercase scene slugs, bracketed group
19
+ * rationale, `BEAT, <name>` and stage direction. Dialogue speakers use sixteen
20
+ * spaces of indentation and text uses eight, with `[t=<seconds>s]` for an
21
+ * anchored line. A shot caption writes `[Shot: <caption>]`. Supplied text is
22
+ * preserved; the serializer does not strip whitespace inside authored fields.
23
+ *
24
+ * @evidence contracts/development/implementation.md#principled-implementation A validated script tree is walked depth-first in declared child order; treeless scripts use flat beat order, and the tree intent supplies the header. Tree admission and cycle checks belong to script commit, not this serializer.
25
+ * @evidence contracts/development/implementation.md#clear-and-simple-structure Tree and flat serialization remain private branches of one screenplay renderer, while scene slug spelling is shared with caption labels.
26
+ * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Empty beat populations refuse instead of emitting an empty screenplay; no authored node id or dialogue text selects a special serialization path.
27
+ * @evidence contracts/development/common.md#meaningful-documentation The comment specifies tree ownership, fallback behavior, indentation, anchored seconds and terminal newline; author-supplied text is emitted without semantic rewriting.
28
+ * @evidence contracts/development/implementation.md#efficient-algorithms For N tree nodes, B beats and L output characters, beat and child maps plus traversal cost O(N+B+L) with O(N+B+L) retained construction data; recursion uses the tree depth.
29
+ * @evidence contracts/development/implementation.md#reuse-equivalent-work One child index and one beat-name index serve the complete document walk; no header, beat or scene is re-indexed for each descendant.
30
+ * @evidence contracts/development/implementation.md#bound-retention-and-release-resources Maps, line arrays and recursion state are local to the serialization, and only the resulting screenplay string escapes with no file or renderer handle.
31
+ */
32
+ export const renderScreenplay: (script: IAutoMovieScript) => string = (
33
+ script: IAutoMovieScript,
34
+ ): string => {
35
+ if (script.beats.length === 0)
36
+ throw new Error("script has no beats: there is no screenplay to render");
37
+
38
+ const tree: IAutoMovieScriptNode[] | null = script.tree ?? null;
39
+ if (tree === null) return renderFlat(script);
40
+ return renderTree(script, tree);
41
+ };
42
+
43
+ const renderFlat: (script: IAutoMovieScript) => string = (
44
+ script: IAutoMovieScript,
45
+ ): string => {
46
+ const lines: string[] = [
47
+ `LOGLINE: ${script.logline}`,
48
+ `THEME: ${script.theme}`,
49
+ ];
50
+ for (const beat of script.beats) {
51
+ lines.push("", `BEAT, ${beat.name}`, beat.summary);
52
+ }
53
+ return `${lines.join("\n")}\n`;
54
+ };
55
+
56
+ const renderTree: (
57
+ script: IAutoMovieScript,
58
+ tree: IAutoMovieScriptNode[],
59
+ ) => string = (
60
+ script: IAutoMovieScript,
61
+ tree: IAutoMovieScriptNode[],
62
+ ): string => {
63
+ const beatNames: Map<string, string> = new Map(
64
+ script.beats.map(
65
+ (beat: IAutoMovieScript["beats"][number]): [string, string] => [
66
+ beat.id,
67
+ beat.name,
68
+ ],
69
+ ),
70
+ );
71
+ const children: Map<string | null, IAutoMovieScriptNode[]> = new Map();
72
+ for (const node of tree) {
73
+ const list: IAutoMovieScriptNode[] = children.get(node.parent) ?? [];
74
+ list.push(node);
75
+ children.set(node.parent, list);
76
+ }
77
+
78
+ const lines: string[] = [];
79
+ const walk: (node: IAutoMovieScriptNode) => void = (
80
+ node: IAutoMovieScriptNode,
81
+ ): void => {
82
+ switch (node.kind) {
83
+ case "intent":
84
+ lines.push(
85
+ `LOGLINE: ${node.payload.logline}`,
86
+ `THEME: ${node.payload.theme}`,
87
+ );
88
+ break;
89
+ case "act":
90
+ lines.push("", `ACT, ${node.payload.purpose}`);
91
+ break;
92
+ case "scene": {
93
+ const slug: string = screenplaySceneSlug(node.payload);
94
+ lines.push("", slug);
95
+ if (node.payload.description !== null)
96
+ lines.push(node.payload.description);
97
+ break;
98
+ }
99
+ case "group":
100
+ lines.push("", `[${node.payload.rationale}]`);
101
+ break;
102
+ case "beat": {
103
+ const name: string =
104
+ beatNames.get(node.payload.beat) ?? node.payload.beat;
105
+ lines.push("", `BEAT, ${name}`, node.payload.direction);
106
+ for (const line of node.payload.dialogue)
107
+ lines.push(...dialogueLines(line));
108
+ if (node.payload.caption !== null)
109
+ lines.push(`[Shot: ${node.payload.caption}]`);
110
+ break;
111
+ }
112
+ }
113
+ for (const child of children.get(node.id) ?? []) walk(child);
114
+ };
115
+
116
+ for (const root of children.get(null) ?? []) walk(root);
117
+ return `${lines.join("\n")}\n`;
118
+ };
119
+
120
+ const dialogueLines: (line: IAutoMovieDialogueLine) => string[] = (
121
+ line: IAutoMovieDialogueLine,
122
+ ): string[] => {
123
+ const anchor: string = line.anchor === null ? "" : `[t=${line.anchor}s] `;
124
+ return [
125
+ `${" ".repeat(16)}${line.speaker.toUpperCase()}`,
126
+ `${" ".repeat(8)}${anchor}${line.text}`,
127
+ ];
128
+ };
@@ -0,0 +1,29 @@
1
+ import type { IAutoMovieScenePayload } from "@automovie/interface";
2
+
3
+ /**
4
+ * `INT. CASTLE COURTYARD - DAWN`: the screenplay slug of one scene, with the
5
+ * location and time of day upper-cased.
6
+ *
7
+ * The screenplay document and the caption join both name a scene by this one
8
+ * slug, so a caption's scene label always matches the document's heading.
9
+ *
10
+ * @evidence contracts/development/implementation.md#principled-implementation The scene payload's interior or exterior marker, uppercased location and uppercased time of day are joined with the screenplay's fixed heading punctuation.
11
+ * @evidence contracts/development/implementation.md#clear-and-simple-structure The shared slug formatter keeps screenplay headings and caption scene labels on one spelling rule without owning either document traversal.
12
+ * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Every supplied scene uses the same case conversion and punctuation; no location name or authored production receives a separate heading template.
13
+ * @evidence contracts/development/common.md#meaningful-documentation The comment gives the exact heading form and names the two consumers whose labels must agree.
14
+ * @evidence contracts/development/implementation.md#efficient-algorithms Uppercasing and joining cost linear time and space in the location and time-of-day strings, with no scene-tree traversal.
15
+ * @evidence contracts/development/implementation.md#reuse-equivalent-work This small formatter keeps no memo table; the consuming traversal owns whether a scene heading is requested once or repeatedly.
16
+ * @evidence contracts/development/implementation.md#bound-retention-and-release-resources The returned heading is the only retained value and contains no reference to the scene payload or host resources.
17
+ */
18
+ export const screenplaySceneSlug: (
19
+ payload: Pick<
20
+ IAutoMovieScenePayload,
21
+ "interiorExterior" | "location" | "timeOfDay"
22
+ >,
23
+ ) => string = (
24
+ payload: Pick<
25
+ IAutoMovieScenePayload,
26
+ "interiorExterior" | "location" | "timeOfDay"
27
+ >,
28
+ ): string =>
29
+ `${payload.interiorExterior}. ${payload.location.toUpperCase()} - ${payload.timeOfDay.toUpperCase()}`;
@@ -0,0 +1,5 @@
1
+ export * from "./IAutoMovieSequenceRenderShotSpan";
2
+ export * from "./IAutoMovieSequenceRenderTransitionSpan";
3
+ export * from "./IAutoMovieSequenceRenderFrame";
4
+ export * from "./IAutoMovieSequenceRenderPlan";
5
+ export * from "./planSequenceRender";
@@ -0,0 +1,6 @@
1
+ export * from "./IAutoMovieSequenceRenderAdapters";
2
+ export * from "./IAutoMovieSequenceRenderResult";
3
+ export * from "./IAutoMovieSequenceRenderAndSeeRequest";
4
+ export * from "./IAutoMovieSequenceRenderAndSeeResult";
5
+ export * from "./renderSequenceVideo";
6
+ export * from "./renderSequenceAndSee";
@@ -0,0 +1,19 @@
1
+ /**
2
+ * The beat id a shot id names: the text after a leading `shot:`, or the whole
3
+ * id when it has no such prefix.
4
+ *
5
+ * The interface defines a beat's computed shot as `shot.id = "shot:" + beat`,
6
+ * and an unprefixed id comes from a hand-authored shot that is its own beat.
7
+ * The caption plan and the pose-keypoint plan label their frames with it, so
8
+ * the two sidecars name the same beat for the same frame.
9
+ *
10
+ * @evidence contracts/development/implementation.md#principled-implementation Removing the fixed prefix inverts the `"shot:" + beat` construction exactly, and any other id is returned whole because no prefix was added to it.
11
+ * @evidence contracts/development/implementation.md#clear-and-simple-structure Both sidecar planners map shots to beats through this one function instead of each spelling the prefix rule.
12
+ * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The prefix is the interface's shot-id contract, a defined convention rather than a special case, and no id is otherwise rewritten.
13
+ * @evidence contracts/development/common.md#meaningful-documentation The doc states both mappings, the contract the prefix comes from, and which planners rely on it.
14
+ * @evidenceExclude contracts/development/implementation.md#efficient-algorithms One prefix test and slice of a short id choose no algorithm.
15
+ * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A prefix test per frame is cheaper than caching the mapping by shot id.
16
+ * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources The beat id is a slice of the shot id handed back to the planner, and nothing is retained.
17
+ */
18
+ export const shotBeat: (shotId: string) => string = (shotId: string): string =>
19
+ shotId.startsWith("shot:") ? shotId.slice("shot:".length) : shotId;
@@ -0,0 +1,85 @@
1
+ import {
2
+ IAutoMovieCaptionEntry,
3
+ IAutoMovieCaptionSidecar,
4
+ } from "./captionSidecar";
5
+
6
+ /**
7
+ * Slice a caption sidecar to one chunk's window `[frameStart, frameEnd)`, with spans clipped to the window and re-based to chunk-local frame indices.
8
+ *
9
+ * This is the caption counterpart of `planChunkedSequenceRender`'s frame-atomic chunking, so each chunk render carries its own caption track. A `frameEnd` past the sidecar's coverage is clamped to `frameCount`, which is how the last, shorter chunk is sliced. Throws when `frameStart` is not a non-negative integer, when `frameEnd` is not an integer above `frameStart`, or when `frameStart` is at or beyond `frameCount`, which means the render and the caption plan disagree on the frame count, for example because they were planned at different fps. The input spans must be in play order and tile the frames, as `planCaptionSidecar` and this function produce them.
10
+ *
11
+ * @evidence contracts/development/implementation.md#principled-implementation Spans are sorted, contiguous half-open intervals, so a binary search finds the first span ending after `frameStart`, and spans are then clipped with `max` and `min` until one starts at or after the clamped end; clipping cannot empty a visited span because each one overlaps the window.
12
+ * @evidence contracts/development/implementation.md#clear-and-simple-structure The slicer reads only the sidecar, not the chunk plan, so a host can pair any chunk window with its caption track; the clamp is a named helper because the coverage refusal and the clamp are separate rules.
13
+ * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts A window beyond coverage throws instead of returning an empty or negative-length slice, and no window or sidecar is special-cased.
14
+ * @evidence contracts/development/common.md#meaningful-documentation The doc states the clipping and re-basing, the clamp for the last chunk, each refusal, and the frame-count mismatch a coverage refusal signals.
15
+ * @evidence contracts/development/implementation.md#efficient-algorithms For S spans and K spans overlapping one window, bisection plus clipping costs O(log(S+1) + K). For C contiguous chunk windows that partition the coverage, each internal boundary adds at most one repeated span visit, so total work is O(C log(S+1) + S); a single long span can still appear in all C outputs, and no span or chunk count cap is imposed.
16
+ * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work Each call slices one window; chunk windows are disjoint, so there is no equivalent result to reuse between calls.
17
+ * @evidence contracts/development/implementation.md#bound-retention-and-release-resources The function retains nothing; the returned sidecar, owned by the caller, holds exactly the K overlapping spans as new objects and never aliases the input's spans.
18
+ */
19
+ export const sliceCaptionSidecar: (
20
+ sidecar: IAutoMovieCaptionSidecar,
21
+ frameStart: number,
22
+ frameEnd: number,
23
+ ) => IAutoMovieCaptionSidecar = (
24
+ sidecar: IAutoMovieCaptionSidecar,
25
+ frameStart: number,
26
+ frameEnd: number,
27
+ ): IAutoMovieCaptionSidecar => {
28
+ if (!Number.isInteger(frameStart) || frameStart < 0)
29
+ throw new Error(
30
+ `frameStart must be a non-negative integer, but was ${frameStart}`,
31
+ );
32
+ if (!Number.isInteger(frameEnd) || frameEnd <= frameStart)
33
+ throw new Error(
34
+ `frameEnd must be an integer > frameStart, but was ${frameEnd}`,
35
+ );
36
+ if (frameStart >= sidecar.frameCount)
37
+ throw new Error(
38
+ `frameStart ${frameStart} is at or beyond the sidecar's ${sidecar.frameCount} frames; the render window exceeds caption coverage`,
39
+ );
40
+
41
+ const end: number = clampWindowEnd(frameEnd, sidecar.frameCount);
42
+ const entries: IAutoMovieCaptionEntry[] = [];
43
+ for (
44
+ let index: number = firstSpanEndingAfter(sidecar.entries, frameStart);
45
+ index < sidecar.entries.length && sidecar.entries[index]!.frameStart < end;
46
+ ++index
47
+ ) {
48
+ const entry: IAutoMovieCaptionEntry = sidecar.entries[index]!;
49
+ entries.push({
50
+ ...entry,
51
+ frameStart: Math.max(entry.frameStart, frameStart) - frameStart,
52
+ frameEnd: Math.min(entry.frameEnd, end) - frameStart,
53
+ });
54
+ }
55
+ return {
56
+ target: sidecar.target,
57
+ fps: sidecar.fps,
58
+ frameCount: end - frameStart,
59
+ entries,
60
+ };
61
+ };
62
+
63
+ /** The window's exclusive end, clamped to the sidecar's frame count. */
64
+ const clampWindowEnd: (frameEnd: number, frameCount: number) => number = (
65
+ frameEnd: number,
66
+ frameCount: number,
67
+ ): number => (frameEnd < frameCount ? frameEnd : frameCount);
68
+
69
+ /** Index of the first span whose exclusive end exceeds `frame`, by bisection. */
70
+ const firstSpanEndingAfter: (
71
+ entries: readonly IAutoMovieCaptionEntry[],
72
+ frame: number,
73
+ ) => number = (
74
+ entries: readonly IAutoMovieCaptionEntry[],
75
+ frame: number,
76
+ ): number => {
77
+ let low: number = 0;
78
+ let high: number = entries.length;
79
+ while (low < high) {
80
+ const middle: number = (low + high) >>> 1;
81
+ if (entries[middle]!.frameEnd > frame) high = middle;
82
+ else low = middle + 1;
83
+ }
84
+ return low;
85
+ };