/** * MP3 inspection without decoding. * * Reading an MP3's duration, bitrate, and channel layout does not require * decoding a single sample — the information is in the frame headers and the * Xing/VBRI tag. That makes probing effectively free even for a large file, * which is what you want for an upload validator, a media library scan, or a * "reject anything over 10 minutes" check. * * Duration is exact for CBR and for VBR files carrying a frame count. For a VBR * file with no tag, every frame header is walked — still far cheaper than * decoding, and the result is exact rather than the extrapolated guess most * tools return. */ import { type ChannelMode, type MpegVersion } from './frame.js'; export interface Mp3Info { /** Duration in seconds. */ duration: number; sampleRate: number; channels: number; channelMode: ChannelMode; /** Average bitrate in bits per second. */ bitrate: number; /** True when the file uses variable bitrate. */ vbr: boolean; mpegVersion: MpegVersion; layer: number; /** Total MPEG frames. */ frameCount: number; /** Byte offset of the first audio frame, past any ID3v2 tag. */ audioOffset: number; /** Encoder delay in samples, when a LAME tag declares it. */ encoderDelay?: number; /** Encoder padding in samples, when a LAME tag declares it. */ encoderPadding?: number; } /** * Reads an MP3's properties without decoding it. * * @param scanAll When a VBR file has no frame-count tag, walk every frame for an * exact duration. Defaults to `true`; set `false` to estimate from the first * frame instead, which is much faster but wrong for VBR. */ export declare function probeMp3(input: Uint8Array, scanAll?: boolean): Mp3Info;