@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.
- package/README.md +556 -72
- package/package.json +20 -15
- package/s/context.ts +0 -7
- package/s/demo/demo.bundle.ts +104 -39
- package/s/demo/demo.css +246 -11
- package/s/demo/routines/export-test.ts +16 -0
- package/s/demo/routines/filmstrip-test.ts +23 -19
- package/s/demo/routines/load-video.ts +2 -3
- package/s/demo/routines/playback-test.ts +61 -0
- package/s/demo/routines/timeline-setup.ts +81 -0
- package/s/demo/routines/transcode-test.ts +21 -5
- package/s/demo/routines/transcriber-test.ts +34 -0
- package/s/demo/routines/transitions-test.ts +43 -0
- package/s/demo/routines/waveform-test.ts +35 -8
- package/s/driver/driver-worker.ts +9 -0
- package/s/driver/driver.test.ts +1 -1
- package/s/driver/driver.ts +52 -43
- package/s/driver/fns/host.ts +7 -6
- package/s/driver/fns/schematic.ts +69 -25
- package/s/driver/fns/work.ts +102 -214
- package/s/driver/parts/compositor.ts +319 -0
- package/s/driver/parts/machina.ts +19 -20
- package/s/driver/utils/find-pixi-filter.ts +24 -0
- package/s/driver/utils/load-decoder-source.ts +3 -4
- package/s/features/bg-remover/bg-remover.ts +26 -0
- package/s/features/bg-remover/default-spec.ts +11 -0
- package/s/features/bg-remover/types.ts +27 -0
- package/s/features/bg-remover/worker.bundle.ts +52 -0
- package/s/features/parts/expose-errors.ts +41 -0
- package/s/features/parts/load-pipe.ts +17 -0
- package/s/features/parts/types.ts +19 -0
- package/s/features/speech/transcribe/default-spec.ts +11 -0
- package/s/features/speech/transcribe/parts/prep-audio.ts +23 -0
- package/s/features/speech/transcribe/parts/transcribe.ts +70 -0
- package/s/features/speech/transcribe/transcriber.ts +46 -0
- package/s/features/speech/transcribe/types.ts +76 -0
- package/s/features/speech/transcribe/worker.bundle.ts +42 -0
- package/s/features/transition/parts/fragment.ts +24 -0
- package/s/features/transition/parts/types.ts +27 -0
- package/s/features/transition/parts/uniforms.ts +29 -0
- package/s/features/transition/parts/vertex.ts +31 -0
- package/s/features/transition/transition.ts +60 -0
- package/s/index.html.ts +103 -20
- package/s/index.ts +1 -0
- package/s/tests.bundle.ts +11 -0
- package/s/tests.html.ts +28 -0
- package/s/timeline/index.ts +17 -1
- package/s/timeline/parts/animations/make.ts +38 -0
- package/s/timeline/parts/animations/presets.ts +138 -0
- package/s/timeline/parts/animations/properties.ts +30 -0
- package/s/timeline/parts/animations/registry.ts +13 -0
- package/s/timeline/parts/animations/types.ts +80 -0
- package/s/timeline/parts/basics.ts +1 -1
- package/s/timeline/parts/captions.ts +91 -0
- package/s/timeline/parts/filmstrip.ts +43 -16
- package/s/timeline/parts/filters.ts +453 -0
- package/s/timeline/parts/item.ts +124 -11
- package/s/timeline/parts/media.ts +43 -1
- package/s/timeline/parts/resource-pool.ts +8 -5
- package/s/timeline/parts/resource.ts +3 -0
- package/s/timeline/parts/transitions.ts +102 -0
- package/s/timeline/parts/waveform/parts/collect.ts +72 -0
- package/s/timeline/parts/waveform/parts/render.ts +45 -0
- package/s/timeline/parts/waveform/parts/types.ts +24 -0
- package/s/timeline/parts/waveform/waveform.ts +161 -0
- package/s/timeline/renderers/export/parts/audio-gain.ts +17 -0
- package/s/timeline/renderers/export/parts/audio-mix.ts +133 -0
- package/s/timeline/renderers/export/parts/cursor.ts +291 -0
- package/s/timeline/renderers/export/parts/produce-audio.ts +64 -0
- package/s/timeline/renderers/export/parts/produce-video.ts +49 -0
- package/s/timeline/renderers/export/parts/resamplers.ts +48 -0
- package/s/timeline/renderers/export/produce.ts +28 -0
- package/s/timeline/renderers/parts/handy.ts +441 -0
- package/s/timeline/renderers/parts/samplers/audio/parts/find.ts +19 -0
- package/s/timeline/renderers/parts/samplers/audio/parts/init.ts +60 -0
- package/s/timeline/renderers/parts/samplers/audio/parts/sink.ts +38 -0
- package/s/timeline/renderers/parts/samplers/audio/parts/types.ts +16 -0
- package/s/timeline/renderers/parts/samplers/audio/sampler.ts +35 -0
- package/s/timeline/renderers/parts/samplers/visual/parts/defaults.ts +23 -0
- package/s/timeline/renderers/parts/samplers/visual/parts/image-sink.ts +51 -0
- package/s/timeline/renderers/parts/samplers/visual/parts/sample.ts +99 -0
- package/s/timeline/renderers/parts/samplers/visual/parts/sequence.ts +97 -0
- package/s/timeline/renderers/parts/samplers/visual/parts/transition.ts +28 -0
- package/s/timeline/renderers/parts/samplers/visual/parts/types.ts +11 -0
- package/s/timeline/renderers/parts/samplers/visual/parts/video-sink.ts +38 -0
- package/s/timeline/renderers/parts/samplers/visual/sampler.ts +31 -0
- package/s/timeline/renderers/parts/schedulers.ts +96 -0
- package/s/timeline/renderers/player/parts/playback.ts +213 -0
- package/s/timeline/renderers/player/player.ts +86 -0
- package/s/timeline/renderers/renderers.test.ts +403 -0
- package/s/timeline/sugar/helpers.ts +239 -0
- package/s/timeline/sugar/o.ts +443 -48
- package/s/timeline/sugar/omni.test.ts +210 -0
- package/s/timeline/sugar/omni.ts +38 -12
- package/s/timeline/types.ts +62 -0
- package/s/timeline/utils/anim.ts +63 -0
- package/s/timeline/utils/checksum.ts +5 -2
- package/s/timeline/utils/datafile.ts +15 -4
- package/s/timeline/utils/dummy-data.ts +3 -3
- package/s/timeline/utils/matrix.ts +54 -0
- package/s/timeline/utils/terps.ts +81 -0
- package/s/units/fps.ts +8 -0
- package/s/units/ms.ts +8 -0
- package/s/units/seconds.ts +8 -0
- package/x/WebGLRenderer-4CHIZDHY.js +2 -0
- package/x/WebGLRenderer-4CHIZDHY.js.map +7 -0
- package/x/WebGPURenderer-O6WXU2QR.js +2 -0
- package/x/WebGPURenderer-O6WXU2QR.js.map +7 -0
- package/x/browserAll-WNIOTNNP.js +2 -0
- package/x/browserAll-WNIOTNNP.js.map +7 -0
- package/x/chunk-23FOBGX6.js +2 -0
- package/x/chunk-23FOBGX6.js.map +7 -0
- package/x/chunk-73XOWA4F.js +393 -0
- package/x/chunk-73XOWA4F.js.map +7 -0
- package/x/chunk-IAWJKNX5.js +42 -0
- package/x/chunk-IAWJKNX5.js.map +7 -0
- package/x/chunk-KCMVLWBS.js +157 -0
- package/x/chunk-KCMVLWBS.js.map +7 -0
- package/x/chunk-MR32SQ27.js +2 -0
- package/x/chunk-MR32SQ27.js.map +7 -0
- package/x/chunk-VCUJJYRJ.js +327 -0
- package/x/chunk-VCUJJYRJ.js.map +7 -0
- package/x/chunk-XNIZ4L5W.js +269 -0
- package/x/chunk-XNIZ4L5W.js.map +7 -0
- package/x/chunk-ZLGNQFUI.js +15 -0
- package/x/chunk-ZLGNQFUI.js.map +7 -0
- package/x/context.d.ts +1 -4
- package/x/context.js +1 -5
- package/x/context.js.map +1 -1
- package/x/demo/WebGLRenderer-RSJAHIG2.js +2 -0
- package/x/demo/WebGLRenderer-RSJAHIG2.js.map +7 -0
- package/x/demo/WebGPURenderer-MGFAJCYY.js +2 -0
- package/x/demo/WebGPURenderer-MGFAJCYY.js.map +7 -0
- package/x/demo/browserAll-PTRBXBRP.js +2 -0
- package/x/demo/browserAll-PTRBXBRP.js.map +7 -0
- package/x/demo/chunk-CUYOGHWU.js +42 -0
- package/x/demo/chunk-CUYOGHWU.js.map +7 -0
- package/x/demo/chunk-DGTDNJ7W.js +2 -0
- package/x/demo/chunk-DGTDNJ7W.js.map +7 -0
- package/x/demo/chunk-FZ5BYF63.js +15 -0
- package/x/demo/chunk-FZ5BYF63.js.map +7 -0
- package/x/demo/chunk-KWN4NNES.js +269 -0
- package/x/demo/chunk-KWN4NNES.js.map +7 -0
- package/x/demo/chunk-OJ3FPXW7.js +157 -0
- package/x/demo/chunk-OJ3FPXW7.js.map +7 -0
- package/x/demo/chunk-PSLUOGTZ.js +393 -0
- package/x/demo/chunk-PSLUOGTZ.js.map +7 -0
- package/x/demo/chunk-VLCVEIFU.js +327 -0
- package/x/demo/chunk-VLCVEIFU.js.map +7 -0
- package/x/demo/chunk-ZWCPT5FR.js +2 -0
- package/x/demo/chunk-ZWCPT5FR.js.map +7 -0
- package/x/demo/demo.bundle.js +94 -36
- package/x/demo/demo.bundle.js.map +1 -1
- package/x/demo/demo.bundle.min.js +7359 -107
- package/x/demo/demo.bundle.min.js.map +4 -4
- package/x/demo/demo.css +246 -11
- package/x/demo/routines/export-test.d.ts +2 -0
- package/x/demo/routines/export-test.js +10 -0
- package/x/demo/routines/export-test.js.map +1 -0
- package/x/demo/routines/filmstrip-test.d.ts +1 -1
- package/x/demo/routines/filmstrip-test.js +21 -18
- package/x/demo/routines/filmstrip-test.js.map +1 -1
- package/x/demo/routines/load-video.d.ts +1 -1
- package/x/demo/routines/load-video.js +1 -2
- package/x/demo/routines/load-video.js.map +1 -1
- package/x/demo/routines/playback-test.d.ts +2 -0
- package/x/demo/routines/playback-test.js +51 -0
- package/x/demo/routines/playback-test.js.map +1 -0
- package/x/demo/routines/timeline-setup.d.ts +6 -0
- package/x/demo/routines/timeline-setup.js +59 -0
- package/x/demo/routines/timeline-setup.js.map +1 -0
- package/x/demo/routines/transcode-test.js +17 -5
- package/x/demo/routines/transcode-test.js.map +1 -1
- package/x/demo/routines/transcriber-test.d.ts +4 -0
- package/x/demo/routines/transcriber-test.js +33 -0
- package/x/demo/routines/transcriber-test.js.map +1 -0
- package/x/demo/routines/transitions-test.d.ts +5 -0
- package/x/demo/routines/transitions-test.js +35 -0
- package/x/demo/routines/transitions-test.js.map +1 -0
- package/x/demo/routines/waveform-test.d.ts +2 -1
- package/x/demo/routines/waveform-test.js +29 -8
- package/x/demo/routines/waveform-test.js.map +1 -1
- package/x/demo/webworkerAll-JENRT6BT.js +2 -0
- package/x/demo/webworkerAll-JENRT6BT.js.map +7 -0
- package/x/driver/driver-worker.d.ts +1 -0
- package/x/driver/driver-worker.js +6 -0
- package/x/driver/driver-worker.js.map +1 -0
- package/x/driver/driver.d.ts +24 -9
- package/x/driver/driver.js +51 -40
- package/x/driver/driver.js.map +1 -1
- package/x/driver/driver.test.js +1 -1
- package/x/driver/driver.test.js.map +1 -1
- package/x/driver/driver.worker.bundle.min.js +137 -1137
- package/x/driver/driver.worker.bundle.min.js.map +4 -4
- package/x/driver/fns/host.d.ts +12 -4
- package/x/driver/fns/host.js +3 -3
- package/x/driver/fns/host.js.map +1 -1
- package/x/driver/fns/schematic.d.ts +65 -25
- package/x/driver/fns/work.d.ts +14 -7
- package/x/driver/fns/work.js +83 -174
- package/x/driver/fns/work.js.map +1 -1
- package/x/driver/parts/compositor.d.ts +39 -0
- package/x/driver/parts/compositor.js +264 -0
- package/x/driver/parts/compositor.js.map +1 -0
- package/x/driver/parts/machina.d.ts +0 -20
- package/x/driver/parts/machina.js +6 -10
- package/x/driver/parts/machina.js.map +1 -1
- package/x/driver/utils/find-pixi-filter.d.ts +5 -0
- package/x/driver/utils/find-pixi-filter.js +13 -0
- package/x/driver/utils/find-pixi-filter.js.map +1 -0
- package/x/driver/utils/load-decoder-source.d.ts +2 -1
- package/x/driver/utils/load-decoder-source.js +2 -3
- package/x/driver/utils/load-decoder-source.js.map +1 -1
- package/x/features/bg-remover/bg-remover.d.ts +5 -0
- package/x/features/bg-remover/bg-remover.js +18 -0
- package/x/features/bg-remover/bg-remover.js.map +1 -0
- package/x/features/bg-remover/default-spec.d.ts +2 -0
- package/x/features/bg-remover/default-spec.js +6 -0
- package/x/features/bg-remover/default-spec.js.map +1 -0
- package/x/features/bg-remover/types.d.ts +20 -0
- package/x/features/bg-remover/types.js +2 -0
- package/x/features/bg-remover/types.js.map +1 -0
- package/x/features/bg-remover/worker.bundle.js +39 -0
- package/x/features/bg-remover/worker.bundle.js.map +1 -0
- package/x/features/bg-remover/worker.bundle.min.js +2916 -0
- package/x/features/bg-remover/worker.bundle.min.js.map +7 -0
- package/x/features/parts/expose-errors.d.ts +3 -0
- package/x/features/parts/expose-errors.js +32 -0
- package/x/features/parts/expose-errors.js.map +1 -0
- package/x/features/parts/load-pipe.d.ts +2 -0
- package/x/features/parts/load-pipe.js +13 -0
- package/x/features/parts/load-pipe.js.map +1 -0
- package/x/features/parts/types.d.ts +15 -0
- package/x/features/parts/types.js +2 -0
- package/x/features/parts/types.js.map +1 -0
- package/x/features/speech/transcribe/default-spec.d.ts +2 -0
- package/x/features/speech/transcribe/default-spec.js +8 -0
- package/x/features/speech/transcribe/default-spec.js.map +1 -0
- package/x/features/speech/transcribe/parts/prep-audio.d.ts +5 -0
- package/x/features/speech/transcribe/parts/prep-audio.js +21 -0
- package/x/features/speech/transcribe/parts/prep-audio.js.map +1 -0
- package/x/features/speech/transcribe/parts/transcribe.d.ts +5 -0
- package/x/features/speech/transcribe/parts/transcribe.js +56 -0
- package/x/features/speech/transcribe/parts/transcribe.js.map +1 -0
- package/x/features/speech/transcribe/transcriber.d.ts +5 -0
- package/x/features/speech/transcribe/transcriber.js +33 -0
- package/x/features/speech/transcribe/transcriber.js.map +1 -0
- package/x/features/speech/transcribe/types.d.ts +59 -0
- package/x/features/speech/transcribe/types.js +2 -0
- package/x/features/speech/transcribe/types.js.map +1 -0
- package/x/features/speech/transcribe/worker.bundle.js +35 -0
- package/x/features/speech/transcribe/worker.bundle.js.map +1 -0
- package/x/features/speech/transcribe/worker.bundle.min.js +2916 -0
- package/x/features/speech/transcribe/worker.bundle.min.js.map +7 -0
- package/x/features/transition/parts/fragment.d.ts +1 -0
- package/x/features/transition/parts/fragment.js +25 -0
- package/x/features/transition/parts/fragment.js.map +1 -0
- package/x/features/transition/parts/types.d.ts +23 -0
- package/x/features/transition/parts/types.js +2 -0
- package/x/features/transition/parts/types.js.map +1 -0
- package/x/features/transition/parts/uniforms.d.ts +31 -0
- package/x/features/transition/parts/uniforms.js +27 -0
- package/x/features/transition/parts/uniforms.js.map +1 -0
- package/x/features/transition/parts/vertex.d.ts +1 -0
- package/x/features/transition/parts/vertex.js +32 -0
- package/x/features/transition/parts/vertex.js.map +1 -0
- package/x/features/transition/transition.d.ts +5 -0
- package/x/features/transition/transition.js +50 -0
- package/x/features/transition/transition.js.map +1 -0
- package/x/index.d.ts +1 -0
- package/x/index.html +349 -30
- package/x/index.html.js +103 -19
- package/x/index.html.js.map +1 -1
- package/x/index.js +1 -0
- package/x/index.js.map +1 -1
- package/x/tests.bundle.d.ts +1 -0
- package/x/tests.bundle.js +8 -0
- package/x/tests.bundle.js.map +1 -0
- package/x/tests.bundle.min.js +7374 -0
- package/x/tests.bundle.min.js.map +7 -0
- package/x/tests.html +316 -0
- package/x/tests.html.d.ts +2 -0
- package/x/tests.html.js +22 -0
- package/x/tests.html.js.map +1 -0
- package/x/timeline/index.d.ts +16 -0
- package/x/timeline/index.js +16 -0
- package/x/timeline/index.js.map +1 -1
- package/x/timeline/parts/animations/make.d.ts +3 -0
- package/x/timeline/parts/animations/make.js +29 -0
- package/x/timeline/parts/animations/make.js.map +1 -0
- package/x/timeline/parts/animations/presets.d.ts +170 -0
- package/x/timeline/parts/animations/presets.js +135 -0
- package/x/timeline/parts/animations/presets.js.map +1 -0
- package/x/timeline/parts/animations/properties.d.ts +84 -0
- package/x/timeline/parts/animations/properties.js +25 -0
- package/x/timeline/parts/animations/properties.js.map +1 -0
- package/x/timeline/parts/animations/registry.d.ts +218 -0
- package/x/timeline/parts/animations/registry.js +11 -0
- package/x/timeline/parts/animations/registry.js.map +1 -0
- package/x/timeline/parts/animations/types.d.ts +60 -0
- package/x/timeline/parts/animations/types.js +2 -0
- package/x/timeline/parts/animations/types.js.map +1 -0
- package/x/timeline/parts/basics.d.ts +1 -1
- package/x/timeline/parts/captions.d.ts +41 -0
- package/x/timeline/parts/captions.js +55 -0
- package/x/timeline/parts/captions.js.map +1 -0
- package/x/timeline/parts/filmstrip.d.ts +4 -3
- package/x/timeline/parts/filmstrip.js +29 -10
- package/x/timeline/parts/filmstrip.js.map +1 -1
- package/x/timeline/parts/filters.d.ts +108 -0
- package/x/timeline/parts/filters.js +340 -0
- package/x/timeline/parts/filters.js.map +1 -0
- package/x/timeline/parts/item.d.ts +106 -12
- package/x/timeline/parts/item.js +11 -7
- package/x/timeline/parts/item.js.map +1 -1
- package/x/timeline/parts/media.d.ts +6 -0
- package/x/timeline/parts/media.js +35 -1
- package/x/timeline/parts/media.js.map +1 -1
- package/x/timeline/parts/resource-pool.d.ts +3 -0
- package/x/timeline/parts/resource-pool.js +7 -4
- package/x/timeline/parts/resource-pool.js.map +1 -1
- package/x/timeline/parts/resource.d.ts +3 -0
- package/x/timeline/parts/transitions.d.ts +15 -0
- package/x/timeline/parts/transitions.js +81 -0
- package/x/timeline/parts/transitions.js.map +1 -0
- package/x/timeline/parts/waveform/parts/collect.d.ts +11 -0
- package/x/timeline/parts/waveform/parts/collect.js +56 -0
- package/x/timeline/parts/waveform/parts/collect.js.map +1 -0
- package/x/timeline/parts/waveform/parts/render.d.ts +5 -0
- package/x/timeline/parts/waveform/parts/render.js +29 -0
- package/x/timeline/parts/waveform/parts/render.js.map +1 -0
- package/x/timeline/parts/waveform/parts/types.d.ts +21 -0
- package/x/timeline/parts/waveform/parts/types.js +2 -0
- package/x/timeline/parts/waveform/parts/types.js.map +1 -0
- package/x/timeline/parts/waveform/waveform.d.ts +19 -0
- package/x/timeline/parts/waveform/waveform.js +133 -0
- package/x/timeline/parts/waveform/waveform.js.map +1 -0
- package/x/timeline/renderers/export/parts/audio-gain.d.ts +1 -0
- package/x/timeline/renderers/export/parts/audio-gain.js +13 -0
- package/x/timeline/renderers/export/parts/audio-gain.js.map +1 -0
- package/x/timeline/renderers/export/parts/audio-mix.d.ts +21 -0
- package/x/timeline/renderers/export/parts/audio-mix.js +89 -0
- package/x/timeline/renderers/export/parts/audio-mix.js.map +1 -0
- package/x/timeline/renderers/export/parts/cursor.d.ts +35 -0
- package/x/timeline/renderers/export/parts/cursor.js +236 -0
- package/x/timeline/renderers/export/parts/cursor.js.map +1 -0
- package/x/timeline/renderers/export/parts/produce-audio.d.ts +6 -0
- package/x/timeline/renderers/export/parts/produce-audio.js +41 -0
- package/x/timeline/renderers/export/parts/produce-audio.js.map +1 -0
- package/x/timeline/renderers/export/parts/produce-video.d.ts +10 -0
- package/x/timeline/renderers/export/parts/produce-video.js +26 -0
- package/x/timeline/renderers/export/parts/produce-video.js.map +1 -0
- package/x/timeline/renderers/export/parts/resamplers.d.ts +12 -0
- package/x/timeline/renderers/export/parts/resamplers.js +29 -0
- package/x/timeline/renderers/export/parts/resamplers.js.map +1 -0
- package/x/timeline/renderers/export/produce.d.ts +13 -0
- package/x/timeline/renderers/export/produce.js +15 -0
- package/x/timeline/renderers/export/produce.js.map +1 -0
- package/x/timeline/renderers/parts/handy.d.ts +38 -0
- package/x/timeline/renderers/parts/handy.js +263 -0
- package/x/timeline/renderers/parts/handy.js.map +1 -0
- package/x/timeline/renderers/parts/samplers/audio/parts/find.d.ts +6 -0
- package/x/timeline/renderers/parts/samplers/audio/parts/find.js +15 -0
- package/x/timeline/renderers/parts/samplers/audio/parts/find.js.map +1 -0
- package/x/timeline/renderers/parts/samplers/audio/parts/init.d.ts +5 -0
- package/x/timeline/renderers/parts/samplers/audio/parts/init.js +40 -0
- package/x/timeline/renderers/parts/samplers/audio/parts/init.js.map +1 -0
- package/x/timeline/renderers/parts/samplers/audio/parts/sink.d.ts +8 -0
- package/x/timeline/renderers/parts/samplers/audio/parts/sink.js +24 -0
- package/x/timeline/renderers/parts/samplers/audio/parts/sink.js.map +1 -0
- package/x/timeline/renderers/parts/samplers/audio/parts/types.d.ts +14 -0
- package/x/timeline/renderers/parts/samplers/audio/parts/types.js +2 -0
- package/x/timeline/renderers/parts/samplers/audio/parts/types.js.map +1 -0
- package/x/timeline/renderers/parts/samplers/audio/sampler.d.ts +11 -0
- package/x/timeline/renderers/parts/samplers/audio/sampler.js +22 -0
- package/x/timeline/renderers/parts/samplers/audio/sampler.js.map +1 -0
- package/x/timeline/renderers/parts/samplers/visual/parts/defaults.d.ts +8 -0
- package/x/timeline/renderers/parts/samplers/visual/parts/defaults.js +14 -0
- package/x/timeline/renderers/parts/samplers/visual/parts/defaults.js.map +1 -0
- package/x/timeline/renderers/parts/samplers/visual/parts/image-sink.d.ts +11 -0
- package/x/timeline/renderers/parts/samplers/visual/parts/image-sink.js +36 -0
- package/x/timeline/renderers/parts/samplers/visual/parts/image-sink.js.map +1 -0
- package/x/timeline/renderers/parts/samplers/visual/parts/sample.d.ts +9 -0
- package/x/timeline/renderers/parts/samplers/visual/parts/sample.js +70 -0
- package/x/timeline/renderers/parts/samplers/visual/parts/sample.js.map +1 -0
- package/x/timeline/renderers/parts/samplers/visual/parts/sequence.d.ts +6 -0
- package/x/timeline/renderers/parts/samplers/visual/parts/sequence.js +63 -0
- package/x/timeline/renderers/parts/samplers/visual/parts/sequence.js.map +1 -0
- package/x/timeline/renderers/parts/samplers/visual/parts/transition.d.ts +3 -0
- package/x/timeline/renderers/parts/samplers/visual/parts/transition.js +18 -0
- package/x/timeline/renderers/parts/samplers/visual/parts/transition.js.map +1 -0
- package/x/timeline/renderers/parts/samplers/visual/parts/types.d.ts +9 -0
- package/x/timeline/renderers/parts/samplers/visual/parts/types.js +2 -0
- package/x/timeline/renderers/parts/samplers/visual/parts/types.js.map +1 -0
- package/x/timeline/renderers/parts/samplers/visual/parts/video-sink.d.ts +8 -0
- package/x/timeline/renderers/parts/samplers/visual/parts/video-sink.js +24 -0
- package/x/timeline/renderers/parts/samplers/visual/parts/video-sink.js.map +1 -0
- package/x/timeline/renderers/parts/samplers/visual/sampler.d.ts +7 -0
- package/x/timeline/renderers/parts/samplers/visual/sampler.js +20 -0
- package/x/timeline/renderers/parts/samplers/visual/sampler.js.map +1 -0
- package/x/timeline/renderers/parts/schedulers.d.ts +17 -0
- package/x/timeline/renderers/parts/schedulers.js +64 -0
- package/x/timeline/renderers/parts/schedulers.js.map +1 -0
- package/x/timeline/renderers/player/parts/playback.d.ts +39 -0
- package/x/timeline/renderers/player/parts/playback.js +160 -0
- package/x/timeline/renderers/player/parts/playback.js.map +1 -0
- package/x/timeline/renderers/player/player.d.ts +27 -0
- package/x/timeline/renderers/player/player.js +64 -0
- package/x/timeline/renderers/player/player.js.map +1 -0
- package/x/timeline/renderers/renderers.test.d.ts +33 -0
- package/x/timeline/renderers/renderers.test.js +321 -0
- package/x/timeline/renderers/renderers.test.js.map +1 -0
- package/x/timeline/sugar/helpers.d.ts +72 -0
- package/x/timeline/sugar/helpers.js +122 -0
- package/x/timeline/sugar/helpers.js.map +1 -0
- package/x/timeline/sugar/o.d.ts +59 -8
- package/x/timeline/sugar/o.js +326 -40
- package/x/timeline/sugar/o.js.map +1 -1
- package/x/timeline/sugar/omni.d.ts +11 -2
- package/x/timeline/sugar/omni.js +30 -9
- package/x/timeline/sugar/omni.js.map +1 -1
- package/x/timeline/sugar/omni.test.d.ts +27 -0
- package/x/timeline/sugar/omni.test.js +128 -0
- package/x/timeline/sugar/omni.test.js.map +1 -0
- package/x/timeline/types.d.ts +37 -0
- package/x/timeline/types.js +2 -0
- package/x/timeline/types.js.map +1 -0
- package/x/timeline/utils/anim.d.ts +3 -0
- package/x/timeline/utils/anim.js +40 -0
- package/x/timeline/utils/anim.js.map +1 -0
- package/x/timeline/utils/checksum.d.ts +3 -2
- package/x/timeline/utils/checksum.js +2 -1
- package/x/timeline/utils/checksum.js.map +1 -1
- package/x/timeline/utils/datafile.d.ts +5 -3
- package/x/timeline/utils/datafile.js +18 -5
- package/x/timeline/utils/datafile.js.map +1 -1
- package/x/timeline/utils/dummy-data.d.ts +1 -2
- package/x/timeline/utils/dummy-data.js +4 -2
- package/x/timeline/utils/dummy-data.js.map +1 -1
- package/x/timeline/utils/matrix.d.ts +17 -0
- package/x/timeline/utils/matrix.js +36 -0
- package/x/timeline/utils/matrix.js.map +1 -0
- package/x/timeline/utils/terps.d.ts +11 -0
- package/x/timeline/utils/terps.js +57 -0
- package/x/timeline/utils/terps.js.map +1 -0
- package/x/units/fps.d.ts +6 -0
- package/x/units/fps.js +2 -0
- package/x/units/fps.js.map +1 -0
- package/x/units/ms.d.ts +6 -0
- package/x/units/ms.js +2 -0
- package/x/units/ms.js.map +1 -0
- package/x/units/seconds.d.ts +6 -0
- package/x/units/seconds.js +2 -0
- package/x/units/seconds.js.map +1 -0
- package/x/webworkerAll-RLCTMSDD.js +2 -0
- package/x/webworkerAll-RLCTMSDD.js.map +7 -0
- package/s/tests.test.ts +0 -8
- package/s/timeline/parts/waveform.ts +0 -62
- package/s/timeline/sugar/omni-test.ts +0 -38
- package/x/tests.test.js +0 -6
- package/x/tests.test.js.map +0 -1
- package/x/timeline/parts/waveform.d.ts +0 -8
- package/x/timeline/parts/waveform.js +0 -51
- package/x/timeline/parts/waveform.js.map +0 -1
- package/x/timeline/sugar/omni-test.js +0 -22
- package/x/timeline/sugar/omni-test.js.map +0 -1
- /package/x/{tests.test.d.ts β features/bg-remover/worker.bundle.d.ts} +0 -0
- /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:**
|
|
4
|
+
> **Note:** Omnitool is under development. Expect breaking changes, evolving APIs, and experimental features.
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
## β
What this library is
|
|
9
9
|
|
|
10
|
-
|
|
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
|
-
|
|
16
|
+
```bash
|
|
17
|
+
npm i @omnimedia/omnitool
|
|
18
|
+
```
|
|
15
19
|
|
|
16
|
-
|
|
20
|
+
## π¦ Quick Start
|
|
17
21
|
|
|
18
|
-
|
|
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
|
-
|
|
59
|
+
Declarative helper style (no explicit `o` in timeline declarations):
|
|
25
60
|
|
|
26
|
-
|
|
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
|
-
|
|
29
|
-
|
|
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
|
-
|
|
197
|
+
Update caption options after creation:
|
|
35
198
|
|
|
36
199
|
```ts
|
|
37
|
-
|
|
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
|
-
|
|
40
|
-
|
|
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
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
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
|
-
|
|
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
|
-
|
|
286
|
+
Filter metadata for UI:
|
|
63
287
|
|
|
64
|
-
```
|
|
65
|
-
{
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
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
|
-
|
|
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
|
-
|
|
371
|
+
Animation application:
|
|
83
372
|
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
|
|
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
|
-
|
|
89
|
-
omnitool validate promo.json
|
|
394
|
+
Reusable animation:
|
|
90
395
|
|
|
91
|
-
|
|
92
|
-
|
|
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
|
-
|
|
95
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
604
|
+
- server-side, not just browsers
|