Skip to content

A simple full-stack web app to download YouTube videos or audio. Built with React, Node.js, and yt-dlp, it lets you paste a link, choose quality, and download instantly with a clean Material-UI interface.

License

Notifications You must be signed in to change notification settings

Mrtracker-new/YT-Downloader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

168 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

YouTube Downloader Logo

🍿 YouTube Downloader

The fast, fancy, and free way to hoard your favorite videos!

Made with React Node.js TypeScript License: MIT

Crafted with 💖 and ☕ by Rolan Lobo


Yo! What is this? 👋

Welcome to the YouTube Downloader! You know those times when your internet acts like it’s from the 90s, but you really need to watch that cat video in 4K? Yeah, I got you.

This isn't just another downloader; it's a private cinema builder. Paste a link, click a button, and boom—video is yours. No ads, no malware, no weird popups asking for your mother's maiden name. Just you and your video files.

⚠️ The Boring Legal Stuff: Serious note though—use this for personal stuff and specific educational purposes only. Don't go stealing people's hard work. Respect the creators! 🙏

🚀 Why is this one cooler?

Start your engines, because we are packing:

  • 🎥 4K & 8K Support: Download pixels you didn't even know existed.
  • 🧠 Smart Merging: The backend now auto-detects when it needs to glue video and audio together like a pro. Validates files so you don't get empty duds!
  • 🛡️ Crash-Proof: We used to crash browsers with 8K videos (oops). Now we use Native Downloads, so you can download massive files without Chrome throwing a tantrum.
  • 🎵 MP3 Magic: Just want the tunes? We strip the audio cleaner than a banana.
  • Supersonic Speed: Optimized buffers and parallel chunks. Zoom zoom.
  • 🧹 Self-Cleaning: The server cleans up its own mess (temp files) so your hard drive doesn't explode.
  • 📱 QR Code Sharing: Generate a magical QR code that your phone can scan to download videos directly. No more "send it to yourself" emails! Perfect for moving videos from your PC to phone in 2 seconds flat.
  • 💚 Wake Server Button: Using Render's free tier? (Smart choice, btw!) The server takes naps after 15 minutes. Just hit the "Wake Server" button to poke it awake. Has a 30-second cooldown so you can't spam it (trust me, we tried).
  • 🎯 Smart Queue System: Downloads are managed through an intelligent queue that prevents server overload. Default limit is 3 concurrent downloads, but you can configure this via environment variables. See Configuration below!

🎯 Smart Download Queue

To keep your server happy and prevent it from melting, we've added a queue system:

  • Default Limit: 3 concurrent downloads (configurable)
  • Queue Management: Requests beyond the limit are automatically queued
  • Position Tracking: Know exactly where you are in line
  • Auto-Progression: As downloads complete, queued items start automatically
  • Timeout Protection: Queued requests timeout after 5 minutes by default

Configuration Options (in .env):

MAX_CONCURRENT_DOWNLOADS=3  # Max simultaneous downloads
MAX_QUEUE_SIZE=20           # Max items that can be queued
QUEUE_TIMEOUT_MS=300000     # Time before queued item expires (5 min)

API Endpoint:

GET /api/video/queue/:downloadId  # Check queue status for a download
GET /api/video/queue              # Get overall queue statistics

🔄 Cross-Device Magic (QR Code Feature)

Ever download a video on your laptop and then need it on your phone? We feel you.

Here's the deal:

  1. Download a video on your computer
  2. Click the QR Code button that appears
  3. Scan it with your phone
  4. BAM! Video downloads straight to your phone

No cables, no cloud storage, no emailing yourself. Just pure wireless wizardry. ✨

🛌 Wake Server Button (Render Users)

If you're using Render's free tier (no judgment, we respect the hustle), the server goes to sleep after 15 minutes of inactivity. It's like a lazy cat.

How to wake it:

  • Look for the green "Wake Server" button in the navbar
  • Give it a click
  • Wait ~10-30 seconds while the server yawns and stretches
  • See the success message ✅
  • Download videos like normal!

The button has a 30-second cooldown after each wake to prevent accidental spam (and to give the server time to make its morning coffee ☕).

💡 Pro Tip: Localhost is King 👑

Listen up, friend. While the Render deployment is awesome for showing off and sharing with friends, if you want the ULTIMATE EXPERIENCE™, run this baby on localhost.

Why localhost wins:

  • 🚀 No timeouts: Render's free tier cuts you off at 30 seconds. Localhost? Unlimited power.
  • 🎬 8K downloads: Yep, the ridiculously huge files work perfectly on localhost. Render free tier might give up halfway.
  • Blazing fast: No internet roundtrip means your downloads are limited only by YouTube's servers, not Render's.
  • 🛌 Never sleeps: Your local server doesn't nap after 15 minutes. It's always awake and ready.
  • 💾 Storage heaven: Download as many videos as your hard drive can handle. No cloud storage limits.

The honest truth? If you're seriously building a video library or downloading longer videos, just clone this repo and run it locally. Takes 5 minutes to set up, gives you superpowers forever.

TL;DR: Render = convenience for showing friends. Localhost = unleashed beast mode. 🦁

🛠️ The Techy Bit (For the code wizards)

Built with the holy trinity:

  • Starship Enterprise: React + TypeScript + Material-UI (Frontend)
  • Engine Room: Node.js + Express (Backend)
  • The Muscle: yt-dlp + FFmpeg (The heavy lifters)

📦 What do you need?

Just a few basics. No PhD required.

  • Node.js (v18+) - Get it
  • FFmpeg - Get it (The magic sauce for audio handling)
  • Git - To snag the code.

🏃‍♂️ Let's Get Running!

1. Steal (Clone) the Code

git clone https://github.com/Mrtracker-new/YT-Downloader.git
cd YT-Downloader

2. Feed the Beast (Install Stuff)

Open a terminal and run:

# Set up the brain (Backend)
cd server
npm install

# Set up the face (Frontend)
cd ../client
npm install

3. Ignition (Run it)

Terminal 1 (The Brains):

cd server
npm run dev
# It listens on port 5000 mainly. It likes port 5000.

Terminal 2 (The Beauty):

cd client
npm run dev
# Opens your gateway to video heaven on localhost:3000

Boom! Go to http://localhost:3000 and start hoarding. 🎉


🐛 Something broke?

"It says 'Failed to fetch'!"

  • Is the video private?
  • Is your internet acting up?
  • Did YouTube change their algorithm again? (They do that).
  • Run npm update in the server folder and pray.

"Where's the audio?"

  • Do you have FFmpeg installed? Type ffmpeg -version in your terminal. If it yells at you, go install it.

"The progress bar stuck!"

  • Wait for it... it's probably merging the audio and video. Huge files take a sec. We added a "Merging..." status so you know we haven't ghosted you.

🤝 Wanna Help?

Found a bug? Want to make it make coffee?

  1. Fork it
  2. Hack it (git checkout -b feature/coffee-maker)
  3. Ship it (git commit -m 'Adds caffeine support')
  4. Push it (git push origin feature/coffee-maker)
  5. PR it

📝 License

MIT License. Basically, do whatever you want, just don't blame me if your computer becomes sentient.


Built with a lot of ❤️ and slightly too much caffeine by Rolan Lobo

Star this repo if it saved your data plan!

Happy Downloading! 🎬

About

A simple full-stack web app to download YouTube videos or audio. Built with React, Node.js, and yt-dlp, it lets you paste a link, choose quality, and download instantly with a clean Material-UI interface.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages