Nodes/XB_ToolBox/XB-BOX - 🎬 视频拼接输出
ComfyUI Node

XB-BOX - 🎬 视频拼接输出

The VHS video saver that got ported into XB_ToolBox — with GIF/WebP shortcuts

By wjluoxiao·Created 5 months ago·Updated 6 days ago· 302
XB-BOX - 🎬 视频拼接输出
  • images
  • audio
  • Filenames
frame_rate8
loop_count0
filename_prefix视频
format
pingpongfalse
save_outputtrue

This is the node that turns your stack of generated frames into an actual video file. XB_VideoCombine is a port of VideoHelperSuite's classic VHS_VideoCombine - the file format list, the VHS_FILENAMES output, the ffmpeg plumbing, the metadata-embedded-PNG trick, all of it. The pack author copied VHS's logic in because he wanted a self-contained save step that doesn't depend on the whole VHS pack, and it sits in the XB_ToolBox/Video menu as "🎬 视频拼接输出" (video stitching output).

Why does this matter to you? Because if a downloaded XB workflow references XB_VideoCombine, you don't need VideoHelperSuite installed to save video from it - the node's own VHS_FILENAMES output type will still match up with other VHS nodes if you happen to have them. It's a compatibility-friendly clone, not a fork that diverges.

What it does

It takes an IMAGE batch (your frames), a frame_rate, and writes them out with ffmpeg. The format dropdown is where the real power lives and it's a long one: image/gif, image/webp, video/h264-mp4, video/ffv1-mkv, video/ProRes, video/nvenc_h264-mp4, video/webm, 8-bit/16-bit PNG sequences, h265, nvenc av1, and more. The NVIDIA nvenc_* options hand encoding to your GPU's encoder instead of CPU - on a 4090 that's a night-and-day difference for long clips.

Other knobs:

  • filename_prefix - output name; defaults to the Chinese "视频".
  • loop_count - 0 means no looping (a plain video); set >0 for an infinitely looping GIF/WebP.
  • pingpong - plays the clip forward then reversed, the classic seamless loop trick. Great for Wan/AnimateDiff-style looping content.
  • save_output - if false, it writes to the temp directory instead of output/.
  • audio (optional, AUDIO) - mux a soundtrack in. Comes straight from a VHS_VideoLoader-style audio output or the pack's audio nodes.

The output is Filenames (VHS_FILENAMES), the same type VHS save nodes emit, which you can wire into a text/annotation node if you want the path on screen.

The gotcha

If ffmpeg isn't findable, the node raises "ffmpeg 未找到" (ffmpeg not found). It searches in order: the VHS_FORCE_FFMPEG_PATH environment variable, the imageio-ffmpeg bundled binary, then a system ffmpeg on PATH. The practical fix when it fails is to set VHS_FORCE_FFMPEG_PATH to your ffmpeg executable or pip install imageio-ffmpeg. Also note the frame dimensions get auto-padded to the format's alignment requirement - you'll see a tiny letterbox on odd sizes, which is expected and harmless.

Install

Part of XB_ToolBox, so:

cd ComfyUI/custom_nodes
git clone https://github.com/WJLUOXIAO/XB_ToolBox.git

then restart, or use ComfyUI Manager and search "XB_ToolBox". For the ffmpeg path, imageio-ffmpeg is in the pack's requirements and Manager will install it. If you cloned manually and get the "not found" error, that's the first dependency to add.

CategoryXB_ToolBox/Video

Inputs (8)

NameTypeDefaultDescription
imagesIMAGE
frame_rateFLOAT8
loop_countINT00–100
filename_prefixSTRING视频
formatCOMBO14 options: image/gif, image/webp, video/h264-mp4, video/ffv1-mkv, video/ProRes, video/nvenc_h264-mp4, +8
pingpongBOOLEANfalse
save_outputBOOLEANtrue
audiooptAUDIO

Outputs (1)

NameTypeDescription
FilenamesVHS_FILENAMES