Dual Video Compare π¬
A/B two videos without the tabs β drag a slider instead
- frames_1
- frames_2
- audio_1
- audio_2
So you've got two videos. One is the upscaled pass, one isn't. Or two generations of the same prompt with different seeds, two denoise strengths, a Wan render vs. an AnimateDiff one. You need to actually see the difference, and flipping between browser tabs or stacking player windows is garbage for that. DualVideoPreview ("Dual Video Compare π¬") gives you the thing every image workflow already has - the before/after drag slider from rgthree's Image Comparer - but for video. Two clips stacked in one player, a handle you drag to peel one off the other, plus a seekable timeline and per-side audio.
It's an output node, the last stop in a workflow, and it's deliberately the only node this pack ships.
How it works
The node does two separate jobs depending on what you feed it, and this is the part that surprises people:
- Give it IMAGE tensors (
frames_1/frames_2, aB,H,W,Cbatch straight off your video pipeline) and it encodes each one to an MP4 with ffmpeg - parallel PNG writes, then a single ffmpeg pass, H.265 (libx265,hvc1tag, CRF 20, ultrafast) with H.264 as a fallback. Optionalaudio_1/audio_2AUDIO inputs get muxed in as AAC. - Give it file paths (
video_1/video_2strings) and it does zero encoding - it just hands the files to the browser player as-is. Much cheaper.
Either way the result shows up as a widget inside the node itself, not in a separate tab. The frontend stacks two <video> layers and drives the top one's clip-path from the slider position, so the drag is genuinely live - no re-encode, no stutter. Both videos are playback-synced, and whichever side the slider is on decides which audio track is unmuted. There's a timeline with tick marks you can click to seek, a frame counter, play/pause, restart, loop, and a volume slider.
Encoding is content-cached: the filename is an MD5 of the first/mid/last frames, fps, and label, so re-running the same frames skips re-encoding entirely. Nice touch for A/B loops.
The inputs that matter
Everything is optional - it's a preview node, it never blocks your graph.
frames_1/frames_2(IMAGE) - wire your batch of frames here. This is the main path for in-graph comparisons.video_1/video_2(STRING) - file paths. Use these when your clips are already on disk and you just want to eyeball them.audio_1/audio_2(AUDIO) - mux audio into the encoded clips.label_1/label_2- the corner badges, default "Before" / "After". Actually rename them, that's the whole point.fps(default 24) - the frame rate the encoded MP4s are stamped with. Match your generation.loop(default on) - loop playback.
It returns nothing - no outputs. It's an OUTPUT_NODE, so everything it produces goes to the widget.
Installing it
The README keeps it to two steps, and there are no pip dependencies, no model downloads, nothing heavy:
cd ComfyUI/custom_nodes
git clone https://github.com/peterducan-hub/Comfyui_DualVideoCompare
Restart ComfyUI (or hit reload), and "Dual Video Preview" shows up under image/video. ComfyUI Manager can do it for you too - search for "Comfyui_DualVideoCompare" under Custom Nodes. The one external dependency is ffmpeg on your PATH with libx265 or libx264; the node checks for it at import. ComfyUI's portable Windows build usually gets ffmpeg from another pack, but if the frame-encode path dies with "No supported video encoder found," that's what it means - ffmpeg -encoders is the diagnostic.
Where people get burned
- File paths need to live inside ComfyUI's
outputfolder. The browser fetches the preview via ComfyUI's/viewendpoint, which resolves relative to output. Pointvideo_1atC:\Downloads\clip.mp4and the node happily builds, then the player shows nothing. Drop a copy inoutput/first. - Odd dimensions get cropped by one pixel. Video codecs want even widths/heights, so the encoder trims as needed. Usually invisible; don't panic.
- If you only connect paths, ffmpeg isn't required at all. The dependency only bites on the frame-tensor path. If you don't have ffmpeg, compare files, not tensors.
It's a preview, not an exporter - but the encoded clips land in output/ as dvp_*.mp4 anyway, so your winning side is sitting right there when you find it.
Note: at time of writing this pack is a single-commit, single-node utility from the same author as the community node "Video Combine Plus" - expect it to stay small and opinionated.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| video_1opt | STRING | Path to first video file | |
| video_2opt | STRING | Path to second video file | |
| frames_1opt | IMAGE | Frame sequence for video 1 (B,H,W,C) | |
| frames_2opt | IMAGE | Frame sequence for video 2 (B,H,W,C) | |
| audio_1opt | AUDIO | Audio track for video 1 | |
| audio_2opt | AUDIO | Audio track for video 2 | |
| label_1opt | STRING | Before | β |
| label_2opt | STRING | After | β |
| fpsopt | FLOAT | 24.01β120 | β |
| loopopt | BOOLEAN | true | β |
Outputs (0)
No outputs