Nodes/MKRShift_Nodes/Video Crossfade
ComfyUI Node

Video Crossfade

Dissolve two clips into one, right there in the graph

By criskb·Created 7 months ago·Updated 5 months ago· 0
Video Crossfade
  • video_a
  • video_b
  • video
  • output_path
  • summary
transition_duration_sec0.50
fallback_fps24.0
output_formatauto
filename_prefixMKR_crossfade_video
subfolder
overwritefalse

MKRVideoCrossfade takes two videos and dissolves from one into the other, outputting a single clip. If you're stitching shots together for a sequence or a promo, this is the dissolve you'd normally do in a timeline editor, done as a node.

The mechanism is honest and simple. It decodes both clips to frames, rescales clip B to clip A's resolution (B is stretched to match A, no cropping), then blends the last transition_duration_sec of A into the first transition_duration_sec of B with a linear ramp, and concatenates the rest. Set transition_duration_sec to 0 and you get a hard cut - same node, no transition. The output frame rate follows A, with fallback_fps (default 24) only used if the source doesn't report one.

The inputs that matter

  • video_a / video_b - the two clips. Both must actually yield frames; if either resolves to nothing you get the source path back plus a warning. They don't need matching durations - A plays in full, then the dissolve, then the rest of B.
  • transition_duration_sec - how long the dissolve takes, in seconds. Default 0.5. The useful range is small (0.1–2s); at the max of 10 you're basically watching a super-slow blend that ends in B.
  • output_format - auto keeps A's container, or force gif/webp/mp4/mov/webm.
  • filename_prefix, subfolder, overwrite - output naming, standard for the pack.

Outputs: video (an MKR_VIDEO payload dict), output_path (the written file), and summary (transition frame count, output frame count, warnings).

Install

It ships in MKRShift Nodes - install the whole pack:

cd ComfyUI/custom_nodes
git clone https://github.com/criskb/MKRShift_Nodes

or ComfyUI Manager → search MKRShift_Nodes → restart. For mp4/mov/webm output you need system ffmpeg on PATH (the README says so explicitly); without it the node falls back to writing a gif. No pip dependencies.

Where people get burned

The one people hit first: this is a frame-based blend, so the output has no audio track - there's no sound carried through the dissolve. If you need the combined audio, mux it back on afterward (this pack has MKRMuxVideoAudio for that). Second: mismatched resolutions aren't an error - B just gets resized to A, so a 1080p A and a 512px B will look exactly as soft as that sounds. Match your sources before you wonder why the result is mushy. And if both inputs are long, remember every frame is being decoded, blended in numpy, and re-encoded - this is a "render it once and walk away" node, not a scrub-through-the-timeline one.

CategoryMKRShift Nodes/Media/Video/Edit

Inputs (8)

NameTypeDefaultDescription
video_a*
video_b*
transition_duration_secFLOAT0.500–10
fallback_fpsFLOAT24.01–240
output_formatCOMBOauto6 options: auto, gif, webp, mp4, mov, webm
filename_prefixSTRINGMKR_crossfade_video
subfolderSTRING
overwriteBOOLEANfalse

Outputs (3)

NameTypeDescription
videoMKR_VIDEO
output_pathSTRING
summarySTRING