ComfyUI Node

S3 Video Load from URL

Turn a video in S3 into ComfyUI frames — no credentials, one gotcha

By udayjain26·Created about a year ago·Updated 6 months ago· 1
S3 Video Load from URL
    • images
    • frame_count
    • status
    url
    force_rate0
    frame_load_cap0
    skip_first_frames0
    select_every_nth1
    timeout60

    S3 Video Load does for video what the pack's S3 Image Load does for images: you paste a URL - public S3 object, presigned link, whatever - and you get ComfyUI frames back, ready to feed into img2vid, frame interpolation, or a detailer. And like its image sibling, it needs no credentials at all. It's a plain HTTP download of the video file, not an S3 API call, so the URL is the only thing it needs.

    That's a genuinely useful shape for a workflow. If your pipeline uploads generated clips to a shared bucket, the next stage can pull them back by URL with zero key management. Presigned URLs work too - a signed link is just a URL with extra query parameters, and the node doesn't care.

    How it works

    The node downloads the video to a temp file with requests (streaming, so it doesn't hold the whole thing in RAM), then decodes frames with OpenCV. This is where the one real gotcha lives: the pack's declared dependencies don't include opencv-python, but this node imports cv2 at runtime and raises a clear "install it with: pip install opencv-python" if it's missing. ComfyUI ships in a lot of flavors and many already have cv2 lying around from other custom nodes - but if you hit that exact error, you know why.

    Frame extraction is handled with a proper timing loop rather than just "every Nth frame." The node reads the source video's real FPS, then uses grab()/retrieve() to hit your requested rate. That's what makes the frame-rate controls behave correctly even when your source is 30fps and you want 12.

    The inputs that matter

    • url - required. The S3 URL or signed URL to the video.
    • force_rate - default 0 means "keep the source frame rate." Set it to, say, 12 to resample to 12fps.
    • frame_load_cap - max frames to pull (0 = all of them). This is your memory safety valve; a long 4K clip can become a genuinely huge tensor.
    • skip_first_frames and select_every_nth - the "drop the intro" and "take every 3rd frame" knobs.
    • timeout - download timeout, default 60 seconds, up to 600.

    Outputs are images (a batched IMAGE tensor), frame_count, and status.

    Install

    Manager or manual clone, same as the whole pack:

    cd ComfyUI/custom_nodes
    git clone https://github.com/udayjain26/s3_serverless_inline_storage_utils
    

    Restart and find it under S3 Serverless Storage. No models to download. And if decoding fails with an ImportError, run pip install opencv-python and restart ComfyUI.

    Troubleshooting

    Same fail-soft pattern as S3 Image Load, and it's worth repeating: on error this node returns a black 64×64 dummy image, frame_count 0, and an explanatory status instead of raising. A video that fails to download or decode won't stop your graph - it'll just quietly hand you a black frame. If you're building anything that depends on the video actually loading, read frame_count. Zero means it didn't happen.

    Beyond that, the usual suspects: presigned URLs expire, so a link that worked yesterday may 404 today, and some S3 gateways return a generic application/octet-stream content type - the node handles that by falling back to checking the URL extension for .mp4, .webm, .avi, .mov, etc., so keep the extension in the URL when you can. And on very large clips, watch frame_load_cap: loading 10,000 frames into a batch will happily eat a few GB of VRAM/RAM before you notice.

    CategoryS3 Serverless Storage

    Inputs (6)

    NameTypeDefaultDescription
    urlSTRINGS3 URL or signed URL to video
    force_rateoptINT00–60Force specific frame rate (0 = use original)
    frame_load_capoptINT00–99999Max frames to load (0 = load all)
    skip_first_framesoptINT00–99999Skip first N frames
    select_every_nthoptINT11–99999Select every Nth frame
    timeoutoptINT605–600Download timeout in seconds

    Outputs (3)

    NameTypeDescription
    imagesIMAGE
    frame_countINT
    statusSTRING