Post

ytpi Downloader - Automating YouTube Downloads on Your Home Server

ytpi Downloader - Automating YouTube Downloads on Your Home Server

What is ytpi Downloader?

ytpi Downloader is a lightweight web application designed to automate the process of downloading YouTube videos and playlists directly to your home server or Raspberry Pi. Built with Flask and powered by yt-dlp, it provides a simple web interface for submitting download jobs, organizing content by category, and monitoring download status—all from your local network.

You can view the code here: https://github.com/joescars/ytpi

Why Did I Build This?

Like many tech enthusiasts, I often find myself wanting to save educational videos, music performances, or tutorials for offline viewing. Manually running download commands on the server was tedious, especially when managing multiple categories or playlists. I wanted a solution that:

  • Lets me submit video URLs from any device on my LAN
  • Organizes downloads into folders by category
  • Shows live status and output for each job
  • Restricts access to my local network for privacy and security

ytpi Downloader solves all these problems with a clean dashboard and a simple form for submitting jobs.

Key Features

  • Web Form Submission: Easily submit single videos or entire playlists for download via a browser.
  • Category Organization: Choose a category for each download, and the app automatically sorts files into the right folders.
  • Live Status Dashboard: Monitor the progress and output of each download job in real time.
  • Local Network Security: Only devices on your LAN can access the app, keeping your downloads private.
  • API Support: Advanced users can submit jobs via API calls for automation or integration with other tools.

How Does It Work?

  1. Submit a Job: Enter a YouTube URL and select a category. The app queues the job for downloading.
  2. Background Worker: A background thread picks up jobs and runs yt-dlp to download the video or playlist, saving it in the appropriate folder.
  3. Status Updates: The dashboard displays all jobs, their status (queued, downloading, finished, error), and recent output logs.
  4. Access Control: The app checks your IP address and only allows requests from local network ranges.

Why Is This Useful?

  • Offline Access: Download videos for offline viewing, perfect for travel or areas with unreliable internet.
  • Centralized Library: Build a personal media library organized by topic, accessible from any device on your network.
  • Automation: Integrate with scripts or other apps to automate downloads (e.g., for podcasts, lectures, or recurring playlists).
  • Privacy: Keep your downloads private and avoid third-party services or browser extensions.

Final Thoughts

ytpi Downloader is a practical tool for anyone who wants to automate YouTube downloads on their home server. It saves time, keeps your media organized, and puts you in control of your content. If you have a Raspberry Pi or any always-on server, give it a try and enjoy hassle-free video downloads!

This post is licensed under CC BY 4.0 by the author.