/** Logical codec — what the caller wants regardless of hardware. */
export type LogicalCodec = "h264" | "h265" | "vp9" | "av1";
/**
 * Hardware tier in priority order. Software fallback is always last.
 * Detection order matters: NVENC first because it gives the biggest win
 * on the broadest hardware (NVIDIA discrete + integrated). VideoToolbox
 * is macOS-native + free. VAAPI is Linux Intel/AMD. QSV is Intel-specific.
 */
export type EncoderTier = "nvenc" | "videotoolbox" | "vaapi" | "qsv" | "software";
export interface EncoderChoice {
    /** ffmpeg `-c:v` value, e.g. "h264_videotoolbox", "libx264". */
    codec: string;
    /** Tier we picked, for logging / metrics. */
    tier: EncoderTier;
    /**
     * Translated preset args for this encoder. Caller appends these
     * verbatim — they include the flag (e.g. `-preset` or `-realtime`).
     * Empty array = no preset flag (encoder uses its own default).
     */
    presetArgs: string[];
    /**
     * Extra flags this encoder requires for sane output. For example
     * h264_videotoolbox needs `-allow_sw 1` for fallback when GPU is busy,
     * and NVENC benefits from `-rc:v vbr_hq -multipass 2`.
     */
    extraArgs: string[];
}
/**
 * libx264 preset vocabulary that callers use today. We'll translate this
 * to whatever the chosen hardware encoder accepts. "medium" is the
 * libx264 default and our pre-R46 implicit preset.
 */
export type LibX264Preset = "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "medium" | "slow" | "slower" | "veryslow";
/**
 * Probe ffmpeg once and cache the encoder list. Process-scoped — we don't
 * worry about ffmpeg being upgraded under us mid-process.
 *
 * Test override: if `process.env.AUTOVIRAL_FAKE_ENCODERS` is set (comma-
 * separated codec names), use that list instead of probing. Lets unit
 * tests assert specific tier picks without spawning ffmpeg.
 */
export declare function detectAvailableEncoders(): Promise<Set<string>>;
/** Test-only — clears the encoder cache. */
export declare function _resetEncoderCacheForTests(): void;
/**
 * Pick the best available hardware encoder for `codec`, honouring the
 * given libx264-vocabulary preset. Returns the ffmpeg codec name + the
 * already-translated preset args ready to splice into the ffmpeg command.
 */
export declare function pickEncoder(codec: LogicalCodec, preset?: LibX264Preset): Promise<EncoderChoice>;
//# sourceMappingURL=gpu-encoder.d.ts.map