Skip to content

elpideus/youtube-downloader

Repository files navigation

🎥 YouTube Downloader

A professional, feature-rich web application for downloading YouTube videos and playlists in high quality. Built with Next.js, yt-dlp, and FFmpeg, it features automatic metadata tagging from MusicBrainz, Discogs, and Deezer.

YouTube Downloader

✨ Features

  • High Quality Downloads: Support for various video (MP4, MKV, WebM) and audio (MP3, M4A, FLAC, WAV, OGG) formats.
  • Playlist Support: Download entire playlists as a single ZIP file or individual tracks.
  • Automatic Metadata: Fetches album art, artist, album, and track information using:
  • SponsorBlock Integration: Automatically remove sponsorships, intros, outros, and non-music sections.
  • Smart Caching: Uses Prisma and SQLite to cache metadata lookups for faster subsequent requests.
  • Premium UI: Sleek, responsive design with dark mode support and real-time progress updates.
  • Docker Ready: Easy deployment using Docker and Docker Compose.
  • CasaOS Support: Optimized for CasaOS with built-in metadata and icons.

🛠️ Tech Stack

🚀 Getting Started

Prerequisites

Quick Start (Docker)

  1. Create a directory for your data and start the container:
    mkdir -p data
    docker run -d \
      -p 3000:3000 \
      -v $(pwd)/data:/app/data \
      --name youtube-downloader \
      ghcr.io/elpideus/youtube-downloader:latest

The app will be available at http://localhost:3000.

🏠 CasaOS Installation

  1. Open your CasaOS dashboard.
  2. Click on App Store -> Custom Install.
  3. Paste the contents of docker-compose.yml into the configuration area.
  4. CasaOS will automatically recognize the metadata, icon, and port settings.
  5. Click Install.

⚙️ Configuration

The following environment variables can be configured:

Variable Description Default
DATABASE_URL SQLite connection string file:./data/ytdl.db
FFMPEG_LOCATION Path to FFmpeg binaries (if not in PATH) Optional
YTDLP_PATH Path to yt-dlp binary (if not in PATH) yt-dlp
DISCOGS_TOKEN Discogs API token for metadata Optional
DEEZER_API_KEY Deezer API access token Optional
DEBUG Enable verbose server logging false

📦 Development

Running locally with Node:

# Install dependencies
npm install

# Push database schema
npx prisma db push

# Run development server
npm run dev

📜 License

This project is licensed under the GPLv3 License - see the LICENSE file for details.

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.


Made with ❤️ by elpideus