YouTube Advanced Downloader

anas k
2025-02-23T16:32:57Z

Advanced YouTube video downloader with quality selection and progress tracking

YouTube Advanced Downloader

A powerful YouTube video downloader that combines a userscript frontend with a secure backend server. Download videos in various formats and qualities directly from YouTube's interface.

🌟 Features

Frontend (Userscript)

📥 One-click video downloads from any YouTube page

🖱️ Right-click context menu on video thumbnails

🎚️ Multiple quality options (1080p to 144p)

🎵 Audio-only download support

📊 Real-time download progress indicator

🌙 Dark theme UI that matches YouTube

⚙️ Easy configuration interface

🔔 Desktop notifications

🔄 Works with YouTube's dynamic navigation

Backend Server

🔐 Secure API key authentication

📹 Multiple video quality options

🎯 Smart format selection

📝 Detailed video information

🔄 Automatic yt-dlp updates

🚀 Direct streaming support

⚙️ Setup Instructions

1. Backend Server Setup

Backend Repository: youtubeApiDownloader

Prerequisites

Node.js (v18 or higher)

Python 3

yt-dlp

ffmpeg

Installation Steps

1. Clone the backend repository:

git clone https://github.com/anassk01/youtubeApiDownloader
cd youtubeApiDownloader

2. Install Node.js dependencies:

npm install

3. Install system dependencies:

For Ubuntu/Debian:

sudo apt update
sudo apt install python3 ffmpeg
pip3 install yt-dlp

For Fedora:

sudo dnf install python3 ffmpeg
pip3 install yt-dlp

1. Configure environment:

# Create .env file with your secure API key
echo "API_KEY=your_generated_64_character_key" > .env

2. Start the server:

# Development
npm run dev
# Production
npm start

2. Userscript Installation

1. Install a userscript manager:

Tampermonkey for Chrome

Tampermonkey for Firefox

2. Install this userscript

3. Configure the script:

Click Tampermonkey icon

Select "⚙️ Configure"

Enter your backend API key and URL

Save configuration

🎯 Usage

Quick Download

1. Go to any YouTube video

2. Click Tampermonkey icon

3. Select "📥 Download Video"

4. Choose quality

5. Click "Download" or "Get Link"

Context Menu Download

1. Right-click any video thumbnail

2. Select "📥 Download Video"

3. Choose quality

4. Select download option

🛠️ Available Quality Options

Audio Only (M4A)

144p

240p

360p

480p

720p

1080p

Highest Quality

🔒 Security Features

Secure API key storage

HTTPS support

Request validation

Error handling

Safe file downloads

⚠️ Important Notes

Keep your API key secure

Don't share your configured userscript

Use HTTPS in production

Monitor API usage

Regularly update yt-dlp

🚀 Deployment Options

Railway Deployment

1. Fork the backend repository

2. Create new Railway project

3. Connect your GitHub repository

4. Add environment variables:

API_KEY: Your secure API key

5. Deploy!

Docker Deployment

# Build
docker build -t youtube-api-dl .
# Run
docker run -p 3000:3000 --env-file .env youtube-api-dl

🔧 Troubleshooting

Check API key configuration

Verify backend server is running

Ensure yt-dlp is updated

Check browser console for errors

Verify sufficient disk space

📝 License

MIT License - Feel free to modify and distribute while maintaining attribution.

🤝 Support

Backend issues: Visit the GitHub repository

Userscript issues: Comment on the Greasy Fork page

General questions: Open a GitHub issue

🔄 Updates

Backend: Pull latest from GitHub

Userscript: Auto-updates through Tampermonkey

yt-dlp: Automatically updates on server start