A powerful command-line tool for downloading videos, audio, PDFs, and images from YouTube and direct URLs. Built with yt-dlp, urllib, and Python threading, it supports multi-threaded downloads, file-type filtering, and YouTube audio-only mode.
- 🎬 YouTube support – Download videos or audio-only
- 🌐 Direct URL support – PDFs, images, MP3s, MP4s
- 🔁 Pause/Resume – Works with Range headers
- ⚙️ Multi-threaded – Parallel downloads with configurable threads
- 📁 Custom output – Choose your download directory
- 🎧 Audio-only mode – Extract audio from YouTube videos
- 🔍 File-type filters – Only download PDFs, images, audio, etc.
- 📊 Progress bar – Powered by
tqdm
- Python 3.8+
- FFmpeg (for YouTube audio/video merging)
git clone https://github.com/yourusername/video-downloader.git
cd video-downloader
pip install -r requirements.txtpython main.py [URL1] [URL2] ... [OPTIONS]python main.py "https://www.youtube.com/watch?v=dQw4w9WgXcQ" --output "E:/Downloads"python main.py "https://www.youtube.com/watch?v=dQw4w9WgXcQ" --audio-only --types audiopython main.py "URL1" "URL2" "URL3" --threads 3python main.py "URL1" "URL2" --types audio pdfpython main.py "https://download.samplelib.com/mp4/sample-5s.mp4" --types video --output "E:/Downloads"| Flag | Description | Default |
|---|---|---|
| -o, | --output Output directory | ./downloads |
| -t, | --threads Number of parallel download threads | 2 |
| --types | Allowed file types: audio, pdf, image, video | None (all allowed) |
| --audio-only | Only download audio (YouTube only) | False |
🎞️ .mp4, .webm, .avi (video)
🎵 .mp3, .wav, .aac (audio)
🖼️ .jpg, .png, .webp (image)
📄 .pdf, .docx, .txt (document)
❌ DRM-protected videos: Cannot be downloaded
📺 TV/client formats: May be skipped (yt-dlp#12563)
🌐 Missing formats: If not available via web client (yt-dlp#12482)
Ensure FFmpeg is installed:
ffmpeg -versionCheck the format settings in YouTubeDownloader (in downloader.py):
'format': 'bestaudio+bestvideo/best'yt-dlp – Download engine
FFmpeg – Video/audio processing
tqdm – Progress bars
colorama – Terminal color output




