import type { Readable } from 'node:stream'; import type { CodecInfo, EncoderInfo, FfmpegCommandOptions, FfmpegCommandThis, FfprobeCallback, FilterInfo, FormatInfo } from './types.js'; type FfmpegInput = string | Readable | FfmpegCommandOptions | undefined; interface FfmpegCommand extends FfmpegCommandThis { clone(): FfmpegCommand; } interface FfmpegCommandStatic { new (input?: FfmpegInput, options?: FfmpegCommandOptions): FfmpegCommand; (input?: FfmpegInput, options?: FfmpegCommandOptions): FfmpegCommand; prototype: FfmpegCommand; setFfmpegPath(p: string): void; setFfprobePath(p: string): void; setFlvtoolPath(p: string): void; availableFilters(callback: (err: Error | null, filters?: Record) => void): void; getAvailableFilters(callback: (err: Error | null, filters?: Record) => void): void; availableCodecs(callback: (err: Error | null, codecs?: Record) => void): void; getAvailableCodecs(callback: (err: Error | null, codecs?: Record) => void): void; availableFormats(callback: (err: Error | null, formats?: Record) => void): void; getAvailableFormats(callback: (err: Error | null, formats?: Record) => void): void; availableEncoders(callback: (err: Error | null, encoders?: Record) => void): void; getAvailableEncoders(callback: (err: Error | null, encoders?: Record) => void): void; ffprobe(file: string, callback: FfprobeCallback): void; ffprobe(file: string, options: string[], callback: FfprobeCallback): void; ffprobe(file: string, index: number, callback: FfprobeCallback): void; ffprobe(file: string, index: number, options: string[], callback: FfprobeCallback): void; } /** * Resolve the bundled `presets/` directory path in a way that survives * both the regular CJS dist (where `__dirname` is defined) and the * ESM-bundler scenario (SvelteKit / Vite SSR / esbuild ESM mode) where * a downstream tool re-emits our compiled CJS as part of an ESM bundle * and `__dirname` is undefined. See issue #43 / upstream #1283. * * The `dirname` parameter exists for testability — production callers * pass the default (current `__dirname` if defined, else undefined). * * In the ESM-bundle branch we return the relative string `'presets'` * rather than trying to recover the absolute path from `import.meta`: * indirect-`eval` of an `import.meta` reference is parsed as Script and * always SyntaxErrors, so any such recovery is dead code in practice. * The relative-path fallback lets module load succeed; preset loading * will surface the existing 'preset … could not be loaded' error * instead of crashing the import with `ReferenceError`. */ export declare function resolveBundledPresetsDir(dirname?: string | undefined): string; declare const FfmpegCommand: FfmpegCommandStatic; export default FfmpegCommand; //# sourceMappingURL=fluent-ffmpeg.d.ts.map