Skip to content

Python script that downloads and saves any of your favorite YouTube videos and playlists. All you need to do is just run the Python script and follow the terminal prompt.

License

Notifications You must be signed in to change notification settings

pH-7/Download-Simply-Videos-From-YouTube

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

47 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“₯ Download Any Videos From YouTube

⚑️ High-Quality YouTube Video & Playlist Downloader πŸŽ₯

Demo. Download any YouTube videos and YouTube playlists

Note

πŸš€ The Ultimate YouTube Downloader

Download single videos, entire playlists, or multiple URLs simultaneously with intelligent concurrent processing and smart organization!

This powerful Python script downloads YouTube content in the highest available quality while handling multiple formats efficiently. Perfect for content creators, educators, and anyone who needs reliable YouTube downloads!

✨ What makes this special?

βš™οΈ Requirements

  • Python v3.7 or higher 🐍
  • FFmpeg installed on your system 🎬
  • YouTube URLs (single videos or playlists) that you have permission to download πŸ“

πŸ“¦ Installation

  1. Clone this repository:

    git clone https://github.com/pH-7/Download-Simply-Videos-From-YouTube.git && cd Download-Simply-Videos-From-YouTube
  2. Install the required Python packages:

    pip install -r requirements.txt
  3. Install FFmpeg:

    • macOS:
      brew install ffmpeg
    • Ubuntu/Debian:
      sudo apt-get install ffmpeg
    • Windows: Download from the FFmpeg website, follow the instructions and add to PATH

πŸͺ„ Usage

Basic Usage

To run the script, use the following command:

python download.py

Single Video Download

Enter a single YouTube URL when prompted:

Enter YouTube URL(s): https://www.youtube.com/watch?v=Hhb8ghB8lMg

For single videos, the script automatically optimizes the process by:

  • ✨ Skipping the concurrent downloads prompt (not needed for single videos)
  • 🎯 Using streamlined single-threaded processing
  • πŸ“ Direct file placement in your chosen directory

Multiple Videos Download πŸ†•

You can download multiple videos simultaneously by entering URLs in various formats. The script intelligently parses different input methods:

Method 1: Comma-Separated URLs

Enter YouTube URL(s): https://www.youtube.com/watch?v=Hhb8ghB8lMg, https://www.youtube.com/watch?v=RiCUh_V7Tjg, https://www.youtube.com/watch?v=HcioaU54p08

Method 2: Space-Separated URLs

Enter YouTube URL(s): https://www.youtube.com/watch?v=Hhb8ghB8lMg https://www.youtube.com/watch?v=RiCUh_V7Tjg https://www.youtube.com/watch?v=HcioaU54p08

Method 3: Mixed Format

You can combine commas and spaces in any way:

Enter YouTube URL(s): https://www.youtube.com/watch?v=Hhb8ghB8lMg, https://www.youtube.com/watch?v=RiCUh_V7Tjg https://www.youtube.com/watch?v=HcioaU54p08, https://www.youtube.com/watch?v=ghi789

Method 4: Multi-Line Input

For easier management of many URLs, press Enter without typing anything when prompted, then enter one URL per line:

Enter YouTube URL(s): [Press Enter here]
πŸ“ Multi-line mode activated!
πŸ’‘ Enter one URL per line, press Enter twice when finished:
   URL 1: https://www.youtube.com/watch?v=Hhb8ghB8lMg
   URL 2: https://www.youtube.com/watch?v=RiCUh_V7Tjg
   URL 3: https://www.youtube.com/watch?v=HcioaU54p08
   URL 4: [Press Enter here to finish]

Benefits of Multi-Video Download:

  • ⚑ Concurrent processing: Downloads happen simultaneously (configurable 1-5 workers)
  • πŸ›‘οΈ Independent operations: One failed download won't stop others
  • πŸ“Š Progress tracking: See individual download status and final summary
  • 🎯 Smart validation: Invalid URLs are automatically skipped with warnings
  • 🧠 Intelligent prompting: Concurrent options only appear when downloading multiple videos

MP3 Audio Downloads 🎡

You can download audio-only versions of videos and playlists in high-quality MP3 format:

When prompted during download, choose:

Choose format:
  1. MP4 Video (default)
  2. MP3 Audio only
Enter choice (1-2, default=1): 2

MP3 Features:

  • 🎡 High Quality: 192kbps MP3 extraction using FFmpeg
  • πŸ“ Smart Organization: Works with playlists - creates MP3 files in playlist folders
  • ⚑ Fast Processing: Optimized audio extraction
  • 🎯 Clean Output: Pure MP3 files without video data

Perfect for:

  • Music playlists
  • Podcasts and interviews
  • Educational content
  • Language learning materials

🎡 Playlist Downloads

The script fully supports YouTube playlist downloads with smart organization and concurrent playlist processing!

Single Playlist

Enter YouTube URL(s): https://www.youtube.com/playlist?list=PLxxxxxxx

Multiple Playlists Concurrently πŸš€

Download multiple playlists simultaneously using any input method:

Enter YouTube URL(s): https://www.youtube.com/playlist?list=PLxxxxxx, https://www.youtube.com/playlist?list=PLyyyyyy

Mixed Content Downloads 🎯

Combine videos and playlists in one go:

Enter YouTube URL(s): https://www.youtube.com/watch?v=abc123, https://www.youtube.com/playlist?list=PLxxxxxx, https://www.youtube.com/watch?v=def456

🌟 Playlist Features:

  • πŸ—‚οΈ Smart organization: Each playlist creates its own folder named after the playlist title
  • πŸ”’ Numbered files: Videos are numbered according to their playlist order
  • ⚑ Concurrent playlist downloads: Multiple playlists download simultaneously
  • πŸ“Š Progress tracking: See individual playlist progress and video counts
  • πŸ›‘οΈ Error resilience: Failed videos in a playlist won't stop the entire playlist download

πŸ“ File Structure Example:

downloads/
β”œβ”€β”€ My Awesome Playlist/
β”‚   β”œβ”€β”€ 01-First Video.mp4
β”‚   β”œβ”€β”€ 02-Second Video.mp4
β”‚   └── 03-Third Video.mp4
β”œβ”€β”€ Another Great Playlist/
β”‚   β”œβ”€β”€ 01-Another Video.mp4
β”‚   └── 02-Last Video.mp4
└── Individual Video.mp4

Advanced Options

List Available Formats

To see what video formats are available for a specific video:

python download.py --list-formats

Concurrent Downloads (Multiple Videos Only)

When downloading multiple videos, the script will prompt you to choose concurrent workers (1-5, default: 3):

Number of concurrent downloads (1-5, default=3): 5

Note: This prompt only appears when downloading multiple videos. Single video downloads are automatically optimized for best performance.

The script will:

  1. Prompt for YouTube URL(s) (single video, playlist, or multiple URLs)
  2. Ask for an output directory (optional)
  3. Smart prompting: Ask for concurrent downloads only when downloading multiple videos
  4. Download content simultaneously in the highest available quality (for multiple videos)
  5. Organize content appropriately:
    • Single videos: Saved directly in the output directory
    • Playlists: Organized in a playlist-named folder with numbered files
    • Multiple videos: All saved to the same output directory
  6. Provide a detailed summary of successful and failed downloads

🌟 Key Features:

  • ✨ Support for single videos, playlists, and multiple URLs simultaneously (including multiple playlists)
  • πŸŽ₯ High-quality video and audio downloads (up to 1080p)
  • 🎡 MP3 audio-only downloads with high-quality 192kbps extraction
  • πŸ“ Organized folder structure with smart playlist handling
  • ⚑ Unlimited concurrent downloading for videos and playlists - ideal for super-fast batch downloads
  • πŸ”„ Format conversion to MP4 or MP3
  • πŸ›‘οΈ Error handling and recovery with detailed reporting
  • πŸ“Š Download progress tracking and summary reports
  • 🎯 Smart URL parsing and validation
  • 🧠 Intelligent UX: Relevant prompts only when applicable

Usage Examples

Download single video:

python download.py
# Enter: https://www.youtube.com/watch?v=Hhb8ghB8lMg
# Note: No concurrent downloads prompt - automatically optimized!

Download multiple videos (comma-separated):

python download.py
# Enter: https://www.youtube.com/watch?v=Hhb8ghB8lMg, https://www.youtube.com/watch?v=RiCUh_V7Tjg
# Concurrent downloads prompt will appear

Download multiple playlists simultaneously:

python download.py
# Enter: https://www.youtube.com/playlist?list=PLxxxxxx, https://www.youtube.com/playlist?list=PLyyyyyy
# Each playlist will be downloaded concurrently in its own organized folder!

Download mixed content (videos + playlists):

python download.py
# Enter: video_url1, playlist_url1, video_url2, playlist_url2
# Smart organization: Videos go to main folder, playlists get their own folders

Download multiple videos (space-separated):

python download.py
# Enter: https://www.youtube.com/watch?v=Hhb8ghB8lMg https://www.youtube.com/watch?v=RiCUh_V7Tjg
# Concurrent downloads prompt will appear

Download multiple videos (mixed format):

python download.py
# Enter: url1, url2 url3, url4 url5
# Concurrent downloads prompt will appear

Download multiple videos (multi-line):

python download.py
# Press Enter when prompted, then:
# URL 1: https://www.youtube.com/watch?v=Hhb8ghB8lMg
# URL 2: https://www.youtube.com/watch?v=RiCUh_V7Tjg
# URL 3: [Press Enter to finish]
# Concurrent downloads prompt will appear

Download with custom concurrent settings:

python download.py
# Enter multiple URLs using any method above
# Choose output directory: /Users/john/Videos
# Choose concurrent downloads: 5 (only for multiple videos)

Debug format issues:

python download.py --list-formats
# Enter problematic URL to see available formats

πŸ› οΈ Configuration

You can modify the following in the script:

  • Video format preferences (currently limited to 1080p max)
  • Maximum concurrent downloads (1-5 workers, automatically applied only for multiple videos)
  • Output directory structure
  • Post-processing options
  • Retry attempts for failed downloads

🧹 Optional: Clean Up Incomplete Downloads

If you ever experience interrupted downloads (e.g., due to network issues or stopping the script), you may find leftover .part or .ytdl files in your downloads/ folder. These are incomplete files and can be safely removed.

A utility script, cleanup_downloads.py, is included to help you quickly clean up these incomplete files:

python cleanup_downloads.py

This will scan your downloads/ directory and remove any partial or temporary files, leaving only your completed videos and audio files. Most users will not need this, but it's handy for keeping your downloads folder tidy after interruptions.

πŸ‘¨β€πŸ³ Who cooked this?

Pierre-Henry Soria

Pierre-Henry Soria. A passionate software AI engineer who loves automating content creation! πŸš€ Enthusiast for YouTube, photography, AI, learning, and health! 😊 Find me at pH7.me πŸš€

β˜•οΈ Do you enjoy this project? Offer me a coffee (spoiler alert: I love almond flat white! πŸ˜‹)

@phenrysay pH-7 YouTube Tech Videos

🀝 Contributing

Contributions to this project are welcome. Please fork the repository and submit a pull request with your changes.

βš–οΈ License

Download Simply Videos From YouTube is generously distributed under the MIT License πŸŽ‰ Enjoy!

⚠️ Disclaimer

This script is for educational purposes only. Please ensure you have the right to download any content and comply with YouTube's terms of service when using this script.

About

Python script that downloads and saves any of your favorite YouTube videos and playlists. All you need to do is just run the Python script and follow the terminal prompt.

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

  •  

Languages