### Installing Omni Tools via npm (bash) Source: https://github.com/omni-media/omnitool/blob/main/README.md Command to install the Omni Tools package using npm. This is the first step to using the library. ```bash npm install @omni/tools ``` -------------------------------- ### Using Omni Tools Command Line Interface (bash) Source: https://github.com/omni-media/omnitool/blob/main/README.md Provides examples of common CLI commands for Omni Tools, including building, validating, exporting single timelines, and batch exporting multiple projects. ```bash # Build a timeline (manually or via AI) omnitool build-template promo.json # Validate structure omnitool validate promo.json # Render video omnitool export promo.json --output final.mp4 # Batch render omnitool batch-export ./projects/* --output-dir ./exports ``` -------------------------------- ### Omni Timeline Format Structure (JSON) Source: https://github.com/omni-media/omnitool/blob/main/README.md Illustrates the structure of the Omni Timeline Format (OTF) in JSON, showing how items are defined as ID-item pairs and can reference each other to form a graph. ```json { "format": "omni-timeline@1", "root": "root-1", "items": [ ["root-1", ["sequence", { "children": ["video-1", "stack-1"] }]], ["video-1", ["video", { ... }]], ["stack-1", ["stack", { "children": ["text-1", "audio-1"] }]], ["text-1", ["text", { ... }]], ["audio-1", ["audio", { ... }]] ] } ``` -------------------------------- ### Defining a Timeline Programmatically (TypeScript) Source: https://github.com/omni-media/omnitool/blob/main/README.md Demonstrates how to construct a video timeline using the Omni Tools TypeScript API, combining video clips, subtitles, crossfades, and stacking elements. ```ts import { subtitle, crossfade, sequence, stack, video } from "@omni/tools" const watermark = subtitle("omniclip") const xfade = crossfade(500) const timeline = sequence( video("opening-credits.mp4"), xfade, stack( video("skateboarding.mp4"), watermark ), xfade, stack( video("biking.mp4"), watermark ) ) ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.