@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,18 @@
1
+ /**
2
+ * Role of a renderer-owned PNG, which decides its picture profile.
3
+ *
4
+ * `preview` and `guide-frame` pictures take the authored raster, while
5
+ * `waveform` (960 × 240) and `spectrogram` (512 × 192) pictures have the fixed
6
+ * rasters their audio-evidence writers draw; `resolveProductionPngProfile`
7
+ * maps a role to its profile.
8
+ *
9
+ * @evidence contracts/development/design.md#principled-representation A closed string union names each kind of picture the renderer writes, so the profile resolver can switch exhaustively and a delivery check names the role in its refusal.
10
+ * @evidence contracts/development/design.md#minimal-and-owned-surface Four literals cover the PNG writers that exist; the raster and format rules stay in `resolveProductionPngProfile` rather than in the role type.
11
+ * @evidence contracts/development/design.md#prohibited-design-shortcuts The fixed rasters belong to the two audio-evidence roles as contract constants of their writers, and the union adds no role for a single consumer.
12
+ * @evidence contracts/development/common.md#meaningful-documentation The doc states which roles take the authored raster, the fixed raster of the others, and where a role becomes a profile.
13
+ */
14
+ export type AutoMovieProductionPngRole =
15
+ | "preview"
16
+ | "guide-frame"
17
+ | "waveform"
18
+ | "spectrogram";
@@ -0,0 +1,52 @@
1
+ import type { AutoMovieProductionPngRole } from "./AutoMovieProductionPngRole";
2
+
3
+ /**
4
+ * The exact PNG picture facts the deterministic writers emit for one role.
5
+ *
6
+ * `resolveProductionPngProfile` builds it, and `assertProductionPngPicture`
7
+ * refuses a parsed PNG that differs in any compared field. Every field except
8
+ * the raster is a single literal, because the writers support exactly one
9
+ * format.
10
+ *
11
+ * @evidence contracts/development/design.md#principled-representation Literal types encode each fixed format fact, so a profile cannot state a format the writers do not produce, and the checker compares fields one-for-one against the parser's observation.
12
+ * @evidence contracts/development/design.md#minimal-and-owned-surface The profile is a flat record mirroring the parsed picture's field names, so the checker needs no mapping layer; `version` lets the shape change without misreading an older profile.
13
+ * @evidence contracts/development/design.md#prohibited-design-shortcuts The literals are the writers' actual output contract, not values chosen to match a fixture, and no role has a field of its own.
14
+ * @evidence contracts/development/common.md#meaningful-documentation The prose names the producer and checker and why fields are literals; each member gives its unit or the convention its literal names.
15
+ */
16
+ export interface IAutoMovieProductionPngProfile {
17
+ /** Profile schema version. */
18
+ version: 1;
19
+
20
+ /** Renderer-owned role the PNG is written for, named in a mismatch error. */
21
+ role: AutoMovieProductionPngRole;
22
+
23
+ /** Stored image width in pixels. */
24
+ width: number;
25
+
26
+ /** Stored image height in pixels. */
27
+ height: number;
28
+
29
+ /** Bits per channel; every writer emits 8. */
30
+ bitDepth: 8;
31
+
32
+ /** Channel layout; every writer emits RGBA. */
33
+ color: "rgba";
34
+
35
+ /** Alpha convention: color channels are not premultiplied by alpha. */
36
+ alpha: "straight";
37
+
38
+ /** Interlace method; the writers never interlace. */
39
+ interlace: "none";
40
+
41
+ /** Color space the pixel values are display-referred in. */
42
+ colorSpace: "srgb";
43
+
44
+ /**
45
+ * Pixel aspect; the writers emit square pixels, and a PNG without a physical
46
+ * pixel ratio is read as square.
47
+ */
48
+ pixelAspect: "square";
49
+
50
+ /** Stored orientation; the writers never rotate. */
51
+ orientation: "upright";
52
+ }
@@ -0,0 +1,48 @@
1
+ import type {
2
+ IAutoMovieProductionFrameRate,
3
+ IAutoMovieProductionVideoProbe,
4
+ } from "@automovie/interface";
5
+
6
+ /**
7
+ * The exact H.264-in-MP4 picture profile one video deliverable must carry,
8
+ * resolved from its authored raster and frame rate.
9
+ *
10
+ * `resolveProductionVideoProfile` builds it, and `assertProductionVideoProfile`
11
+ * refuses a probed file that differs from it. Raster and rate vary per
12
+ * deliverable; brands, matrix, pixel aspect and color are fixed literals of the
13
+ * one profile the normalizer writes.
14
+ *
15
+ * @evidence contracts/development/design.md#principled-representation The profile states facts in the MP4 file's own terms, such as ISO brands, the 16.16 and 2.30 fixed-point track matrix and ITU-T H.273 color code points, so the checker compares them directly with the probe without unit conversion.
16
+ * @evidence contracts/development/design.md#minimal-and-owned-surface Only the facts the checker needs from the author are variable, and container and codec identity stay inside the checker because no profile may differ there.
17
+ * @evidence contracts/development/design.md#prohibited-design-shortcuts The literal color code points and brand are the sRGB and ISO base media identities the normalizer writes, shared through `AUTOMOVIE_MP4_SRGB_COLOUR` and the unity matrix constant, not values picked for a test file.
18
+ * @evidence contracts/development/common.md#meaningful-documentation The prose names producer and checker and which fields vary; each member gives its unit, fixed-point form or code-point meaning.
19
+ */
20
+ export interface IAutoMovieProductionVideoProfile {
21
+ /** Coded and displayed picture width in pixels. */
22
+ width: number;
23
+
24
+ /** Coded and displayed picture height in pixels. */
25
+ height: number;
26
+
27
+ /** Exact rational picture rate the sample timing must equal. */
28
+ frameRate: IAutoMovieProductionFrameRate;
29
+
30
+ /**
31
+ * Major brand, and the brands the file's compatible-brand list must
32
+ * include; other compatible brands are allowed.
33
+ */
34
+ brands: { major: "isom"; requiredCompatible: readonly string[] };
35
+
36
+ /** Track display matrix in 16.16 and 2.30 fixed point; the unity matrix. */
37
+ trackMatrix: IAutoMovieProductionVideoProbe["trackMatrix"];
38
+
39
+ /** Pixel aspect; the profile admits square pixels only. */
40
+ pixelAspect: "square";
41
+
42
+ /**
43
+ * ITU-T H.273 color code points the track's `nclx` color box must declare:
44
+ * BT.709 primaries (1), sRGB transfer (13), BT.709 matrix (1), and full
45
+ * range.
46
+ */
47
+ color: { primaries: 1; transfer: 13; matrix: 1; fullRange: true };
48
+ }
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Refuse a capture page that is not ready or does not expose the commissioned
3
+ * clock, before any sound is prepared or pixel captured: the page must be
4
+ * ready, report the commissioned duration and frame rate, and count exactly
5
+ * `durationSeconds * fps` frames, an integer. Readiness is no visual or
6
+ * physical acceptance.
7
+ *
8
+ * @param host Values read from the capture page.
9
+ * @param expected The commissioned duration and rate.
10
+ * @evidence contracts/development/common.md#meaningful-documentation Gives the purpose (Refuse a capture page that is not ready or does not expose the commissioned clock, before any sound is prepared or pixel captured: the page must be ready, report the commissioned duration and frame rate, and count exactly `durationSeconds * fps` frames, an integer) and documents parameters `host`, `expected` as stated in this comment.
11
+ * @evidence contracts/development/implementation.md#principled-implementation Implements the documented behavior (Refuse a capture page that is not ready or does not expose the commissioned clock, before any sound is prepared or pixel captured: the page must be ready, report the commissioned duration and frame rate, and count exactly `durationSeconds * fps` frames, an integer) directly over its typed inputs (`host`, `expected`) as a fixed number of statements with no loop or recursion in the body, delegating to `Number.isSafeInteger`; the premises are the units, frames and ranges stated in its parameter documentation, enforced only where the body throws (1 throw site). Apart from structural 0, 1 and 2 the body uses no numeric literal.
12
+ * @evidence contracts/development/implementation.md#clear-and-simple-structure One operation of 12 lines and 1 top-level statements that reuses `Number.isSafeInteger` from their owners instead of copying them; it adds no option, layer or abstraction beyond its documented parameters.
13
+ * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Scanning the body finds no `any`, type assertion, non-null assertion, suppression directive or TODO, and no branch keyed on a consumer, fixture or expected answer; values come from its parameters.
14
+ * @evidence contracts/development/implementation.md#efficient-algorithms Cost is driven by the sizes of `host`, `expected`; the dominant cost is a fixed number of statements with no loop or recursion in the body, performed once per call with 1 allocation site (literals and constructed values). No speedup is claimed and none is measured.
15
+ * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work The operation coordinates no requests, phases or consumers and holds no cache: each call recomputes from its arguments and shares nothing, which is correct because its result depends only on them.
16
+ * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources The function acquires no handle, timer, listener or task and keeps no state between calls; its 1 allocation site become the returned value or die with the call, so nothing grows.
17
+ */
18
+ export function assertAutoMovieCaptureClock(
19
+ host: {
20
+ ready: boolean;
21
+ durationSeconds: number;
22
+ fps: number;
23
+ frameCount: number;
24
+ },
25
+ expected: { durationSeconds: number; fps: number },
26
+ ): void {
27
+ if (
28
+ host.ready !== true ||
29
+ host.durationSeconds !== expected.durationSeconds ||
30
+ host.fps !== expected.fps ||
31
+ host.frameCount !== host.durationSeconds * host.fps ||
32
+ !Number.isSafeInteger(host.frameCount)
33
+ )
34
+ throw new Error(
35
+ "The capture page does not expose the complete commissioned clock",
36
+ );
37
+ }
@@ -0,0 +1,179 @@
1
+ import type {
2
+ IAutoMovieProductionAudioProbe,
3
+ IAutoMovieProductionOpusDescription,
4
+ } from "@automovie/interface";
5
+
6
+ import { AUTOMOVIE_PRODUCTION_OPUS_PROFILE } from "./AUTOMOVIE_PRODUCTION_OPUS_PROFILE";
7
+
8
+ /**
9
+ * Refuse every difference between a probed Opus-in-MP4 audio track and the one
10
+ * profile the deterministic encoder writes.
11
+ *
12
+ * The codec, channel layout, 48 kHz rate and every `dOps` field must equal
13
+ * `AUTOMOVIE_PRODUCTION_OPUS_PROFILE`, the `dOps` pre-skip must equal the
14
+ * parsed priming, and the clocks must describe one full-rate edit that starts
15
+ * at the pre-skip, presents a whole number of media samples, and is covered by
16
+ * the coded samples. The reported runtime must equal movie duration over movie
17
+ * timescale. The first difference, in the order above, throws an `Error`
18
+ * whose message starts with `unsupported-audio-profile.<field>` and names the
19
+ * expected and observed values.
20
+ *
21
+ * @evidence contracts/development/implementation.md#principled-implementation Each fact is compared exactly, numbers by identity and arrays by their JSON spelling, and the presentation length is computed as the exact BigInt quotient of movie duration times media timescale over movie timescale, so no rounding can admit a fractional-sample edit; clock checks come before every derived check so a zero clock is reported by name rather than as a division artifact.
22
+ * @evidence contracts/development/implementation.md#clear-and-simple-structure One ordered list of named comparisons is the whole check, so the error names the first failing field and adding a fact is one row; the expected codec and `dOps` values come from the exported `AUTOMOVIE_PRODUCTION_OPUS_PROFILE` constant rather than literals in the rows.
23
+ * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The expected values are the encoder's contract, the codec string is compared by its family prefix as MP4 codec strings are spelled, and nothing is relaxed for a particular file.
24
+ * @evidence contracts/development/common.md#meaningful-documentation The doc lists every compared group, the derived clock conditions, the order that decides which field is reported, and the error format.
25
+ * @evidence contracts/development/implementation.md#efficient-algorithms The check is constant-time over a fixed set of fields plus a single edit-list length; all comparisons are built before the first mismatch is found, which costs a few dozen operations per delivered track.
26
+ * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work Each call judges one probe once; the probe and delivery validators call it for different files, so no result is equivalent across calls.
27
+ * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources The function holds only its comparison list until it returns or throws, and opens no file, buffer or task.
28
+ */
29
+ export const assertProductionOpusProfile: (
30
+ actual: IAutoMovieProductionAudioProbe,
31
+ ) => void = (actual: IAutoMovieProductionAudioProbe): void => {
32
+ const description: IAutoMovieProductionOpusDescription = actual.sampleEntry;
33
+ const edit:
34
+ | IAutoMovieProductionAudioProbe["timebase"]["edits"][number]
35
+ | undefined = actual.timebase.edits[0];
36
+ const clockTerms: number[] = [
37
+ actual.timebase.movieTimescale,
38
+ actual.timebase.mediaTimescale,
39
+ actual.timebase.movieDuration,
40
+ actual.timebase.mediaDuration,
41
+ ];
42
+ const clocksSafe: boolean = clockTerms.every((value: number): boolean =>
43
+ positiveSafeInteger(value),
44
+ );
45
+ const presentationNumerator: bigint = clocksSafe
46
+ ? BigInt(actual.timebase.movieDuration) *
47
+ BigInt(actual.timebase.mediaTimescale)
48
+ : 0n;
49
+ const presentationDenominator: bigint = clocksSafe
50
+ ? BigInt(actual.timebase.movieTimescale)
51
+ : 1n;
52
+ const presentationQuotient: bigint =
53
+ presentationNumerator / presentationDenominator;
54
+ const presentationSamplesSafe: boolean =
55
+ clocksSafe &&
56
+ presentationNumerator % presentationDenominator === 0n &&
57
+ presentationQuotient <= BigInt(Number.MAX_SAFE_INTEGER);
58
+ const presentationSamples: number = Number(presentationQuotient);
59
+ const comparisons: Array<[string, unknown, unknown]> = [
60
+ [
61
+ "codec",
62
+ AUTOMOVIE_PRODUCTION_OPUS_PROFILE.kind,
63
+ actual.codec.split(".")[0]!.toLowerCase(),
64
+ ],
65
+ [
66
+ "channels",
67
+ AUTOMOVIE_PRODUCTION_OPUS_PROFILE.outputChannelCount,
68
+ actual.channels,
69
+ ],
70
+ [
71
+ "sampleRate",
72
+ AUTOMOVIE_PRODUCTION_OPUS_PROFILE.inputSampleRate,
73
+ actual.sampleRate,
74
+ ],
75
+ ["sampleCount", true, actual.sampleCount > 0],
76
+ [
77
+ "dOps.version",
78
+ AUTOMOVIE_PRODUCTION_OPUS_PROFILE.version,
79
+ description.version,
80
+ ],
81
+ [
82
+ "dOps.outputChannelCount",
83
+ AUTOMOVIE_PRODUCTION_OPUS_PROFILE.outputChannelCount,
84
+ description.outputChannelCount,
85
+ ],
86
+ [
87
+ "dOps.inputSampleRate",
88
+ AUTOMOVIE_PRODUCTION_OPUS_PROFILE.inputSampleRate,
89
+ description.inputSampleRate,
90
+ ],
91
+ [
92
+ "dOps.outputGainQ7_8",
93
+ AUTOMOVIE_PRODUCTION_OPUS_PROFILE.outputGainQ7_8,
94
+ description.outputGainQ7_8,
95
+ ],
96
+ [
97
+ "dOps.channelMappingFamily",
98
+ AUTOMOVIE_PRODUCTION_OPUS_PROFILE.channelMapping.family,
99
+ description.channelMapping.family,
100
+ ],
101
+ [
102
+ "dOps.streamCount",
103
+ AUTOMOVIE_PRODUCTION_OPUS_PROFILE.channelMapping.streamCount,
104
+ description.channelMapping.streamCount,
105
+ ],
106
+ [
107
+ "dOps.coupledCount",
108
+ AUTOMOVIE_PRODUCTION_OPUS_PROFILE.channelMapping.coupledCount,
109
+ description.channelMapping.coupledCount,
110
+ ],
111
+ [
112
+ "dOps.mapping",
113
+ JSON.stringify(AUTOMOVIE_PRODUCTION_OPUS_PROFILE.channelMapping.mapping),
114
+ JSON.stringify(description.channelMapping.mapping),
115
+ ],
116
+ [
117
+ "dOps.channelOrder",
118
+ JSON.stringify(
119
+ AUTOMOVIE_PRODUCTION_OPUS_PROFILE.channelMapping.channelOrder,
120
+ ),
121
+ JSON.stringify(description.channelMapping.channelOrder),
122
+ ],
123
+ ["dOps.preSkip", actual.primingSamples, description.preSkip],
124
+ [
125
+ "timebase.movieTimescale",
126
+ true,
127
+ positiveSafeInteger(actual.timebase.movieTimescale),
128
+ ],
129
+ [
130
+ "timebase.mediaTimescale",
131
+ AUTOMOVIE_PRODUCTION_OPUS_PROFILE.inputSampleRate,
132
+ actual.timebase.mediaTimescale,
133
+ ],
134
+ [
135
+ "timebase.movieDuration",
136
+ true,
137
+ positiveSafeInteger(actual.timebase.movieDuration),
138
+ ],
139
+ [
140
+ "timebase.mediaDuration",
141
+ true,
142
+ positiveSafeInteger(actual.timebase.mediaDuration),
143
+ ],
144
+ ["timebase.edits.length", 1, actual.timebase.edits.length],
145
+ [
146
+ "timebase.edit.segmentDuration",
147
+ actual.timebase.movieDuration,
148
+ edit?.segmentDuration,
149
+ ],
150
+ ["timebase.edit.mediaTime", description.preSkip, edit?.mediaTime],
151
+ ["timebase.edit.mediaRateInteger", 1, edit?.mediaRateInteger],
152
+ ["timebase.edit.mediaRateFraction", 0, edit?.mediaRateFraction],
153
+ ["timebase.presentationSamples", true, presentationSamplesSafe],
154
+ [
155
+ "timebase.codedCoverage",
156
+ true,
157
+ presentationSamplesSafe &&
158
+ actual.timebase.mediaDuration >=
159
+ description.preSkip + presentationSamples,
160
+ ],
161
+ [
162
+ "runtimeSeconds",
163
+ actual.timebase.movieDuration / actual.timebase.movieTimescale,
164
+ actual.runtimeSeconds,
165
+ ],
166
+ ];
167
+ const mismatch: [string, unknown, unknown] | undefined = comparisons.find(
168
+ ([, expected, observed]: [string, unknown, unknown]): boolean =>
169
+ expected !== observed,
170
+ );
171
+ if (mismatch !== undefined)
172
+ throw new Error(
173
+ `unsupported-audio-profile.${mismatch[0]}: expected ${String(mismatch[1])}, observed ${String(mismatch[2])}.`,
174
+ );
175
+ };
176
+
177
+ const positiveSafeInteger: (value: number) => boolean = (
178
+ value: number,
179
+ ): boolean => Number.isSafeInteger(value) && value > 0;
@@ -0,0 +1,62 @@
1
+ import type { IAutoMovieProductionPngPicture } from "@automovie/interface";
2
+
3
+ import type { IAutoMovieProductionPngProfile } from "./IAutoMovieProductionPngProfile";
4
+
5
+ /**
6
+ * Refuse every difference between a role's PNG profile and the facts a PNG
7
+ * parser observed.
8
+ *
9
+ * Raster, bit depth, channel layout, alpha, interlace, color space and
10
+ * orientation must equal the profile, and a declared physical pixel ratio must
11
+ * be square; an absent ratio counts as square. The first difference, in that
12
+ * order, throws an `Error` naming the role, the field, and the expected and
13
+ * observed values.
14
+ *
15
+ * @evidence contracts/development/implementation.md#principled-implementation Every compared field is a scalar compared by identity against the profile, and pixel aspect is judged by the ratio itself, `x === y`, because a PNG may declare square pixels with any equal pair of densities.
16
+ * @evidence contracts/development/implementation.md#clear-and-simple-structure One ordered list of named comparisons is the whole check, so the error names the first failing field; the profile's raster rules stay in `resolveProductionPngProfile`, which built it.
17
+ * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The profile's `version` and `role` are not picture facts and are not compared, and no role relaxes a field.
18
+ * @evidence contracts/development/common.md#meaningful-documentation The doc lists the compared fields, the pixel-aspect rule with its absent case, the order that decides the reported field, and the error contents.
19
+ * @evidence contracts/development/implementation.md#efficient-algorithms The check compares a fixed set of eight or nine scalars in constant time, independent of the picture size, because the parser has already decoded the facts.
20
+ * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work Each call judges one parsed picture against one profile, and different delivered PNGs are not equivalent work.
21
+ * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Only the small comparison list exists during the call, and the function opens no file or task.
22
+ */
23
+ export const assertProductionPngPicture: (props: {
24
+ profile: IAutoMovieProductionPngProfile;
25
+ actual: IAutoMovieProductionPngPicture;
26
+ }) => void = (props: {
27
+ /** Profile of the role the PNG was written for. */
28
+ profile: IAutoMovieProductionPngProfile;
29
+
30
+ /** Facts the PNG parser observed in the delivered file. */
31
+ actual: IAutoMovieProductionPngPicture;
32
+ }): void => {
33
+ const expected: IAutoMovieProductionPngProfile = props.profile;
34
+ const actual: IAutoMovieProductionPngPicture = props.actual;
35
+ const entries: Array<[string, unknown, unknown]> = [
36
+ ["width", expected.width, actual.width],
37
+ ["height", expected.height, actual.height],
38
+ ["bitDepth", expected.bitDepth, actual.bitDepth],
39
+ ["color", expected.color, actual.color],
40
+ ["alpha", expected.alpha, actual.alpha],
41
+ ["interlace", expected.interlace, actual.interlace],
42
+ ["colorSpace", expected.colorSpace, actual.colorSpace],
43
+ ["orientation", expected.orientation, actual.orientation],
44
+ ];
45
+ if (
46
+ actual.pixelAspect.kind === "explicit" &&
47
+ actual.pixelAspect.x !== actual.pixelAspect.y
48
+ )
49
+ entries.push([
50
+ "pixelAspect",
51
+ expected.pixelAspect,
52
+ `${actual.pixelAspect.x}:${actual.pixelAspect.y}`,
53
+ ]);
54
+ const mismatch: [string, unknown, unknown] | undefined = entries.find(
55
+ ([, wanted, observed]: [string, unknown, unknown]): boolean =>
56
+ wanted !== observed,
57
+ );
58
+ if (mismatch !== undefined)
59
+ throw new Error(
60
+ `PNG ${expected.role} profile mismatch at ${mismatch[0]}: expected ${String(mismatch[1])}, observed ${String(mismatch[2])}.`,
61
+ );
62
+ };
@@ -0,0 +1,180 @@
1
+ import { equalProductionFrameRates } from "@automovie/engine";
2
+ import type {
3
+ IAutoMovieProductionFrameRate,
4
+ IAutoMovieProductionVideoProbe,
5
+ } from "@automovie/interface";
6
+
7
+ import type { IAutoMovieProductionVideoProfile } from "./IAutoMovieProductionVideoProfile";
8
+
9
+ /**
10
+ * Refuse every presentation, timing or color fact of a probed H.264-in-MP4
11
+ * video that differs from its delivery profile.
12
+ *
13
+ * The file must be MP4 with H.264, the profile's major brand and every required
14
+ * compatible brand, the profile raster as coded size and as 16.16 track display
15
+ * size, and the unity track matrix. Its samples must number the probed frame
16
+ * count with one positive constant duration, start at decode and composition
17
+ * time zero, and run at exactly the profile's frame rate, and both runtimes,
18
+ * media and movie, must equal the reported runtime. Pixels must be square, the
19
+ * `nclx` color box must declare the profile's sRGB code points, and the edit
20
+ * list must be empty or one full-length edit starting at media time zero. The
21
+ * first difference throws an `Error` whose message starts with
22
+ * `unsupported-video-profile.<field>` and names the expected and observed
23
+ * values.
24
+ *
25
+ * @evidence contracts/development/implementation.md#principled-implementation Each fact is compared exactly in the file's own integer units; the frame rate is compared as a reduced rational through `equalProductionFrameRates` on timescale over sample duration, and the sample clock is checked by name before that rate is derived, so a zero clock is reported as its field rather than as an arithmetic failure.
26
+ * @evidence contracts/development/implementation.md#clear-and-simple-structure One ordered list of named comparisons, with conditional rows for brands, explicit pixel aspect, `nclx` fields and edits, is the whole check, so every normalizer, assembler and delivery validator applies the same profile and reports the same field name.
27
+ * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Container, codec, `nclx` and sRGB identities are the single delivery format the normalizer writes, an extra compatible brand is allowed because brands only advertise readers, and no file or caller is special-cased.
28
+ * @evidence contracts/development/common.md#meaningful-documentation The doc lists every compared group, the timing and edit-list conditions, and the error format; the order of rows decides which field a multiply-wrong file reports.
29
+ * @evidence contracts/development/implementation.md#efficient-algorithms Fixed scalar checks are constant work; required-brand membership costs the product of required and observed brand counts. Matrix serialization and any mismatched edit-list serialization depend on their lengths, which caller-supplied records do not cap here. No coded sample bytes are read.
30
+ * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work Each call judges one probe of one file, and the several callers check different files or the same file after it changed, so no earlier verdict is equivalent.
31
+ * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources The comparison list is the only allocation and dies with the call; the function opens no file, process or task.
32
+ */
33
+ export const assertProductionVideoProfile: (props: {
34
+ expected: IAutoMovieProductionVideoProfile;
35
+ actual: IAutoMovieProductionVideoProbe;
36
+ }) => void = (props: {
37
+ /** Profile resolved from the deliverable's authored raster and rate. */
38
+ expected: IAutoMovieProductionVideoProfile;
39
+
40
+ /** Facts the MP4 probe observed in the file. */
41
+ actual: IAutoMovieProductionVideoProbe;
42
+ }): void => {
43
+ const expected: IAutoMovieProductionVideoProfile = props.expected;
44
+ const actual: IAutoMovieProductionVideoProbe = props.actual;
45
+ const clockValid: boolean =
46
+ positiveClock(actual.samples.timescale) &&
47
+ positiveClock(actual.samples.duration);
48
+ const actualRate: IAutoMovieProductionFrameRate = {
49
+ numerator: actual.samples.timescale,
50
+ denominator: actual.samples.duration,
51
+ };
52
+ const lastSampleTime: number =
53
+ (actual.samples.count - 1) * actual.samples.duration;
54
+ const comparisons: Array<[string, unknown, unknown]> = [
55
+ ["container", "mp4", actual.container],
56
+ ["codec", "h264", actual.codec],
57
+ ["brands.major", expected.brands.major, actual.brands.major],
58
+ ["width", expected.width, actual.width],
59
+ ["height", expected.height, actual.height],
60
+ ["coded.width", expected.width, actual.coded.width],
61
+ ["coded.height", expected.height, actual.coded.height],
62
+ [
63
+ "trackDisplay.width16_16",
64
+ expected.width * 65_536,
65
+ actual.trackDisplay.width16_16,
66
+ ],
67
+ [
68
+ "trackDisplay.height16_16",
69
+ expected.height * 65_536,
70
+ actual.trackDisplay.height16_16,
71
+ ],
72
+ [
73
+ "trackMatrix",
74
+ JSON.stringify(expected.trackMatrix),
75
+ JSON.stringify(actual.trackMatrix),
76
+ ],
77
+ ["samples.count", actual.frameCount, actual.samples.count],
78
+ ["samples.duration", true, positiveClock(actual.samples.duration)],
79
+ ["samples.timescale", true, positiveClock(actual.samples.timescale)],
80
+ [
81
+ "frameRate",
82
+ true,
83
+ clockValid &&
84
+ equalProductionFrameRates(expected.frameRate, actualRate) &&
85
+ equalProductionFrameRates(actual.frameRate, actualRate),
86
+ ],
87
+ ["samples.firstDts", 0, actual.samples.firstDts],
88
+ ["samples.lastDts", lastSampleTime, actual.samples.lastDts],
89
+ ["samples.firstCts", 0, actual.samples.firstCts],
90
+ ["samples.lastCts", lastSampleTime, actual.samples.lastCts],
91
+ [
92
+ "presentation.movieTimescale",
93
+ true,
94
+ actual.presentation.movieTimescale > 0,
95
+ ],
96
+ [
97
+ "presentation.mediaTimescale",
98
+ actual.samples.timescale,
99
+ actual.presentation.mediaTimescale,
100
+ ],
101
+ [
102
+ "presentation.mediaDuration",
103
+ actual.samples.count * actual.samples.duration,
104
+ actual.presentation.mediaDuration,
105
+ ],
106
+ [
107
+ "runtimeSeconds.media",
108
+ actual.presentation.mediaDuration / actual.presentation.mediaTimescale,
109
+ actual.runtimeSeconds,
110
+ ],
111
+ [
112
+ "runtimeSeconds.movie",
113
+ actual.presentation.movieDuration / actual.presentation.movieTimescale,
114
+ actual.runtimeSeconds,
115
+ ],
116
+ ["color.container.kind", "nclx", actual.color.container.kind],
117
+ ["color.resolved.kind", "srgb", actual.color.resolved.kind],
118
+ ];
119
+ for (const brand of expected.brands.requiredCompatible)
120
+ comparisons.push([
121
+ `brands.compatible.${brand}`,
122
+ true,
123
+ actual.brands.compatible.includes(brand),
124
+ ]);
125
+ if (actual.pixelAspect.kind === "explicit")
126
+ comparisons.push([
127
+ "pixelAspect",
128
+ actual.pixelAspect.hSpacing,
129
+ actual.pixelAspect.vSpacing,
130
+ ]);
131
+ if (actual.color.container.kind === "nclx") {
132
+ comparisons.push(
133
+ [
134
+ "color.primaries",
135
+ expected.color.primaries,
136
+ actual.color.container.primaries,
137
+ ],
138
+ [
139
+ "color.transfer",
140
+ expected.color.transfer,
141
+ actual.color.container.transfer,
142
+ ],
143
+ ["color.matrix", expected.color.matrix, actual.color.container.matrix],
144
+ [
145
+ "color.fullRange",
146
+ expected.color.fullRange,
147
+ actual.color.container.fullRange,
148
+ ],
149
+ );
150
+ }
151
+ const edits: IAutoMovieProductionVideoProbe["presentation"]["edits"] =
152
+ actual.presentation.edits;
153
+ if (
154
+ edits.length !== 0 &&
155
+ !(
156
+ edits.length === 1 &&
157
+ edits[0]!.mediaTime === 0 &&
158
+ edits[0]!.mediaRateInteger === 1 &&
159
+ edits[0]!.mediaRateFraction === 0 &&
160
+ edits[0]!.segmentDuration === actual.presentation.movieDuration
161
+ )
162
+ )
163
+ comparisons.push([
164
+ "presentation.edits",
165
+ "none or one full zero-start edit",
166
+ JSON.stringify(edits),
167
+ ]);
168
+ const mismatch: [string, unknown, unknown] | undefined = comparisons.find(
169
+ ([, wanted, observed]: [string, unknown, unknown]): boolean =>
170
+ wanted !== observed,
171
+ );
172
+ if (mismatch !== undefined)
173
+ throw new Error(
174
+ `unsupported-video-profile.${mismatch[0]}: expected ${String(mismatch[1])}, observed ${String(mismatch[2])}.`,
175
+ );
176
+ };
177
+
178
+ /** Whether a sample-clock term is a positive safe integer. */
179
+ const positiveClock: (value: number) => boolean = (value: number): boolean =>
180
+ Number.isSafeInteger(value) && value > 0;