🎬🔊AGSoft Extract Audio From Video
Pull the audio out of a generated clip (or just part of it)
- video
- audio_path
- duration_seconds
- duration_timecode
- file_size_mb
🎬🔊AGSoft Extract Audio From Video does exactly what the name says: pulls the audio track out of a video and saves it as a standalone file. That's a boringly common task, which is precisely why it's useful - every video workflow eventually needs the sound separated from the picture, and doing it inside the graph beats exporting the file, opening Audacity, and fiddling.
Where it earns its keep in ComfyUI workflows:
- Reusing the voiceover from a generated clip as conditioning or as a source for other audio nodes.
- Grabbing just the dialog section of a video so you can splice it into something else.
- Archiving the audio of a clip you're about to re-render, so you don't lose the good take.
How it works
The source is a video, and you have two ways to give it one: the optional video input (a VIDEO object from another node - this takes priority) or video_path (a file on disk). It then runs FFmpeg to demux the audio and encode it to the format you picked: mp3, wav, m4a, flac, or ogg, with audio_bitrate (96k–320k) applying to the lossy ones and being ignored for wav/flac.
The extra that makes it a step above a dumb demuxer: start_time and end_time. Set both to 0 and you get the whole track; set a range and it extracts just that fragment. That's your "clip the first 20 seconds of dialogue" use case with zero post-processing. output_name sets the filename (extension derived from format), output_path is the destination folder, empty = ComfyUI/output.
The inputs that matter
For a beginner, honestly, just three:
- The source - either connect
videoor type avideo_path. format- default mp3 is fine for most; pick wav if you plan to edit further or feed lossless audio downstream.start_time/end_time- leave at 0 for the whole track, set a range to grab a fragment.
Outputs
audio_path(STRING) - where the extracted file was written. Feed this into the pack's audio-splitting or concatenation nodes.duration_seconds,duration_timecode- length of what you extracted.file_size_mb- size, if you're estimating output or checking bitrate effects.
Install
Part of the comfyui-AGSoft pack. ComfyUI Manager → search "comfyui-AGSoft" → Install → restart, or by hand:
cd ComfyUI/custom_nodes
git clone https://github.com/Art-xmaster/comfyui-AGSoft
Restart and you're set. No model downloads here - the pack's audio/video nodes are pure FFmpeg tooling, using the binary ComfyUI bundles via imageio-ffmpeg (or a system ffmpeg on PATH). If you hit an "ffmpeg not found" error, that's the environment, not the node: install FFmpeg system-wide and restart.
One pairing worth knowing: extract the audio with this node, then feed it back into the pack's Replace Audio To Video node if you want to swap sound on another clip. Together those two cover most dubbing-style workflows without leaving the graph.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| output_name | STRING | extracted_audio | Output filename. The extension is set by the chosen format. --- Имя итогового файла. Расширение задаётся выбранным форматом. |
| output_path | STRING | Output directory. If empty, ComfyUI/output is used. --- Папка сохранения. Если пусто, используется ComfyUI/output. | |
| video_path | STRING | Path to the source video. Used only if video input is not connected. --- Путь к исходному видео. Используется, только если вход video не подключен. | |
| format | COMBO | mp3 | Output audio format. / Формат выходного аудио. |
| audio_bitrate | COMBO | 192k | Bitrate for lossy formats (mp3/m4a/ogg). Ignored for wav/flac. --- Битрейт для lossy-форматов. Для wav/flac игнорируется. |
| start_time | FLOAT | 0.00–86400 | Fragment start in seconds. 0 = from the beginning. / Начало фрагмента. 0 = с начала. |
| end_time | FLOAT | 0.00–86400 | Fragment end in seconds. 0 = to the end. / Конец фрагмента. 0 = до конца. |
| videoopt | VIDEO | Optional source video from ComfyUI. Has priority over video_path. --- Опциональное исходное видео из ComfyUI. Имеет приоритет над video_path. |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| audio_path | STRING | — |
| duration_seconds | FLOAT | — |
| duration_timecode | STRING | — |
| file_size_mb | FLOAT | — |