Nodes/ComfyUI-Pronodes/⚡ Load Youtube Video
ComfyUI Node

⚡ Load Youtube Video

Pull a YouTube video (or Short) straight into your ComfyUI video workflow

By yuvraj108c·Created 3 years ago·Updated 2 years ago· 4
⚡ Load Youtube Video
    • video_path
    • frame_rate
    url

    The ⚡ Load Youtube Video node is the reason most people find this pack. Paste a URL, run the graph, and it downloads the video to ComfyUI's output folder, skips the download if it's already there, and hands you the file path and frame rate as clean outputs - with a playable video preview rendered right inside the node. If you've ever wanted to feed a YouTube clip or Short into an img2vid, face-swap, upscale, or style-transfer pipeline without leaving ComfyUI, this is the missing first step.

    It's built to pair with VideoHelperSuite, and the pack even ships an example workflow showing the exact wiring.

    How it works

    Under the hood it's yt-dlp wrapped in a ComfyUI node. It does three things in order:

    1. Fetches the video title (using yt-dlp's info extraction) and sanitizes it into a filename.
    2. Downloads the video as yt-dlp -f 22 <url> into output/youtube/<sanitized-title>.mp4 - but only if that file doesn't already exist. Re-run the workflow and it prints a "skipping download" message and moves on instantly.
    3. Reads the file metadata with imageio to get the real frame rate and resolution, then returns them.

    That last bit is the clever part. Because it returns the actual fps of the downloaded file, your downstream combine node can match the source speed instead of you guessing "uh, 30?"

    The outputs and where they go

    Two outputs:

    • video_path (STRING) - the full path to the downloaded file. This is what you wire into VHS_LoadVideoPath's video input. VHS loads the frames, and the whole thing becomes a normal image-batch pipeline.
    • frame_rate (INT) - the source video's fps, wire it straight into VHS_VideoCombine's frame_rate so your output matches the original.

    The node is also an output node with a custom UI: after a run it shows the video in an embedded player (with the preview code borrowed from VHS) plus a text line with resolution, fps, and title in that classic terminal-green.

    Where people get burned

    This is where it gets honest, because yt-dlp in 2025-2026 is a moving target:

    • -f 22 isn't always available. Format 22 is YouTube's combined 720p mp4, and it's not guaranteed on every video - higher-quality uploads, some Shorts, and VP9-only encodes often lack it. When it's missing, the download fails with a yt-dlp error in the console. There's no fallback logic in the node. If you hit it, a regular yt-dlp <url> download works; the node is just picky.
    • It shells out to the yt-dlp command, not the Python library. yt_dlp in requirements.txt gives you the console script, so it normally works - but if your ComfyUI runs in an odd environment where the yt-dlp binary isn't on PATH, the node errors. Running yt-dlp --version from the same environment as ComfyUI is the quick check.
    • YouTube's bot detection is real. "Sign in to confirm you're not a bot" errors are an ongoing yt-dlp struggle and will fail inside this node just like everywhere else. Not the pack's fault - but don't be surprised when it happens.

    Install

    cd ComfyUI/custom_nodes
    git clone https://github.com/yuvraj108c/ComfyUI-Pronodes
    cd ComfyUI-Pronodes
    pip install -r requirements.txt   # yt_dlp + imageio[ffmpeg]
    

    Or search "ComfyUI-Pronodes" in ComfyUI Manager and let it handle that. Restart, and the node appears as "⚡ Load Youtube Video". You'll also want VideoHelperSuite installed for the node to be useful, since it produces a path that VHS consumes. Dependencies are light, no model downloads, no API keys - the pack's author keeps this one free of external services.

    CategoryPronodes

    Inputs (1)

    NameTypeDefaultDescription
    urlSTRING

    Outputs (2)

    NameTypeDescription
    video_pathSTRING
    frame_rateINT