OptionalformatTarget output format. Default: 'auto' (converts WAV/FLAC to MP3).
OptionalbitrateTarget bitrate, e.g. '128k', '192k'. Encoder default if omitted.
OptionalchannelsOutput channel count. Defaults to input channel count.
OptionalsampleOutput sample rate in Hz. Defaults to input sample rate.
OptionalpreserveWhen true, audio tags/metadata is preserved. Default: false (stripped).
OptionalstrictIf the compressed audio is larger than the original, return the original. Default: false.
OptionaluseExplicitly force Web Worker usage (true) or Main Thread usage (false). If omitted, the library chooses based on file size and operation type.
OptionalonCalled with progress 0–100 during FFmpeg operations.
OptionalsignalCancel the operation. Throws AbortError when signalled.
Options for compressAudio().