Nodes/ComfyUI-aihub-workflow-exposer/AIHub Action New Video
ComfyUI Node

AIHub Action New Video

Shipping a generated video clip back to the editor, encoded and ready

By otavanopisto·Created about a year ago·Updated 22 days ago· 7
AIHub Action New Video
  • video
    actionAPPEND
    namenew video
    formatauto
    codecauto
    crf23
    file_name
    autoplayfalse

    AIHub Action New Video is the node that gets a generated video out of ComfyUI and into the editor that's driving the workflow. You've produced your video - Wan, LTX, Hunyuan, whatever the current flavor of the month is - and this node takes the VIDEO handle, encodes it, and sends the clip back to the client under a NEW_VIDEO event. It's the video twin of AIHub Action New Image, right down to the APPEND/REPLACE and optional autoplay fields.

    Pack context: this comes from otavanopisto's ComfyUI-aihub-workflow-exposer, the bridge that lets external apps run ComfyUI as their generation engine. Expose nodes pull frames and segments in from the client; action nodes push results back over the pack's own websocket (port 8111). This node is squarely outbound.

    How it works

    The node takes the VIDEO value (which in ComfyUI is a path to a rendered video file), re-encodes it through ComfyUI's video tooling into the requested container/codec, and streams the bytes to the client. The envelope carries the filename, the APPEND/REPLACE file action, the mime type, and the autoplay flag. Note the "auto" defaults: format = auto and codec = auto mean "keep whatever the source already is," which is usually what you want - you only override them when the client needs a specific container.

    The inputs that matter

    • video (required) - the path of the video file to export. In practice you wire this from whatever video-output node your model wrapper uses.
    • format - auto or mp4. Auto passes through; mp4 forces the container.
    • codec - auto or h264. Same idea at the codec level.
    • crf - the H.264 constant rate factor, 0–51, default 23. Lower is better quality (and bigger); the tooltip helpfully warns it only matters for codecs that support it, like H.264. For video-to-video work where you're re-encoding, don't just leave this at the default out of habit - CRF 23 is decent, but for a final deliverable you often want 17–20.
    • action - APPEND/REPLACE for the stored file.
    • name / file_name - friendly name and optional explicit filename. An extension is derived from the format if you don't override.
    • autoplay - whether the client plays the clip immediately on receipt.

    No outputs. Side-effect node.

    Installing it

    ComfyUI Manager (search "ComfyUI-aihub-workflow-exposer"), or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/otavanopisto/ComfyUI-aihub-workflow-exposer
    # restart ComfyUI
    

    No model downloads or extra pip packages - the pack builds on ComfyUI's existing video stack.

    Where people get burned

    The standard one: your editor receives a clip it can't play because the client expects a specific codec and you left everything on auto, so the source format sailed through. If your client is picky, set format/codec explicitly rather than assuming auto is right. And remember the pack-wide rule - if no aihub client is connected to the websocket, this node runs "successfully" and the video simply goes nowhere visible.

    Categoryaihub/actions

    Inputs (8)

    NameTypeDefaultDescription
    videoVIDEOnew_video.mp4The path of the video file to export
    actionCOMBOAPPENDIf append is selected, the video will be added a number to the name to make it unique, if replace is selected, the video will be replaced with the new one
    nameSTRINGnew videoThe name of the video to be used
    formatCOMBOautoThe format to save the video as.
    codecCOMBOautoThe codec to use for the video.
    crfINT230–51The Constant Rate Factor (CRF) to use for encoding quality (lower is better quality). Only used for certain codecs like H.264.
    file_nameoptSTRINGThe filename to use, with the extension
    autoplayoptBOOLEANfalseIf true, the video will autoplay when added

    Outputs (0)

    No outputs