docs.
reference for mustardy v0.2.0 — a standalone, offline Rust + FFmpeg CLI. source on github →
install
Requires ffmpeg and ffprobe on your PATH (or via MUSTARDY_FFMPEG / MUSTARDY_FFPROBE).
# shell one-liner (macOS & Linux, no Rust required)
curl -fsSL https://raw.githubusercontent.com/noemit/mustardy/main/install.sh | sh
# or install with cargo
cargo install --git https://github.com/noemit/mustardy
# or via homebrew from the repo formula
brew install ./Formula/mustardy.rb
# confirm ffmpeg and hardware encoders
mustardy doctorPrebuilt tarballs for macOS (aarch64/x86_64) and Linux (x86_64/aarch64) are published on github releases.
commands
| command | what it does |
|---|---|
mustardy trim <inputs...> | Trim silences from one or more video/audio files (aliases: cut, remove-silences) |
mustardy scan <input> | Analyze silences & visual transitions and write a reusable plan.json (alias: analyze) |
mustardy apply <plan.json> | Render a saved or edited plan JSON directly without re-scanning |
mustardy doctor | Verify ffmpeg/ffprobe versions, working hardware encoders, and active config |
mustardy completions <shell> | Generate bash, zsh, fish, or powershell completions |
mustardy install-cli | Symlink the current binary onto PATH (/usr/local/bin or ~/.local/bin) |
trim & options
presets
| preset | --drop | --min | pad before / after | normalize |
|---|---|---|---|---|
natural (default) | 30 dB | 0.90 s | 0.18 s / 0.18 s | on (0.7) |
tight | 24 dB | 0.45 s | 0.10 s / 0.08 s | on (0.7) |
podcast | 28 dB | 0.70 s | 0.18 s / 0.14 s | on (0.8) |
flags
| option | default | what it does |
|---|---|---|
-o, --output <path> | <input>-trimmed.<ext> | output media or timeline file (single-file mode) |
--format <media|fcpxml|edl> | media | output format; also auto-detected from .fcpxml / .edl extension |
--preset <tight|natural|podcast> | natural | pacing & normalization preset |
--drop <dB> | 30 | how far below talking counts as a pause (8 to 35) |
--min <seconds> | 0.9 | shortest pause to remove |
--pad / --pad-before / --pad-after | 0.18 | breathing room kept on each side of speech (seconds) |
--keep-edges | off | keep edge padding at 0:00 and EOF instead of trimming cleanly |
--no-visual | off | skip the parallel picture-change scan |
--cut <START-END> | add explicit manual cuts (repeatable, e.g. 0:00-0:12, 14:20-end) | |
--srt <file> --cut-words <csv> | cut matching words or phrases from an SRT transcript | |
--plan / --save-plan <file> | reuse or save a plan JSON to avoid scanning twice | |
--no-normalize / --normalize-amount | on (0.7) | control -16 LUFS podcast-style audio leveling |
--hw / --codec <name> | libx264 | auto-detect VideoToolbox / NVENC / VAAPI / QSV, or pick an encoder |
--crf <0..51> / --encode-preset | 18 / veryfast | video quality and software encoder speed |
--crossfade <ms> | 8 | audio micro-fade at cut joins to eliminate clicks (0 to disable) |
--fast-copy | off | keyframe-snapped stream copy for instant rough drafts |
--out-dir / --in-place / --skip-existing | batch directory processing and atomic in-place replacement (--backup) | |
--dry-run / --json | preview cuts without encoding; emit structured JSON on stdout | |
--progress <auto|bar|plain|jsonl|none> | auto | TTY progress bar with ETA, plain lines, or NDJSON events on stderr |
-q, --quiet / -v, --verbose | suppress stderr output or show internal debug diagnostics |
plans, timelines & config
two-step scan & apply
mustardy scan talk.mov -o plan.json --json
mustardy apply plan.json -o talk-trimmed.mp4 --hwzero-reencode nle timelines
Export cut timelines directly for DaVinci Resolve, Final Cut Pro, or Adobe Premiere without touching your original footage:
mustardy trim talk.mov -o talk.fcpxml
mustardy apply plan.json -o talk.edlconfig file
Store your microphone and encoder defaults in ./.mustardy.toml or ~/.config/mustardy/config.toml (CLI flags always override):
# ./.mustardy.toml or ~/.config/mustardy/config.toml
preset = "tight"
hw = true
crf = 19
crossfade_ms = 8.0agent & scripting contract
With --json, structured output goes to stdout while progress stays on stderr (use --progress jsonl for NDJSON progress events).
success output
{
"ok": true,
"schemaVersion": 1,
"input": "talk.mp4",
"output": "talk-trimmed.mp4",
"duration": 14.0,
"trimmedDuration": 9.22,
"removed": 4.78,
"silences": 2,
"audio": {
"speechDb": -31.544,
"noiseFloorDb": -180.0,
"thresholdDb": -61.544,
"contrastDb": 148.456,
"lowContrast": false
},
"cuts": [
{ "start": 2.18, "end": 4.82, "label": "Trim 2.6s silence", "origin": "silence" }
],
"keeps": [
{ "start": 0.0, "end": 2.18 },
{ "start": 4.82, "end": 9.18 }
],
"elapsedMs": 1548
}error output
{
"ok": false,
"code": "NO_AUDIO",
"error": "clip.mp4 has no audio track, so there are no pauses to find"
}exit codes
- 0: success (including 0 pauses found)
- 1: runtime, FFmpeg, or I/O error
- 2: CLI usage or invalid argument / plan
- 3: unsupported input (e.g. video has no audio track)
- 130: interrupted (
Ctrl-C; temp files cleaned up automatically)