Nodes/ComfyUI Image to Video Inserter/Base64 Video to Images
ComfyUI Node

Base64 Video to Images

Decode a base64 video into frames without leaving the graph

By Yeq6X·Created 2 months ago·Updated 2 months ago· 1
Base64 Video to Images
    • frames
    base64_video
    frame_step1
    max_frames0

    You've got a video as one giant base64 string - from an API response, an upload, a colleague's paste - and you want those frames inside ComfyUI so you can actually work with them. Base64 Video to Images is the node that does the boring but essential job: decode the string, pull the frames out as an IMAGE batch, and hand them to whatever comes next.

    It's part of ComfyUI Image to Video Inserter by Yeq6X, the pack built around stamping still images into video timelines. Its sibling Images to Base64 Video encodes the other way (frames → base64 string), which makes this node the natural decoder half of that round trip. If your workflow moves video as text - a headless job, a remote render, a shared blob - these two are how it gets in and out of the graph.

    How it works

    Under the hood it's OpenCV doing the heavy lifting: the node base64-decodes the string, writes it to a temp file, opens it with cv2.VideoCapture, and walks the frames one by one. Nothing exotic - which is the point. A couple of behaviors worth knowing:

    • Data URIs are handled. A data:video/mp4;base64,... blob works just like raw base64; the header gets stripped before decoding.
    • frame_step subsamples. Set it to 1 and you get every frame. Set it to 5 and you get every fifth frame - a quick way to get a lower-fps overview or to skip redundant frames before processing. Frames that land on the step get extracted; the rest are skipped.
    • max_frames caps the output. 0 means "no cap". If your clip is long, set it so you don't accidentally pull ten thousand frames into VRAM.

    Inputs and outputs that matter

    • base64_video - the multiline text field with the encoded video.
    • frame_step - default 1, range 1–100. How many frames to skip between extracted frames.
    • max_frames - optional, default 0 (unlimited), max 10000. Hard stop on extracted frame count.

    The output is frames, a standard IMAGE batch - B,H,W,C tensor in the usual ComfyUI layout, so it plugs into anything that eats a frame batch: the pack's Multi Image Inserter, a VHS_VideoCombine to re-encode, or a preview.

    Installing it

    Same as the rest of the pack - this is one install for all ten nodes. ComfyUI Manager → search "Image to Video Inserter", or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Yeq6X/ComfyUI-image-to-video-inserter
    

    then restart. No model downloads, no keys. Dependencies are what a stock ComfyUI already has (the node uses opencv-python, which the pack requires - if nodes aren't showing up in your menu, pip install opencv-python into the ComfyUI env is the first thing to try).

    When to reach for it

    Reach for this when video arrives in your pipeline as text and you want it as editable frames - extracting a clip sent from another service, unpacking a base64 render for post-processing, or just reversing an Images to Base64 Video export to see what's inside. Like its sibling, it's a plumbing node. It fails quietly, though: if the string is garbage or the codec unsupported, you get a black 64×64 dummy frame instead of an error, so verify your input decodes before you start debugging downstream output.

    CategoryVideo/Import

    Inputs (3)

    NameTypeDefaultDescription
    base64_videoSTRING
    frame_stepINT11–100
    max_framesoptINT00–10000

    Outputs (1)

    NameTypeDescription
    framesIMAGE