Save & Preview Video (TJ)
Save & Preview Video (TJ)
- image
- video
- audio_a
- audio_b
- image
- video
- audio_a
- audio_b
- original_audio
- video_total_frame
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_typeincludes audio (video + audio/video + original audio) and that you fedaudio_a/audio_b;video onlydrops 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.
Inputs (14)
| Name | Type | Default | Description |
|---|---|---|---|
| fps | FLOAT | 241–120 | — |
| begin_frame | STRING | — | |
| end_frame | STRING | — | |
| save_type | COMBO | video only | 4 options: video only, video + audio, video + original audio, audio only |
| audio_monitor | COMBO | A+B | 3 options: A, B, A+B |
| get_name | COMBO | 1 options: (none) | |
| setnode_name | STRING | Save_video | — |
| filename_prefix | STRING | Video | — |
| path | STRING | video/%date/ | — |
| mode | COMBO | Preview | 2 options: Preview, Save |
| imageopt | IMAGE | — | |
| videoopt | * | — | |
| audio_aopt | * | — | |
| audio_bopt | * | — |
Outputs (6)
| Name | Type | Description |
|---|---|---|
| image | * | — |
| video | * | — |
| audio_a | * | — |
| audio_b | * | — |
| original_audio | * | — |
| video_total_frame | INT | — |