Extract audio to WAV
extract_audio_from_fileExtract an audio stream from a video or media file into an uncompressed WAV for import, analysis, or use in another program, leaving the source unchanged.
Instructions
Write one audio stream of a media file to an uncompressed WAV file, optionally only a time range, with a chosen sample rate, channel count and bit depth. Use it to get the sound of a video as a separate file to import, to send to another program, or to analyse. The source is not changed. Returns the new file's output_path, duration, sample rate, channels and size, plus source_start/source_end. Works on the file on disk with ffmpeg, not on the timeline; Premiere Pro is not needed. ffmpeg and ffprobe must be installed (see check_ffmpeg), else FFMPEG_NOT_FOUND.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"path": "<path>",
"output_path": "<output_path>"
},
"name": "extract_audio_from_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | No | End of the part to extract, in file time (seconds); clamped to the file's length. Default: the end of the file. | |
| path | Yes | Absolute path of the media file on this computer. | |
| start | No | Start of the part to extract, in file time (seconds). Default 0. | |
| channels | No | Channel count of the WAV, 1-8 (1 = mono mix, 2 = stereo). Default: the source's channels. | |
| bit_depth | No | Bits per sample: 16, 24 or 32 (integer PCM). Default 24. | |
| overwrite | No | Replace output_path if it already exists. Default false: an existing file makes the tool fail with FILE_EXISTS. | |
| output_path | Yes | Absolute path of the WAV file to write (.wav only); missing folders are created. | |
| sample_rate | No | Sample rate of the WAV in Hz, 8000-192000. Default: the source's rate. | |
| audio_stream | No | Which audio stream to use, 0-based among the file's audio streams (see probe_media_file). Default 0. | |
| timeout_seconds | No | Stop ffmpeg and fail with TIMEOUT after this many seconds. Default 900. |