Nodes/YouTube Downloader/YouTube 動画ダウンローダー
ComfyUI Node

YouTube 動画ダウンローダー

Paste a YouTube link, queue, and a file lands in your output folder — no API key needed

By sou319b·Created about a year ago·Updated about a year ago· 0
YouTube 動画ダウンローダー
    • result
    ◄video_urlhttps://www.youtube.com/watch?v=dQw4w9WgXcQ►
    ◄download_typevideo►
    ◄video_type通常動画►
    ◄resolution720p►
    ◄video_formatmp4►
    ◄audio_formatmp3►
    ◄custom_filename►

    The name is the whole pitch. This node takes a YouTube URL, a resolution, and a format, and on queue it downloads the file straight into ComfyUI's output directory. No API key, no second browser tab, no dragging files in from Downloads afterward. It's a thin, friendly wrapper around yt-dlp, the same command-line tool behind most of the downloaders you've already used. And yes, the default URL is the Rickroll - the author either has a sense of humor or is trolling you on purpose.

    You'd reach for it when your whole pipeline lives inside one canvas and you keep having to fetch a clip from outside: pulling reference footage into a video-to-video workflow, gathering clips as training data for a LoRA, or grabbing audio to run through a separation step. It's not the only yt-dlp wrapper in this little niche, but it's the one that saves you from leaving ComfyUI at all.

    How it works under the hood

    There's no magic, which is the good kind of news. The node builds a format selector string for yt-dlp and lets it do the work. Pick 720p and it translates that to a 1280x720 target, then asks yt-dlp for the best video stream at exactly that size, falling back to something slightly larger, then slightly smaller, then any stream no taller than the target, then just best. Video and best audio get merged, and FFmpeg's convertor post-processor rewraps the result into your chosen container. Audio mode skips video entirely and runs FFmpeg's audio extraction to mp3, m4a, opus, or wav (mp3 at a chunky 320 kbps). The "Short video" setting is just a width/height swap so portrait targets get matched properly.

    Files land in output/ with the sanitized video title as the filename, unless you set a custom one. It's registered as an output node, meaning it doesn't need to connect to anything - fire it and collect the file.

    The one thing beginners get wrong

    This is not a media node. It doesn't hand frames or audio to anything downstream. Its single output, result, is a STRING - a Japanese summary message with the title, uploader, duration, save path, and file size, emoji included. If you came here hoping to wire video straight into a VAE, this isn't that. You use it to get a file onto disk, then load that file with whatever node your workflow actually needs.

    The inputs that matter

    Three of the six are ones you'll actually touch:

    • video_url - the link. Everything else hangs off this.
    • download_type - video or audio. This is the fork in the road; switch it and the format inputs below become the relevant ones.
    • resolution - 1080p / 720p / 480p / 360p, default 720p.

    The rest (video_type, video_format, audio_format, custom_filename) are refinements. Two of the labels are in Japanese: 通常動画 means normal/landscape, ショート動画 means Shorts/portrait. Don't let that trip you up.

    Installing it

    Easiest route is ComfyUI Manager: search for comfyui-youtube-downloader (display name "YouTube Downloader") and install. Manager pulls in yt-dlp>=2023.12.30 from the pack's requirements automatically. Manual install is the usual dance:

    cd ComfyUI/custom_nodes/
    git clone https://github.com/sou319b/comfyui-youtube-downloader
    pip install yt-dlp
    

    Then restart ComfyUI. Small trap: the pack's own README shows git clone https://github.com/YOUR_USERNAME/comfyui-youtube-downloader.git - a copy-paste placeholder. Copy that literally and you'll be cloning nothing.

    The gotchas that actually bite

    • The resolution is a target, not a promise. YouTube doesn't always serve your exact frame size, and the selector happily falls back to something close or bigger - or just best. Pick 1080p on a 720p-only video and you get 720p. Watch the console; the node prints exactly which stream it selected.
    • yt-dlp rots. When YouTube changes something server-side, downloads start failing and it's almost never your fault. Fix it with pip install -U yt-dlp.
    • FFmpeg is mandatory for every audio extraction and any container conversion. ComfyUI installs usually ship it via the embedded Python, but if yours doesn't: brew install ffmpeg on macOS, sudo apt install ffmpeg on Debian/Ubuntu, or grab a Windows build from the BtbN FFmpeg-Builds releases.
    • Restricted videos just fail. There's no cookie or login support in this version, so age-gated, members-only, or region-locked content will bounce. When that happens the node catches the error and returns a message string instead of crashing your queue - nice touch.
    • Files land in ComfyUI/output, not in the node's own folder, so don't go looking next to the install.

    It's a small, single-purpose node, and for "I need this clip on disk, right now, without leaving ComfyUI" it does the job cleanly. Just keep yt-dlp fresh and remember it's a downloader, not a media source.

    CategoryYouTube Downloader

    Inputs (7)

    NameTypeDefaultDescription
    video_urlSTRINGhttps://www.youtube.com/watch?v=dQw4w9WgXcQ—
    download_typeCOMBOvideo2 options: video, audio
    video_typeCOMBO通常動画2 options: 通常動画, ショート動画
    resolutionCOMBO720p4 options: 1080p, 720p, 480p, 360p
    video_formatCOMBOmp43 options: mp4, webm, mkv
    audio_formatCOMBOmp34 options: mp3, m4a, opus, wav
    custom_filenameoptSTRING—

    Outputs (1)

    NameTypeDescription
    resultSTRING—