ZZX Batch Converter / 批量转码
Point it at a folder and walk away
- settings
- output_paths
- report_json
Sooner or later you generate two hundred clips and the client wants them all as H.264 MP4s under 8 MB, or you've got a season of something in MKV and want one folder of AV1. Doing that in ComfyUI sounds silly until you notice the alternative is remembering your FFmpeg incantation six times. ZZX Batch Converter / 批量转码 is a folder-in, files-out node with a progress bar and a per-file report - and it runs inside the queue, so you can leave it and come back.
Same engine as the advanced converter. One file at a time, sequentially, on purpose - the README says it's to keep CPU/GPU load sane, and it means a single failed file doesn't take the machine down mid-batch.
What it reads
Two ways in. file_list is a newline-separated list of absolute paths and it wins if it has anything in it; input_directory is only scanned when the list is empty. Around quotes are stripped, so pasting from a file manager mostly works.
Folder mode uses extensions (comma separated, defaults to a long list of video and audio formats), recursive for subfolders, and max_files (default 100) as a guard rail. That guard is strict: if the scan finds more files than you allowed, the node errors rather than silently converting the first hundred. Good. If output_path is a different directory from the input, files already inside the output folder are skipped, so a recursive scan over the parent doesn't eat its own tail. Your own subfolder layout can be mirrored with preserve_subfolders.
filename_suffix (default _converted) is appended to each source's own name, and outputs are auto-numbered on top of that. continue_on_error keeps going and reports failures per file; turn it off and the first error stops everything, keeping the files already finished.
What it writes
output_paths is a list - a real ComfyUI list output, so it goes to something that accepts a list, not to a single-path widget. report_json is the summary: total, succeeded, failed, and a files array where each entry has the source, the output, a status, and an error string if there was one. That report is what you actually read afterwards, so don't leave the node collapsed.
preset offers the fifteen built-ins: MP4 H.264 compatible, MP4 H.264 GPU auto, HEVC smaller, AV1 smaller, WebM VP9, 1080p/720p H.264, Vertical 1080×1920, ProRes editing, Lossless archive, Remux MKV no re-encode, Extract MP3, Extract FLAC, GIF 480px, and Custom. Optional settings (from ZZX Video Settings) and preset_json override on top of the chosen preset, in that order - and, as everywhere in this pack, connecting the full settings bundle makes the preset irrelevant, so pick Custom.
Install
Manager: search ZZX (Comfy Registry: ComfyUI-ZZX). Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/ZZXYWQ/ComfyUI-ZZXYWQ
python -m pip install -r ComfyUI-ZZXYWQ/requirements.txt
Windows portable:
python_embeded\python.exe -m pip install -r ComfyUI\custom_nodes\ComfyUI-ZZXYWQ\requirements.txt
Then ffmpeg and ffprobe on PATH or via ZZX_FFMPEG / ZZX_FFPROBE, and a restart. The pack's workflows/workflow-BatchVideoConverter.json is worth importing once - it wires the audio and video settings nodes in front of this one so you can see the intended shape.
The traps, in order of how often they bite
The output folder gets rescanned. Default extensions include mp4, so a second run over the same folder picks up clip_converted_0000.mp4 and produces clip_converted_0000_converted_0000.mp4. Point output_path elsewhere, or set output_path to a subfolder of the input - which the scan then skips - and keep it that way.
The default preset is a video preset. The default extension list happily finds .mp3 and .wav files too, and those fail under MP4 H.264 with "Selected video track does not exist." They land in the report as failures rather than killing the batch, but the fix is to use a dedicated preset or tighten extensions.
The file list is frozen when the node starts. Dropping new files into a folder mid-run does nothing; queue again.
Cancelling stops the currently running FFmpeg and deletes that partial file, keeping everything already finished. That's better behaviour than most batch tools manage, and it means a cancel is safe.
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| input_directory | STRING | — | |
| file_list | STRING | — | |
| extensions | STRING | mp4,mkv,mov,avi,webm,ts,mts,m2ts,m4v,wmv,flv,mpg,mpeg,mp3,wav,flac,m4a,ogg,opus | — |
| recursive | BOOLEAN | false | — |
| preset | COMBO | MP4 H.264 - compatible | 15 options: Custom, MP4 H.264 - compatible, MP4 H.264 - GPU auto, HEVC - smaller file, AV1 - smaller file, WebM VP9, +9 |
| output_path | STRING | — | |
| filename_suffix | STRING | _converted | — |
| preserve_subfolders | BOOLEAN | true | — |
| continue_on_error | BOOLEAN | true | — |
| max_files | INT | 1001–10000 | — |
| settingsopt | ZZX_TRANSCODE_SETTINGS | — | |
| preset_jsonopt | STRING | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| output_paths | STRING | — |
| report_json | STRING | — |