Skip to content

About

Youtube video download using python

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

Repository files navigation

🚀 YT Downloader Pro

A professional, feature-rich YouTube Downloader built for Termux and Linux with a modern, interactive terminal user interface powered by rich, prompt_toolkit, and yt-dlp.


🌟 Key Features

  • 🎥 High-Definition Video Downloads: Download videos up to 4K / 1080p 60fps with ease.
  • 🎵 Smart Audio Matching: Automatically selects and pairs the highest quality audio stream for your chosen video stream.
  • ⚡ Dual Progress Dashboard: Concurrent video & audio stream downloading with real-time speed, ETA, and CPU/RAM resource monitoring.
  • 🛠️ Seamless Stream Merging: Merges video and audio losslessly using FFmpeg.
  • 📱 Termux Storage Optimized: Direct saving to Android /sdcard/Download/YTDownloader or Linux download directories.
  • 🔍 Interactive Quality Selection: Clean, color-coded tabular view for available resolutions and codecs.

📋 Prerequisites

Before installing, ensure your environment has the required dependencies:

  1. Python 3.8+: Language runtime.
  2. FFmpeg: Required for merging separate high-definition video & audio streams.
  3. Storage Access (Termux only): Permission to write downloaded files to your Android internal storage.

📥 Installation Guide

📱 Option A: Installation on Termux (Android)

Open Termux and run the following commands line by line:

# 1. Update package list and install required system packages
pkg update && pkg upgrade -y
pkg install python git ffmpeg -y

# 2. Grant Termux storage access (Required to save videos to downloads)
termux-setup-storage

# 3. Clone the repository
git clone https://github.com/soumik183/Ytdownloder.git
cd Ytdownloder

# 4. Install Python dependencies and package
pip install -r requirements.txt
pip install -e .

🐧 Option B: Installation on Linux (Ubuntu / Debian / Arch / Fedora)

Open your Linux terminal and run:

# 1. Install system dependencies (Debian/Ubuntu)
sudo apt update && sudo apt install python3 python3-pip git ffmpeg -y

# 2. Clone the repository
git clone https://github.com/soumik183/Ytdownloder.git
cd Ytdownloder

# 3. Install Python dependencies and package
pip install -r requirements.txt
pip install -e .

🎯 How to Run

Once installed, you can launch the application using any of the following methods:

Method 1: Using the global command (If installed via pip install -e .)

ytdownloader

or shorthand:

ytdownh

Method 2: Running via Python script directly

python3 main.py

💡 How It Works (Step-by-Step)

  1. Launch App: Start ytdownloader or python3 main.py.
  2. Enter URL: Paste any valid YouTube video link when prompted.
  3. Metadata View: The app fetches and presents video title, channel name, duration, and view count.
  4. Select Resolution: Pick your preferred video quality (e.g. 1080p 60fps, 720p, 480p) from the interactive table.
  5. Download & Merge: Watch real-time dual progress bars for video & audio downloads. FFmpeg will automatically combine them into a single high-quality video file.
  6. Access File: Find your downloaded video in:
    • Termux: /sdcard/Download/YTDownloader/
    • Linux: ~/Downloads/YTDownloader/ or current directory.

🛠️ Troubleshooting & Tips

Tip

Keep yt-dlp Updated
YouTube frequently updates its service. If video fetching fails, update yt-dlp to the latest version by running:

pip install --upgrade yt-dlp

Warning

FFmpeg Missing Error
If you see ❌ FFmpeg is missing!, install FFmpeg manually:

  • Termux: pkg install ffmpeg
  • Ubuntu/Debian: sudo apt install ffmpeg

Important

Termux Permission Denied
If downloads fail due to storage permission issues in Termux, run:

termux-setup-storage

And accept the storage permission prompt on your Android screen.


📂 Project Structure

Ytdownloder/
├── main.py                     # Main CLI execution entry point
├── setup.py                    # Package installation & command setup
├── requirements.txt            # Python dependencies
├── README.md                   # Documentation
└── ytdownloader/               # Core application source code
    ├── cli.py                  # CLI controller workflow
    ├── downloader.py           # yt-dlp metadata and stream download engine
    ├── ffmpeg_utils.py         # FFmpeg stream merging utilities
    ├── format_parser.py        # Stream parsing & audio pairing logic
    ├── system_stats.py         # CPU/RAM system monitor
    └── ui/                     # Terminal UI components (rich banners, tables, progress)

📜 License

This project is open source and available under the MIT License.

About

Youtube video download using python

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages