To follow a workflow instead, see Matching Loudness, Exporting, and Batch Processing and Automation. This page is for looking things up.
Subcommands
| Subcommand | Purpose |
|---|---|
probe | Show metadata and loudness information for input audio |
render | Apply operations in order and write one or more output files |
play | Play an input audio file |
version | Show application information |
The supported formats are WAV / FLAC / AIFF (including AIFF-C) / Ogg Vorbis / MP3 / AAC (M4A and ADTS, AAC-LC / HE-AAC v1 / HE-AAC v2). MP3 output requires LAME, and some AAC settings require libfdk-aac; see Getting Started for installation.
probe
Measures and prints the input audio format and loudness.
a9a_cli probe input.wav
Multiple inputs can be measured in one call. In text output, the per-file result blocks are separated by a single blank line.
a9a_cli probe a.wav b.wav
Options
| Option | Description |
|---|---|
--json | Print machine-readable JSON |
--no-indicator | Accepted for compatibility. probe does not show progress, so this option does not change behavior |
-q, --quiet | Suppresses warning lines in text output only. Measurement results are still printed, and --json output is unaffected (warnings are always included) |
Output
- File information: file path, format, sample rate, bit depth, channels, and duration
- Loudness metrics: integrated LUFS, true peak, LRA, and crest factor
- Other information: loop data, Vorbis Comments, and warnings
JSON output fields
The top level is always an array, even for a single input, with entries in the order the inputs were given.
| Key | Type | Description |
|---|---|---|
file | string | The input file path as given |
format | string | Input format: one of wav, aiff, mp3, flac, ogg_vorbis, aac |
sample_rate_hz | number | Sample rate (Hz) |
bit_depth | number / null | Bit depth. null for lossy formats (MP3 / Ogg Vorbis / AAC) |
channels | number | Channel count |
duration_seconds | number | Duration in seconds |
integrated_lufs | number / null | Integrated loudness (LUFS) |
true_peak_dbtp | number / null | Highest true peak across all channels (dBTP) |
channel_true_peaks_dbtp | array | Per-channel true peak (dBTP); each element is number / null |
loudness_range_lu | number / null | LRA (LU). null when the input is too short to measure |
crest_factor_db | number / null | Crest factor (dB) |
channel_crest_factor_db | array | Per-channel crest factor (dB); each element is number / null |
aac | object / null | AAC inputs only: {"container": "m4a"|"adts", "profile": "lc"|"he-v1"|"he-v2"}. null otherwise |
loop | object / null | Loop data {"start", "end", "length"} in samples, with end exclusive. null when there is no loop |
tags | array | Vorbis Comments as {"key", "value"}, preserving record order and duplicate keys |
warnings | array | Decode warning messages (strings) |
Numeric measurements become null when they cannot be measured (±inf / NaN, for example on silence).
Errors and exit code
If some files fail to decode or measure, the remaining inputs are still processed. Failed files appear in the same array as {"file": "broken.wav", "error": "Failed to decode ..."}, and the exit code is non-zero when at least one input failed. Successful entries never include an error key.
The JSON schema may gain fields, but existing fields are never removed and their meaning does not change. Scripts should ignore unknown fields.
render
Applies operations in order and writes audio output.
a9a_cli render input.wav \
--out output.flac \
--op gain db=-3 \
--op fade-in duration=100ms curve=linear
Input and output options
| Option | Description |
|---|---|
-o, --out <PATH> | Single output file |
--out-dir <DIR> | Output directory for multiple inputs |
--force | Overwrite existing output |
--same-format | Preserve the input format |
--format <wav|flac|aiff|ogg|mp3|m4a|aac> | Explicitly set the output format (m4a = AAC/MP4 container, aac = AAC/ADTS) |
--sample-rate <HZ> | Set the output sample rate |
--bits-per-sample <BITS> | Bit depth for WAV / FLAC / AIFF |
--sample-format <int|float> | WAV sample format |
--aiff-container <aiff|aifc-none|aifc-sowt|aifc-float32> | Container / compression type for AIFF output |
--flac-compression-level <0..8> | FLAC compression level |
--vorbis-quality <-1..10> | Ogg Vorbis quality |
--mp3-vbr-quality <0..9> | MP3 VBR quality (0 is the highest quality). Requires LAME |
--mp3-bitrate <8..320> | MP3 average bitrate (kbps, ABR). Cannot be combined with --mp3-vbr-quality |
--aac-profile <lc|he-v1|he-v2> | AAC profile. Defaults to the input’s profile for AAC input, otherwise lc |
--aac-bitrate <8..320> | AAC bitrate (kbps, CBR). Defaults per profile (LC=192 / HE v1=64 / HE v2=32) |
--aac-vbr-quality <1..5> | AAC VBR quality (5 is the highest quality). Cannot be combined with --aac-bitrate |
--aac-encoder <auto|fdk|os> | AAC encoder selection. auto prefers the OS-native encoder and falls back to libfdk-aac for unsupported settings |
--comment KEY=VALUE | Add a Vorbis Comment |
--no-indicator | Disable the progress bar and per-operation progress output |
-q, --quiet | Suppress warnings and progress output. This also disables the indicator |
--job <JOB> | Load a TOML job file |
Operations
Use --op to specify an operation. When multiple --op arguments are provided, they are applied in the specified order.
| Operation | Required keys | Optional keys |
|---|---|---|
gain | db | - |
loudness | target | max-true-peak, limiter, release |
fade-in | duration | curve |
fade-out | duration | curve |
loop | start, end | - |
trim | start, end | - |
For loop and trim, start < end is required.
trim keeps only the range from start to end (in frames, end exclusive) and discards the rest. Because it changes the length, the order of operations matters: a loop specified before trim is remapped onto the trimmed timeline (a loop entirely outside the trim range is discarded with a warning), while a loop specified after trim is resolved in trimmed coordinates.
limiter on loudness (default off) toggles the true peak limiter. When on, a look-ahead limiter keeps the true peak within max-true-peak while reaching the target integrated loudness. When off, the gain is capped so the true peak stays within the limit, and a warning is printed to stderr for files that fall short of the target.
release on loudness (default normal) selects how quickly the gain recovers after the limiter engages: fast (30 ms), normal (100 ms), or slow (300 ms). It takes effect only with limiter=on. Every setting keeps the true peak within max-true-peak.
Value formats
| Key | Format | Examples |
|---|---|---|
db, target, max-true-peak | Number or suffixed string | -3, -3dB, -16LUFS, -1dBTP |
limiter | One of on, off, true, false | on |
release | One of fast, normal, slow | slow |
duration | 100ms, 1s, or an integer millisecond value without a suffix | 100ms, 1s, 100 |
curve | One of linear, equal_power, s_curve, log, exp | equal_power |
start, end | Integer frame count (end is exclusive) | 48000 |
AIFF / AIFF-C (AIFC) input and output
Files with any of the .aiff / .aif / .aifc extensions are read as AIFF files. The AIFF-C (AIFC) container is also supported on input, covering the following compression types.
| Compression type | Content | Read | Write |
|---|---|---|---|
| (plain AIFF) | Big-endian integer PCM | Yes | Yes |
NONE / twos / in16 / in24 / in32 | AIFF-C big-endian integer PCM | Yes | Yes (aifc-none) |
sowt | AIFF-C little-endian integer PCM | Yes | Yes (aifc-sowt) |
fl32 | AIFF-C 32-bit float (IEEE754) | Yes | Yes (aifc-float32) |
Others (ulaw, ima4, fl64, etc.) | Compressed codecs or 64-bit float | No | No |
Constraints
Output path and format settings have the following constraints.
--outand--out-dircannot be specified together.- With multiple inputs,
--outcannot be used. Use--out-dir. --same-formatand--formatcannot be specified together.- When
--outis used, the output format must be determined by one of--format,--same-format, or the output path extension. - When
--formatand--outare used together, and--outhas an extension, that extension must match--format.
--sample-rate accepts only the following standard values.
8000, 11025, 16000, 22050, 32000, 44100, 48000, 88200, 96000, 176400, 192000
Format-specific options have the following constraints.
--sample-formatis valid only for WAV output. When usingfloat,--bits-per-sample 32is required.--aiff-containeris valid only for AIFF output. When omitted, an AIFF/AIFF-C input keeps its container, while any other input produces plain AIFF (aiff). When specifyingaifc-float32,--bits-per-sample 32is required.- FLAC bit depth is limited to 24 bit.
--flac-compression-levelis valid only for FLAC output. --vorbis-qualityis valid only for Ogg Vorbis output.--mp3-vbr-qualityand--mp3-bitrateare valid only for MP3 output and cannot be specified together. When both are omitted, the default VBR quality (roughly equivalent to 190 kbps) is used.- MP3 output requires the LAME (
libmp3lame) shared library at run time. When it is not installed, only MP3 output fails with an error. --aac-*options are valid only for AAC (m4a/aac) output.--aac-bitrateand--aac-vbr-qualitycannot be specified together. Writing an AAC input back with--same-formatpreserves the input’s container and profile.- Only M4A can carry accurate duration information (gapless metadata). ADTS has no way to express it, so some players show the file as longer by the encoder delay.
- The OS-native encoder (
--aac-encoder os) has coverage limits: Windows supports only AAC-LC CBR at 96/128/160/192 kbps and 44.1/48 kHz, and macOS does not support AAC-LC at 88.2/96 kHz. Withauto, unsupported settings fall back to libfdk-aac automatically (an error when it is not installed). - Tags added with
--commentare preserved for FLAC / Ogg Vorbis, but are discarded when writing WAV / AIFF / MP3 / AAC.
Job file
Collect processing settings in a TOML file and load it with render --job <JOB>. For how to write and operate them, see Batch Processing and Automation.
Top-level keys
| Key | Description |
|---|---|
input | Single input or an array of inputs |
output | Single output file |
out_dir | Output directory for multiple inputs |
force | Overwrite existing output when true |
same_format | Preserve the input format |
format | wav, flac, aiff, ogg, mp3, m4a, aac |
sample_rate | Output sample rate |
bits_per_sample | Output bit depth |
sample_format | WAV only. int or float |
aiff_container | AIFF only. aiff, aifc-none, aifc-sowt, aifc-float32 |
flac_compression_level | FLAC only |
vorbis_quality | Ogg Vorbis only. -1..10 |
mp3_vbr_quality | MP3 only. 0..9 (0 is the highest quality). Requires LAME |
mp3_bitrate | MP3 only. Average bitrate (kbps, ABR). Cannot be combined with mp3_vbr_quality |
aac_profile | AAC only. lc, he-v1, he-v2 |
aac_bitrate | AAC only. Bitrate (kbps, CBR). Cannot be combined with aac_vbr_quality |
aac_vbr_quality | AAC only. 1..5 (5 is the highest quality) |
aac_encoder | AAC only. auto, fdk, os |
comment | Array of KEY=VALUE strings |
output and out_dir cannot be specified together. same_format and format also cannot be specified together.
[[op]]
| Type | Required keys | Optional keys |
|---|---|---|
gain | db | - |
loudness | target | unit (must be LUFS when specified), max_true_peak, limiter (boolean, default false), release ("fast" / "normal" / "slow", default "normal") |
fade_in | duration | curve |
fade_out | duration | curve |
loop | start, end | - |
trim | start, end | - |
type values are fixed to snake_case. The CLI --op names fade-in and fade-out are not accepted.
Merge rules
When --job and CLI arguments are used together, they are resolved with these rules.
- Operations are concatenated: job file
[[op]]entries first, then CLI--opentries. inputprefers the CLI value.output/out_dirprefer the CLI value.- Output overrides such as
sample_rateprefer the CLI value field by field. forceandsame_formatbecometruewhen either side istrue.commentappends CLI--commentvalues to the job file array.
play
Plays an input audio file. During playback, the current playback position is displayed in the terminal. There are no options.
a9a_cli play input.wav
version
Shows application information. Add --third-party-licenses to include third-party licenses.
a9a_cli version
a9a_cli version --third-party-licenses
Examples
Write a single file as FLAC and normalize its loudness:
a9a_cli render input.wav \
--out output.flac \
--format flac \
--sample-rate 48000 \
--bits-per-sample 24 \
--op loudness target=-16LUFS max-true-peak=-1dBTP limiter=on release=slow
Define the processing steps in a job file and override only the output directory from the CLI:
a9a_cli render \
--job jobs/master.toml \
--out-dir build/mastered \
--comment REVISION=2026-03-20
Write AIFF-C (little-endian integer PCM, sowt):
a9a_cli render input.wav \
--out output.aifc \
--format aiff \
--aiff-container aifc-sowt \
--bits-per-sample 16 \
--op gain db=-3 This page was written with generative AI.