YTDL Downloader
Download YouTube Audio (or Video) Straight Into ComfyUI — No Shell, No Copy-Paste
- links
- downloaded_files
- download_info
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 isYTDL_LINKS, so you can't just type a URL here; the links node is the gateway.media_type-audio_only(default) orvideo. 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. Defaultbestis 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.
Inputs (15)
| Name | Type | Default | Description |
|---|---|---|---|
| links | YTDL_LINKS | — | |
| output_folder | STRING | output/YTDL/ | — |
| media_type | COMBO | audio_only | 2 options: audio_only, video |
| audio_format | COMBO | mp3 | 🎵 AUDIO FORMAT - Only applies when media_type = 'audio_only'. Ignored for video downloads. |
| video_format | COMBO | mp4 | 🎬 VIDEO FORMAT - Only applies when media_type = 'video'. Ignored for audio-only downloads. |
| quality | COMBO | best | 10 options: best, worst, 1080p, 720p, 480p, 360p, +4 |
| enable_time_crop | BOOLEAN | false | — |
| crop_start | STRING | — | |
| crop_end | STRING | — | |
| use_cookies | BOOLEAN | true | — |
| browser_for_cookies | COMBO | firefox | 6 options: chrome, firefox, edge, safari, brave, none |
| download_playlist | BOOLEAN | false | — |
| continue_on_error | BOOLEAN | true | — |
| custom_filenameopt | STRING | %(title)s.%(ext)s | — |
| cookie_fileopt | STRING | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| downloaded_files | STRING | — |
| download_info | STRING | — |