automovie 0.3.4 → 0.4.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 (331) hide show
  1. package/README.md +40 -139
  2. package/lib/AUTOMOVIE_CAPTURE_OPTIONS.d.ts +5 -2
  3. package/lib/AUTOMOVIE_CAPTURE_OPTIONS.js +6 -2
  4. package/lib/AUTOMOVIE_CAPTURE_OPTIONS.js.map +1 -1
  5. package/lib/AUTOMOVIE_DEFAULT_PROJECT_NAME.d.ts +3 -1
  6. package/lib/AUTOMOVIE_DEFAULT_PROJECT_NAME.js +3 -1
  7. package/lib/AUTOMOVIE_DEFAULT_PROJECT_NAME.js.map +1 -1
  8. package/lib/AUTOMOVIE_INSPECT_OPTIONS.d.ts +5 -2
  9. package/lib/AUTOMOVIE_INSPECT_OPTIONS.js +5 -2
  10. package/lib/AUTOMOVIE_INSPECT_OPTIONS.js.map +1 -1
  11. package/lib/AUTOMOVIE_RENDER_OPTIONS.d.ts +6 -2
  12. package/lib/AUTOMOVIE_RENDER_OPTIONS.js +8 -2
  13. package/lib/AUTOMOVIE_RENDER_OPTIONS.js.map +1 -1
  14. package/lib/AUTOMOVIE_REVIEW_OPTIONS.d.ts +3 -1
  15. package/lib/AUTOMOVIE_REVIEW_OPTIONS.js +12 -1
  16. package/lib/AUTOMOVIE_REVIEW_OPTIONS.js.map +1 -1
  17. package/lib/AutoMovieCaptureBackend.d.ts +4 -6
  18. package/lib/AutoMovieCaptureHost.d.ts +73 -53
  19. package/lib/AutoMovieCaptureHost.js +89 -56
  20. package/lib/AutoMovieCaptureHost.js.map +1 -1
  21. package/lib/AutoMovieCommand.d.ts +69 -20
  22. package/lib/AutoMovieFfmpegStaticPath.d.ts +6 -0
  23. package/lib/AutoMovieFfmpegStaticPath.js +3 -0
  24. package/lib/AutoMovieFfmpegStaticPath.js.map +1 -0
  25. package/lib/AutoMovieMp4Boxes.d.ts +78 -0
  26. package/lib/AutoMovieMp4Boxes.js +227 -0
  27. package/lib/AutoMovieMp4Boxes.js.map +1 -0
  28. package/lib/AutoMovieRenderOutputReservation.d.ts +18 -0
  29. package/lib/AutoMovieRenderOutputReservation.js +118 -0
  30. package/lib/AutoMovieRenderOutputReservation.js.map +1 -0
  31. package/lib/IAutoMovieChromium.d.ts +13 -57
  32. package/lib/IAutoMovieDeliveryAudioTrack.d.ts +17 -0
  33. package/lib/IAutoMovieDeliveryAudioTrack.js +3 -0
  34. package/lib/IAutoMovieDeliveryAudioTrack.js.map +1 -0
  35. package/lib/IAutoMovieDeliveryProfileFinding.d.ts +21 -0
  36. package/lib/IAutoMovieDeliveryProfileFinding.js +3 -0
  37. package/lib/IAutoMovieDeliveryProfileFinding.js.map +1 -0
  38. package/lib/IAutoMovieFfmpegSources.d.ts +11 -0
  39. package/lib/IAutoMovieFfmpegSources.js +3 -0
  40. package/lib/IAutoMovieFfmpegSources.js.map +1 -0
  41. package/lib/IAutoMovieReviewObservation.d.ts +66 -0
  42. package/lib/IAutoMovieReviewObservation.js +3 -0
  43. package/lib/IAutoMovieReviewObservation.js.map +1 -0
  44. package/lib/IAutoMovieVerification.d.ts +163 -0
  45. package/lib/IAutoMovieVerification.js +3 -0
  46. package/lib/IAutoMovieVerification.js.map +1 -0
  47. package/lib/auditAutoMovieAlphaSamples.d.ts +23 -0
  48. package/lib/auditAutoMovieAlphaSamples.js +183 -0
  49. package/lib/auditAutoMovieAlphaSamples.js.map +1 -0
  50. package/lib/auditAutoMovieDeliveryProfile.d.ts +33 -0
  51. package/lib/auditAutoMovieDeliveryProfile.js +93 -0
  52. package/lib/auditAutoMovieDeliveryProfile.js.map +1 -0
  53. package/lib/captureAutoMovie.d.ts +23 -11
  54. package/lib/captureAutoMovie.js +102 -18
  55. package/lib/captureAutoMovie.js.map +1 -1
  56. package/lib/createAutoMovieDeliveryAudioLog.d.ts +31 -0
  57. package/lib/createAutoMovieDeliveryAudioLog.js +110 -0
  58. package/lib/createAutoMovieDeliveryAudioLog.js.map +1 -0
  59. package/lib/createAutoMovieDeliveryAudioScan.d.ts +39 -0
  60. package/lib/createAutoMovieDeliveryAudioScan.js +125 -0
  61. package/lib/createAutoMovieDeliveryAudioScan.js.map +1 -0
  62. package/lib/createAutoMovieVerificationInputScope.d.ts +19 -0
  63. package/lib/createAutoMovieVerificationInputScope.js +147 -0
  64. package/lib/createAutoMovieVerificationInputScope.js.map +1 -0
  65. package/lib/createAutoMovieVerificationMediaHash.d.ts +5 -0
  66. package/lib/createAutoMovieVerificationMediaHash.js +61 -0
  67. package/lib/createAutoMovieVerificationMediaHash.js.map +1 -0
  68. package/lib/decodeAutoMovieDeliveryAudio.d.ts +24 -0
  69. package/lib/decodeAutoMovieDeliveryAudio.js +77 -0
  70. package/lib/decodeAutoMovieDeliveryAudio.js.map +1 -0
  71. package/lib/deriveAutoMovieProjectName.d.ts +14 -11
  72. package/lib/deriveAutoMovieProjectName.js +14 -11
  73. package/lib/deriveAutoMovieProjectName.js.map +1 -1
  74. package/lib/findAutoMovieFreePort.d.ts +5 -10
  75. package/lib/findAutoMovieFreePort.js +5 -10
  76. package/lib/findAutoMovieFreePort.js.map +1 -1
  77. package/lib/formatAutoMovieInspectUrl.d.ts +6 -10
  78. package/lib/formatAutoMovieInspectUrl.js +6 -10
  79. package/lib/formatAutoMovieInspectUrl.js.map +1 -1
  80. package/lib/hashAutoMovieFile.d.ts +5 -0
  81. package/lib/hashAutoMovieFile.js +16 -0
  82. package/lib/hashAutoMovieFile.js.map +1 -0
  83. package/lib/importAutoMovieVerificationEntry.d.mts +2 -0
  84. package/lib/importAutoMovieVerificationEntry.mjs +6 -0
  85. package/lib/importAutoMovieVerificationEntry.mjs.map +1 -0
  86. package/lib/index.d.ts +9 -0
  87. package/lib/index.js +9 -0
  88. package/lib/index.js.map +1 -1
  89. package/lib/inspectAutoMovie.d.ts +15 -9
  90. package/lib/inspectAutoMovie.js +25 -9
  91. package/lib/inspectAutoMovie.js.map +1 -1
  92. package/lib/inspectAutoMovieVerificationCapture.d.ts +15 -0
  93. package/lib/inspectAutoMovieVerificationCapture.js +221 -0
  94. package/lib/inspectAutoMovieVerificationCapture.js.map +1 -0
  95. package/lib/inspectAutoMovieVerificationDelivery.d.ts +13 -0
  96. package/lib/inspectAutoMovieVerificationDelivery.js +247 -0
  97. package/lib/inspectAutoMovieVerificationDelivery.js.map +1 -0
  98. package/lib/inspectAutoMovieVerificationReview.d.ts +11 -0
  99. package/lib/inspectAutoMovieVerificationReview.js +141 -0
  100. package/lib/inspectAutoMovieVerificationReview.js.map +1 -0
  101. package/lib/launchAutoMovieChromium.d.ts +9 -11
  102. package/lib/launchAutoMovieChromium.js +10 -11
  103. package/lib/launchAutoMovieChromium.js.map +1 -1
  104. package/lib/listAutoMovieReleaseFindings.d.ts +9 -0
  105. package/lib/listAutoMovieReleaseFindings.js +58 -0
  106. package/lib/listAutoMovieReleaseFindings.js.map +1 -0
  107. package/lib/loadAutoMovieProductionModule.d.ts +11 -10
  108. package/lib/loadAutoMovieProductionModule.js +18 -10
  109. package/lib/loadAutoMovieProductionModule.js.map +1 -1
  110. package/lib/loadAutoMovieVerificationModule.d.ts +6 -0
  111. package/lib/loadAutoMovieVerificationModule.js +246 -0
  112. package/lib/loadAutoMovieVerificationModule.js.map +1 -0
  113. package/lib/planAutoMovieChromiumLaunch.d.ts +7 -13
  114. package/lib/planAutoMovieChromiumLaunch.js +7 -13
  115. package/lib/planAutoMovieChromiumLaunch.js.map +1 -1
  116. package/lib/planAutoMovieDeliveryAudioDecode.d.ts +10 -0
  117. package/lib/planAutoMovieDeliveryAudioDecode.js +29 -0
  118. package/lib/planAutoMovieDeliveryAudioDecode.js.map +1 -0
  119. package/lib/planAutoMovieDeliveryDecode.d.ts +19 -0
  120. package/lib/planAutoMovieDeliveryDecode.js +57 -0
  121. package/lib/planAutoMovieDeliveryDecode.js.map +1 -0
  122. package/lib/planAutoMovieDeliveryInput.d.ts +11 -0
  123. package/lib/planAutoMovieDeliveryInput.js +26 -0
  124. package/lib/planAutoMovieDeliveryInput.js.map +1 -0
  125. package/lib/planAutoMovieModulePageViteConfig.d.ts +13 -10
  126. package/lib/planAutoMovieModulePageViteConfig.js +13 -10
  127. package/lib/planAutoMovieModulePageViteConfig.js.map +1 -1
  128. package/lib/promptAutoMovieProjectName.d.ts +6 -10
  129. package/lib/promptAutoMovieProjectName.js +6 -10
  130. package/lib/promptAutoMovieProjectName.js.map +1 -1
  131. package/lib/publishAutoMovieRenderAttempt.d.ts +32 -0
  132. package/lib/publishAutoMovieRenderAttempt.js +91 -0
  133. package/lib/publishAutoMovieRenderAttempt.js.map +1 -0
  134. package/lib/readAutoMovieAddArguments.d.ts +10 -11
  135. package/lib/readAutoMovieAddArguments.js +10 -11
  136. package/lib/readAutoMovieAddArguments.js.map +1 -1
  137. package/lib/readAutoMovieCaptureHostOptions.d.ts +19 -17
  138. package/lib/readAutoMovieCaptureHostOptions.js +16 -17
  139. package/lib/readAutoMovieCaptureHostOptions.js.map +1 -1
  140. package/lib/readAutoMovieCommandArguments.d.ts +6 -9
  141. package/lib/readAutoMovieCommandArguments.js +9 -10
  142. package/lib/readAutoMovieCommandArguments.js.map +1 -1
  143. package/lib/readAutoMovieCreateArguments.d.ts +7 -11
  144. package/lib/readAutoMovieCreateArguments.js +7 -11
  145. package/lib/readAutoMovieCreateArguments.js.map +1 -1
  146. package/lib/readAutoMovieDeliveryAudioTrack.d.ts +21 -0
  147. package/lib/readAutoMovieDeliveryAudioTrack.js +104 -0
  148. package/lib/readAutoMovieDeliveryAudioTrack.js.map +1 -0
  149. package/lib/readAutoMovieDeliveryDecode.d.ts +19 -0
  150. package/lib/readAutoMovieDeliveryDecode.js +209 -0
  151. package/lib/readAutoMovieDeliveryDecode.js.map +1 -0
  152. package/lib/readAutoMovieDeliveryProbe.d.ts +35 -0
  153. package/lib/readAutoMovieDeliveryProbe.js +363 -0
  154. package/lib/readAutoMovieDeliveryProbe.js.map +1 -0
  155. package/lib/readAutoMovieErrorCode.d.ts +9 -0
  156. package/lib/readAutoMovieErrorCode.js +18 -0
  157. package/lib/readAutoMovieErrorCode.js.map +1 -0
  158. package/lib/readAutoMovieInspectHostOptions.d.ts +15 -16
  159. package/lib/readAutoMovieInspectHostOptions.js +11 -15
  160. package/lib/readAutoMovieInspectHostOptions.js.map +1 -1
  161. package/lib/readAutoMovieNameOption.d.ts +4 -10
  162. package/lib/readAutoMovieNameOption.js +4 -10
  163. package/lib/readAutoMovieNameOption.js.map +1 -1
  164. package/lib/readAutoMoviePageTimeout.d.ts +13 -0
  165. package/lib/readAutoMoviePageTimeout.js +21 -0
  166. package/lib/readAutoMoviePageTimeout.js.map +1 -0
  167. package/lib/readAutoMovieRenderOptions.d.ts +24 -16
  168. package/lib/readAutoMovieRenderOptions.js +23 -16
  169. package/lib/readAutoMovieRenderOptions.js.map +1 -1
  170. package/lib/readAutoMovieReviewObservation.d.ts +6 -0
  171. package/lib/readAutoMovieReviewObservation.js +108 -0
  172. package/lib/readAutoMovieReviewObservation.js.map +1 -0
  173. package/lib/readAutoMovieReviewOptions.d.ts +32 -24
  174. package/lib/readAutoMovieReviewOptions.js +82 -18
  175. package/lib/readAutoMovieReviewOptions.js.map +1 -1
  176. package/lib/readAutoMovieRevision.d.ts +3 -9
  177. package/lib/readAutoMovieRevision.js +3 -9
  178. package/lib/readAutoMovieRevision.js.map +1 -1
  179. package/lib/readAutoMovieVerifyOptions.d.ts +17 -0
  180. package/lib/readAutoMovieVerifyOptions.js +45 -0
  181. package/lib/readAutoMovieVerifyOptions.js.map +1 -0
  182. package/lib/readAutoMovieVideoProbe.d.ts +6 -10
  183. package/lib/readAutoMovieVideoProbe.js +20 -13
  184. package/lib/readAutoMovieVideoProbe.js.map +1 -1
  185. package/lib/recordAutoMoviePlayback.d.ts +18 -11
  186. package/lib/recordAutoMoviePlayback.js +26 -13
  187. package/lib/recordAutoMoviePlayback.js.map +1 -1
  188. package/lib/renderAutoMovie.d.ts +16 -10
  189. package/lib/renderAutoMovie.js +31 -14
  190. package/lib/renderAutoMovie.js.map +1 -1
  191. package/lib/renderAutoMovieScaffoldNextSteps.d.ts +10 -10
  192. package/lib/renderAutoMovieScaffoldNextSteps.js +10 -10
  193. package/lib/renderAutoMovieVideo.d.ts +53 -15
  194. package/lib/renderAutoMovieVideo.js +290 -45
  195. package/lib/renderAutoMovieVideo.js.map +1 -1
  196. package/lib/resolveAutoMovieFfmpeg.d.ts +12 -15
  197. package/lib/resolveAutoMovieFfmpeg.js +12 -17
  198. package/lib/resolveAutoMovieFfmpeg.js.map +1 -1
  199. package/lib/reviewAutoMovie.d.ts +10 -10
  200. package/lib/reviewAutoMovie.js +15 -10
  201. package/lib/reviewAutoMovie.js.map +1 -1
  202. package/lib/reviewAutoMovieFile.d.ts +21 -0
  203. package/lib/reviewAutoMovieFile.js +378 -0
  204. package/lib/reviewAutoMovieFile.js.map +1 -0
  205. package/lib/run.d.ts +32 -18
  206. package/lib/run.js +67 -23
  207. package/lib/run.js.map +1 -1
  208. package/lib/runAutoMovieDeliveryAudioDecode.d.ts +18 -0
  209. package/lib/runAutoMovieDeliveryAudioDecode.js +28 -0
  210. package/lib/runAutoMovieDeliveryAudioDecode.js.map +1 -0
  211. package/lib/runAutoMovieDeliveryDecode.d.ts +19 -0
  212. package/lib/runAutoMovieDeliveryDecode.js +42 -0
  213. package/lib/runAutoMovieDeliveryDecode.js.map +1 -0
  214. package/lib/runAutoMovieDeliveryReferenceDecode.d.ts +28 -0
  215. package/lib/runAutoMovieDeliveryReferenceDecode.js +77 -0
  216. package/lib/runAutoMovieDeliveryReferenceDecode.js.map +1 -0
  217. package/lib/runAutoMovieDeliverySourceAudioDecode.d.ts +20 -0
  218. package/lib/runAutoMovieDeliverySourceAudioDecode.js +56 -0
  219. package/lib/runAutoMovieDeliverySourceAudioDecode.js.map +1 -0
  220. package/lib/runAutoMovieFfmpeg.d.ts +15 -10
  221. package/lib/runAutoMovieFfmpeg.js +36 -13
  222. package/lib/runAutoMovieFfmpeg.js.map +1 -1
  223. package/lib/runAutoMovieVerification.d.ts +28 -0
  224. package/lib/runAutoMovieVerification.js +393 -0
  225. package/lib/runAutoMovieVerification.js.map +1 -0
  226. package/lib/sameAutoMovieReviewFile.d.ts +2 -0
  227. package/lib/sameAutoMovieReviewFile.js +57 -0
  228. package/lib/sameAutoMovieReviewFile.js.map +1 -0
  229. package/lib/selectAutoMovieProjectName.d.ts +8 -11
  230. package/lib/selectAutoMovieProjectName.js +8 -11
  231. package/lib/selectAutoMovieProjectName.js.map +1 -1
  232. package/lib/serveAutoMovieDrawPage.d.ts +14 -11
  233. package/lib/serveAutoMovieDrawPage.js +14 -11
  234. package/lib/serveAutoMovieDrawPage.js.map +1 -1
  235. package/lib/serveAutoMovieInspectorPage.d.ts +4 -8
  236. package/lib/serveAutoMovieInspectorPage.js +3 -9
  237. package/lib/serveAutoMovieInspectorPage.js.map +1 -1
  238. package/lib/verifyAutoMovie.d.ts +19 -0
  239. package/lib/verifyAutoMovie.js +44 -0
  240. package/lib/verifyAutoMovie.js.map +1 -0
  241. package/lib/writeAutoMovieModulePage.d.ts +17 -12
  242. package/lib/writeAutoMovieModulePage.js +13 -11
  243. package/lib/writeAutoMovieModulePage.js.map +1 -1
  244. package/lib/writeAutoMovieVerificationReceipt.d.ts +2 -0
  245. package/lib/writeAutoMovieVerificationReceipt.js +75 -0
  246. package/lib/writeAutoMovieVerificationReceipt.js.map +1 -0
  247. package/package.json +8 -8
  248. package/src/AUTOMOVIE_CAPTURE_OPTIONS.ts +6 -2
  249. package/src/AUTOMOVIE_DEFAULT_PROJECT_NAME.ts +3 -1
  250. package/src/AUTOMOVIE_INSPECT_OPTIONS.ts +5 -2
  251. package/src/AUTOMOVIE_RENDER_OPTIONS.ts +8 -2
  252. package/src/AUTOMOVIE_REVIEW_OPTIONS.ts +12 -1
  253. package/src/AutoMovieCaptureBackend.ts +4 -6
  254. package/src/AutoMovieCaptureHost.ts +122 -68
  255. package/src/AutoMovieCommand.ts +71 -20
  256. package/src/AutoMovieFfmpegStaticPath.ts +7 -0
  257. package/src/AutoMovieMp4Boxes.ts +263 -0
  258. package/src/AutoMovieRenderOutputReservation.ts +97 -0
  259. package/src/IAutoMovieChromium.ts +13 -57
  260. package/src/IAutoMovieDeliveryAudioTrack.ts +19 -0
  261. package/src/IAutoMovieDeliveryProfileFinding.ts +24 -0
  262. package/src/IAutoMovieFfmpegSources.ts +13 -0
  263. package/src/IAutoMovieReviewObservation.ts +59 -0
  264. package/src/IAutoMovieVerification.ts +207 -0
  265. package/src/auditAutoMovieAlphaSamples.ts +201 -0
  266. package/src/auditAutoMovieDeliveryProfile.ts +125 -0
  267. package/src/captureAutoMovie.ts +137 -28
  268. package/src/createAutoMovieDeliveryAudioLog.ts +141 -0
  269. package/src/createAutoMovieDeliveryAudioScan.ts +150 -0
  270. package/src/createAutoMovieVerificationInputScope.ts +156 -0
  271. package/src/createAutoMovieVerificationMediaHash.ts +32 -0
  272. package/src/decodeAutoMovieDeliveryAudio.ts +95 -0
  273. package/src/deriveAutoMovieProjectName.ts +14 -11
  274. package/src/findAutoMovieFreePort.ts +5 -10
  275. package/src/formatAutoMovieInspectUrl.ts +6 -10
  276. package/src/hashAutoMovieFile.ts +12 -0
  277. package/src/importAutoMovieVerificationEntry.mts +6 -0
  278. package/src/index.ts +9 -0
  279. package/src/inspectAutoMovie.ts +28 -11
  280. package/src/inspectAutoMovieVerificationCapture.ts +292 -0
  281. package/src/inspectAutoMovieVerificationDelivery.ts +301 -0
  282. package/src/inspectAutoMovieVerificationReview.ts +130 -0
  283. package/src/launchAutoMovieChromium.ts +14 -12
  284. package/src/listAutoMovieReleaseFindings.ts +87 -0
  285. package/src/loadAutoMovieProductionModule.ts +22 -15
  286. package/src/loadAutoMovieVerificationModule.ts +278 -0
  287. package/src/planAutoMovieChromiumLaunch.ts +7 -13
  288. package/src/planAutoMovieDeliveryAudioDecode.ts +26 -0
  289. package/src/planAutoMovieDeliveryDecode.ts +66 -0
  290. package/src/planAutoMovieDeliveryInput.ts +25 -0
  291. package/src/planAutoMovieModulePageViteConfig.ts +13 -10
  292. package/src/promptAutoMovieProjectName.ts +6 -10
  293. package/src/publishAutoMovieRenderAttempt.ts +89 -0
  294. package/src/readAutoMovieAddArguments.ts +10 -11
  295. package/src/readAutoMovieCaptureHostOptions.ts +22 -17
  296. package/src/readAutoMovieCommandArguments.ts +8 -10
  297. package/src/readAutoMovieCreateArguments.ts +7 -11
  298. package/src/readAutoMovieDeliveryAudioTrack.ts +137 -0
  299. package/src/readAutoMovieDeliveryDecode.ts +269 -0
  300. package/src/readAutoMovieDeliveryProbe.ts +499 -0
  301. package/src/readAutoMovieErrorCode.ts +13 -0
  302. package/src/readAutoMovieInspectHostOptions.ts +15 -16
  303. package/src/readAutoMovieNameOption.ts +4 -10
  304. package/src/readAutoMoviePageTimeout.ts +19 -0
  305. package/src/readAutoMovieRenderOptions.ts +34 -16
  306. package/src/readAutoMovieReviewObservation.ts +146 -0
  307. package/src/readAutoMovieReviewOptions.ts +133 -28
  308. package/src/readAutoMovieRevision.ts +3 -9
  309. package/src/readAutoMovieVerifyOptions.ts +50 -0
  310. package/src/readAutoMovieVideoProbe.ts +24 -13
  311. package/src/recordAutoMoviePlayback.ts +26 -13
  312. package/src/renderAutoMovie.ts +38 -17
  313. package/src/renderAutoMovieScaffoldNextSteps.ts +10 -10
  314. package/src/renderAutoMovieVideo.ts +474 -85
  315. package/src/resolveAutoMovieFfmpeg.ts +17 -24
  316. package/src/reviewAutoMovie.ts +21 -16
  317. package/src/reviewAutoMovieFile.ts +479 -0
  318. package/src/run.ts +75 -25
  319. package/src/runAutoMovieDeliveryAudioDecode.ts +45 -0
  320. package/src/runAutoMovieDeliveryDecode.ts +63 -0
  321. package/src/runAutoMovieDeliveryReferenceDecode.ts +107 -0
  322. package/src/runAutoMovieDeliverySourceAudioDecode.ts +71 -0
  323. package/src/runAutoMovieFfmpeg.ts +48 -14
  324. package/src/runAutoMovieVerification.ts +487 -0
  325. package/src/sameAutoMovieReviewFile.ts +23 -0
  326. package/src/selectAutoMovieProjectName.ts +8 -11
  327. package/src/serveAutoMovieDrawPage.ts +16 -12
  328. package/src/serveAutoMovieInspectorPage.ts +6 -9
  329. package/src/verifyAutoMovie.ts +67 -0
  330. package/src/writeAutoMovieModulePage.ts +17 -12
  331. package/src/writeAutoMovieVerificationReceipt.ts +51 -0
@@ -1,18 +1,18 @@
1
1
  /**
2
- * Explain the work between a freshly written installation and a runnable production.
2
+ * Explain the work between a freshly written installation and a runnable
3
+ * production.
3
4
  *
4
- * `directory` is printed as given (`run` passes the absolute target). The text starts with a blank line because `run` appends it to the written-file list. A `production` is a single production in its own pnpm repository; a `workspace` is a pnpm workspace root that still needs its first production; a `workspace-production` is a production added to such a root. The steps name the generated `README.md`, `AGENTS.md`, the `lint` and `evidence` scripts and the workspace's `add` command, so they must change with the scaffold's first-run README sections.
5
+ * `directory` is printed as given (`run` passes the absolute target). The text
6
+ * starts with a blank line because `run` appends it to the written-file list. A
7
+ * `production` is a single production in its own pnpm repository; a `workspace`
8
+ * is a pnpm workspace root that still needs its first production; a
9
+ * `workspace-production` is a production added to such a root. The steps name
10
+ * the generated `README.md`, `AGENTS.md`, the `lint` and `evidence` scripts and
11
+ * the workspace's `add` command, so they must change with the scaffold's
12
+ * first-run README sections.
5
13
  *
6
14
  * @param directory The installed directory.
7
15
  * @param kind Which installation was written.
8
16
  * @returns The closing text.
9
- *
10
- * @evidence contracts/development/implementation.md#principled-implementation The steps are fixed text derived from each layer's first-run contract: the production README's pnpm install and checks, and the workspace README's pnpm install and add.
11
- * @evidence contracts/development/implementation.md#clear-and-simple-structure One pure function returns the text for every installation kind and leaves writing to `run`, so the message has a single owner and no terminal effect.
12
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The text names no fixture or particular directory and is not altered by any caller; a closed union selects the variant.
13
- * @evidence contracts/development/common.md#meaningful-documentation The comment states how `directory` is printed, why the text opens with a blank line, what each kind means and what must change with the scaffold.
14
- * @evidence contracts/development/implementation.md#efficient-algorithms One concatenation of constant lines with one interpolation, linear in the directory's length.
15
- * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work `run` calls this once per successful installation.
16
- * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources The function returns a new string and holds no state, handle, or task after it returns.
17
17
  */
18
18
  export declare function renderAutoMovieScaffoldNextSteps(directory: string, kind: "production" | "workspace" | "workspace-production"): string;
@@ -2,21 +2,21 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.renderAutoMovieScaffoldNextSteps = renderAutoMovieScaffoldNextSteps;
4
4
  /**
5
- * Explain the work between a freshly written installation and a runnable production.
5
+ * Explain the work between a freshly written installation and a runnable
6
+ * production.
6
7
  *
7
- * `directory` is printed as given (`run` passes the absolute target). The text starts with a blank line because `run` appends it to the written-file list. A `production` is a single production in its own pnpm repository; a `workspace` is a pnpm workspace root that still needs its first production; a `workspace-production` is a production added to such a root. The steps name the generated `README.md`, `AGENTS.md`, the `lint` and `evidence` scripts and the workspace's `add` command, so they must change with the scaffold's first-run README sections.
8
+ * `directory` is printed as given (`run` passes the absolute target). The text
9
+ * starts with a blank line because `run` appends it to the written-file list. A
10
+ * `production` is a single production in its own pnpm repository; a `workspace`
11
+ * is a pnpm workspace root that still needs its first production; a
12
+ * `workspace-production` is a production added to such a root. The steps name
13
+ * the generated `README.md`, `AGENTS.md`, the `lint` and `evidence` scripts and
14
+ * the workspace's `add` command, so they must change with the scaffold's
15
+ * first-run README sections.
8
16
  *
9
17
  * @param directory The installed directory.
10
18
  * @param kind Which installation was written.
11
19
  * @returns The closing text.
12
- *
13
- * @evidence contracts/development/implementation.md#principled-implementation The steps are fixed text derived from each layer's first-run contract: the production README's pnpm install and checks, and the workspace README's pnpm install and add.
14
- * @evidence contracts/development/implementation.md#clear-and-simple-structure One pure function returns the text for every installation kind and leaves writing to `run`, so the message has a single owner and no terminal effect.
15
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The text names no fixture or particular directory and is not altered by any caller; a closed union selects the variant.
16
- * @evidence contracts/development/common.md#meaningful-documentation The comment states how `directory` is printed, why the text opens with a blank line, what each kind means and what must change with the scaffold.
17
- * @evidence contracts/development/implementation.md#efficient-algorithms One concatenation of constant lines with one interpolation, linear in the directory's length.
18
- * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work `run` calls this once per successful installation.
19
- * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources The function returns a new string and holds no state, handle, or task after it returns.
20
20
  */
21
21
  function renderAutoMovieScaffoldNextSteps(directory, kind) {
22
22
  if (kind === "workspace")
@@ -1,35 +1,73 @@
1
+ import type * as Render from "@automovie/render";
1
2
  import type { AutoMovieCaptureHost } from "./AutoMovieCaptureHost";
3
+ import { runAutoMovieFfmpeg } from "./runAutoMovieFfmpeg";
4
+ /** The render operations this host needs from a production's draw session. */
5
+ interface IDeliveryHost {
6
+ render: Pick<typeof Render, "renderAutoMovieDrawnVideo" | "auditAutoMovieDeliveryContent" | "createAutoMovieLoudnessMeter" | "AUTOMOVIE_MP4_SRGB_COLOUR" | "assertProductionAacProfile" | "assertProductionVideoProfile" | "resolveProductionVideoProfile">;
7
+ session(props: Parameters<AutoMovieCaptureHost["session"]>[0]): Promise<Pick<Render.AutoMovieDrawSession, "backend" | "close" | "frame" | "speak" | "subject">>;
8
+ }
2
9
  /**
3
- * Render one subject of a host's draw page into `<out>/film.mp4`, with `render-report.json` beside it.
10
+ * Renders one subject and publishes an approved film beside its shared report.
11
+ * Every measurable audit runs on the drawn frames or the exact staged encoded
12
+ * bytes. The decoded audio's integrated loudness and true peak, measured by the
13
+ * production render's BS.1770-5 meter, must meet the targets the sound-list mix
14
+ * applied or, for a supplied soundtrack, the declared loudness intent, and a
15
+ * phoneme-driven line whose lip-sync lag, measured against the mouth the
16
+ * subject read on each drawn frame, fails the report's verdict blocks. The
17
+ * encoded file must also carry its declared picture profile and, with a
18
+ * soundtrack, the AAC profile, or no audio track without one
19
+ * (`auditAutoMovieDeliveryProfile`); a mismatch blocks like a blocking audit
20
+ * finding and the report's `profile` records each field with its expected and
21
+ * observed values. A blocked attempt replaces the report and preserves the
22
+ * former film. A failed encode still reports the frames and scene inspection
23
+ * already drawn. If the approved film or its report cannot be installed, the
24
+ * former film is put back, so the film and report on disk always come from the
25
+ * same attempt.
4
26
  *
5
- * The subject is opened through the host's draw session, every frame of its clock is drawn by `renderAutoMovieDrawnVideo` into a scratch folder under `<root>/.cache/render/`, and FFmpeg encodes them into a partial file that is renamed to `film.mp4` only once it is complete, so a failed render leaves no file that looks finished. The report names the subject, the source revision, the backend, the encoder's arguments and every frame's second and pixel hash. The scratch folder is deleted and the session closed on every outcome.
27
+ * With `passes`, every frame is also drawn in those guide passes and written
28
+ * under `<out>/controls/` with `record.json`, whose `filmSha256` is the
29
+ * report's `source.sha256`; the folder is staged and installed in the same
30
+ * publish step as the film, so a blocked or failed attempt keeps the former
31
+ * `controls/` with the former film.
6
32
  *
7
- * @evidence contracts/development/common.md#meaningful-documentation States what is written where, how a failure leaves the output, what the report holds, and what is released.
8
- * @evidence contracts/development/implementation.md#principled-implementation Drawing and encoding are the render package's; this host supplies the session, files and FFmpeg, so a delivered frame is drawn by the same function as a capture's still.
9
- * @evidence contracts/development/implementation.md#clear-and-simple-structure Open, draw and encode, rename, report, release.
10
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The output is replaced only by a complete encode; no frame is reused from an earlier render.
11
- * @evidence contracts/development/implementation.md#efficient-algorithms One draw and one PNG file per frame, then one FFmpeg run.
12
- * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work Each render draws afresh.
13
- * @evidence contracts/development/implementation.md#bound-retention-and-release-resources The frame files live in the scratch folder until the encode ends, then are deleted with it; the session's page is closed on every outcome.
33
+ * With `background` `transparent`, the beauty pass is drawn over a transparent
34
+ * background and its straight-alpha PNG files are wrapped unencoded into
35
+ * `film.mov` in `media/automovie/<film>/transparent` by default, so a layer
36
+ * attempt never replaces the film's report. The layer carries no audio: the
37
+ * film's required soundtrack is not expected, none is passed to the wrap and
38
+ * the report's `layer` says so. The black check, which reads a transparent
39
+ * frame as black, does not block; the profile check is replaced by
40
+ * `auditAutoMovieAlphaSamples`, which requires one sample per drawn frame with
41
+ * the frame file's bytes.
14
42
  */
15
43
  export declare function renderAutoMovieVideo(props: {
16
44
  /** The opened draw host. */
17
- host: AutoMovieCaptureHost;
45
+ host: IDeliveryHost;
18
46
  /** The production's root folder. */
19
47
  root: string;
20
48
  /** The subject's name, or null for the page's only subject. */
21
49
  subject: string | null;
22
50
  /** Data the subject module reads, as JSON, or null. */
23
51
  props: unknown;
24
- /** Output folder, relative to the root or absolute; absent, `media/automovie/<subject>/videos`. */
52
+ /** Output folder, relative to the root or absolute. */
25
53
  out?: string;
26
54
  /** FFmpeg executable. */
27
55
  ffmpeg: string;
28
- }): Promise<{
29
- /** The video written. */
56
+ /**
57
+ * Guide passes other than `beauty` drawn at every frame into
58
+ * `<out>/controls/`; absent or empty draws the film alone.
59
+ */
60
+ passes?: readonly string[];
61
+ /**
62
+ * `transparent` renders a straight-alpha layer as `film.mov` with no audio,
63
+ * into `media/automovie/<film>/transparent` by default; absent or `scene`
64
+ * renders the film.
65
+ */
66
+ background?: "scene" | "transparent";
67
+ }, run?: typeof runAutoMovieFfmpeg): Promise<{
30
68
  video: string;
31
- /** The report written beside it. */
32
69
  report: string;
33
- /** Frames drawn. */
34
70
  frames: number;
71
+ controls: string | null;
35
72
  }>;
73
+ export {};
@@ -34,13 +34,20 @@ var __importStar = (this && this.__importStar) || (function () {
34
34
  })();
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
36
  exports.renderAutoMovieVideo = renderAutoMovieVideo;
37
+ const node_crypto_1 = require("node:crypto");
38
+ const node_fs_1 = require("node:fs");
37
39
  const fs = __importStar(require("node:fs/promises"));
38
40
  const path = __importStar(require("node:path"));
41
+ const AutoMovieRenderOutputReservation_1 = require("./AutoMovieRenderOutputReservation");
42
+ const auditAutoMovieAlphaSamples_1 = require("./auditAutoMovieAlphaSamples");
43
+ const auditAutoMovieDeliveryProfile_1 = require("./auditAutoMovieDeliveryProfile");
44
+ const listAutoMovieReleaseFindings_1 = require("./listAutoMovieReleaseFindings");
45
+ const publishAutoMovieRenderAttempt_1 = require("./publishAutoMovieRenderAttempt");
39
46
  const readAutoMovieRevision_1 = require("./readAutoMovieRevision");
47
+ const runAutoMovieDeliveryDecode_1 = require("./runAutoMovieDeliveryDecode");
48
+ const runAutoMovieDeliveryReferenceDecode_1 = require("./runAutoMovieDeliveryReferenceDecode");
40
49
  const runAutoMovieFfmpeg_1 = require("./runAutoMovieFfmpeg");
41
- /**
42
- * The delivery encoding of a drawn subject: H.264 in yuv420p at CRF 18, without tone mapping, as the production's render used; the frame format is the subject's own clock and raster.
43
- */
50
+ /** Delivery encoding uses the drawn subject's own clock and raster. */
44
51
  const SPEC = {
45
52
  target: "production",
46
53
  toneMapping: "none",
@@ -49,62 +56,300 @@ const SPEC = {
49
56
  crf: 18,
50
57
  };
51
58
  /**
52
- * Render one subject of a host's draw page into `<out>/film.mp4`, with `render-report.json` beside it.
59
+ * Defaults measure long enough intervals to distinguish them from a transient
60
+ * frame or sample.
61
+ */
62
+ const THRESHOLDS = {
63
+ black: {
64
+ minimumDuration: { ticks: 1, timeBase: [1, 5] },
65
+ minimumPictureRatio: 0.98,
66
+ maximumPixelThreshold: 0.1,
67
+ },
68
+ frozen: {
69
+ minimumDuration: { ticks: 1, timeBase: [1, 2] },
70
+ maximumMeanDifference: 0.001,
71
+ },
72
+ silence: {
73
+ minimumDuration: { ticks: 1, timeBase: [1, 2] },
74
+ maximumAmplitude: 0.001,
75
+ },
76
+ };
77
+ /**
78
+ * Renders one subject and publishes an approved film beside its shared report.
79
+ * Every measurable audit runs on the drawn frames or the exact staged encoded
80
+ * bytes. The decoded audio's integrated loudness and true peak, measured by the
81
+ * production render's BS.1770-5 meter, must meet the targets the sound-list mix
82
+ * applied or, for a supplied soundtrack, the declared loudness intent, and a
83
+ * phoneme-driven line whose lip-sync lag, measured against the mouth the
84
+ * subject read on each drawn frame, fails the report's verdict blocks. The
85
+ * encoded file must also carry its declared picture profile and, with a
86
+ * soundtrack, the AAC profile, or no audio track without one
87
+ * (`auditAutoMovieDeliveryProfile`); a mismatch blocks like a blocking audit
88
+ * finding and the report's `profile` records each field with its expected and
89
+ * observed values. A blocked attempt replaces the report and preserves the
90
+ * former film. A failed encode still reports the frames and scene inspection
91
+ * already drawn. If the approved film or its report cannot be installed, the
92
+ * former film is put back, so the film and report on disk always come from the
93
+ * same attempt.
53
94
  *
54
- * The subject is opened through the host's draw session, every frame of its clock is drawn by `renderAutoMovieDrawnVideo` into a scratch folder under `<root>/.cache/render/`, and FFmpeg encodes them into a partial file that is renamed to `film.mp4` only once it is complete, so a failed render leaves no file that looks finished. The report names the subject, the source revision, the backend, the encoder's arguments and every frame's second and pixel hash. The scratch folder is deleted and the session closed on every outcome.
95
+ * With `passes`, every frame is also drawn in those guide passes and written
96
+ * under `<out>/controls/` with `record.json`, whose `filmSha256` is the
97
+ * report's `source.sha256`; the folder is staged and installed in the same
98
+ * publish step as the film, so a blocked or failed attempt keeps the former
99
+ * `controls/` with the former film.
55
100
  *
56
- * @evidence contracts/development/common.md#meaningful-documentation States what is written where, how a failure leaves the output, what the report holds, and what is released.
57
- * @evidence contracts/development/implementation.md#principled-implementation Drawing and encoding are the render package's; this host supplies the session, files and FFmpeg, so a delivered frame is drawn by the same function as a capture's still.
58
- * @evidence contracts/development/implementation.md#clear-and-simple-structure Open, draw and encode, rename, report, release.
59
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The output is replaced only by a complete encode; no frame is reused from an earlier render.
60
- * @evidence contracts/development/implementation.md#efficient-algorithms One draw and one PNG file per frame, then one FFmpeg run.
61
- * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work Each render draws afresh.
62
- * @evidence contracts/development/implementation.md#bound-retention-and-release-resources The frame files live in the scratch folder until the encode ends, then are deleted with it; the session's page is closed on every outcome.
101
+ * With `background` `transparent`, the beauty pass is drawn over a transparent
102
+ * background and its straight-alpha PNG files are wrapped unencoded into
103
+ * `film.mov` in `media/automovie/<film>/transparent` by default, so a layer
104
+ * attempt never replaces the film's report. The layer carries no audio: the
105
+ * film's required soundtrack is not expected, none is passed to the wrap and
106
+ * the report's `layer` says so. The black check, which reads a transparent
107
+ * frame as black, does not block; the profile check is replaced by
108
+ * `auditAutoMovieAlphaSamples`, which requires one sample per drawn frame with
109
+ * the frame file's bytes.
63
110
  */
64
- async function renderAutoMovieVideo(props) {
111
+ async function renderAutoMovieVideo(props, run = runAutoMovieFfmpeg_1.runAutoMovieFfmpeg) {
65
112
  const session = await props.host.session({
66
113
  subject: props.subject,
67
114
  props: props.props,
68
115
  });
69
- const name = session.subject.name;
70
- const out = path.resolve(props.root, props.out ?? path.join("media", "automovie", name, "videos"));
71
- const scratch = path.join(props.root, ".cache", "render", `${name}-${process.pid}-${Date.now()}`);
72
- const partial = path.join(out, `.film-${process.pid}.mp4`);
116
+ const { name, delivery: intent } = session.subject;
117
+ // A transparent layer has its own folder, so its attempts never replace the
118
+ // report of the film in `videos/`.
119
+ const transparent = props.background === "transparent";
120
+ const file = transparent ? "film.mov" : "film.mp4";
121
+ const out = path.resolve(props.root, props.out ??
122
+ path.join("media", "automovie", name, transparent ? "transparent" : "videos"));
123
+ const video = path.join(out, file);
124
+ const report = path.join(out, "render-report.json");
125
+ const reservation = path.join(out, ".render-publish");
126
+ let reservationTicket;
127
+ let staging;
128
+ let scratch;
73
129
  try {
74
- await fs.mkdir(scratch, { recursive: true });
75
130
  await fs.mkdir(out, { recursive: true });
76
- const result = await props.host.render.renderAutoMovieDrawnVideo({
77
- session,
78
- spec: SPEC,
79
- frameDir: scratch.split(path.sep).join("/"),
80
- outputPath: partial,
81
- audio: null,
82
- write: (file, data) => fs.writeFile(file, data),
83
- encode: async (args) => {
84
- await (0, runAutoMovieFfmpeg_1.runAutoMovieFfmpeg)(props.ffmpeg, args);
85
- },
86
- });
87
- const video = path.join(out, "film.mp4");
88
- await fs.rename(partial, video);
89
- const report = path.join(out, "render-report.json");
90
- await fs.writeFile(report, JSON.stringify({
131
+ staging = await fs.mkdtemp(path.join(out, ".render-"));
132
+ reservationTicket = await AutoMovieRenderOutputReservation_1.AutoMovieRenderOutputReservation.reserve(staging, reservation, out);
133
+ const candidate = path.join(staging, file);
134
+ const pendingReport = path.join(staging, "render-report.json");
135
+ const attempt = {
91
136
  subject: name,
92
137
  revision: (0, readAutoMovieRevision_1.readAutoMovieRevision)(props.root),
93
138
  backend: session.backend,
94
- video: "film.mp4",
95
- args: result.args,
96
- frames: result.frames.map((frame) => ({
97
- index: frame.index,
98
- seconds: frame.seconds,
99
- hash: frame.hash,
100
- })),
101
- }, null, 2));
102
- return { video, report, frames: result.frames.length };
139
+ status: "failed",
140
+ video: null,
141
+ args: [],
142
+ frames: [],
143
+ diagnostics: null,
144
+ sound: null,
145
+ delivery: null,
146
+ profile: null,
147
+ source: null,
148
+ ...(transparent
149
+ ? {
150
+ layer: {
151
+ background: "transparent",
152
+ audio: "none",
153
+ },
154
+ }
155
+ : {}),
156
+ };
157
+ const writeReport = async () => fs.writeFile(pendingReport, JSON.stringify(attempt, null, 2) + "\n");
158
+ let phase = "draw";
159
+ const soundtrack = transparent
160
+ ? null
161
+ : (intent?.audio?.path ?? null);
162
+ try {
163
+ const frameRoot = path.join(props.root, ".cache", "render");
164
+ await fs.mkdir(frameRoot, { recursive: true });
165
+ scratch = await fs.mkdtemp(path.join(frameRoot, "frames-"));
166
+ // Control frames are staged beside the film and published with it,
167
+ // inside the output folder whose publish lock this attempt holds.
168
+ const controls = (props.passes ?? []).length === 0
169
+ ? null
170
+ : {
171
+ staged: path.join(staging, "controls"),
172
+ installed: path.join(out, "controls"),
173
+ };
174
+ if (controls !== null)
175
+ await fs.mkdir(controls.staged);
176
+ const result = await props.host.render.renderAutoMovieDrawnVideo({
177
+ session,
178
+ spec: SPEC,
179
+ frameDir: scratch.split(path.sep).join("/"),
180
+ outputPath: candidate,
181
+ ...(transparent ? { background: "transparent" } : {}),
182
+ ...(controls === null
183
+ ? {}
184
+ : {
185
+ controls: {
186
+ passes: props.passes ?? [],
187
+ frameDir: controls.staged.split(path.sep).join("/"),
188
+ },
189
+ }),
190
+ audio: soundtrack === null ? null : path.resolve(props.root, soundtrack),
191
+ write: (file, data) => fs.writeFile(file, data),
192
+ read: async (file) => fs.readFile(path.resolve(props.root, file)),
193
+ encode: async (args, drawn) => {
194
+ attempt.args = args;
195
+ // The soundtrack lives in the frame scratch, which is released, so
196
+ // the report names it by file name beside its digest.
197
+ attempt.sound =
198
+ drawn.sound === undefined
199
+ ? null
200
+ : { ...drawn.sound, file: path.posix.basename(drawn.sound.file) };
201
+ attempt.frames = drawn.frames.map(({ index, seconds, hash }) => ({
202
+ index,
203
+ seconds,
204
+ hash,
205
+ }));
206
+ attempt.diagnostics = drawn.diagnostics ?? null;
207
+ if (drawn.cut !== undefined)
208
+ attempt.cut = drawn.cut;
209
+ phase = "encode";
210
+ await run(props.ffmpeg, args);
211
+ },
212
+ });
213
+ phase = "audit";
214
+ const hash = (0, node_crypto_1.createHash)("sha256");
215
+ for await (const chunk of (0, node_fs_1.createReadStream)(candidate))
216
+ hash.update(chunk);
217
+ attempt.source = {
218
+ file: path.relative(out, candidate).split(path.sep).join("/"),
219
+ sha256: hash.digest("hex"),
220
+ };
221
+ // The decoded audio meets the targets the mix applied (the production's
222
+ // own or EBU R 128), or the production's own for a supplied soundtrack.
223
+ const loudness = attempt.sound?.loudness.intent ?? intent?.loudness ?? undefined;
224
+ const expected = {
225
+ frameCount: result.frames.length,
226
+ frameRate: result.frameRate,
227
+ audioRequired: transparent ? false : (intent?.audio?.required ?? false),
228
+ contentRequired: intent !== undefined,
229
+ ...(intent?.allowances === undefined
230
+ ? {}
231
+ : { allowances: intent.allowances }),
232
+ ...(loudness === undefined ? {} : { loudness }),
233
+ };
234
+ const thresholds = intent?.thresholds ?? THRESHOLDS;
235
+ const streams = await (0, runAutoMovieDeliveryDecode_1.runAutoMovieDeliveryDecode)(props.ffmpeg, candidate, expected, thresholds, run, props.host.render.createAutoMovieLoudnessMeter);
236
+ // The drawn frames and the soundtrack as the encoder read them, measured
237
+ // the same way, before the frame scratch is released.
238
+ const reference = await (0, runAutoMovieDeliveryReferenceDecode_1.runAutoMovieDeliveryReferenceDecode)(props.ffmpeg, attempt.args, expected, thresholds, run);
239
+ attempt.delivery = props.host.render.auditAutoMovieDeliveryContent({
240
+ source: attempt.source,
241
+ expected,
242
+ thresholds,
243
+ streams,
244
+ reference,
245
+ });
246
+ // The file must carry the picture and sound profiles its types declare;
247
+ // the encoder muxed a soundtrack exactly when it had a second input.
248
+ // A transparent layer instead holds each drawn PNG file as one sample.
249
+ attempt.profile = transparent
250
+ ? await (0, auditAutoMovieAlphaSamples_1.auditAutoMovieAlphaSamples)({
251
+ path: candidate,
252
+ frames: result.frames.map(({ file }) => file),
253
+ })
254
+ : await (0, auditAutoMovieDeliveryProfile_1.auditAutoMovieDeliveryProfile)({
255
+ render: props.host.render,
256
+ path: candidate,
257
+ width: session.subject.width,
258
+ height: session.subject.height,
259
+ frameRate: result.frameRate,
260
+ audio: attempt.args.indexOf("-i", attempt.args.indexOf("-i") + 2) >= 0,
261
+ });
262
+ const failures = [
263
+ ...(0, listAutoMovieReleaseFindings_1.listAutoMovieReleaseFindings)(attempt.diagnostics, attempt.delivery, transparent ? ["black"] : []),
264
+ ...attempt.profile.map((finding) => `unsupported-${finding.media}-profile.${finding.field}: expected ${finding.expected}, observed ${finding.observed}`),
265
+ // A phoneme-driven line whose sound and mouth part by more than the
266
+ // detectability window blocks; unmeasured and inconclusive lines are
267
+ // only reported.
268
+ ...(attempt.sound?.lipSync ?? []).flatMap((entry) => entry.status === "measured" && entry.verdict === "fail"
269
+ ? [
270
+ `lip-sync ${entry.line}: the sound is ${entry.lagMilliseconds.toFixed(1)} ms after the mouth, outside -45 to +125 ms`,
271
+ ]
272
+ : []),
273
+ ];
274
+ if (failures.length > 0) {
275
+ attempt.status = "blocked";
276
+ throw new Error(failures.join(" | "));
277
+ }
278
+ phase = "publish";
279
+ attempt.status = "published";
280
+ attempt.video = file;
281
+ await writeReport();
282
+ if (controls !== null)
283
+ await writeControlRecord(controls.staged, {
284
+ film: name,
285
+ revision: attempt.revision,
286
+ backend: attempt.backend,
287
+ clock: {
288
+ frameRate: result.frameRate,
289
+ frameCount: result.frames.length,
290
+ width: session.subject.width,
291
+ height: session.subject.height,
292
+ },
293
+ filmSha256: attempt.source.sha256,
294
+ channels: result.controls ?? [],
295
+ });
296
+ await (0, publishAutoMovieRenderAttempt_1.publishAutoMovieRenderAttempt)({
297
+ candidate,
298
+ video,
299
+ pendingReport,
300
+ report,
301
+ previous: path.join(staging, "previous-" + file),
302
+ ...(controls === null
303
+ ? {}
304
+ : {
305
+ controls: {
306
+ candidate: controls.staged,
307
+ installed: controls.installed,
308
+ previous: path.join(staging, "previous-controls"),
309
+ },
310
+ }),
311
+ });
312
+ return {
313
+ video,
314
+ report,
315
+ frames: result.frames.length,
316
+ controls: controls === null ? null : controls.installed,
317
+ };
318
+ }
319
+ catch (cause) {
320
+ attempt.video = null;
321
+ if (attempt.status !== "blocked")
322
+ attempt.status = "failed";
323
+ const message = cause instanceof Error ? cause.message : String(cause);
324
+ attempt.failure = { phase, message };
325
+ try {
326
+ await writeReport();
327
+ await fs.rename(pendingReport, report);
328
+ }
329
+ catch (reportFailure) {
330
+ throw new AggregateError([cause, reportFailure], "Render failed and could not publish " + report + ": " + message);
331
+ }
332
+ throw new Error("Render " + attempt.status + ": " + message + "\n" + report, { cause });
333
+ }
103
334
  }
104
335
  finally {
105
- await fs.rm(partial, { force: true });
106
- await fs.rm(scratch, { recursive: true, force: true });
107
- await session.close();
336
+ await Promise.all([
337
+ session.close(),
338
+ ...(staging === undefined ? [] : [fs.rm(staging, { recursive: true })]),
339
+ ...(scratch === undefined ? [] : [fs.rm(scratch, { recursive: true })]),
340
+ ...(reservationTicket === undefined
341
+ ? []
342
+ : [
343
+ AutoMovieRenderOutputReservation_1.AutoMovieRenderOutputReservation.release(reservation, reservationTicket),
344
+ ]),
345
+ ]);
108
346
  }
109
347
  }
348
+ /**
349
+ * Writes a control folder's `record.json`, the file a generation request names
350
+ * and a manifest digests.
351
+ */
352
+ async function writeControlRecord(folder, record) {
353
+ await fs.writeFile(path.join(folder, "record.json"), JSON.stringify(record, null, 2) + "\n");
354
+ }
110
355
  //# sourceMappingURL=renderAutoMovieVideo.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"renderAutoMovieVideo.js","sourceRoot":"","sources":["../src/renderAutoMovieVideo.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,MAAY,EAAE,6CAAyB;AACvC,MAAY,IAAI,sCAAkB;AAGlC,mEAAgE;AAChE,6DAA0D;AAE1D;;GAEG;AACH,MAAM,IAAI,GAAmE;IAC3E,MAAM,EAAE,YAAY;IACpB,WAAW,EAAE,MAAM;IACnB,KAAK,EAAE,MAAM;IACb,WAAW,EAAE,SAAS;IACtB,GAAG,EAAE,EAAE;CACR,CAAC;AAEF;;;;;;;;;;;;GAYG;AACI,KAAK,+BAA+B,KAkB1C;IAUC,MAAM,OAAO,GAAgC,MAAM,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC;QACpE,OAAO,EAAE,KAAK,CAAC,OAAO;QACtB,KAAK,EAAE,KAAK,CAAC,KAAK;KACnB,CAAC,CAAC;IACH,MAAM,IAAI,GAAW,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC;IAC1C,MAAM,GAAG,GAAW,IAAI,CAAC,OAAO,CAC9B,KAAK,CAAC,IAAI,EACV,KAAK,CAAC,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,QAAQ,CAAC,CAC7D,CAAC;IACF,MAAM,OAAO,GAAW,IAAI,CAAC,IAAI,CAC/B,KAAK,CAAC,IAAI,EACV,QAAQ,EACR,QAAQ,EACR,GAAG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EAC3D,EAAE,KAAK,EAAE,CACV,CAAC;QACJ,CAAC;IACH,CAAC;YAAS,CAAC;QACT,MAAM,OAAO,CAAC,GAAG,CAAC;YAChB,OAAO,CAAC,KAAK,EAAE;YACf,GAAG,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;YACvE,GAAG,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;YACvE,GAAG,CAAC,iBAAiB,KAAK,SAAS;gBACjC,CAAC,CAAC,EAAE;gBACJ,CAAC,CAAC;oBACE,mEAAgC,CAAC,OAAO,CACtC,WAAW,EACX,iBAAiB,CAClB;iBACF,CAAC;SACP,CAAC,CAAC;IACL,CAAC;AACH,CAAC;AAED;;;GAGG;AACH,KAAK,UAAU,kBAAkB,CAC/B,MAAc,EACd,MAA+B;IAE/B,MAAM,EAAE,CAAC,SAAS,CAChB,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,aAAa,CAAC,EAChC,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,IAAI,CACvC,CAAC;AACJ,CAAC"}
@@ -1,19 +1,16 @@
1
+ import type { IAutoMovieFfmpegSources } from "./IAutoMovieFfmpegSources";
1
2
  /**
2
- * Find the FFmpeg executable a capture of a video file runs: `FFMPEG_PATH` when the environment sets it to a non-blank path, else the binary of the production's `ffmpeg-static`.
3
+ * Find the FFmpeg executable a capture of a video file runs: `FFMPEG_PATH` when
4
+ * the environment sets it to a non-blank path, else the binary of the
5
+ * production's `ffmpeg-static`.
3
6
  *
4
- * It throws naming both `FFMPEG_PATH` and `ffmpeg-static` when neither gives a path, so a capture that plans a video says how to supply one before it touches its folder.
7
+ * A production without `ffmpeg-static` installed refuses with the loader's own
8
+ * error, which names the package and the production; one whose `ffmpeg-static`
9
+ * has no binary for this platform refuses naming both `FFMPEG_PATH` and
10
+ * `ffmpeg-static`, so a capture that plans a video says how to supply one
11
+ * before it touches its folder.
5
12
  *
6
- * @evidence contracts/development/common.md#meaningful-documentation States the order of the two sources and the refusal.
7
- * @evidence contracts/development/implementation.md#principled-implementation `ffmpeg-static` exports the path of the binary it downloaded, or null on a platform it has none for; the environment variable wins so a machine's own build can be used.
8
- * @evidence contracts/development/implementation.md#clear-and-simple-structure Read the variable, else load the package, else refuse.
9
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts No `ffmpeg` on the search path is guessed, because a capture records the binary it ran.
10
- * @evidence contracts/development/implementation.md#efficient-algorithms One module load at most.
11
- * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work Resolved once per capture.
12
- * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Returns a path and keeps nothing.
13
+ * @param props The environment and the production's loader.
14
+ * @returns The executable's path.
13
15
  */
14
- export declare function resolveAutoMovieFfmpeg(props: {
15
- /** The environment, read for `FFMPEG_PATH`. */
16
- env: Readonly<Record<string, string | undefined>>;
17
- /** Loads a package from the production, throwing when it is not installed. */
18
- load: (id: string) => unknown;
19
- }): string;
16
+ export declare function resolveAutoMovieFfmpeg(props: IAutoMovieFfmpegSources): string;