Nodes/ComfyWarp/RenderVideo
ComfyUI Node

RenderVideo

Turn the frame folder into an actual movie

By Sxela·Created 3 years ago·Updated 2 months ago· 49
RenderVideo
      output_dir
      frames_input_dir
      batch_nameComfyWarp
      first_frame0
      last_frame-1
      render_at_frame0
      current_frame0
      fps24.00
      output_format
      use_deflickerfalse

      Your ComfyWarp loop produces PNGs, one per frame, into a folder via SaveFrame. That folder is not a video, and nobody wants to manually feed 600 PNGs into an encoder. RenderVideo is the closing step: it watches the loop, and the moment the current frame crosses the threshold you set, it shells out to ffmpeg, stitches {frames_folder}/{batch_name}_%06d.png into an mp4 (or mov), and drops it in your output dir. Then it stops - it's a one-shot trigger, not a watcher.

      The inputs that matter

      • output_dir - where the rendered file lands. Created automatically.
      • frames_input_dir - the folder SaveFrame writes to. Wire it to the same path and the naming matches up.
      • batch_name (default ComfyWarp) - must match the batch_name in SaveFrame; the file pattern is {batch_name}_%06d.png on both ends. Mismatch these and ffmpeg finds zero frames and you get a confusing empty encode.
      • first_frame / last_frame - which frames to include. last_frame = -1 (the default) means "everything available."
      • render_at_frame - the trigger point. Plug your dataset's total frame count here (or whatever frame you want the movie to start being built at). The export only fires when current_frame >= render_at_frame.
      • current_frame - the loop counter. Don't set this by hand; wire it from FixedQueue's current output, same as the rest of the graph.
      • fps (default 24) - output framerate. If you extracted every nth frame from the source video, remember this isn't the source's fps; it's the fps of your rendered frame sequence.
      • output_format - h264_mp4 (default), qtrle_mov (lossless, huge, for editing), or prores_mov (prores, for grading/editor pipelines).
      • use_deflicker - adds ffmpeg's built-in deflicker filter, which smooths luminance flicker between frames. Cheap insurance on noisy output, but it can wash out intentional flicker (fire, lightning) - test before committing to it.

      The dependency gotcha

      This is where ComfyWarp needs ffmpeg, and it's the one install step people trip on. The pack searches the working directory tree for an ffmpeg binary; on Windows it will try to download GyanD's ffmpeg 6.0 build automatically if it can't find one, but on Linux/macOS that download is a .exe that won't run. If the export step dies with a silent failure or a FileNotFoundError, the fix is almost always "ffmpeg isn't reachable":

      # Debian/Ubuntu
      sudo apt install ffmpeg
      # macOS
      brew install ffmpeg
      

      Verify with ffmpeg -version before blaming the node. One catch specific to this pack: it looks for the binary in the working-directory tree, not your PATH, so if the command exists but the export still fails, copy or symlink ffmpeg into the folder you launch ComfyUI from (or wherever the pack's cwd points) and re-run.

      The flow-blend bonus

      The README describes this node's optional deflicker in terms of the wider "FlowBlend" idea: consistent regions of the frame blend linearly with the previously warped stylized output, while inconsistent regions come only from the current stylized output. That's the recipe for smoothing static areas and cutting trails on moving ones - and the practical knob here is use_deflicker. Everything else about that blending happens upstream (the consistency masks); RenderVideo just outputs the result. Wire it as the final node, plug the counter through, and the loop hands you a finished file at the end.

      CategoryWarpFusion

      Inputs (10)

      NameTypeDefaultDescription
      output_dirSTRING
      frames_input_dirSTRING
      batch_nameSTRINGComfyWarp
      first_frameINT00–9999999999
      last_frameINT-1-1–9999999999
      render_at_frameINT00–9999999999
      current_frameINT00–9999999999
      fpsFLOAT24.000–9999999999
      output_formatCOMBO3 options: h264_mp4, qtrle_mov, prores_mov
      use_deflickerBOOLEANfalse

      Outputs (0)

      No outputs