@omnimedia/omnitool 1.1.0-1 β†’ 1.1.0-100

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 (468) hide show
  1. package/README.md +556 -72
  2. package/package.json +20 -15
  3. package/s/context.ts +0 -7
  4. package/s/demo/demo.bundle.ts +104 -39
  5. package/s/demo/demo.css +246 -11
  6. package/s/demo/routines/export-test.ts +16 -0
  7. package/s/demo/routines/filmstrip-test.ts +23 -19
  8. package/s/demo/routines/load-video.ts +2 -3
  9. package/s/demo/routines/playback-test.ts +61 -0
  10. package/s/demo/routines/timeline-setup.ts +81 -0
  11. package/s/demo/routines/transcode-test.ts +21 -5
  12. package/s/demo/routines/transcriber-test.ts +34 -0
  13. package/s/demo/routines/transitions-test.ts +43 -0
  14. package/s/demo/routines/waveform-test.ts +35 -8
  15. package/s/driver/driver-worker.ts +9 -0
  16. package/s/driver/driver.test.ts +1 -1
  17. package/s/driver/driver.ts +52 -43
  18. package/s/driver/fns/host.ts +7 -6
  19. package/s/driver/fns/schematic.ts +69 -25
  20. package/s/driver/fns/work.ts +102 -214
  21. package/s/driver/parts/compositor.ts +319 -0
  22. package/s/driver/parts/machina.ts +19 -20
  23. package/s/driver/utils/find-pixi-filter.ts +24 -0
  24. package/s/driver/utils/load-decoder-source.ts +3 -4
  25. package/s/features/bg-remover/bg-remover.ts +26 -0
  26. package/s/features/bg-remover/default-spec.ts +11 -0
  27. package/s/features/bg-remover/types.ts +27 -0
  28. package/s/features/bg-remover/worker.bundle.ts +52 -0
  29. package/s/features/parts/expose-errors.ts +41 -0
  30. package/s/features/parts/load-pipe.ts +17 -0
  31. package/s/features/parts/types.ts +19 -0
  32. package/s/features/speech/transcribe/default-spec.ts +11 -0
  33. package/s/features/speech/transcribe/parts/prep-audio.ts +23 -0
  34. package/s/features/speech/transcribe/parts/transcribe.ts +70 -0
  35. package/s/features/speech/transcribe/transcriber.ts +46 -0
  36. package/s/features/speech/transcribe/types.ts +76 -0
  37. package/s/features/speech/transcribe/worker.bundle.ts +42 -0
  38. package/s/features/transition/parts/fragment.ts +24 -0
  39. package/s/features/transition/parts/types.ts +27 -0
  40. package/s/features/transition/parts/uniforms.ts +29 -0
  41. package/s/features/transition/parts/vertex.ts +31 -0
  42. package/s/features/transition/transition.ts +60 -0
  43. package/s/index.html.ts +103 -20
  44. package/s/index.ts +1 -0
  45. package/s/tests.bundle.ts +11 -0
  46. package/s/tests.html.ts +28 -0
  47. package/s/timeline/index.ts +17 -1
  48. package/s/timeline/parts/animations/make.ts +38 -0
  49. package/s/timeline/parts/animations/presets.ts +138 -0
  50. package/s/timeline/parts/animations/properties.ts +30 -0
  51. package/s/timeline/parts/animations/registry.ts +13 -0
  52. package/s/timeline/parts/animations/types.ts +80 -0
  53. package/s/timeline/parts/basics.ts +1 -1
  54. package/s/timeline/parts/captions.ts +91 -0
  55. package/s/timeline/parts/filmstrip.ts +43 -16
  56. package/s/timeline/parts/filters.ts +453 -0
  57. package/s/timeline/parts/item.ts +124 -11
  58. package/s/timeline/parts/media.ts +43 -1
  59. package/s/timeline/parts/resource-pool.ts +8 -5
  60. package/s/timeline/parts/resource.ts +3 -0
  61. package/s/timeline/parts/transitions.ts +102 -0
  62. package/s/timeline/parts/waveform/parts/collect.ts +72 -0
  63. package/s/timeline/parts/waveform/parts/render.ts +45 -0
  64. package/s/timeline/parts/waveform/parts/types.ts +24 -0
  65. package/s/timeline/parts/waveform/waveform.ts +161 -0
  66. package/s/timeline/renderers/export/parts/audio-gain.ts +17 -0
  67. package/s/timeline/renderers/export/parts/audio-mix.ts +133 -0
  68. package/s/timeline/renderers/export/parts/cursor.ts +291 -0
  69. package/s/timeline/renderers/export/parts/produce-audio.ts +64 -0
  70. package/s/timeline/renderers/export/parts/produce-video.ts +49 -0
  71. package/s/timeline/renderers/export/parts/resamplers.ts +48 -0
  72. package/s/timeline/renderers/export/produce.ts +28 -0
  73. package/s/timeline/renderers/parts/handy.ts +441 -0
  74. package/s/timeline/renderers/parts/samplers/audio/parts/find.ts +19 -0
  75. package/s/timeline/renderers/parts/samplers/audio/parts/init.ts +60 -0
  76. package/s/timeline/renderers/parts/samplers/audio/parts/sink.ts +38 -0
  77. package/s/timeline/renderers/parts/samplers/audio/parts/types.ts +16 -0
  78. package/s/timeline/renderers/parts/samplers/audio/sampler.ts +35 -0
  79. package/s/timeline/renderers/parts/samplers/visual/parts/defaults.ts +23 -0
  80. package/s/timeline/renderers/parts/samplers/visual/parts/image-sink.ts +51 -0
  81. package/s/timeline/renderers/parts/samplers/visual/parts/sample.ts +99 -0
  82. package/s/timeline/renderers/parts/samplers/visual/parts/sequence.ts +97 -0
  83. package/s/timeline/renderers/parts/samplers/visual/parts/transition.ts +28 -0
  84. package/s/timeline/renderers/parts/samplers/visual/parts/types.ts +11 -0
  85. package/s/timeline/renderers/parts/samplers/visual/parts/video-sink.ts +38 -0
  86. package/s/timeline/renderers/parts/samplers/visual/sampler.ts +31 -0
  87. package/s/timeline/renderers/parts/schedulers.ts +96 -0
  88. package/s/timeline/renderers/player/parts/playback.ts +213 -0
  89. package/s/timeline/renderers/player/player.ts +86 -0
  90. package/s/timeline/renderers/renderers.test.ts +403 -0
  91. package/s/timeline/sugar/helpers.ts +239 -0
  92. package/s/timeline/sugar/o.ts +443 -48
  93. package/s/timeline/sugar/omni.test.ts +210 -0
  94. package/s/timeline/sugar/omni.ts +38 -12
  95. package/s/timeline/types.ts +62 -0
  96. package/s/timeline/utils/anim.ts +63 -0
  97. package/s/timeline/utils/checksum.ts +5 -2
  98. package/s/timeline/utils/datafile.ts +15 -4
  99. package/s/timeline/utils/dummy-data.ts +3 -3
  100. package/s/timeline/utils/matrix.ts +54 -0
  101. package/s/timeline/utils/terps.ts +81 -0
  102. package/s/units/fps.ts +8 -0
  103. package/s/units/ms.ts +8 -0
  104. package/s/units/seconds.ts +8 -0
  105. package/x/WebGLRenderer-4CHIZDHY.js +2 -0
  106. package/x/WebGLRenderer-4CHIZDHY.js.map +7 -0
  107. package/x/WebGPURenderer-O6WXU2QR.js +2 -0
  108. package/x/WebGPURenderer-O6WXU2QR.js.map +7 -0
  109. package/x/browserAll-WNIOTNNP.js +2 -0
  110. package/x/browserAll-WNIOTNNP.js.map +7 -0
  111. package/x/chunk-23FOBGX6.js +2 -0
  112. package/x/chunk-23FOBGX6.js.map +7 -0
  113. package/x/chunk-73XOWA4F.js +393 -0
  114. package/x/chunk-73XOWA4F.js.map +7 -0
  115. package/x/chunk-IAWJKNX5.js +42 -0
  116. package/x/chunk-IAWJKNX5.js.map +7 -0
  117. package/x/chunk-KCMVLWBS.js +157 -0
  118. package/x/chunk-KCMVLWBS.js.map +7 -0
  119. package/x/chunk-MR32SQ27.js +2 -0
  120. package/x/chunk-MR32SQ27.js.map +7 -0
  121. package/x/chunk-VCUJJYRJ.js +327 -0
  122. package/x/chunk-VCUJJYRJ.js.map +7 -0
  123. package/x/chunk-XNIZ4L5W.js +269 -0
  124. package/x/chunk-XNIZ4L5W.js.map +7 -0
  125. package/x/chunk-ZLGNQFUI.js +15 -0
  126. package/x/chunk-ZLGNQFUI.js.map +7 -0
  127. package/x/context.d.ts +1 -4
  128. package/x/context.js +1 -5
  129. package/x/context.js.map +1 -1
  130. package/x/demo/WebGLRenderer-RSJAHIG2.js +2 -0
  131. package/x/demo/WebGLRenderer-RSJAHIG2.js.map +7 -0
  132. package/x/demo/WebGPURenderer-MGFAJCYY.js +2 -0
  133. package/x/demo/WebGPURenderer-MGFAJCYY.js.map +7 -0
  134. package/x/demo/browserAll-PTRBXBRP.js +2 -0
  135. package/x/demo/browserAll-PTRBXBRP.js.map +7 -0
  136. package/x/demo/chunk-CUYOGHWU.js +42 -0
  137. package/x/demo/chunk-CUYOGHWU.js.map +7 -0
  138. package/x/demo/chunk-DGTDNJ7W.js +2 -0
  139. package/x/demo/chunk-DGTDNJ7W.js.map +7 -0
  140. package/x/demo/chunk-FZ5BYF63.js +15 -0
  141. package/x/demo/chunk-FZ5BYF63.js.map +7 -0
  142. package/x/demo/chunk-KWN4NNES.js +269 -0
  143. package/x/demo/chunk-KWN4NNES.js.map +7 -0
  144. package/x/demo/chunk-OJ3FPXW7.js +157 -0
  145. package/x/demo/chunk-OJ3FPXW7.js.map +7 -0
  146. package/x/demo/chunk-PSLUOGTZ.js +393 -0
  147. package/x/demo/chunk-PSLUOGTZ.js.map +7 -0
  148. package/x/demo/chunk-VLCVEIFU.js +327 -0
  149. package/x/demo/chunk-VLCVEIFU.js.map +7 -0
  150. package/x/demo/chunk-ZWCPT5FR.js +2 -0
  151. package/x/demo/chunk-ZWCPT5FR.js.map +7 -0
  152. package/x/demo/demo.bundle.js +94 -36
  153. package/x/demo/demo.bundle.js.map +1 -1
  154. package/x/demo/demo.bundle.min.js +7359 -107
  155. package/x/demo/demo.bundle.min.js.map +4 -4
  156. package/x/demo/demo.css +246 -11
  157. package/x/demo/routines/export-test.d.ts +2 -0
  158. package/x/demo/routines/export-test.js +10 -0
  159. package/x/demo/routines/export-test.js.map +1 -0
  160. package/x/demo/routines/filmstrip-test.d.ts +1 -1
  161. package/x/demo/routines/filmstrip-test.js +21 -18
  162. package/x/demo/routines/filmstrip-test.js.map +1 -1
  163. package/x/demo/routines/load-video.d.ts +1 -1
  164. package/x/demo/routines/load-video.js +1 -2
  165. package/x/demo/routines/load-video.js.map +1 -1
  166. package/x/demo/routines/playback-test.d.ts +2 -0
  167. package/x/demo/routines/playback-test.js +51 -0
  168. package/x/demo/routines/playback-test.js.map +1 -0
  169. package/x/demo/routines/timeline-setup.d.ts +6 -0
  170. package/x/demo/routines/timeline-setup.js +59 -0
  171. package/x/demo/routines/timeline-setup.js.map +1 -0
  172. package/x/demo/routines/transcode-test.js +17 -5
  173. package/x/demo/routines/transcode-test.js.map +1 -1
  174. package/x/demo/routines/transcriber-test.d.ts +4 -0
  175. package/x/demo/routines/transcriber-test.js +33 -0
  176. package/x/demo/routines/transcriber-test.js.map +1 -0
  177. package/x/demo/routines/transitions-test.d.ts +5 -0
  178. package/x/demo/routines/transitions-test.js +35 -0
  179. package/x/demo/routines/transitions-test.js.map +1 -0
  180. package/x/demo/routines/waveform-test.d.ts +2 -1
  181. package/x/demo/routines/waveform-test.js +29 -8
  182. package/x/demo/routines/waveform-test.js.map +1 -1
  183. package/x/demo/webworkerAll-JENRT6BT.js +2 -0
  184. package/x/demo/webworkerAll-JENRT6BT.js.map +7 -0
  185. package/x/driver/driver-worker.d.ts +1 -0
  186. package/x/driver/driver-worker.js +6 -0
  187. package/x/driver/driver-worker.js.map +1 -0
  188. package/x/driver/driver.d.ts +24 -9
  189. package/x/driver/driver.js +51 -40
  190. package/x/driver/driver.js.map +1 -1
  191. package/x/driver/driver.test.js +1 -1
  192. package/x/driver/driver.test.js.map +1 -1
  193. package/x/driver/driver.worker.bundle.min.js +137 -1137
  194. package/x/driver/driver.worker.bundle.min.js.map +4 -4
  195. package/x/driver/fns/host.d.ts +12 -4
  196. package/x/driver/fns/host.js +3 -3
  197. package/x/driver/fns/host.js.map +1 -1
  198. package/x/driver/fns/schematic.d.ts +65 -25
  199. package/x/driver/fns/work.d.ts +14 -7
  200. package/x/driver/fns/work.js +83 -174
  201. package/x/driver/fns/work.js.map +1 -1
  202. package/x/driver/parts/compositor.d.ts +39 -0
  203. package/x/driver/parts/compositor.js +264 -0
  204. package/x/driver/parts/compositor.js.map +1 -0
  205. package/x/driver/parts/machina.d.ts +0 -20
  206. package/x/driver/parts/machina.js +6 -10
  207. package/x/driver/parts/machina.js.map +1 -1
  208. package/x/driver/utils/find-pixi-filter.d.ts +5 -0
  209. package/x/driver/utils/find-pixi-filter.js +13 -0
  210. package/x/driver/utils/find-pixi-filter.js.map +1 -0
  211. package/x/driver/utils/load-decoder-source.d.ts +2 -1
  212. package/x/driver/utils/load-decoder-source.js +2 -3
  213. package/x/driver/utils/load-decoder-source.js.map +1 -1
  214. package/x/features/bg-remover/bg-remover.d.ts +5 -0
  215. package/x/features/bg-remover/bg-remover.js +18 -0
  216. package/x/features/bg-remover/bg-remover.js.map +1 -0
  217. package/x/features/bg-remover/default-spec.d.ts +2 -0
  218. package/x/features/bg-remover/default-spec.js +6 -0
  219. package/x/features/bg-remover/default-spec.js.map +1 -0
  220. package/x/features/bg-remover/types.d.ts +20 -0
  221. package/x/features/bg-remover/types.js +2 -0
  222. package/x/features/bg-remover/types.js.map +1 -0
  223. package/x/features/bg-remover/worker.bundle.js +39 -0
  224. package/x/features/bg-remover/worker.bundle.js.map +1 -0
  225. package/x/features/bg-remover/worker.bundle.min.js +2916 -0
  226. package/x/features/bg-remover/worker.bundle.min.js.map +7 -0
  227. package/x/features/parts/expose-errors.d.ts +3 -0
  228. package/x/features/parts/expose-errors.js +32 -0
  229. package/x/features/parts/expose-errors.js.map +1 -0
  230. package/x/features/parts/load-pipe.d.ts +2 -0
  231. package/x/features/parts/load-pipe.js +13 -0
  232. package/x/features/parts/load-pipe.js.map +1 -0
  233. package/x/features/parts/types.d.ts +15 -0
  234. package/x/features/parts/types.js +2 -0
  235. package/x/features/parts/types.js.map +1 -0
  236. package/x/features/speech/transcribe/default-spec.d.ts +2 -0
  237. package/x/features/speech/transcribe/default-spec.js +8 -0
  238. package/x/features/speech/transcribe/default-spec.js.map +1 -0
  239. package/x/features/speech/transcribe/parts/prep-audio.d.ts +5 -0
  240. package/x/features/speech/transcribe/parts/prep-audio.js +21 -0
  241. package/x/features/speech/transcribe/parts/prep-audio.js.map +1 -0
  242. package/x/features/speech/transcribe/parts/transcribe.d.ts +5 -0
  243. package/x/features/speech/transcribe/parts/transcribe.js +56 -0
  244. package/x/features/speech/transcribe/parts/transcribe.js.map +1 -0
  245. package/x/features/speech/transcribe/transcriber.d.ts +5 -0
  246. package/x/features/speech/transcribe/transcriber.js +33 -0
  247. package/x/features/speech/transcribe/transcriber.js.map +1 -0
  248. package/x/features/speech/transcribe/types.d.ts +59 -0
  249. package/x/features/speech/transcribe/types.js +2 -0
  250. package/x/features/speech/transcribe/types.js.map +1 -0
  251. package/x/features/speech/transcribe/worker.bundle.js +35 -0
  252. package/x/features/speech/transcribe/worker.bundle.js.map +1 -0
  253. package/x/features/speech/transcribe/worker.bundle.min.js +2916 -0
  254. package/x/features/speech/transcribe/worker.bundle.min.js.map +7 -0
  255. package/x/features/transition/parts/fragment.d.ts +1 -0
  256. package/x/features/transition/parts/fragment.js +25 -0
  257. package/x/features/transition/parts/fragment.js.map +1 -0
  258. package/x/features/transition/parts/types.d.ts +23 -0
  259. package/x/features/transition/parts/types.js +2 -0
  260. package/x/features/transition/parts/types.js.map +1 -0
  261. package/x/features/transition/parts/uniforms.d.ts +31 -0
  262. package/x/features/transition/parts/uniforms.js +27 -0
  263. package/x/features/transition/parts/uniforms.js.map +1 -0
  264. package/x/features/transition/parts/vertex.d.ts +1 -0
  265. package/x/features/transition/parts/vertex.js +32 -0
  266. package/x/features/transition/parts/vertex.js.map +1 -0
  267. package/x/features/transition/transition.d.ts +5 -0
  268. package/x/features/transition/transition.js +50 -0
  269. package/x/features/transition/transition.js.map +1 -0
  270. package/x/index.d.ts +1 -0
  271. package/x/index.html +349 -30
  272. package/x/index.html.js +103 -19
  273. package/x/index.html.js.map +1 -1
  274. package/x/index.js +1 -0
  275. package/x/index.js.map +1 -1
  276. package/x/tests.bundle.d.ts +1 -0
  277. package/x/tests.bundle.js +8 -0
  278. package/x/tests.bundle.js.map +1 -0
  279. package/x/tests.bundle.min.js +7374 -0
  280. package/x/tests.bundle.min.js.map +7 -0
  281. package/x/tests.html +316 -0
  282. package/x/tests.html.d.ts +2 -0
  283. package/x/tests.html.js +22 -0
  284. package/x/tests.html.js.map +1 -0
  285. package/x/timeline/index.d.ts +16 -0
  286. package/x/timeline/index.js +16 -0
  287. package/x/timeline/index.js.map +1 -1
  288. package/x/timeline/parts/animations/make.d.ts +3 -0
  289. package/x/timeline/parts/animations/make.js +29 -0
  290. package/x/timeline/parts/animations/make.js.map +1 -0
  291. package/x/timeline/parts/animations/presets.d.ts +170 -0
  292. package/x/timeline/parts/animations/presets.js +135 -0
  293. package/x/timeline/parts/animations/presets.js.map +1 -0
  294. package/x/timeline/parts/animations/properties.d.ts +84 -0
  295. package/x/timeline/parts/animations/properties.js +25 -0
  296. package/x/timeline/parts/animations/properties.js.map +1 -0
  297. package/x/timeline/parts/animations/registry.d.ts +218 -0
  298. package/x/timeline/parts/animations/registry.js +11 -0
  299. package/x/timeline/parts/animations/registry.js.map +1 -0
  300. package/x/timeline/parts/animations/types.d.ts +60 -0
  301. package/x/timeline/parts/animations/types.js +2 -0
  302. package/x/timeline/parts/animations/types.js.map +1 -0
  303. package/x/timeline/parts/basics.d.ts +1 -1
  304. package/x/timeline/parts/captions.d.ts +41 -0
  305. package/x/timeline/parts/captions.js +55 -0
  306. package/x/timeline/parts/captions.js.map +1 -0
  307. package/x/timeline/parts/filmstrip.d.ts +4 -3
  308. package/x/timeline/parts/filmstrip.js +29 -10
  309. package/x/timeline/parts/filmstrip.js.map +1 -1
  310. package/x/timeline/parts/filters.d.ts +108 -0
  311. package/x/timeline/parts/filters.js +340 -0
  312. package/x/timeline/parts/filters.js.map +1 -0
  313. package/x/timeline/parts/item.d.ts +106 -12
  314. package/x/timeline/parts/item.js +11 -7
  315. package/x/timeline/parts/item.js.map +1 -1
  316. package/x/timeline/parts/media.d.ts +6 -0
  317. package/x/timeline/parts/media.js +35 -1
  318. package/x/timeline/parts/media.js.map +1 -1
  319. package/x/timeline/parts/resource-pool.d.ts +3 -0
  320. package/x/timeline/parts/resource-pool.js +7 -4
  321. package/x/timeline/parts/resource-pool.js.map +1 -1
  322. package/x/timeline/parts/resource.d.ts +3 -0
  323. package/x/timeline/parts/transitions.d.ts +15 -0
  324. package/x/timeline/parts/transitions.js +81 -0
  325. package/x/timeline/parts/transitions.js.map +1 -0
  326. package/x/timeline/parts/waveform/parts/collect.d.ts +11 -0
  327. package/x/timeline/parts/waveform/parts/collect.js +56 -0
  328. package/x/timeline/parts/waveform/parts/collect.js.map +1 -0
  329. package/x/timeline/parts/waveform/parts/render.d.ts +5 -0
  330. package/x/timeline/parts/waveform/parts/render.js +29 -0
  331. package/x/timeline/parts/waveform/parts/render.js.map +1 -0
  332. package/x/timeline/parts/waveform/parts/types.d.ts +21 -0
  333. package/x/timeline/parts/waveform/parts/types.js +2 -0
  334. package/x/timeline/parts/waveform/parts/types.js.map +1 -0
  335. package/x/timeline/parts/waveform/waveform.d.ts +19 -0
  336. package/x/timeline/parts/waveform/waveform.js +133 -0
  337. package/x/timeline/parts/waveform/waveform.js.map +1 -0
  338. package/x/timeline/renderers/export/parts/audio-gain.d.ts +1 -0
  339. package/x/timeline/renderers/export/parts/audio-gain.js +13 -0
  340. package/x/timeline/renderers/export/parts/audio-gain.js.map +1 -0
  341. package/x/timeline/renderers/export/parts/audio-mix.d.ts +21 -0
  342. package/x/timeline/renderers/export/parts/audio-mix.js +89 -0
  343. package/x/timeline/renderers/export/parts/audio-mix.js.map +1 -0
  344. package/x/timeline/renderers/export/parts/cursor.d.ts +35 -0
  345. package/x/timeline/renderers/export/parts/cursor.js +236 -0
  346. package/x/timeline/renderers/export/parts/cursor.js.map +1 -0
  347. package/x/timeline/renderers/export/parts/produce-audio.d.ts +6 -0
  348. package/x/timeline/renderers/export/parts/produce-audio.js +41 -0
  349. package/x/timeline/renderers/export/parts/produce-audio.js.map +1 -0
  350. package/x/timeline/renderers/export/parts/produce-video.d.ts +10 -0
  351. package/x/timeline/renderers/export/parts/produce-video.js +26 -0
  352. package/x/timeline/renderers/export/parts/produce-video.js.map +1 -0
  353. package/x/timeline/renderers/export/parts/resamplers.d.ts +12 -0
  354. package/x/timeline/renderers/export/parts/resamplers.js +29 -0
  355. package/x/timeline/renderers/export/parts/resamplers.js.map +1 -0
  356. package/x/timeline/renderers/export/produce.d.ts +13 -0
  357. package/x/timeline/renderers/export/produce.js +15 -0
  358. package/x/timeline/renderers/export/produce.js.map +1 -0
  359. package/x/timeline/renderers/parts/handy.d.ts +38 -0
  360. package/x/timeline/renderers/parts/handy.js +263 -0
  361. package/x/timeline/renderers/parts/handy.js.map +1 -0
  362. package/x/timeline/renderers/parts/samplers/audio/parts/find.d.ts +6 -0
  363. package/x/timeline/renderers/parts/samplers/audio/parts/find.js +15 -0
  364. package/x/timeline/renderers/parts/samplers/audio/parts/find.js.map +1 -0
  365. package/x/timeline/renderers/parts/samplers/audio/parts/init.d.ts +5 -0
  366. package/x/timeline/renderers/parts/samplers/audio/parts/init.js +40 -0
  367. package/x/timeline/renderers/parts/samplers/audio/parts/init.js.map +1 -0
  368. package/x/timeline/renderers/parts/samplers/audio/parts/sink.d.ts +8 -0
  369. package/x/timeline/renderers/parts/samplers/audio/parts/sink.js +24 -0
  370. package/x/timeline/renderers/parts/samplers/audio/parts/sink.js.map +1 -0
  371. package/x/timeline/renderers/parts/samplers/audio/parts/types.d.ts +14 -0
  372. package/x/timeline/renderers/parts/samplers/audio/parts/types.js +2 -0
  373. package/x/timeline/renderers/parts/samplers/audio/parts/types.js.map +1 -0
  374. package/x/timeline/renderers/parts/samplers/audio/sampler.d.ts +11 -0
  375. package/x/timeline/renderers/parts/samplers/audio/sampler.js +22 -0
  376. package/x/timeline/renderers/parts/samplers/audio/sampler.js.map +1 -0
  377. package/x/timeline/renderers/parts/samplers/visual/parts/defaults.d.ts +8 -0
  378. package/x/timeline/renderers/parts/samplers/visual/parts/defaults.js +14 -0
  379. package/x/timeline/renderers/parts/samplers/visual/parts/defaults.js.map +1 -0
  380. package/x/timeline/renderers/parts/samplers/visual/parts/image-sink.d.ts +11 -0
  381. package/x/timeline/renderers/parts/samplers/visual/parts/image-sink.js +36 -0
  382. package/x/timeline/renderers/parts/samplers/visual/parts/image-sink.js.map +1 -0
  383. package/x/timeline/renderers/parts/samplers/visual/parts/sample.d.ts +9 -0
  384. package/x/timeline/renderers/parts/samplers/visual/parts/sample.js +70 -0
  385. package/x/timeline/renderers/parts/samplers/visual/parts/sample.js.map +1 -0
  386. package/x/timeline/renderers/parts/samplers/visual/parts/sequence.d.ts +6 -0
  387. package/x/timeline/renderers/parts/samplers/visual/parts/sequence.js +63 -0
  388. package/x/timeline/renderers/parts/samplers/visual/parts/sequence.js.map +1 -0
  389. package/x/timeline/renderers/parts/samplers/visual/parts/transition.d.ts +3 -0
  390. package/x/timeline/renderers/parts/samplers/visual/parts/transition.js +18 -0
  391. package/x/timeline/renderers/parts/samplers/visual/parts/transition.js.map +1 -0
  392. package/x/timeline/renderers/parts/samplers/visual/parts/types.d.ts +9 -0
  393. package/x/timeline/renderers/parts/samplers/visual/parts/types.js +2 -0
  394. package/x/timeline/renderers/parts/samplers/visual/parts/types.js.map +1 -0
  395. package/x/timeline/renderers/parts/samplers/visual/parts/video-sink.d.ts +8 -0
  396. package/x/timeline/renderers/parts/samplers/visual/parts/video-sink.js +24 -0
  397. package/x/timeline/renderers/parts/samplers/visual/parts/video-sink.js.map +1 -0
  398. package/x/timeline/renderers/parts/samplers/visual/sampler.d.ts +7 -0
  399. package/x/timeline/renderers/parts/samplers/visual/sampler.js +20 -0
  400. package/x/timeline/renderers/parts/samplers/visual/sampler.js.map +1 -0
  401. package/x/timeline/renderers/parts/schedulers.d.ts +17 -0
  402. package/x/timeline/renderers/parts/schedulers.js +64 -0
  403. package/x/timeline/renderers/parts/schedulers.js.map +1 -0
  404. package/x/timeline/renderers/player/parts/playback.d.ts +39 -0
  405. package/x/timeline/renderers/player/parts/playback.js +160 -0
  406. package/x/timeline/renderers/player/parts/playback.js.map +1 -0
  407. package/x/timeline/renderers/player/player.d.ts +27 -0
  408. package/x/timeline/renderers/player/player.js +64 -0
  409. package/x/timeline/renderers/player/player.js.map +1 -0
  410. package/x/timeline/renderers/renderers.test.d.ts +33 -0
  411. package/x/timeline/renderers/renderers.test.js +321 -0
  412. package/x/timeline/renderers/renderers.test.js.map +1 -0
  413. package/x/timeline/sugar/helpers.d.ts +72 -0
  414. package/x/timeline/sugar/helpers.js +122 -0
  415. package/x/timeline/sugar/helpers.js.map +1 -0
  416. package/x/timeline/sugar/o.d.ts +59 -8
  417. package/x/timeline/sugar/o.js +326 -40
  418. package/x/timeline/sugar/o.js.map +1 -1
  419. package/x/timeline/sugar/omni.d.ts +11 -2
  420. package/x/timeline/sugar/omni.js +30 -9
  421. package/x/timeline/sugar/omni.js.map +1 -1
  422. package/x/timeline/sugar/omni.test.d.ts +27 -0
  423. package/x/timeline/sugar/omni.test.js +128 -0
  424. package/x/timeline/sugar/omni.test.js.map +1 -0
  425. package/x/timeline/types.d.ts +37 -0
  426. package/x/timeline/types.js +2 -0
  427. package/x/timeline/types.js.map +1 -0
  428. package/x/timeline/utils/anim.d.ts +3 -0
  429. package/x/timeline/utils/anim.js +40 -0
  430. package/x/timeline/utils/anim.js.map +1 -0
  431. package/x/timeline/utils/checksum.d.ts +3 -2
  432. package/x/timeline/utils/checksum.js +2 -1
  433. package/x/timeline/utils/checksum.js.map +1 -1
  434. package/x/timeline/utils/datafile.d.ts +5 -3
  435. package/x/timeline/utils/datafile.js +18 -5
  436. package/x/timeline/utils/datafile.js.map +1 -1
  437. package/x/timeline/utils/dummy-data.d.ts +1 -2
  438. package/x/timeline/utils/dummy-data.js +4 -2
  439. package/x/timeline/utils/dummy-data.js.map +1 -1
  440. package/x/timeline/utils/matrix.d.ts +17 -0
  441. package/x/timeline/utils/matrix.js +36 -0
  442. package/x/timeline/utils/matrix.js.map +1 -0
  443. package/x/timeline/utils/terps.d.ts +11 -0
  444. package/x/timeline/utils/terps.js +57 -0
  445. package/x/timeline/utils/terps.js.map +1 -0
  446. package/x/units/fps.d.ts +6 -0
  447. package/x/units/fps.js +2 -0
  448. package/x/units/fps.js.map +1 -0
  449. package/x/units/ms.d.ts +6 -0
  450. package/x/units/ms.js +2 -0
  451. package/x/units/ms.js.map +1 -0
  452. package/x/units/seconds.d.ts +6 -0
  453. package/x/units/seconds.js +2 -0
  454. package/x/units/seconds.js.map +1 -0
  455. package/x/webworkerAll-RLCTMSDD.js +2 -0
  456. package/x/webworkerAll-RLCTMSDD.js.map +7 -0
  457. package/s/tests.test.ts +0 -8
  458. package/s/timeline/parts/waveform.ts +0 -62
  459. package/s/timeline/sugar/omni-test.ts +0 -38
  460. package/x/tests.test.js +0 -6
  461. package/x/tests.test.js.map +0 -1
  462. package/x/timeline/parts/waveform.d.ts +0 -8
  463. package/x/timeline/parts/waveform.js +0 -51
  464. package/x/timeline/parts/waveform.js.map +0 -1
  465. package/x/timeline/sugar/omni-test.js +0 -22
  466. package/x/timeline/sugar/omni-test.js.map +0 -1
  467. /package/x/{tests.test.d.ts β†’ features/bg-remover/worker.bundle.d.ts} +0 -0
  468. /package/x/{timeline/sugar/omni-test.d.ts β†’ features/speech/transcribe/worker.bundle.d.ts} +0 -0
package/README.md CHANGED
@@ -1,120 +1,604 @@
1
1
 
2
2
  # 🚧 Work In Progress
3
3
 
4
- > **Note:** Omni Tools is under development. Expect breaking changes, evolving APIs, and experimental features.
4
+ > **Note:** Omnitool is under development. Expect breaking changes, evolving APIs, and experimental features.
5
5
 
6
6
  ---
7
7
 
8
- # 🎬 Omnitool
8
+ ## βœ… What this library is
9
9
 
10
- > Code-first video editing toolkit behind [Omniclip](https://omniclip.app) β€” build timelines, render videos, and automate workflows.
10
+ - API for building and rendering timelines in the browser
11
+ - Uses WebCodecs, Web Workers, and the File System Access API for export
12
+ - usage is currently JavaScript/TypeScript only, cli soon
11
13
 
12
- ---
14
+ ## πŸš€ Install
13
15
 
14
- ## 🧱 Modular by Design
16
+ ```bash
17
+ npm i @omnimedia/omnitool
18
+ ```
15
19
 
16
- Omni Tools is a collection of composable utilities for working with Omniclip timelines β€” via code, JSON, or CLI.
20
+ ## πŸ“¦ Quick Start
17
21
 
18
- - βœ… Define timelines in JSON or TypeScript
19
- - βœ… Automate rendering with CLI tools
20
- - βœ… Ideal for scripting, CI/CD, and AI-generated workflows
22
+ #### Declaring the timeline
21
23
 
22
- ---
24
+ ```ts
25
+ import {Driver, Omni, Datafile} from "@omnimedia/omnitool"
26
+
27
+ const driver = await Driver.setup()
28
+ const omni = new Omni(driver)
29
+
30
+ const {clip} = await omni.load({
31
+ clip: Datafile.make(file) // file is a File or Blob
32
+ })
33
+
34
+ const timeline = omni.timeline(o => {
35
+ const caption = o.text("Hello world", {
36
+ duration: 1500,
37
+ styles: {fill: "white", fontSize: 48}
38
+ })
39
+ const xfade = o.transition.fade(500)
40
+ const softened = o.filter.blur.make({strength: 8, quality: 4})
41
+
42
+ const visual = o.sequence(
43
+ o.stack(
44
+ o.video(clip, {start: 0, duration: 3000, filterIds: [softened.id]}),
45
+ caption
46
+ ),
47
+ xfade,
48
+ o.video(clip, {start: 5000, duration: 2500}),
49
+ o.gap(400)
50
+ )
51
+
52
+ return o.stack(
53
+ visual,
54
+ o.audio(clip, {start: 5000, duration: 2500})
55
+ )
56
+ })
57
+ ```
23
58
 
24
- ## πŸš€ Quick Start
59
+ Declarative helper style (no explicit `o` in timeline declarations):
25
60
 
26
- ### Install
61
+ ```ts
62
+ import {
63
+ Driver, Omni, Datafile,
64
+ timeline, sequence, stack, video, audio, text, gap, transition, filter
65
+ } from "@omnimedia/omnitool"
66
+
67
+ const driver = await Driver.setup()
68
+ const omni = new Omni(driver)
69
+ const {clip} = await omni.load({clip: Datafile.make(file)})
70
+
71
+ const timeline = timeline(
72
+ stack(
73
+ sequence(
74
+ stack(
75
+ filter.blur(
76
+ video(clip, {start: 0, duration: 3000}),
77
+ {strength: 8, quality: 4}
78
+ ),
79
+ text("Hello world", {duration: 1500}),
80
+ ),
81
+ transition.fade(500),
82
+ video(clip, {start: 5000, duration: 2500}),
83
+ gap(400),
84
+ ),
85
+ audio(clip, {start: 5000, duration: 2500})
86
+ )
87
+ )
88
+ ```
27
89
 
28
- ```bash
29
- npm install @omni/tools
90
+ ## πŸ’¬ Captions
91
+
92
+ Captions render transcript data as timed, styled text.
93
+ The transcript can come from anywhere, as long as it follows the structure.
94
+
95
+ ```ts
96
+ const transcript = {
97
+ text: "Hello world. This is a caption.",
98
+ chunks: [
99
+ {text: "Hello", timestamp: [0, 0.4]},
100
+ {text: "world.", timestamp: [0.4, 1.2]},
101
+ {text: "This", timestamp: [1.3, 1.6]},
102
+ {text: "is", timestamp: [1.6, 1.8]},
103
+ {text: "a", timestamp: [1.8, 1.9]},
104
+ {text: "caption.", timestamp: [1.9, 2.6]},
105
+ ],
106
+ }
107
+
108
+ const timeline = omni.timeline(o => {
109
+ const video = o.video(clip, {duration: 3000})
110
+ return o.captions(video, transcript)
111
+ })
30
112
  ```
31
113
 
32
- ---
114
+ Use a caption preset to pick a built-in caption style:
115
+
116
+ ```ts
117
+ const timeline = omni.timeline(o => {
118
+ const video = o.video(clip, {duration: 3000})
119
+ return o.captions.presets.default(video, transcript)
120
+ })
121
+ ```
122
+
123
+ or do your own styled captions:
124
+
125
+ ```ts
126
+ const timeline = omni.timeline(o => {
127
+ const video = o.video(clip, {duration: 3000})
128
+ return o.captions(video, transcript, {
129
+ styles: {
130
+ fontFamily: "Inter",
131
+ fontSize: 64,
132
+ fill: "#fff7d6",
133
+ stroke: {color: "#111111", width: 8},
134
+ align: "center",
135
+ },
136
+ })
137
+ })
138
+ ```
139
+
140
+ Use omnitool's built in speech-to-text with default model:
141
+
142
+ ```ts
143
+ import {makeTranscriber, defaultTranscriberSpec} from "@omnimedia/omnitool"
144
+
145
+ // uses onnx-community/whisper-tiny_timestamped
146
+ const transcriber = await makeTranscriber({
147
+ driver,
148
+ spec: defaultTranscriberSpec(),
149
+ workerUrl: new URL("/features/speech/transcribe/worker.bundle.min.js", import.meta.url),
150
+ onLoading: loading => console.log("loading", loading),
151
+ })
152
+
153
+ const transcript = await transcriber.transcribe({
154
+ source: file,
155
+ language: "english",
156
+ onReport: report => console.log("report", report),
157
+ onTranscription: text => console.log("transcribing", text),
158
+ })
159
+
160
+ const timeline = omni.timeline(o => {
161
+ const video = o.video(clip)
162
+ return o.captions(video, transcript)
163
+ })
164
+ ```
165
+
166
+ Load a custom speech-to-text model:
167
+
168
+ ```ts
169
+ const transcriber = await makeTranscriber({
170
+ driver,
171
+ spec: {
172
+ model: "onnx-community/whisper-tiny_timestamped",
173
+ dtype: "q4",
174
+ device: "wasm",
175
+ chunkLength: 20,
176
+ strideLength: 3
177
+ },
178
+ workerUrl: new URL("/features/speech/transcribe/worker.bundle.min.js", import.meta.url),
179
+ onLoading: loading => console.log("loading", loading),
180
+ })
181
+ ```
182
+
183
+ > [!IMPORTANT]
184
+ > Use a Transformers.js-compatible speech-to-text model, for example `onnx-community/*_timestamped`.
185
+ > The model must support word-level timestamps because captions use `return_timestamps: "word"`.
186
+ > `device` and `dtype` are passed to Transformers.js and depend on your runtime/model.
187
+ > Browser usage commonly uses `"wasm"` or `"webgpu"`. `"webgpu"` for speed, `"wasm"` for more device support
188
+ > `workerUrl` depends on where you host the worker bundle.
189
+
190
+ `o.captions(video, transcript, options)` creates captions for a video or audio.
191
+ `o.captions` uses `captionPresets.default` preset.
192
+ The generated caption id is stored on the source item as `captionId`.
193
+ use `o.captions.presets` to choose from available pre-styled captions.
194
+ pass `styles` in options to override preset styles.
195
+ transcript chunk timestamps are in seconds.
33
196
 
34
- ## πŸ“¦ Example (Programmatic Timeline)
197
+ Update caption options after creation:
35
198
 
36
199
  ```ts
37
- import { subtitle, crossfade, sequence, stack, video } from "@omni/tools"
200
+ const caption = o.captions.make(transcript, {maxChars: 42})
201
+ const style = o.textStyle({fill: "#00ff00"})
202
+ o.set(caption.id, {
203
+ maxChars: 32,
204
+ styleId: style.id,
205
+ })
206
+ ```
207
+
208
+ Caption options:
209
+ `styles` - sets styles, it overrides the preset's styles.
210
+ `start` - transcript time where captions begin, in milliseconds.
211
+ `duration` - caption layer duration, in milliseconds.
212
+ `maxChars` - maximum characters in one generated caption line.
213
+ `maxDuration` - maximum duration of one generated caption line, in milliseconds.
214
+ `maxSilence` - maximum silence allowed inside one caption; longer pauses start a new caption, in milliseconds.
215
+
216
+ import `captionPresets` to list available caption looks.
38
217
 
39
- const watermark = subtitle("omniclip")
40
- const xfade = crossfade(500)
218
+ ## 🧼 Background Remover
219
+
220
+ ```ts
221
+ import {makeBgRemover, defaultBgRemoverSpec} from "@omnimedia/omnitool"
222
+
223
+ const bgRemover = await makeBgRemover({
224
+ spec: defaultBgRemoverSpec(),
225
+ workerUrl: new URL("/features/bg-remover/worker.bundle.min.js", import.meta.url),
226
+ onLoading: loading => console.log("loading", loading),
227
+ })
228
+
229
+ const outputFrame = await bgRemover.remove({frame: inputFrame})
230
+
231
+ bgRemover.dispose()
232
+ ```
41
233
 
42
- const timeline = sequence(
43
- video("opening-credits.mp4"),
44
- xfade,
45
- stack(
46
- video("skateboarding.mp4"),
47
- watermark
48
- ),
49
- xfade,
50
- stack(
51
- video("biking.mp4"),
52
- watermark
53
- )
234
+ Use it on image or while decoding a video:
235
+
236
+ ```ts
237
+ const bgRemover = await makeBgRemover({
238
+ spec: defaultBgRemoverSpec(),
239
+ workerUrl: new URL("/features/bg-remover/worker.bundle.min.js", import.meta.url),
240
+ onLoading: loading => console.log("loading", loading),
241
+ })
242
+
243
+ const video = driver.decodeVideo({
244
+ source: file,
245
+ onFrame: frame => bgRemover.remove({frame}),
246
+ })
247
+ ```
248
+
249
+ Notes:
250
+ - `defaultBgRemoverSpec()` uses `Xenova/modnet` on `webgpu` with `auto` dtype.
251
+ - `model`, `device`, and `dtype` are passed to Transformers.js and depend on browser/runtime support.
252
+ - Call `dispose()` when the remover is no longer needed.
253
+
254
+ ## πŸŽ› Filters
255
+
256
+ Filter application:
257
+
258
+ ```ts
259
+ const timeline = omni.timeline(o =>
260
+ o.stack(
261
+ o.filter.blur(
262
+ o.video(clip, {duration: 3000}),
263
+ {strength: 8, quality: 4}
264
+ ),
265
+ o.filter.glow(
266
+ o.text("Hello world", {duration: 3000}),
267
+ {distance: 12, outerStrength: 2, color: "#ffffff"}
268
+ )
269
+ )
54
270
  )
55
-
56
271
  ```
57
272
 
58
- ---
273
+ Reusable filter items:
59
274
 
60
- ## 🧩 Timeline Format (Omni Timeline Format)
275
+ ```ts
276
+ const timeline = omni.timeline(o => {
277
+ const blur = o.filter.blur.make({strength: 8, quality: 4})
278
+
279
+ return o.stack(
280
+ o.video(clip, {duration: 3000, filterIds: [blur.id]}),
281
+ o.text("Caption", {duration: 3000, styles: {fill: "white"}})
282
+ )
283
+ })
284
+ ```
61
285
 
62
- Every timeline is defined as a graph:
286
+ Filter metadata for UI:
63
287
 
64
- ```json
65
- {
66
- "format": "omni-timeline@1",
67
- "root": "root-1",
68
- "items": [
69
- ["root-1", ["sequence", { "children": ["video-1", "stack-1"] }]],
70
- ["video-1", ["video", { ... }]],
71
- ["stack-1", ["stack", { "children": ["text-1", "audio-1"] }]],
72
- ["text-1", ["text", { ... }]],
73
- ["audio-1", ["audio", { ... }]]
74
- ]
288
+ ```ts
289
+ import {
290
+ filters
291
+ } from "@omnimedia/omnitool"
292
+
293
+ const available = Object.entries(filters)
294
+ const blur = filters.blur
295
+ const schema = blur.schema
296
+ ```
297
+
298
+ ## 🧭 Spatial Transforms
299
+
300
+ ```ts
301
+ const timeline = omni.timeline(o => {
302
+ const move = o.spatial(o.transform({
303
+ position: [120, 40],
304
+ scale: [0.6, 0.6],
305
+ rotation: 12
306
+ }))
307
+
308
+ const title = o.text("Lower third", {
309
+ duration: 2000,
310
+ styles: {fill: "white", fontSize: 36}
311
+ })
312
+ o.set(title.id, {spatialId: move.id})
313
+
314
+ return o.stack(
315
+ o.video(clip, {duration: 4000}),
316
+ title
317
+ )
318
+ })
319
+ ```
320
+
321
+ Animations:
322
+
323
+ ```ts
324
+ const timeline = omni.timeline(o => {
325
+ const fadeIn = o.animate.opacity.make("easeIn", [
326
+ [0, 0],
327
+ [700, 1],
328
+ ])
329
+ const slideOut = o.animate.transform.make("linear", [
330
+ [0, o.transform({position: [0, 0]})],
331
+ [1000, o.transform({position: [400, 0]})],
332
+ ])
333
+
334
+ const title = o.text("Lower third", {
335
+ duration: 2000,
336
+ styles: {fill: "white", fontSize: 36}
337
+ })
338
+ o.set(title.id, {animationIds: [fadeIn.id, slideOut.id]})
339
+
340
+ return o.stack(
341
+ o.video(clip, {duration: 4000}),
342
+ title
343
+ )
344
+ })
345
+ ```
346
+
347
+ Built-in transform animations:
348
+
349
+ ```ts
350
+ const animOut = {
351
+ duration: 500,
352
+ offset: item.duration - 500,
75
353
  }
354
+ const slideIn = o.animate.presets.slideIn.make()
355
+ const slideOut = o.animate.presets.slideOut.make(animOut)
356
+ const spinIn = o.animate.presets.spinIn.make()
357
+ const spinOut = o.animate.presets.spinOut.make(animOut)
358
+ const zoomIn = o.animate.presets.zoomIn.make()
359
+ const zoomOut = o.animate.presets.zoomOut.make(animOut)
360
+ const bounceIn = o.animate.presets.bounceIn.make()
361
+ const bounceOut = o.animate.presets.bounceOut.make(animOut)
76
362
  ```
77
363
 
78
- Each item is a `[id, item]` pair. Items can reference others by ID, forming a directed graph of reusable, composable blocks.
364
+ Built-in scalar animations:
79
365
 
80
- ---
366
+ ```ts
367
+ const fadeIn = o.animate.presets.fadeIn.make()
368
+ const fadeOut = o.animate.presets.fadeOut.make(animOut)
369
+ ```
81
370
 
82
- ## πŸ–₯ CLI Usage
371
+ Animation application:
83
372
 
84
- ```bash
85
- # Build a timeline (manually or via AI)
86
- omnitool build-template promo.json
373
+ ```ts
374
+ const timeline = omni.timeline(o => {
375
+ const title = o.animate.opacity(
376
+ o.text("Lower third", {
377
+ duration: 2000,
378
+ styles: {fill: "white", fontSize: 36},
379
+ }),
380
+ "easeIn",
381
+ [
382
+ [0, 0],
383
+ [700, 1],
384
+ ]
385
+ )
386
+
387
+ return o.stack(
388
+ o.video(clip, {duration: 4000}),
389
+ title
390
+ )
391
+ })
392
+ ```
87
393
 
88
- # Validate structure
89
- omnitool validate promo.json
394
+ Reusable animation:
90
395
 
91
- # Render video
92
- omnitool export promo.json --output final.mp4
396
+ ```ts
397
+ const timeline = omni.timeline(o => {
398
+ const fadeIn = o.animate.opacity.make("easeIn", [
399
+ [0, 0],
400
+ [700, 1],
401
+ ])
402
+
403
+ const title = o.text("Lower third", {
404
+ duration: 2000,
405
+ styles: {fill: "white", fontSize: 36},
406
+ })
407
+ o.set(title.id, {animationIds: [fadeIn.id]})
408
+
409
+ return o.stack(
410
+ o.video(clip, {duration: 4000}),
411
+ title
412
+ )
413
+ })
414
+ ```
93
415
 
94
- # Batch render
95
- omnitool batch-export ./projects/* --output-dir ./exports
416
+ Animation metadata:
417
+
418
+ ```ts
419
+ import {animatableProperties, animationPresets} from "@omnimedia/omnitool"
420
+
421
+ Object.entries(animatableProperties).forEach(([property, meta]) => {
422
+ console.log(property, meta.type, meta.defaultTerp, meta.channels)
423
+ // transform transform linear [...]
424
+ // opacity scalar linear [...]
425
+ })
426
+
427
+ Object.entries(animationPresets).forEach(([preset, meta]) => {
428
+ console.log(preset, meta.type, meta.label, meta.defaults)
429
+ // slideIn motion Slide in {...}
430
+ // slideOut motion Slide out {...}
431
+ // spinIn motion Spin in {...}
432
+ // spinOut motion Spin out {...}
433
+ // zoomIn motion Zoom in {...}
434
+ // zoomOut motion Zoom out {...}
435
+ // bounceIn motion Bounce in {...}
436
+ // bounceOut motion Bounce out {...}
437
+ // fadeIn scalar Fade in {...}
438
+ // fadeOut scalar Fade out {...}
439
+ })
96
440
  ```
97
441
 
98
- ---
442
+ Animatable properties describe what can be keyframed, such as `transform` and `opacity`.
443
+ Animation presets describe built-in recipes, such as `slideIn` and `fadeIn`.
444
+ Use `animationPresets` to list available recipes, and `o.animate.presets` to create animation items.
445
+ Use `o.animate` to create or apply animation items.
99
446
 
100
- ## βœ… Use Cases
447
+ Preset options:
448
+ - `duration` sets the animation duration, defaulting to `700`.
449
+ - `offset` shifts generated keyframes in item-local time.
450
+ Useful for out animations: `item.duration - 500` starts `slideOut` 500ms before the item ends.
451
+ - `from` sets the start value, like opacity `0` or position `[-400, 0]`.
452
+ - `to` sets the end value, like opacity `1` or position `[0, 0]`.
453
+ - `terp` sets interpolation, defaulting to the preset's `terp`.
101
454
 
102
- - Render videos from scripts, templates, or AI
103
- - Build and test timelines without opening the UI
104
- - Generate video pipelines from code or prompts
455
+ Utils:
105
456
 
106
- ---
457
+ ```ts
458
+ import {resolveScalarAnimation, resolveTransformAnimation} from "@omnimedia/omnitool"
459
+
460
+ const transform = resolveTransformAnimation(localTime, transformAnimation)
461
+ const opacity = resolveScalarAnimation(localTime, opacityAnimation)
462
+ ```
107
463
 
108
- ## πŸ“˜ More to come
464
+ `resolveTransformAnimation` resolves an animated transform at the given local time.
465
+ `resolveScalarAnimation` resolves an animated scalar value at the given local time.
466
+ `localTime` is time relative to the item being resolved.
467
+ `clamp` is the default and currently only extrapolation mode, holding the first or last keyframe value outside the authored range.
109
468
 
110
- - `omnitool preview` – headless timeline viewer
111
- - `omnitool optimize` – auto-fit timeline elements
112
- - `omnitool ai` – native prompt-to-timeline generation
469
+ ## πŸ”€ Transitions
113
470
 
114
- ---
471
+ Transitions are sequence items placed between two visual items.
472
+
473
+ ```ts
474
+ const timeline = omni.timeline(o =>
475
+ o.sequence(
476
+ o.video(firstClip, {duration: 3000}),
477
+ o.transition.fade(700),
478
+ o.video(secondClip, {duration: 3000}),
479
+ )
480
+ )
481
+ ```
482
+
483
+ Use the exported transition registry to build UI:
484
+
485
+ ```ts
486
+ import {transitions} from "@omnimedia/omnitool"
487
+
488
+ const options = Object.entries(transitions).map(([key, transition]) => ({
489
+ key,
490
+ label: transition.label,
491
+ }))
492
+ ```
115
493
 
116
- ## 🧠 Learn More
494
+ Worker URL notes:
495
+ - `Driver.setup()` defaults to `/node_modules/@omnimedia/omnitool/x/driver/driver.worker.bundle.min.js`.
496
+ - If you serve the worker from a different location, pass `workerUrl`:
117
497
 
118
- Omni Tools powers AI agents, programmatic editing, and upcoming new version of omniclip video editor.
498
+ ```ts
499
+ const workerUrl = new URL(
500
+ "/path/to/driver.worker.bundle.min.js",
501
+ window.location.href
502
+ )
503
+ const driver = await Driver.setup({workerUrl})
504
+ ```
505
+
506
+ ## ▢️ Playback
507
+
508
+ ```ts
509
+ const player = await omni.playback(timeline)
510
+
511
+ document.body.appendChild(player.canvas)
512
+ await player.play()
513
+ player.playbackRate = 0.5 // slow motion
514
+ player.playbackRate = -1 // reverse
515
+ ```
516
+
517
+ Notes:
518
+ - Call `await player.update(timeline)` if you update the timeline.
519
+ - `playbackRate` supports slower, faster, and reverse visual playback. Audio currently plays only at `1`.
520
+
521
+ ## πŸ“€ Export
522
+
523
+ ```ts
524
+ await omni.render(timeline, framerate)
525
+ ```
526
+
527
+ ## 🧩 Timeline Format (TimelineFile)
528
+
529
+ All durations and timestamps are in milliseconds.
530
+
531
+ ```json
532
+ {
533
+ "format": "timeline",
534
+ "info": "https://omniclip.app/",
535
+ "version": 0,
536
+ "rootId": 123,
537
+ "items": [
538
+ {"id": 123, "kind": 0, "childrenIds": [456, 789]},
539
+ {"id": 456, "kind": 2, "mediaHash": "...", "start": 0, "duration": 3000},
540
+ {"id": 789, "kind": 4, "content": "Hello", "duration": 1500}
541
+ ]
542
+ }
543
+ ```
544
+
545
+ Timeline items:
546
+ - 0 `Sequence`
547
+ - 1 `Stack`
548
+ - 2 `Video`
549
+ - 3 `Audio`
550
+ - 4 `Text`
551
+ - 5 `Gap`
552
+ - 6 `Spatial`
553
+ - 7 `Animation`
554
+ - 8 `Transition`
555
+ - 9 `TextStyle`
556
+ - 10 `Filter`
557
+ - 11 `Caption`
558
+
559
+ ## πŸ—ΊοΈ Roadmap
560
+ - CLI commands:
561
+
562
+ ```bash
563
+ # build a reusable template from a timeline
564
+ omnitool build-template promo.json
565
+ # validate a timeline file
566
+ omnitool validate promo.json
567
+ # export a timeline to a video file
568
+ omnitool export promo.json --output final.mp4
569
+ # batch export multiple timelines
570
+ omnitool batch-export ./projects/* --output-dir ./exports
571
+ # headless timeline viewer
572
+ omnitool preview promo.json
573
+ # auto-fit timeline elements
574
+ omnitool optimize promo.json
575
+ # prompt-to-timeline generation
576
+ omnitool ai "make a 15s promo for tea"
577
+ ```
578
+
579
+ - smooth seeking
580
+ - keyframes
581
+ - custom filters, likely via driver-side registration with timeline sugar such as:
582
+
583
+ ```ts
584
+ // Register custom filter
585
+ driver.registerFilter({
586
+ type: "vhs",
587
+ make: params => new Filter(/* ... */),
588
+ schema: {
589
+ intensity: {type: "number", min: 0, max: 1, default: 0.5},
590
+ scanlines: {type: "boolean", default: true},
591
+ },
592
+ })
593
+
594
+ // Use custom filter
595
+ const timeline = omni.timeline(o =>
596
+ o.filter.custom(
597
+ "vhs",
598
+ o.video(clip, {duration: 3000}),
599
+ {intensity: 0.8}
600
+ )
601
+ )
602
+ ```
119
603
 
120
- β†’ [Visit Omniclip](https://omniclip.app)
604
+ - server-side, not just browsers