FFmpeg Batch Convert (Video -> Audio)
Strip audio out of a whole folder of videos without leaving ComfyUI
- output_files
- success_count
- fail_count
- report_json
FFmpeg Batch Convert does exactly what its display name says and nothing more: it batch-extracts the audio track from videos and saves them as mp3 or wav. No AI, no cleverness - it shells out to ffmpeg and reports how many files worked. That's the whole thing, and it's honestly refreshing in an ecosystem of overpromising nodes.
You'd reach for it as the front end of this pack's pipeline. The same author ships a cloud transcription node that wants audio as URLs, so the intended flow is: point this at a folder of mp4s → get audio in object storage → feed the URLs to the ASR node. But it stands alone too. If you run ComfyUI on a cloud pod and would rather not SSH around just to strip audio, or you're building a repeatable workflow where "drag in videos, get text out" is the deliverable, this is the plumbing. For a one-off, honestly, a terminal one-liner is faster - this earns its keep in workflows, not ad hoc use.
How it works
The node resolves an ffmpeg binary in this order: an explicit ffmpeg_path if you set one, then the IMAGEIO_FFMPEG_EXE environment variable, then it falls back to the binary bundled with imageio-ffmpeg (downloaded on first use). So you don't need ffmpeg installed system-wide - that's the design, and it means the first run needs internet to fetch that binary.
For each input file it runs ffmpeg with -vn (drop video), -ar (sample rate) and -ac (channels), adding a -ab bitrate flag when output is mp3. Results land in the output directory, or get uploaded to S3-compatible storage via boto3 if you wire up OSS config - the code accepts Aliyun OSS, Cloudflare R2, or AWS S3 endpoints.
Inputs that matter
input_mode- pickdirectory(scansource_pathwithglob_pattern, plus arecursivetoggle),list(one absolute path per line infile_list), orsingle(justsource_path).output_format-mp3orwav.sample_rate(default 44100) andchannels(default 2) - the audio settings.audio_bitrate- only applies to mp3, default192k.overwrite-skip,overwrite, orrenamewhen the output file already exists.continue_on_error- keep processing the rest of the batch when one file fails.
The optional inputs only matter for cloud output: oss_config_json (wire it from the pack's OSS Configuration node), use_local_output, oss_output_mode (oss_key or presigned_url), and presigned_expires_sec for how long the generated URLs stay valid.
Outputs are output_files (newline-joined paths or URLs), success_count, fail_count, and report_json - a structured per-file log you can inspect if something went sideways.
Install and gotchas
ComfyUI Manager: search for dll-comfyui-node, install, restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/dlliang14/dll-comfyui-node
cd dll-comfyui-node && pip install -r requirements.txt
Dependencies are light: imageio-ffmpeg and boto3. Two things trip people up. First, the README (which is in Chinese and only documents this node - the code ships two more it never mentions) warns that on a Linux pod with a Windows UI you must use container paths like /data/input, never Windows drive letters. Second, if you give ffmpeg_path a path that doesn't exist, it throws FileNotFoundError at runtime - it won't silently fall back, so leave it blank unless you know what you're doing. And if your cluster has no internet, pre-warm imageio-ffmpeg's binary during the image build or set IMAGEIO_FFMPEG_EXE to a local copy.
Inputs (17)
| Name | Type | Default | Description |
|---|---|---|---|
| input_mode | COMBO | 3 options: directory, list, single | |
| source_path | STRING | /root/ComfyUI/input/ | — |
| file_list | STRING | — | |
| glob_pattern | STRING | *.mp4 | — |
| recursive | BOOLEAN | false | — |
| output_format | COMBO | 2 options: mp3, wav | |
| sample_rate | INT | 441008000–192000 | — |
| channels | INT | 21–2 | — |
| audio_bitrate | STRING | 192k | — |
| overwrite | COMBO | 3 options: skip, overwrite, rename | |
| continue_on_error | BOOLEAN | true | — |
| ffmpeg_path | STRING | — | |
| oss_config_jsonopt | STRING | — | |
| use_local_outputopt | BOOLEAN | true | — |
| local_output_diropt | STRING | /root/ComfyUI/output/ | — |
| oss_output_modeopt | COMBO | 2 options: oss_key, presigned_url | |
| presigned_expires_secopt | INT | 360060–86400 | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| output_files | STRING | — |
| success_count | INT | — |
| fail_count | INT | — |
| report_json | STRING | — |