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

FlagTypeDefaultMeaning
--trackinteger0Which audio track (0 = first audio stream; see media streams) Range: 0...
--copyflag—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

CodeMeaning
0Success
1Processing failed
2Usage or parameter error
3Input missing or unreadable
4Unsupported format or codec
8Cancelled
70Internal error (bug)

Common mistakes

  • Forgetting that outputs are never overwritten: pass --overwrite or a new -o path 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"}}