Nodes/ComfyUI-Pixaroma/Save Mp4 Pixaroma
ComfyUI Node

Save Mp4 Pixaroma

Save Mp4 Pixaroma - encode an IMAGE batch (and optional AUDIO) to a single H.264 mp4 with a built-in <video> preview right on the node body so you can watch the result without leaving ComfyUI. Frames stream straight to ffmpeg's stdin (no temp PNG files); audio is muxed in as AAC 192k. Pairs with AudioReact Pixaroma but works with any source that produces frames + AUDIO. The workflow is embedded in the saved mp4 (its comment metadata), so you can drag the video back into ComfyUI to restore the graph - reading it back needs a video pack like VideoHelperSuite installed. ffmpeg binary is auto-located: imageio-ffmpeg's bundled exe is preferred (no system install needed - 'pip install imageio-ffmpeg'), with ffmpeg on PATH as a fallback. yuv420p requires even width and height; the node surfaces a clear error rather than ffmpeg's opaque crash if dimensions are odd. Encoder is hardcoded to libx264 / preset medium / CRF 19. Bring those back to INPUT_TYPES if a workflow needs per-clip control.

By pixaroma·Created 5 months ago·Updated 23 days ago· 271
Save Mp4 Pixaroma
  • video_frames
  • audio
    fps24
    filename_prefixVideo
    save_modesave
    trim_to_audiofalse
    Category👑 Pixaroma/🖼️ Image

    Inputs (6)

    NameTypeDefaultDescription
    video_framesIMAGEFrame batch to encode. Wire Audio React Pixaroma's video_frames output here.
    fpsFLOAT241–120Output frame rate. Wire Audio React Pixaroma's fps output here so it always matches what produced the frames.
    filename_prefixSTRINGVideoFilename stem. The node appends a 5-digit counter and .mp4 (e.g. Video_00001.mp4). Use '/' for subfolders, date tokens like %date:yyyy-MM-dd%, and node references like %Seed Pixaroma.seed% that print another node's field value into the name.
    save_modeCOMBOsavesave: write to ComfyUI's output/ folder, kept across restarts. preview: write to ComfyUI's temp/ folder, auto-cleared on restart — use while iterating so you don't clutter output/. The in-node video preview works the same in both modes.
    trim_to_audioBOOLEANfalseOff (default): keep every video frame; the audio simply ends where it ends. On: end the video exactly at the audio's length (ffmpeg -shortest), for when the audio is the master (e.g. with Audio React). On can drop the last frame or two when the audio is slightly shorter than the video.
    audiooptAUDIOOptional audio track to mux into the mp4 as AAC 192k. Connect Audio React Pixaroma's audio output here.

    Outputs (0)

    No outputs