Welcome to the YouTube Batch Downloader! This repository provides an automated, highly efficient system to bulk download high-resolution YouTube videos (up to 4K) and massive playlists.
Powered by the robust yt-dlp library, this setup utilizes aria2c for lightning-fast multi-threaded downloading and intelligent auto-sorting to organize your files seamlessly. Whether you are a developer or a complete beginner, this guide will get you up and running in minutes.
- 🧠 Smart Auto-Sorting: Automatically scans your URLs and routes downloads to specific folders (
YT-Knowledge,YT-Entertainment, or standardDownloads) based on the Playlist ID. - ⚡ Lightning Fast Speeds: Integrates
aria2cwith 16 concurrent connections per file to max out your internet bandwidth. - 🛡️ Intelligent Cookie Management: Bypasses YouTube's strict anti-bot measures by prioritizing local
cookies.txtfiles for huge playlists, with an automatic fallback to your default browser cookies. - 💾 Crash-Proof Resuming: Utilizes a
downloaded_archive.txttracker. If your internet drops or you close the script, it will instantly resume where it left off without downloading duplicates. - ⚙️ Zero-Touch Windows Setup: The included PowerShell script automatically installs and updates all required background tools via Scoop.
If you are on Windows 10 or 11, the provided .ps1 script handles almost everything for you. It automatically checks for and installs the necessary packages (yt-dlp, ffmpeg, aria2, deno).
Since the primary automation script is written in Windows PowerShell, Mac and Linux users will need to install the core dependencies manually before running yt-dlp via terminal.
Please install the following prerequisites using your system's package manager (like Homebrew for macOS or APT for Ubuntu), or download them directly:
- Python (Required to run yt-dlp)
- FFmpeg (Required for merging high-quality video and audio tracks)
- yt-dlp (The core downloading engine)
- Aria2 (The download accelerator)
- Deno (Required for specific web scraping tasks)
Navigate to the script/ folder and open the YT-url.txt file[cite: 4]. Paste the YouTube URLs (single videos or full playlists) you want to download.
- Rule: Place exactly one URL per line.
- (Note: Any line starting with a
#is treated as a comment and will be ignored by the script).
YouTube frequently blocks automated mass downloads. To prevent the script from crashing during massive batch downloads (100+ videos), you must authenticate the session:
- Install the Get cookies.txt LOCALLY extension on Chrome or Firefox.
- Open a Private / Incognito window in your browser.
- Log in to your YouTube account, then navigate to
youtube.com/robots.txt(a blank page that prevents background scripts from expiring your session early). - Click the extension icon and export your
cookies.txtfile. - Move this
cookies.txtfile into thescript/folder, placing it right next to the.ps1script[cite: 4]. - Close the Incognito window completely to "freeze" the session.
If you skip this step, the script will attempt to fall back and extract cookies directly from your active Firefox browser.
- Windows: Right-click the
yt-batch-HighRes4K.ps1file inside thescript/folder and select Run with PowerShell[cite: 4]. - macOS/Linux: You can read the parameters inside the
.ps1file and execute theyt-dlpcommands natively in your terminal.
Once the process finishes successfully, the script will automatically wipe the YT-url.txt file clean, ready for your next batch! All files are saved by default to your OS Downloads folder.
script/- The active working directory containing the main PowerShell script, the URL text file, and your cookies file[cite: 4].Old/- An archive directory for legacy scripts and outdated configuration references[cite: 4].
Legacy Configuration Paths (For Reference Only)
If you are looking to manually configure yt-dlp outside of the provided script, standard configuration files (yt-dlp.conf) are historically placed here[cite: 4]:
- Windows:
C:\Users\<YourName>\yt-dlp.confor%APPDATA%\yt-dlp\config.txt[cite: 4] - Linux/macOS:
~/.config/yt-dlp/config[cite: 4] - See the Official yt-dlp Configuration Docs for more details.[cite: 4]
Found a bug? Have an idea for a new feature? Feel free to open an Issue or submit a Pull Request (PR)! Contributions are highly encouraged and always welcome.
Maintainer: Monish Soni
📧 Email: sonimonish00[at]gmail[dot]com
🔗 LinkedIn: 🔗monishsoni
🐦 Twitter/X: @MonishSoni95
This project wouldn't be possible without the incredible open-source community. Massive thanks to:
- The developers and maintainers of yt-dlp for creating the ultimate media downloader.
- The team behind Aria2 for the ultra-fast download engine.
- The creators of FFmpeg for the flawless media processing.
- Special thanks to the RapidSeedBox Complete Guide for providing excellent foundational documentation on maximizing yt-dlp's potential.