a9a / Docs

CLI Reference

A complete list of a9a_cli subcommands, options, operations, job file keys, and input/output constraints.

To follow a workflow instead, see Matching Loudness, Exporting, and Batch Processing and Automation. This page is for looking things up.

Subcommands

SubcommandPurpose
probeShow metadata and loudness information for input audio
renderApply operations in order and write one or more output files
playPlay an input audio file
versionShow 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

OptionDescription
--jsonPrint machine-readable JSON
--no-indicatorAccepted for compatibility. probe does not show progress, so this option does not change behavior
-q, --quietSuppresses warning lines in text output only. Measurement results are still printed, and --json output is unaffected (warnings are always included)
--silence-threshold <DBFS>Upper RMS level treated as silence (dBFS). Defaults to -60
--silence-min-duration <MS>Minimum length reported as a silent region (milliseconds). Defaults to 100. The leading and trailing silence lengths are reported regardless of this value

Output

  • File information: file path, format, sample rate, bit depth, channels, and duration
  • Loudness metrics: integrated LUFS, true peak, LRA, and crest factor
  • Silence detection: the threshold and minimum length used, leading silence, trailing silence, the total length and count of silent regions, and the list of silent regions (frame positions and seconds; none when there are none)
  • Other information: loop data, Vorbis Comments, and warnings

Silence is detected by checking whether the RMS level of each 5 ms block (summed across all channels) falls below the threshold. Region boundaries are rounded to block boundaries.

JSON output fields

The top level is always an array, even for a single input, with entries in the order the inputs were given.

KeyTypeDescription
filestringThe input file path as given
formatstringInput format: one of wav, aiff, mp3, flac, ogg_vorbis, aac
sample_rate_hznumberSample rate (Hz)
bit_depthnumber / nullBit depth. null for lossy formats (MP3 / Ogg Vorbis / AAC)
channelsnumberChannel count
duration_secondsnumberDuration in seconds
integrated_lufsnumber / nullIntegrated loudness (LUFS)
true_peak_dbtpnumber / nullHighest true peak across all channels (dBTP)
channel_true_peaks_dbtparrayPer-channel true peak (dBTP); each element is number / null
loudness_range_lunumber / nullLRA (LU). null when the input is too short to measure
crest_factor_dbnumber / nullCrest factor (dB)
channel_crest_factor_dbarrayPer-channel crest factor (dB); each element is number / null
aacobject / nullAAC inputs only: {"container": "m4a"|"adts", "profile": "lc"|"he-v1"|"he-v2"}. null otherwise
loopobject / nullLoop data {"start", "end", "length"} in samples, with end exclusive. null when there is no loop
tagsarrayVorbis Comments as {"key", "value"}, preserving record order and duplicate keys
warningsarrayDecode warning messages (strings)
silenceobjectSilence detection results. threshold_dbfs / min_duration_ms are the values used for detection, leading_* / trailing_* are the leading and trailing silence lengths (reported regardless of min_duration_ms), total_* is the total length of silent regions, and regions is an array of {"start_frame", "end_frame", "start_seconds", "end_seconds"} with end exclusive. Frames are in the file’s own sample rate

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

OptionDescription
-o, --out <PATH>Single output file
--out-dir <DIR>Output directory for multiple inputs
--forceOverwrite existing output
--same-formatPreserve the input format
--clear-loopRemove the input’s loop metadata and reserved loop comment tags (such as LOOPSTART) before operations are applied. Anything newly set with --op loop or --comment is still written. When --clear-loop is specified, --op can be omitted
--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 (decimals allowed; 6.5 is encoder quality 0.65)
--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=VALUEAdd a Vorbis Comment
--remove-comment KEYRemove the input’s Vorbis Comments with the same key (case-insensitive) before --comment values are added. Can be specified multiple times. When --remove-comment is specified, --op can be omitted
--no-indicatorDisable the progress bar and per-operation progress output
-q, --quietSuppress 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.

OperationRequired keysOptional keys
gaindb-
loudnesstargetmax-true-peak, limiter, release
fade-indurationcurve
fade-outdurationcurve
loopstart, endsnap
trimstart, end-
trim-silence-threshold, margin
reverse--

For loop and trim, start < end is required. reverse takes no keys.

By default, the start / end of loop are snapped to the best loop seam (zero crossing) within a search window of 128 frames on each side. With snap=off, no snapping happens and the given frames are used as the loop boundaries as-is (for example, to use positions already finalized in the GUI).

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.

trim-silence detects and automatically trims leading and trailing silence. Regions where the RMS level of each short block (5 ms) falls below threshold (default -60dBFS) are treated as silence, the silence running from the start and end is dropped, and the rest is applied as the same non-destructive trim as trim. With margin (default 0ms), that much silence is kept before and after the audible range. Detection runs against the timeline at that point (the audio with any earlier gain / fade-in / fade-out / trim / reverse applied), so placing it after gain means the detection uses the boosted levels. Files with no leading or trailing silence, and files entirely below the threshold, are left unchanged with a warning. trim-silence accepts only the threshold and margin keys; keys for other operations (db, duration, start, and so on) are errors.

reverse reverses the time axis (reversed playback). Combined with trim, the audio kept by trim is reversed as-is (in either order). A loop specified before reverse is remapped to the reversed coordinates (start' = length - end, end' = length - start), while a loop specified after reverse is resolved in reversed coordinates. Fades always apply to the start (fade-in) and end (fade-out) of the output, so combining reverse with fade-in produces reversed material whose attack fades in. reverse toggles the reversed state: specifying it twice restores the original (remapping the loop each time).

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

KeyFormatExamples
db, target, max-true-peakNumber or suffixed string-3, -3dB, -16LUFS, -1dBTP
limiter, snapOne of on, off, true, falseon
releaseOne of fast, normal, slowslow
duration100ms, 1s, or an integer millisecond value without a suffix100ms, 1s, 100
thresholdNumber or string with a dBFS / dB suffix-60, -50dBFS
marginSame format as duration (including 0). Decimals allowed10ms, 12.5ms, 0
curveOne of linear, equal_power, s_curve, log, expequal_power
start, endInteger 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 typeContentReadWrite
(plain AIFF)Big-endian integer PCMYesYes
NONE / twos / in16 / in24 / in32AIFF-C big-endian integer PCMYesYes (aifc-none)
sowtAIFF-C little-endian integer PCMYesYes (aifc-sowt)
fl32AIFF-C 32-bit float (IEEE754)YesYes (aifc-float32)
Others (ulaw, ima4, fl64, etc.)Compressed codecs or 64-bit floatNoNo

Constraints

Output path and format settings have the following constraints.

  • --out and --out-dir cannot be specified together.
  • With multiple inputs, --out cannot be used. Use --out-dir.
  • --same-format and --format cannot be specified together.
  • When --out is used, the output format must be determined by one of --format, --same-format, or the output path extension.
  • When --format and --out are used together, and --out has 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-format is valid only for WAV output. When using float, --bits-per-sample 32 is required.
  • --aiff-container is valid only for AIFF output. When omitted, an AIFF/AIFF-C input keeps its container, while any other input produces plain AIFF (aiff). When specifying aifc-float32, --bits-per-sample 32 is required.
  • FLAC bit depth is limited to 24 bit. --flac-compression-level is valid only for FLAC output. Writing float PCM input (32-bit float WAV / AIFF-C float32) to FLAC requires --bits-per-sample.
  • --vorbis-quality is valid only for Ogg Vorbis output.
  • --mp3-vbr-quality and --mp3-bitrate are 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-bitrate and --aac-vbr-quality cannot be specified together. Writing an AAC input back with --same-format preserves 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. With auto, unsupported settings fall back to libfdk-aac automatically (an error when it is not installed).
  • Tags added with --comment are 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. The GUI’s bounce dialog can also export its settings and edits as a job file (see Exporting).

Top-level keys

KeyDescription
inputSingle input or an array of inputs
outputSingle output file
out_dirOutput directory for multiple inputs
forceOverwrite existing output when true
same_formatPreserve the input format
clear_loopWhen true, remove the input’s loop metadata and reserved loop tags before operations are applied (same as --clear-loop). When true, [[op]] can be omitted
formatwav, flac, aiff, ogg, mp3, m4a, aac
sample_rateOutput sample rate
bits_per_sampleOutput bit depth
sample_formatWAV only. int or float
aiff_containerAIFF only. aiff, aifc-none, aifc-sowt, aifc-float32
flac_compression_levelFLAC only
vorbis_qualityOgg Vorbis only. -1..10 (decimals allowed)
mp3_vbr_qualityMP3 only. 0..9 (0 is the highest quality). Requires LAME
mp3_bitrateMP3 only. Average bitrate (kbps, ABR). Cannot be combined with mp3_vbr_quality
aac_profileAAC only. lc, he-v1, he-v2
aac_bitrateAAC only. Bitrate (kbps, CBR). Cannot be combined with aac_vbr_quality
aac_vbr_qualityAAC only. 1..5 (5 is the highest quality)
aac_encoderAAC only. auto, fdk, os
remove_commentArray of keys to remove from the input (same as --remove-comment). When present, [[op]] can be omitted
commentArray of KEY=VALUE strings

output and out_dir cannot be specified together. same_format and format also cannot be specified together.

[[op]]

TypeRequired keysOptional keys
gaindb-
loudnesstargetunit (must be LUFS when specified), max_true_peak, limiter (boolean, default false), release ("fast" / "normal" / "slow", default "normal")
fade_indurationcurve
fade_outdurationcurve
loopstart, endsnap (boolean, default true; false uses the given frames as-is without snapping)
trimstart, end-
trim_silence-threshold (default -60), margin (default 0)
reverse--

For loop and trim, start < end is required. reverse takes no keys (specifying any is an error). Each type accepts only the keys in the table above; keys for other operations (for example duration on gain) are errors.

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 --op entries.
  • input prefers the CLI value.
  • output / out_dir prefer the CLI value.
  • Output overrides such as sample_rate prefer the CLI value field by field.
  • force, same_format, and clear_loop become true when either side is true.
  • comment / remove_comment append CLI --comment / --remove-comment values to the job file arrays.

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.