Nodes/ComfyUI-ytdl_nodes/YTDL Downloader
ComfyUI Node

YTDL Downloader

Download YouTube Audio (or Video) Straight Into ComfyUI — No Shell, No Copy-Paste

By Saganaki22·Created about a year ago·Updated 12 months ago· 32
YTDL Downloader
  • links
  • downloaded_files
  • download_info
output_folderoutput/YTDL/
media_typeaudio_only
audio_formatmp3
video_formatmp4
qualitybest
enable_time_cropfalse
crop_start
crop_end
use_cookiestrue
browser_for_cookiesfirefox
download_playlistfalse
continue_on_errortrue
custom_filename%(title)s.%(ext)s
cookie_file

Want to grab the audio track of a video and feed it into a music-to-video, voice-cloning, or stem-splitting workflow without ever leaving ComfyUI? That's the whole job of YTDL Downloader, the workhorse of the ComfyUI-ytdl_nodes pack. It's a thin, friendly wrapper around yt-dlp - the same tool the terminal crowd has used for years - so it downloads from YouTube plus 1,000+ other sites (SoundCloud, Vimeo, Bandcamp, a lot of things with an RSS feed), converts to your format of choice, and drops files into a folder you pick. The entire download-and-convert flow becomes one node in your graph instead of a detour into a shell.

How it works

Under the hood it's genuinely just yt-dlp with a nicer face. Give it links, it builds a YoutubeDL instance with sensible settings (retries, a Chrome user-agent, sleep intervals so you don't trip rate limits), picks a format string based on your quality choice, and runs. When you ask for audio conversion or a time crop, it hands the heavy lifting to FFmpeg as a postprocessor. There's no API, no key, and no model weights involved - nothing to download except the media itself. The pack's own framing is worth repeating: it's a wrapper, not a service.

The inputs that actually matter

You've got a wall of options, but 90% of the time you touch these:

  • links - feed it from YTDL Links Input (same pack). The socket type is YTDL_LINKS, so you can't just type a URL here; the links node is the gateway.
  • media_type - audio_only (default) or video. The format dropdowns only apply to their matching type, which the tooltips spell out.
  • quality - best, worst, resolutions (1080p, 720p…), or bitrates (320, 256…) for audio. Default best is what you want for music.
  • audio_format / video_format - mp3/wav/m4a/flac/ogg for audio; mp4/webm/mkv/best for video.
  • enable_time_crop + crop_start / crop_end - grab just a segment ("0:30" to "5:00", or plain seconds). This is the sleeper feature and it works well.
  • use_cookies / browser_for_cookies - the ones that decide whether YouTube gives you 480p or 1080p+.

Where people get burned: without cookies, YouTube caps downloads at 480p. It's not a bug in this node, it's YouTube's policy on non-authenticated requests, and it trips up everyone on day one. The fix is in the README and it's simple - enable cookies, pick firefox, and be logged into YouTube in that browser. Firefox extraction works automatically; Chrome/Edge/Brave need a manual cookies.txt export (the "Get cookies.txt LOCALLY" extension), which you point at with the optional cookie_file input and set browser_for_cookies to none. Also: disable your VPN. YouTube blocks VPN traffic hard and the failures look like the node is broken when it isn't.

The outputs

  • downloaded_files - a STRING of absolute paths, one per line. This is the one you wire into YTDL Preview (same pack) to play the result, or into any other node that wants a file path.
  • download_info - a JSON blob with per-file status, handy for debugging.

Installing and the ffmpeg catch

Install via ComfyUI Manager (search "ytdl") or:

cd ComfyUI/custom_nodes
git clone https://github.com/Saganaki22/ComfyUI-ytdl_nodes

Restart ComfyUI. On first launch the pack auto-installs its one Python dependency (yt-dlp) straight from requirements.txt, so you don't usually touch pip. The catch that isn't auto-handled: FFmpeg must be on your system PATH for anything but m4a audio and for time cropping. It's a system install, not a pip one:

sudo apt install ffmpeg        # Linux
brew install ffmpeg            # macOS
winget install ffmpeg          # Windows

If it's missing, the node prints clear install instructions in the console and refuses to crop rather than silently producing garbage - the retries, anti-bot headers, and fallback logic are otherwise pretty forgiving. It's a small indie pack from a single developer (launched as a WIP on r/StableDiffusion in August 2025), but the downloader is the stable core of it and the node it's actually worth installing the pack for.

Categoryaudio/ytdl

Inputs (15)

NameTypeDefaultDescription
linksYTDL_LINKS
output_folderSTRINGoutput/YTDL/
media_typeCOMBOaudio_only2 options: audio_only, video
audio_formatCOMBOmp3🎵 AUDIO FORMAT - Only applies when media_type = 'audio_only'. Ignored for video downloads.
video_formatCOMBOmp4🎬 VIDEO FORMAT - Only applies when media_type = 'video'. Ignored for audio-only downloads.
qualityCOMBObest10 options: best, worst, 1080p, 720p, 480p, 360p, +4
enable_time_cropBOOLEANfalse
crop_startSTRING
crop_endSTRING
use_cookiesBOOLEANtrue
browser_for_cookiesCOMBOfirefox6 options: chrome, firefox, edge, safari, brave, none
download_playlistBOOLEANfalse
continue_on_errorBOOLEANtrue
custom_filenameoptSTRING%(title)s.%(ext)s
cookie_fileoptSTRING

Outputs (2)

NameTypeDescription
downloaded_filesSTRING
download_infoSTRING