Nodes/ComfyUI-AI-CustomURL/Save Video from URL
ComfyUI Node

Save Video from URL

The node that actually gets the hosted video onto your disk

By bowtiedbluefin·Created 10 months ago·Updated 10 months ago· 3
Save Video from URL
    • filepath
    • status
    video_url
    filenamevideo_{timestamp}
    output_folderoutput/videos
    api_key

    Generating a video through an API hands you back a URL, not a file. That URL can expire, the hosting can go away, and your "finished video" is really just a link with a timestamp on it. This node is the part of the ComfyUI-AI-CustomURL pack that makes the result yours: it takes that URL, downloads the bytes, and writes a real file to disk. It's an output node - the terminal point of a generation workflow - and it's the natural pair for the pack's video generation node.

    How it works

    Give it video_url, a filename, and an output_folder, and it does the straightforward thing: requests.get with streaming, write the bytes, report back. There are three bits of behavior worth knowing:

    • The {timestamp} placeholder. The default filename is video_{timestamp}, which expands to something like video_20260816_143022.mp4 at save time. Keep it and you never overwrite; drop it and you'll need to manage collisions yourself.
    • Extension handling. If your filename doesn't end in .mp4, .webm, .mov, or .avi, it gets .mp4 appended. The format is whatever the server actually sent - this node doesn't re-encode, it just names the file.
    • Authenticated downloads. The optional api_key is only used when the URL contains openai.com - it adds a Bearer header. This matters, because OpenAI's video content URLs require authentication. That's exactly why the video generation node passes its api_key through as an output: chain video_urlvideo_url, api_keyapi_key, and the download just works.

    The inputs and outputs

    Inputs: video_url, filename (default video_{timestamp}), output_folder (default output/videos), optional api_key. Outputs: filepath (the absolute path where the file landed) and status (a human-readable message, including the file size in MB).

    A caveat on the default folder: output/videos is relative to wherever ComfyUI is running, so check your output directory for a videos subfolder if the file seems to vanish. And if you want the preview node to find it, feed it the absolute filepath this node returns.

    Installing it

    Part of the ComfyUI-AI-CustomURL pack:

    cd ComfyUI/custom_nodes
    git clone https://github.com/bowtiedbluefin/ComfyUI-AI-CustomURL
    cd ComfyUI-AI-CustomURL
    pip install -r requirements.txt
    

    Or ComfyUI Manager → search "AI CustomURL", restart. No model downloads; opencv-python in the pack requirements isn't used here, but requests is.

    Common issues

    • "No valid video URL to save" - the generation failed or timed out upstream, so the URL is empty. Check the generation node's status first.
    • HTTP 403 on OpenAI downloads - you forgot the api_key for an authenticated content URL.
    • Long downloads - the timeout here is 300 seconds, which is generous but not infinite; very large or slow files can still trip it.

    A small, quiet pack with a single author, but this node does the unglamorous job every hosted-video workflow needs: making the result permanent.

    Categoryai_customurl

    Inputs (4)

    NameTypeDefaultDescription
    video_urlSTRING
    filenameSTRINGvideo_{timestamp}
    output_folderSTRINGoutput/videos
    api_keyoptSTRING

    Outputs (2)

    NameTypeDescription
    filepathSTRING
    statusSTRING