import { type Result } from '@riverbankcms/core';
export type BrowserFfmpegLoadError = {
    readonly tag: 'ffmpeg-import-failed';
    readonly message: string;
} | {
    readonly tag: 'ffmpeg-core-load-failed';
    readonly message: string;
};
export type BrowserFfmpegRuntime = {
    readonly ffmpeg: BrowserFfmpeg;
    readonly fetchFile: (file: File | Blob | string) => Promise<Uint8Array>;
};
export type BrowserFfmpeg = {
    readonly loaded: boolean;
    readonly load: (config: BrowserFfmpegLoadConfig, options?: {
        readonly signal?: AbortSignal;
    }) => Promise<boolean>;
    readonly exec: (args: string[], timeout?: number, options?: {
        readonly signal?: AbortSignal;
    }) => Promise<number>;
    readonly writeFile: (path: string, data: Uint8Array, options?: {
        readonly signal?: AbortSignal;
    }) => Promise<boolean>;
    readonly readFile: (path: string, encoding?: 'binary', options?: {
        readonly signal?: AbortSignal;
    }) => Promise<Uint8Array | string>;
    readonly deleteFile: (path: string, options?: {
        readonly signal?: AbortSignal;
    }) => Promise<boolean>;
    readonly terminate: () => void;
    readonly on: (event: 'progress', callback: BrowserFfmpegProgressListener) => void;
    readonly off: (event: 'progress', callback: BrowserFfmpegProgressListener) => void;
};
type BrowserFfmpegProgressListener = (event: {
    readonly progress: number;
    readonly time: number;
}) => void;
type BrowserFfmpegLoadConfig = {
    readonly coreURL: string;
    readonly wasmURL: string;
};
export declare const FFMPEG_CORE_VERSION = "0.12.10";
export declare const FFMPEG_CORE_BASE_PATH = "/vendor/ffmpeg/core/0.12.10";
/**
 * Dynamically imports and loads a single-threaded FFmpeg.wasm runtime.
 *
 * The heavy FFmpeg packages stay out of the main dashboard bundle because this
 * module only references them inside dynamic imports.
 */
export declare function loadBrowserFfmpeg(options?: {
    readonly signal?: AbortSignal;
}): Promise<Result<BrowserFfmpegRuntime, BrowserFfmpegLoadError>>;
export {};
