Nodes/ComfyUI-TJ_NODE/Save & Preview Video (TJ)
ComfyUI Node

Save & Preview Video (TJ)

Save & Preview Video (TJ)

By designloves2·Created 4 months ago·Updated 3 days ago· 13
Save & Preview Video (TJ)
  • image
  • video
  • audio_a
  • audio_b
  • image
  • video
  • audio_a
  • audio_b
  • original_audio
  • video_total_frame
fps24
begin_frame
end_frame
save_typevideo only
audio_monitorA+B
get_name
setnode_nameSave_video
filename_prefixVideo
pathvideo/%date/
modePreview

Video workflows have a preview problem: your model spits out 100 frames and ComfyUI helpfully shows you... a node full of thumbnails. Save & Preview Video (TJ) is the pack's fix - an actual player node that turns an IMAGE batch into an in-node HTML5 video, plays it back at the right fps, optionally muxes in audio, and saves the file when you say so. It's the "am I done yet" node for VFI and video-generation branches.

How it works

The core trick is that it doesn't try to be a fancy frame viewer: it encodes the incoming image batch into a real mp4 with imageio.mimsave (libx264) and plays that in an HTML5 player inside the node. So what you preview is what you'd get - same encoder, same fps, same output. fps (default 24) sets the playback/encode rate. There's a frame-range option (begin_frame / end_frame) if you only want to render a slice, and audio support: save_type lets you write video only, video + audio, video + original audio, or audio only, with audio_a / audio_b as optional inputs and an audio_monitor A/B/A+B selector for dual-track jobs.

Like the image sibling, mode flips between Preview (no file written) and Save, with filename_prefix and a path default of video/%date/. The wireless get_name / setnode_name pair is there too, so a TJ provider can feed frames without a wire.

Outputs: image, video, audio_a, audio_b, original_audio (all passthrough * so you can keep chaining), plus video_total_frame (INT) - the actual frame count of what got encoded, handy for downstream math or a sanity check.

Installing it (the one gotcha)

Pack install is standard:

cd ComfyUI/custom_nodes
git clone https://github.com/designloves2/ComfyUI-TJ_NODE

But this node is the reason the pack depends on imageio and imageio-ffmpeg - neither is part of ComfyUI's own requirements, and the pack imports them without a guard, so on a clean install that skipped the requirements step this node dies with ModuleNotFoundError. The pack's requirements installer handles it; if you cloned by hand, make sure the pack's requirements.txt actually got installed:

cd ComfyUI/custom_nodes/ComfyUI-TJ_NODE
pip install -r requirements.txt

Common issues

  • ModuleNotFoundError: imageio - see above; run the requirements install and restart.
  • Audio doesn't appear - double-check save_type includes audio (video + audio / video + original audio) and that you fed audio_a/audio_b; video only drops it on purpose.
  • Wrong speed - encode and preview both run at fps; if the playback looks fast/slow, your source frames probably don't match what you told it (24 fps for a 16-fps animation will look rushed).

If you're mostly generating single images, ignore this node. If you're doing LTX, Wan, or frame-interpolation work, it replaces the "encode with a random ffmpeg node, then open a player" two-step with one node that plays the real result.

Category ✨ TJ_Node/Video

Inputs (14)

NameTypeDefaultDescription
fpsFLOAT241–120
begin_frameSTRING
end_frameSTRING
save_typeCOMBOvideo only4 options: video only, video + audio, video + original audio, audio only
audio_monitorCOMBOA+B3 options: A, B, A+B
get_nameCOMBO1 options: (none)
setnode_nameSTRINGSave_video
filename_prefixSTRINGVideo
pathSTRINGvideo/%date/
modeCOMBOPreview2 options: Preview, Save
imageoptIMAGE
videoopt*
audio_aopt*
audio_bopt*

Outputs (6)

NameTypeDescription
image*
video*
audio_a*
audio_b*
original_audio*
video_total_frameINT