Nodes/ComfyArt/ComfyArt Timeline Render
ComfyUI Node

ComfyArt Timeline Render

Cutting a real video inside ComfyUI

By jtydhr88·Created about a month ago·Updated 3 days ago· 553
ComfyArt Timeline Render
  • clip
  • clip2
  • clip3
  • clip4
  • clip5
    ◄timeline—►
    ◄filename_prefixcomfyart/edit►

    The annoying part of making anything longer than a single shot in ComfyUI isn't generating the clips. It's everything after: five separate mp4s in output/, a music track that needs to line up, a title card that has to land at 0:03. ComfyUI's core video nodes save one clip and stop. The standard answer is to leave, open a video editor, and re-import the result if you need another pass.

    ComfyArt Timeline Render is the "don't leave" option. Feed it up to five video inputs, describe the edit as JSON, and it renders the finished file - transitions, overlays, mixed audio - inside a normal queue job. It's the node behind ComfyArt's built-in video editor, exposed so you can wire it up yourself.

    How it actually works

    PyAV and numpy, on the CPU, frame by frame. Not a wrapper around an ffmpeg binary.

    For every output frame the node asks each layer on each track "what do you look like at time t?", seeks or decodes the source, scales it (cover or contain), pastes it with alpha, applies whatever transition is mid-flight, draws overlays on top, encodes. Audio is decoded separately, resampled to 48 kHz stereo, tempo-adjusted if you changed a clip's speed, gain/faded per clip, summed, clipped, muxed in as a second stream. Output is mp4 (h264, CRF 20, preset medium, AAC) or webm (VP9, CRF 32, libopus), picked by format.

    Two things to internalise. That encode is CPU work and doesn't care how fast your GPU is - a 60-second 24 fps render is 1,440 frames of numpy compositing. And files referenced from disk must live inside ComfyUI's input, output or temp; the path goes through ComfyUI's annotated-filepath helper, which throws if it escapes those folders. Sensible, and mildly annoying if your b-roll lives elsewhere.

    The inputs and output that matter

    timeline is the only one you'll think about. It's a multiline STRING holding JSON. Required. The schema, as built by the pack's own editor:

    {
      "width": 1080, "height": 1920, "fps": 24, "duration": 12.5, "format": "mp4",
      "video": [
        {"src": "@clip", "start": 0, "duration": 4, "offset": 0, "speed": 1,
         "track": 0, "fit": "cover", "muted": true,
         "transition": {"type": "fade", "duration": 0.5}},
        {"src": "broll.mp4 [input]", "start": 4, "duration": 8.5, "offset": 1.2,
         "track": 0, "fit": "cover", "volume": 0.4, "fadeIn": 0.3}
      ],
      "audio": [{"src": "music.mp3 [input]", "start": 0, "duration": 12.5, "volume": 0.7}],
      "overlays": [{"image": "title.png [input]", "x": 0, "y": 0, "start": 0.5,
                    "duration": 2, "animation": {"type": "fade", "duration": 0.6}}]
    }
    

    clip through clip5 are the optional VIDEO inputs, and this is the bit people miss: connecting a video doesn't automatically use it. When you wire one up, the node writes it to a temp file and expects your JSON to point at it as @clip, @clip2, @clip3, @clip4 or @clip5, in that order. Wire nothing, reference @clip, and you get "the timeline is empty" rather than a helpful missing-input message.

    filename_prefix defaults to comfyart/edit, which drops the file in output/comfyart/.

    No outputs - it's an output node. The finished file is reported through ComfyUI's UI results channel with the animated flag set, so it appears in the queue's result preview and lands in output/. Nothing to wire onward; if you want a second pass, start a new graph from the mp4.

    Per clip you get start, duration, offset (how far into the source to begin), speed, track (higher paints over lower), fit, muted, volume, fadeIn/fadeOut, maskShape: "circle", and transition with a type and duration. Transition types: fade, black, white, wipeleft, wiperight, wipeup, wipedown, slideleft, slideright, zoom. Overlays take start, duration, x, y, an optional box, and an animation from a fixed keyframe set - fade, spring-up, blur-in, zoom-in, slide-left, slide-right, wipe-in, pulse, wave.

    Installing it

    Same pack, same two-command install:

    cd ComfyUI/custom_nodes
    git clone https://github.com/jtydhr88/ComfyArt
    cd ComfyArt && pip install -r requirements.txt
    

    Restart and the node appears under ComfyArt. The pack's own canvas app then lives at http://127.0.0.1:8188/comfyart/.

    Unlike most of ComfyArt's feature table, this needs no model downloads - pure Python. What it does need is PyAV, and here's the wrinkle: requirements.txt lists only pypdfium2 and rapidocr, neither used by the timeline, while the timeline imports av at module load. ComfyUI ships PyAV, so on a normal install you never notice. On a portable build or hand-rolled venv you get ModuleNotFoundError: No module named 'av' - and because nodes.py imports the timeline module at startup, both ComfyArt nodes vanish with one IMPORT FAILED line. pip install av fixes it.

    Troubleshooting

    "the timeline is empty." Either duration is missing or zero and nothing else has length, or your video entries point somewhere unresolvable. Check the src values first.

    "unsupported format." Only mp4 and webm exist. No MOV, no GIF, no ProRes. Encode mp4 here and transcode after.

    A src was rejected for being outside input/output/temp. Move or copy the file into ComfyUI/input/ and reference it as name.mp4 [input].

    Renders take forever and the GPU sits idle. Correct - this runs on the CPU. Long timelines are a queue-and-leave job.

    A transition jumps at the cut. The node seeks slightly before a transitioning clip's start to have frames to blend; a source with no keyframe near its head seeks imprecisely. Trimming the offset is the usual fix.

    Works locally, fails on a LAN instance. The renderer is part of ComfyArt, so whichever machine executes the prompt needs the pack installed. Another box with only core ComfyUI won't have the node.

    One honest caveat on sourcing: there is basically no community discussion of this node yet - the pack is recent, and the searchable Reddit corpus returns nothing for it. Everything above came from reading the shipped renderer, so treat version drift as real: if behaviour doesn't match, check timeline/__init__.py in your clone before you check a forum.

    CategoryComfyArt

    Inputs (7)

    NameTypeDefaultDescription
    timelineSTRING—
    filename_prefixSTRINGcomfyart/edit—
    clipoptVIDEO—
    clip2optVIDEO—
    clip3optVIDEO—
    clip4optVIDEO—
    clip5optVIDEO—

    Outputs (0)

    No outputs