Nodes/Download Tools for ComfyUI/YouTube Downloader (yt-dlp)
ComfyUI Node

YouTube Downloader (yt-dlp)

Grab any video — YouTube to TikTok — audio or 4K, straight from the graph

By EricRollei·Created 9 months ago·Updated 7 months ago· 6
YouTube Downloader (yt-dlp)
    • output_dir
    • summary
    • download_count
    • success
    url_list# Enter URLs here, one per line # Example: # https://www.youtube.com/watch?v=example # https://soundcloud.com/user/track
    output_dir./yt-dlp-output
    batch_file
    config_path
    cookie_file
    use_browser_cookiestrue
    browser_namefirefox
    use_download_archivetrue
    archive_file./yt-dlp-archive.txt
    format_selectorbest
    extract_audiofalse
    audio_formatmp3
    audio_quality192
    download_subtitlesfalse
    subtitle_langsen
    embed_subtitlesfalse
    write_info_jsontrue
    organize_filestrue
    rate_limit
    concurrent_fragments1
    playlist_start
    playlist_end
    extra_options

    The YouTube Downloader (YtDlpDownloader, from the Download Tools pack) is a ComfyUI face on yt-dlp, the go-to tool for pulling video and audio from 1800+ platforms - YouTube, Vimeo, Twitch, TikTok, SoundCloud, the works. You paste a URL, pick a quality, and the video lands in a folder. In a ComfyUI context it's a reference and dataset node: grab source footage to upscale, pull frames for training or video-gen projects, or just collect videos you want to process later. It sits at the edge of the graph and feeds your disk, not the sampler.

    Like its sibling gallery-dl node, this one is a wrapper - it builds a yt-dlp command from your settings and runs it as a subprocess. That's a feature, not laziness: yt-dlp is one of the most actively maintained downloaders on the internet, and wrapping it means every site fix and format change lands in your workflow the moment you update the package, with none of the node's own logic to rot.

    The inputs that matter

    • url_list - required, one URL per line (# for comments). Works for single videos, playlists, channels.
    • output_dir - where files go (default ./yt-dlp-output, relative to ComfyUI's output folder).
    • format_selector - the one you'll fiddle with most. best grabs highest quality; best[height<=1080] caps at 1080p; bestaudio gets audio only; mp4/webm pin the container. If you know yt-dlp's format syntax you can type something custom here too.
    • extract_audio + audio_format / audio_quality - rip audio to mp3, flac, opus, whatever. Requires FFmpeg.
    • use_browser_cookies / browser_name - for age-restricted or private content. Firefox works without admin rights; Chrome/Edge need the browser closed and ComfyUI running elevated.
    • use_download_archive - on by default, writes yt-dlp-archive.txt so re-runs skip what's already saved. Re-running a large playlist after a crash is painless.

    Worth a look in the optional tab: download_subtitles + subtitle_langs, playlist_start / playlist_end for slicing a playlist, rate_limit (e.g. 1M to cap at 1 MB/s so you don't swamp your connection), and extra_options for raw yt-dlp flags like --write-thumbnail --embed-metadata.

    The outputs

    output_dir (STRING) and summary (STRING) tell you where things landed and what happened; download_count (INT) and success (BOOLEAN) let you route follow-up nodes in the graph if you're chaining anything after the download.

    Installing it

    Via ComfyUI Manager, search "Download Tools," or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/EricRollei/Download_Tools
    cd Download_Tools && pip install -r requirements.txt
    

    yt-dlp installs as a Python dependency. The one real requirement beyond that is FFmpeg for anything audio-related (and it's strongly recommended in general - modern YouTube streams often need it to merge separate video/audio tracks). On Windows choco install ffmpeg, on macOS brew install ffmpeg, on Linux apt-get install ffmpeg, and make sure it's on PATH.

    Where it bites

    • Audio extraction fails - FFmpeg missing, or not on PATH. Check with ffmpeg -version.
    • Age-restricted or private videos error out - you need cookies. The node can pull them from your browser, or you can pass a cookies file.
    • Weird "format not available" errors - your yt-dlp is stale. Sites change constantly; pip install -U yt-dlp fixes most strange failures because the node just inherits whatever yt-dlp version you have.
    • Downloads racing your connection - set rate_limit.

    Fair warning, same as the rest of the pack: the license is non-commercial (CC BY-NC 4.0) unless you buy a commercial license, and yt-dlp exists in a legal gray zone in some jurisdictions - downloading content you don't have rights to is on you, not the tool. For your own content, public-domain material, and fair-use cases, this is the fastest way to get web video into a workflow.

    CategoryDownloaders

    Inputs (23)

    NameTypeDefaultDescription
    url_listSTRING# Enter URLs here, one per line # Example: # https://www.youtube.com/watch?v=example # https://soundcloud.com/user/track
    output_dirSTRING./yt-dlp-outputDirectory where downloaded files will be saved
    batch_fileoptSTRINGPath to a text file containing URLs (one per line)
    config_pathoptSTRINGPath to yt-dlp config file
    cookie_fileoptSTRINGPath to Netscape cookies file (for authenticated downloads)
    use_browser_cookiesoptBOOLEANtrueUse browser cookies for authentication (ignored if cookie file is provided)
    browser_nameoptCOMBOfirefoxBrowser to extract cookies from (Firefox works without admin, Chrome/Edge require admin)
    use_download_archiveoptBOOLEANtrueUse archive file to skip already downloaded content
    archive_fileoptSTRING./yt-dlp-archive.txtPath to the download archive file
    format_selectoroptCOMBObestVideo format to download. 'best' gets highest quality, 'bestaudio' gets audio only
    extract_audiooptBOOLEANfalseExtract audio from videos (requires ffmpeg)
    audio_formatoptCOMBOmp3Audio format when extracting audio
    audio_qualityoptCOMBO192Audio quality in kbps (for lossy formats)
    download_subtitlesoptBOOLEANfalseDownload subtitle files
    subtitle_langsoptSTRINGenSubtitle languages to download (comma-separated, e.g., 'en,es,fr' or 'all')
    embed_subtitlesoptBOOLEANfalseEmbed subtitles in video files (requires ffmpeg)
    write_info_jsonoptBOOLEANtrueSave video metadata to JSON files
    organize_filesoptBOOLEANtrueSort downloaded files into subfolders (videos/, audio/, subtitles/, other/)
    rate_limitoptSTRINGMaximum download rate (e.g., '1M' for 1MB/s, '500K' for 500KB/s)
    concurrent_fragmentsoptCOMBO1Number of fragments to download concurrently
    playlist_startoptSTRINGPlaylist start index (leave empty for all)
    playlist_endoptSTRINGPlaylist end index (leave empty for all)
    extra_optionsoptSTRINGAdditional options for yt-dlp (e.g., '--write-thumbnail --embed-metadata')

    Outputs (4)

    NameTypeDescription
    output_dirSTRING
    summarySTRING
    download_countINT
    successBOOLEAN