ferraus media extract-audio
Pull an audio track out of a video or multi-track file
Synopsis
ferraus media extract-audio <input> [options] [-o <output>]
What it does
Decodes the chosen audio track natively (Symphonia) and writes it in any format ferraus encodes (default WAV, or the -o extension). --copy stream-copies the track without re-encoding through FFmpeg (the default extension then follows the codec: .m4a for AAC/ALAC, .opus, .mp3, .flac, .ogg, .ac3, otherwise .mka).
Examples
Audio track to WAV, decoded natively
ferraus media extract-audio interview.mp4 -o interview.wav
Second audio track to FLAC
ferraus media extract-audio movie.mkv --track 1 -o commentary.flac
Copy the AAC track to lecture.media-extract-audio.m4a without re-encoding
ferraus media extract-audio lecture.mp4 --copy
Options
| Flag | Type | Default | Meaning |
|---|---|---|---|
--track | integer | 0 | Which audio track (0 = first audio stream; see media streams) Range: 0... |
--copy | flag | — | Stream-copy the track bit-for-bit via FFmpeg instead of decoding [default: off] |
Global options
Every command also accepts the global options (-o, --json, --dry-run, --overwrite, --progress, ...). See Global options.
Exit codes
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | Processing failed |
| 2 | Usage or parameter error |
| 3 | Input missing or unreadable |
| 4 | Unsupported format or codec |
| 8 | Cancelled |
| 70 | Internal error (bug) |
Common mistakes
- Forgetting that outputs are never overwritten: pass
--overwriteor a new-opath when re-running.
For models
- MCP tool:
ferraus_media_extract_audio - Schema:
ferraus schema media extract-audio - Pipeline:
{ op: media extract-audio, args: { ... } }(flag names with_instead of-) - fx stage: no
{"command": "media extract-audio", "defaults": {"track": "0"}}