omni-compress - v2.3.1
    Preparing search index...

    Interface VideoOptions

    Options for compressVideo().

    interface VideoOptions {
        format?: "mp4" | "webm";
        bitrate?: string;
        maxWidth?: number;
        maxHeight?: number;
        fps?: number;
        preserveMetadata?: boolean;
        strict?: boolean;
        useWorker?: boolean;
        onProgress?: (percent: number) => void;
        signal?: AbortSignal;
    }
    Index

    Properties

    format?: "mp4" | "webm"

    Target output format. Default: 'mp4'.

    bitrate?: string

    Target video bitrate, e.g. '1M', '2M'. Default: '1M'.

    maxWidth?: number

    Resize output width to at most this many pixels (maintains aspect ratio).

    maxHeight?: number

    Resize output height to at most this many pixels (maintains aspect ratio).

    fps?: number

    Output frames per second. Default: input FPS.

    preserveMetadata?: boolean

    When true, metadata is preserved. Default: false (stripped).

    strict?: boolean

    If the compressed video is larger than the original, return the original. Default: false.

    useWorker?: boolean

    Explicitly force Web Worker usage (true) or Main Thread usage (false). If omitted, the library chooses based on file size and operation type.

    onProgress?: (percent: number) => void

    Called with progress 0–100 during processing.

    signal?: AbortSignal

    Cancel the operation. Throws AbortError when signalled.