import type { AVCodecID, DemuxerFormat } from '../constants/index.js';
import type { DemuxerOptions } from './demuxer.js';
/**
 * Stream type as a readable string.
 */
export type ProbeStreamType = 'video' | 'audio' | 'subtitle' | 'data' | 'attachment' | 'unknown';
/**
 * Structured information about a single media stream.
 */
export interface ProbeStream {
    /** Stream index within the container. */
    index: number;
    /** Stream type. */
    type: ProbeStreamType;
    /** Codec short name (e.g. `'h264'`), or `'unknown'`. */
    codec: string;
    /** Codec long name (e.g. `'H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10'`). */
    codecLongName: string;
    /** Raw `AVCodecID`. */
    codecId: AVCodecID;
    /** Stream bitrate in bits per second, or 0 if unknown. */
    bitrate: number;
    /** Stream-level metadata tags. */
    metadata: Record<string, string>;
    /** Language tag (from metadata), if present. */
    language?: string;
    /** True if this stream is marked as default. */
    default: boolean;
    /** Video width in pixels. */
    width?: number;
    /** Video height in pixels. */
    height?: number;
    /** Pixel format name (e.g. `'yuv420p'`). */
    pixelFormat?: string;
    /** Average frame rate in frames per second. */
    frameRate?: number;
    /** Sample aspect ratio. */
    sampleAspectRatio?: {
        num: number;
        den: number;
    };
    /** Audio sample rate in Hz. */
    sampleRate?: number;
    /** Number of audio channels. */
    channels?: number;
    /** Sample format name (e.g. `'fltp'`). */
    sampleFormat?: string;
}
/**
 * Structured result of {@link probe}.
 */
export interface ProbeResult {
    /** Container format short name (e.g. `'mov,mp4,m4a,3gp,3g2,mj2'`). */
    format: string;
    /** Container format long name (e.g. `'QuickTime / MOV'`). */
    formatLongName: string;
    /** Total duration in seconds, or 0 if unknown. */
    duration: number;
    /** Start time in seconds, or 0 if unknown. */
    startTime: number;
    /** Overall bitrate in bits per second, or 0 if unknown. */
    bitrate: number;
    /** Number of streams. */
    nbStreams: number;
    /** All streams in container order. */
    streams: ProbeStream[];
    /** Container-level metadata tags. */
    metadata: Record<string, string>;
    /** First video stream, if any (convenience). */
    video?: ProbeStream;
    /** First audio stream, if any (convenience). */
    audio?: ProbeStream;
}
/**
 * Options for {@link probe} and {@link probeSync}.
 *
 * Same shape as {@link DemuxerOptions}: when `format` is a known literal, the
 * `options` bag is typed to that demuxer's options.
 */
export type ProbeOptions<F extends DemuxerFormat | (string & {}) = DemuxerFormat | (string & {})> = DemuxerOptions<F>;
/**
 * Probe a media source and return structured metadata.
 *
 * Opens the input, reads stream information, builds a typed summary, and closes
 * the input again. Equivalent to `ffprobe -show_format -show_streams`, but as a
 * plain object.
 *
 * @param input - Media source: a file path/URL or an in-memory buffer
 *
 * @param options - Optional format hint and demuxer options
 *
 * @returns Structured probe result
 *
 * @throws {FFmpegError} If the input cannot be opened or has no stream info
 *
 * @example
 * ```typescript
 * const info = await probe('input.mkv');
 * if (info.video) {
 *   console.log(`${info.video.codec} ${info.video.width}x${info.video.height} @ ${info.video.frameRate}fps`);
 * }
 * ```
 *
 * @see {@link probeSync} For the synchronous version
 * @see {@link Demuxer} For full streaming access
 */
export declare function probe<const F extends DemuxerFormat | (string & {}) = DemuxerFormat | (string & {})>(input: string | Buffer, options?: ProbeOptions<F>): Promise<ProbeResult>;
/**
 * Probe a media source and return structured metadata synchronously.
 * Synchronous version of {@link probe}.
 *
 * @param input - Media source: a file path/URL or an in-memory buffer
 *
 * @param options - Optional format hint and demuxer options
 *
 * @returns Structured probe result
 *
 * @throws {FFmpegError} If the input cannot be opened or has no stream info
 *
 * @example
 * ```typescript
 * const info = probeSync('input.mkv');
 * console.log(info.duration, info.streams.length);
 * ```
 *
 * @see {@link probe} For the asynchronous version
 */
export declare function probeSync<const F extends DemuxerFormat | (string & {}) = DemuxerFormat | (string & {})>(input: string | Buffer, options?: ProbeOptions<F>): ProbeResult;
